Skip to content

Commit

Permalink
[NEW] Colors for button-hovers are now saved and loaded from the data…
Browse files Browse the repository at this point in the history
…base

[NEW] A window to show all data to a cosplan when clicked at one
[NEW] Version number will be shown in the lower right corner
[NEW] Extension class for GUI-related extensions
[NEW] Layout class to handle button-hovers from one place
[IMPR] Changed buttons to panels to handle hover-effects by myself
[IMPR] Moved Franchises4Dropdown to DbObjects as it represents data from the database
  • Loading branch information
AokiMiku committed Mar 6, 2020
1 parent 1f19bab commit 3c39a63
Show file tree
Hide file tree
Showing 13 changed files with 470 additions and 84 deletions.
3 changes: 2 additions & 1 deletion ACP/ACP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@
<Compile Include="DbObjects\Einstellungen.cs" />
<Compile Include="DbObjects\Franchises.cs" />
<Compile Include="Extensions.cs" />
<Compile Include="Franchises4Dropdown.cs" />
<Compile Include="DbObjects\Franchises4Dropdown.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UpdateDatabase\Version_0_1_3.cs" />
<Compile Include="Updater.cs" />
<Compile Include="UserSettings.cs" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ public override string ToString()
return this.Name;
}
}
}
}
24 changes: 16 additions & 8 deletions ACP/Resources/ToDo.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
TODO ACP (! - TODO; ? - Testing)

? erledigen
! farben in einstellungen aendern
! neue spalte in cosplans fuer cosplaypartner
! conventions
? alle cosplans anzeigen
? update-funktion
! in franchise dropdown jeweils anzahl anzeigen
!!! Bilder
? erledigen
! Farben in Einstellungen aendern
! neue Spalte in Cosplans fuer Cosplaypartner
! Conventions
? alle Cosplans anzeigen
? update-funktion
! in franchise dropdown jeweils anzahl anzeigen
!!! Bilder
! Tableheader-Buttons durch Labels mit Click-Event ersetzen, um Hover-Effekt leichter zu ändern ... Dockpanel Click-Event?
! Cosplans in Liste filtern



Bilder:
zu welchem cosplay?
anzeigebild (in cosplans)
16 changes: 16 additions & 0 deletions ACP/UpdateDatabase/Version_0_1_3.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
namespace ACP.Datenbankversionen
{
using ApS.Databases.Firebird;

internal class Version_0_1_3 : UpdateDatabase
{
private readonly string CosplansAddErstelltAm = "";
private readonly string CosplansAddAnzeigebild = "";

public Version_0_1_3() : base()
{
base.AddStatements(this.CosplansAddErstelltAm);
base.AddStatements(this.CosplansAddAnzeigebild);
}
}
}
35 changes: 35 additions & 0 deletions ACP/UserSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,41 @@ public static Core.OrderBy LetzteSortierung
}
#endregion

#region Farben
public static string ButtonHover
{
get { return Settings.GetSetting("ButtonHover"); }
set { Settings.SetSetting("ButtonHover", value); }
}

public static string ButtonHoverDefault
{
get { return "Lavender"; }
}

public static string ButtonBackground
{
get { return Settings.GetSetting("ButtonBackground"); }
set { Settings.SetSetting("ButtonBackground", value); }
}

public static string ButtonBackgroundDefault
{
get { return "Transparent"; }
}

public static string SelectedBackground
{
get { return Settings.GetSetting("SelectedBackground"); }
set { Settings.SetSetting("SelectedBackground", value); }
}

public static string SelectedBackgroundDefault
{
get { return "MediumPurple"; }
}
#endregion

