Black Theme for the WPF App
This commit is contained in:
BIN
LaDOSE.Src/LaDOSE.DesktopApp/64x64.ico
Normal file
BIN
LaDOSE.Src/LaDOSE.DesktopApp/64x64.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 107 KiB |
@@ -10,7 +10,8 @@
|
||||
<ResourceDictionary>
|
||||
<local:Bootstrapper x:Key="Bootstrapper" />
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Themes\Styles.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>LaDOSE.DesktopApp</RootNamespace>
|
||||
<AssemblyName>LaDOSE.DesktopApp</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
@@ -35,6 +35,9 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>64x64.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Caliburn.Micro, Version=3.2.0.0, Culture=neutral, PublicKeyToken=8e5891231f2ed21f, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Caliburn.Micro.Core.3.2.0\lib\net45\Caliburn.Micro.dll</HintPath>
|
||||
@@ -79,6 +82,8 @@
|
||||
</ApplicationDefinition>
|
||||
<Compile Include="Behaviors\MultiSelectorBehaviours.cs" />
|
||||
<Compile Include="Bootstrapper.cs" />
|
||||
<Compile Include="Themes\LeftMarginMultiplierConverter.cs" />
|
||||
<Compile Include="Themes\TreeViewItemExtensions.cs" />
|
||||
<Compile Include="Utils\PhpSerialize.cs" />
|
||||
<Compile Include="Services\RestService.cs" />
|
||||
<Compile Include="UserControls\BookingUserControl.xaml.cs">
|
||||
@@ -106,6 +111,10 @@
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Page Include="Themes\Styles.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="UserControls\BookingUserControl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -162,7 +171,9 @@
|
||||
<Name>LaDOSE.DTO</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<Resource Include="64x64.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\64x64.png" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace DarkBlendTheme
|
||||
{
|
||||
public class LeftMarginMultiplierConverter : IValueConverter
|
||||
{
|
||||
public double Length { get; set; }
|
||||
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
var item = value as TreeViewItem;
|
||||
if (item == null)
|
||||
return new Thickness(0);
|
||||
|
||||
return new Thickness(Length * item.GetDepth(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
3096
LaDOSE.Src/LaDOSE.DesktopApp/Themes/Styles.xaml
Normal file
3096
LaDOSE.Src/LaDOSE.DesktopApp/Themes/Styles.xaml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace DarkBlendTheme
|
||||
{
|
||||
public static class TreeViewItemExtensions
|
||||
{
|
||||
public static int GetDepth(this TreeViewItem item)
|
||||
{
|
||||
TreeViewItem parent;
|
||||
while ((parent = GetParent(item)) != null)
|
||||
{
|
||||
return GetDepth(parent) + 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private static TreeViewItem GetParent(TreeViewItem item)
|
||||
{
|
||||
var parent = VisualTreeHelper.GetParent(item);
|
||||
|
||||
while (!(parent is TreeViewItem || parent is TreeView))
|
||||
{
|
||||
if (parent == null) return null;
|
||||
parent = VisualTreeHelper.GetParent(parent);
|
||||
}
|
||||
return parent as TreeViewItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,21 +6,24 @@
|
||||
xmlns:local="clr-namespace:LaDOSE.DesktopApp.UserControls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800"
|
||||
|
||||
>
|
||||
<UserControl.Resources>
|
||||
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<ListView Grid.Row ="1" ItemsSource="{Binding Path=Reservation}">
|
||||
<ListView Grid.Row ="1" Margin="2" ItemsSource="{Binding Path=Reservation}">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Background="Green" x:Name="Panel" VerticalAlignment="Stretch" >
|
||||
<Label Content="{Binding Name}"></Label>
|
||||
<StackPanel Orientation="Horizontal" x:Name="Panel" VerticalAlignment="Stretch" >
|
||||
<Label x:Name="Name" Content="{Binding Name}">
|
||||
|
||||
</Label>
|
||||
</StackPanel>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding Valid}" Value="False">
|
||||
<Setter TargetName="Panel" Property="Background" Value="Red" />
|
||||
<DataTrigger Binding="{Binding Valid}" Value="True">
|
||||
<Setter TargetName="Name" Property="Foreground" Value="Green" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
xmlns:cal="http://www.caliburnproject.org"
|
||||
Icon="{Binding Path=AppIcon}"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
d:DesignHeight="450" d:DesignWidth="800"
|
||||
Style="{StaticResource {x:Type Window}}">
|
||||
<Window.Resources>
|
||||
|
||||
</Window.Resources>
|
||||
@@ -53,11 +54,20 @@
|
||||
<TabControl Grid.Row="1" x:Name="Items">
|
||||
<TabControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding DisplayName}" />
|
||||
<Button Content="X"
|
||||
cal:Message.Attach="DeactivateItem($dataContext,'true')" />
|
||||
</StackPanel>
|
||||
<DockPanel>
|
||||
<TextBlock HorizontalAlignment="Right" Text="{Binding DisplayName}" />
|
||||
<Button Margin="5,0,0,0"
|
||||
cal:Message.Attach="DeactivateItem($dataContext,'true')" >
|
||||
<Grid>
|
||||
<Canvas Width='8' Height='8'>
|
||||
<Line X1='2' X2='6' Y1='2' Y2='6'
|
||||
Stroke='Red' StrokeThickness='1'/>
|
||||
<Line X1='6' X2='2' Y1='2' Y2='6'
|
||||
Stroke='Red' StrokeThickness='1'/>
|
||||
</Canvas>
|
||||
</Grid>
|
||||
</Button>
|
||||
</DockPanel>
|
||||
</DataTemplate>
|
||||
</TabControl.ItemTemplate>
|
||||
</TabControl>
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<DockPanel Grid.Row="0">
|
||||
<Button x:Name="UpdateDb">Update DB</Button>
|
||||
<Button x:Name="LoadEvents">Load Events</Button>
|
||||
<Button Margin="2" x:Name="UpdateDb">Update DB</Button>
|
||||
<Button Margin="2" x:Name="LoadEvents">Load Events</Button>
|
||||
</DockPanel>
|
||||
|
||||
<ListView Grid.Row="1" ItemsSource="{Binding Events}" x:Name="EventsList"
|
||||
<ListView Grid.Row="1" ItemsSource="{Binding Events}" x:Name="EventsList" Margin="0,0,0,5"
|
||||
SelectedItem="{Binding SelectedWpEvent, Mode=TwoWay}">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
@@ -46,7 +46,7 @@
|
||||
<ColumnDefinition Width="2*"></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ListView Grid.Column="0" ItemsSource="{Binding ElementName=EventsList,Path=SelectedItem.WpBookings}"
|
||||
x:Name="BookingList" IsTextSearchEnabled="True" TextSearch.TextPath="WpUserDto.Name">
|
||||
x:Name="BookingList" IsTextSearchEnabled="True" TextSearch.TextPath="WpUserDto.Name" Margin="2">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
@@ -67,7 +67,7 @@
|
||||
<userControls:BookingUserControl Grid.Row="0"
|
||||
Current="{Binding ElementName=BookingList,Path=SelectedItem.Meta,UpdateSourceTrigger=PropertyChanged}" />
|
||||
<Label Grid.Row="1">Message</Label>
|
||||
<TextBox Grid.Row="2" IsReadOnly="True" Text="{Binding ElementName=BookingList,Path=SelectedItem.Message}" TextWrapping="Wrap" AcceptsReturn="False" VerticalScrollBarVisibility="Auto" />
|
||||
<TextBox Grid.Row="2" Margin="2" IsReadOnly="True" Text="{Binding ElementName=BookingList,Path=SelectedItem.Message}" TextWrapping="Wrap" AcceptsReturn="False" VerticalScrollBarVisibility="Auto" />
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
</Grid.RowDefinitions>
|
||||
<Button Grid.Row="0" cal:Message.Attach="Generate">Generate</Button>
|
||||
<ListView Grid.Row="1" x:Name="GameFoundListView" ItemsSource="{Binding GamesFound}"
|
||||
SelectedItem="{Binding SelectedGame,UpdateSourceTrigger=PropertyChanged}" IsTextSearchEnabled="True" TextSearch.TextPath="Name">
|
||||
SelectedItem="{Binding SelectedGame,UpdateSourceTrigger=PropertyChanged}" IsTextSearchEnabled="True" TextSearch.TextPath="Name" Margin="2">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
@@ -102,7 +102,7 @@
|
||||
<Label Content="{Binding Players.Count,UpdateSourceTrigger=PropertyChanged}"></Label>
|
||||
<Label>)</Label>
|
||||
</StackPanel>
|
||||
<ListView Grid.Row="1" Grid.Column="0" x:Name="PlayersList" ItemsSource="{Binding Players,UpdateSourceTrigger=PropertyChanged}" IsTextSearchEnabled="True" TextSearch.TextPath="Name">
|
||||
<ListView Grid.Row="1" Grid.Column="0" Margin="2" x:Name="PlayersList" ItemsSource="{Binding Players,UpdateSourceTrigger=PropertyChanged}" IsTextSearchEnabled="True" TextSearch.TextPath="Name">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
@@ -116,7 +116,7 @@
|
||||
<Label Content="{Binding PlayersOptions.Count,UpdateSourceTrigger=PropertyChanged}"></Label>
|
||||
<Label>)</Label>
|
||||
</StackPanel>
|
||||
<ListView Grid.Row="1" Grid.Column="1" x:Name="PlayersOptionsList" ItemsSource="{Binding PlayersOptions,UpdateSourceTrigger=PropertyChanged}" IsTextSearchEnabled="True" TextSearch.TextPath="Name" behaviors:MultiSelectorBehaviours.SynchronizedSelectedItems="{Binding OptionalPlayers}">
|
||||
<ListView Grid.Row="1" Grid.Column="1" Margin="2" x:Name="PlayersOptionsList" ItemsSource="{Binding PlayersOptions,UpdateSourceTrigger=PropertyChanged}" IsTextSearchEnabled="True" TextSearch.TextPath="Name" behaviors:MultiSelectorBehaviours.SynchronizedSelectedItems="{Binding OptionalPlayers}">
|
||||
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
|
||||
@@ -3,4 +3,5 @@
|
||||
<package id="Caliburn.Micro" version="3.2.0" targetFramework="net461" />
|
||||
<package id="Caliburn.Micro.Core" version="3.2.0" targetFramework="net461" />
|
||||
<package id="RestSharp" version="106.6.5" targetFramework="net461" />
|
||||
<package id="WPFThemes.DarkBlend" version="1.0.8" targetFramework="net461" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user