#region Updates
public static bool Updates
{
Expand Down
9 changes: 9 additions & 0 deletions ACP_GUI/ACP_GUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,14 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Cosplan.xaml.cs">
<DependentUpon>Cosplan.xaml</DependentUpon>
</Compile>
<Compile Include="Einstellungen.xaml.cs">
<DependentUpon>Einstellungen.xaml</DependentUpon>
</Compile>
<Compile Include="Extensions.cs" />
<Compile Include="Layout.cs" />
<Compile Include="SaveCancel.xaml.cs">
<DependentUpon>SaveCancel.xaml</DependentUpon>
</Compile>
Expand All @@ -83,6 +88,10 @@
<DependentUpon>ApSCosplayplanner.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="Cosplan.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Einstellungen.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down
59 changes: 34 additions & 25 deletions ACP_GUI/ApSCosplayplanner.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<Grid.RowDefinitions>
<RowDefinition Height="5" />
<RowDefinition />
<RowDefinition Height="5" />
<RowDefinition Height="9" />
</Grid.RowDefinitions>

<Grid Grid.Column="1" Grid.Row="1" >
Expand Down Expand Up @@ -50,69 +50,78 @@
<TextBox Name="newFranchise" Width="150" Visibility="Collapsed" KeyDown="NewFranchise_KeyDown" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
<DockPanel >
<Label Width="3"/>
<Button Name="addFranchise" Click="AddFranchise_Click" Background="Transparent" BorderThickness="0" >
<DockPanel Name="addFranchise" MouseLeftButtonUp="AddFranchise_Click" Background="Transparent" MouseEnter="Button_MouseEnter" MouseLeave="Button_MouseLeave" >
<Image Source="Resources/Icons/add.ico" Width="20" />
</Button>
</DockPanel>
<Label Width="3"/>
<Button Name="delFranchise" Click="DelFranchise_Click" Background="Transparent" BorderThickness="0" >
<DockPanel Name="delFranchise" MouseLeftButtonUp="DelFranchise_Click" Background="Transparent" MouseEnter="Button_MouseEnter" MouseLeave="Button_MouseLeave" >
<Image Source="Resources/Icons/del.ico" Width="20" />
</Button>
</DockPanel>
</DockPanel>
</DockPanel>

<Button Name="Einstellungen" Click="Einstellungen_Click" HorizontalAlignment="Stretch" VerticalAlignment="Center" Grid.Row="0" Grid.Column="7" Grid.ColumnSpan="2" Background="Transparent" >
<DockPanel>
<DockPanel Name="Einstellungen" MouseLeftButtonUp="Einstellungen_Click" HorizontalAlignment="Stretch" VerticalAlignment="Center" Grid.Row="0" Grid.Column="7" Grid.ColumnSpan="2" MouseEnter="Button_MouseEnter" MouseLeave="Button_MouseLeave" >
<DockPanel HorizontalAlignment="Center" >
<Image Source="Resources/Icons/wheel.ico" Width="20"/>
<Label Width="3"/>
<TextBlock Text="Einstellungen" />
</DockPanel>
</Button>
</DockPanel>

<DockPanel HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2">
<Label Content="Cosplans: " />
<Button Name="addCosplan" Click="AddCosplan_Click" Background="Transparent" BorderThickness="0" >
<DockPanel Name="addCosplan" MouseLeftButtonUp="AddCosplan_Click" Background="Transparent" MouseEnter="Button_MouseEnter" MouseLeave="Button_MouseLeave" >
<Image Source="Resources/Icons/add.ico" Width="20" />
</Button>
</DockPanel>
<Label Width="3" />
<Button Name="delCosplan" Click="DelCosplan_Click" Background="Transparent" BorderThickness="0" >
<DockPanel Name="delCosplan" MouseLeftButtonUp="DelCosplan_Click" Background="Transparent" MouseEnter="Button_MouseEnter" MouseLeave="Button_MouseLeave" >
<Image Source="Resources/Icons/del.ico" Width="20" />
</Button>
</DockPanel>
</DockPanel>

<Button Name="colNummer" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="1" BorderBrush="Black" Background="Transparent" BorderThickness="0,2" Click="ColNummer_Click">
<DockPanel>
<StackPanel Name="colNummer" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="1" MouseLeftButtonUp="ColNummer_Click">
<Label Background="Black" Height="2" />
<DockPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,12">
<TextBlock Text="Nummer" />
<Label Width="3" />
<Image Name="colNummerIcon" Source="Resources/Icons/arrow_down.ico" Width="20" Visibility="Visible" />
</DockPanel>
</Button>
<Label Background="Black" Height="2" />
</StackPanel>

<Button Name="colName" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="6" BorderBrush="Black" Background="Transparent" BorderThickness="0,2" Click="ColName_Click">
<DockPanel>
<StackPanel Name="colName" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="8" MouseLeftButtonUp="ColName_Click">
<Label Background="Black" Height="2" />
<DockPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,12">
<TextBlock Text="Bezeichnung" />
<Label Width="3" />
<Image Name="colNameIcon" Source="Resources/Icons/arrow_down.ico" Width="20" Visibility="Hidden"/>
</DockPanel>
</Button>
<Label Background="Black" Height="2" />
</StackPanel>

<Button Name="colErledigt" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="2" Grid.Column="7" Grid.ColumnSpan="1" BorderBrush="Black" Background="Transparent" BorderThickness="0,2" Click="ColErledigt_Click">
<DockPanel>
<!--<StackPanel Name="colErledigt" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="2" Grid.Column="7" Grid.ColumnSpan="1" MouseLeftButtonUp="ColErledigt_Click">
<Label Background="Black" Height="2" />
<DockPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,12" >
<TextBlock Text="Erledigt" />
<Label Width="3" />
<Image Name="colErledigtIcon" Source="Resources/Icons/arrow_down.ico" Width="20" Visibility="Hidden"/>
</DockPanel>
</Button>
<Label Background="Black" Height="2" />
</StackPanel>
<Button Name="colBilder" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="2" Grid.Column="8" Grid.ColumnSpan="1" BorderBrush="Black" Background="Transparent" BorderThickness="0,2">
<DockPanel>
<StackPanel Name="colBilder" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="2" Grid.Column="8" Grid.ColumnSpan="1" >
<Label Background="Black" Height="2" HorizontalAlignment="Stretch" />
<DockPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,12" Height="20" >
<TextBlock Text="Bilder" />
</DockPanel>
</Button>
<Label Background="Black" Height="2" HorizontalAlignment="Stretch" />
</StackPanel>-->

<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="9" Grid.RowSpan="6">
<ScrollViewer VerticalScrollBarVisibility="Hidden" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="9" Grid.RowSpan="6">
<StackPanel Name="data" >
</StackPanel>
</ScrollViewer>
</Grid>
<TextBlock Text="0.0.0" Name="version" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Top" FontSize="7" Foreground="Gray" />
</Grid>
</Window>
Loading

0 comments on commit 3c39a63

Please sign in to comment.