Re-Design + Code Cleanup

This commit is contained in:
WeeXnes 2022-06-20 20:15:44 +02:00
parent 1fc48eaae6
commit aa1870198b
8 changed files with 119 additions and 85 deletions

View file

@ -15,7 +15,7 @@ namespace WeeXnes.Core
public static string encryptionKey = "8zf5#RdyQ]$4x4_";
public static string AppDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "WeeXnes");
public static string SettingsFileName = "settings.ini";
public static string version = "2.7.9";
public static string version = "3.0";
public static bool info_isRpcRunning = false;
public static bool info_RpcAutoStart;
public static string apiUrl = "http://www.weexnes.com:5169/";

View file

@ -20,10 +20,19 @@
<ColumnDefinition Width="220"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Background="#22202f"
CornerRadius="10"
<Border
CornerRadius="4"
Height="300"
VerticalAlignment="Top">
<Border.Background>
<LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
<LinearGradientBrush.GradientStops>
<GradientStop Offset="0.2" Color="#212329" />
<GradientStop Offset="1" Color="#202127" />
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Border.Background>
<ListBox Height="300"
VerticalAlignment="Top"
Background="Transparent"
@ -43,7 +52,7 @@
VerticalAlignment="Top"
Margin="20,20,0,0"
Name="tb_FormName"
Background="#353340"
Background="#212329"
Tag="Name (for List)"/>
<TextBox Grid.Column="1"
@ -54,7 +63,7 @@
VerticalAlignment="Top"
Margin="20,60,0,0"
Name="tb_FormPName"
Background="#353340"
Background="#212329"
Tag="Process Name"/>
<Label Content=".exe"
Foreground="White"
@ -69,7 +78,7 @@
VerticalAlignment="Top"
Margin="20,100,0,0"
Name="tb_FormClient"
Background="#353340"
Background="#212329"
Tag="ClientID"/>
<TextBox Grid.Column="1"
Style="{StaticResource MaterialTextBox}"
@ -79,7 +88,7 @@
VerticalAlignment="Top"
Margin="20,180,0,0"
Name="tb_FormState"
Background="#353340"
Background="#212329"
Tag="State"/>
<TextBox Grid.Column="1"
Style="{StaticResource MaterialTextBox}"
@ -89,7 +98,7 @@
VerticalAlignment="Top"
Margin="20,140,0,0"
Name="tb_FormDetails"
Background="#353340"
Background="#212329"
Tag="Details"/>
@ -101,7 +110,7 @@
VerticalAlignment="Top"
Margin="20,220,0,0"
Name="tb_FormLargeImgKey"
Background="#353340"
Background="#212329"
Tag="Large Image Key"/>
<TextBox Grid.Column="1"
Style="{StaticResource MaterialTextBox}"
@ -111,7 +120,7 @@
VerticalAlignment="Top"
Margin="250,220,0,0"
Name="tb_FormLargeImgTxt"
Background="#353340"
Background="#202127"
Tag="Large Image Text"/>
<TextBox Grid.Column="1"
@ -122,7 +131,7 @@
VerticalAlignment="Top"
Margin="20,260,0,0"
Name="tb_FormSmallImgKey"
Background="#353340"
Background="#212329"
Tag="Small Image Key"/>
<TextBox Grid.Column="1"
Style="{StaticResource MaterialTextBox}"
@ -132,7 +141,7 @@
VerticalAlignment="Top"
Margin="250,260,0,0"
Name="tb_FormSmallImgTxt"
Background="#353340"
Background="#202127"
Tag="Small Image Text"/>
<Button Height="30"
Width="65"
@ -143,7 +152,7 @@
HorizontalAlignment="Left"
Grid.Column="1"
Margin="20,0,0,5"
Background="#353340"
Background="#212329"
Content="Save"/>
@ -158,7 +167,7 @@
VerticalAlignment="Bottom"
HorizontalAlignment="Left"
Margin="70,0,0,5"
Background="#353340"
Background="#212329"
Content="Stop"/>
<Button Height="30"
Width="65"
@ -168,7 +177,7 @@
VerticalAlignment="Bottom"
HorizontalAlignment="Left"
Margin="0,0,0,5"
Background="#353340"
Background="#212329"
Content="Start"/>
<Button Height="30"
Width="65"
@ -178,7 +187,7 @@
VerticalAlignment="Bottom"
HorizontalAlignment="Left"
Margin="140,0,0,5"
Background="#353340"
Background="#212329"
Content="New"/>
@ -188,8 +197,16 @@
<Border Grid.Row="1"
Background="#22202f"
CornerRadius="10">
CornerRadius="4">
<Border.Background>
<LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
<LinearGradientBrush.GradientStops>
<GradientStop Offset="0.2" Color="#212329" />
<GradientStop Offset="1" Color="#1b1c21" />
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Border.Background>
<RichTextBox Grid.Row="1"
Background="Transparent"
BorderThickness="0"

View file

@ -21,9 +21,17 @@
<Grid>
<Border Background="#22202f"
CornerRadius="10"
<Border
CornerRadius="4"
Height="375">
<Border.Background>
<LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
<LinearGradientBrush.GradientStops>
<GradientStop Offset="0.2" Color="#212329" />
<GradientStop Offset="1" Color="#1b1c21" />
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Border.Background>
<ListView Name="KeyListView"
Background="Transparent"
Foreground="White"
@ -59,21 +67,22 @@
HorizontalAlignment="Left"
Width="250"
Style="{StaticResource MaterialTextBox}"
Background="#353340" Tag="Name"/>
Background="#1c1e23" Tag="Name"/>
<TextBox Name="Textbox_Value"
Height="30"
HorizontalAlignment="Right"
Width="250"
Margin="15,0,0,0"
Style="{StaticResource MaterialTextBox}"
Background="#353340" Tag="Value"/>
Background="#1c1e23" Tag="Value"/>
<Button Width="90"
Height="30"
Name="AddButton"
Margin="15,0,0,0"
Click="AddButton_Click"
Content="Add"
Style="{StaticResource ModernAddButton}"
Background="#1c1e23"
Style="{StaticResource UniversalMaterialButton}"
/>
</StackPanel>

View file

@ -15,11 +15,17 @@
</Grid.RowDefinitions>
<Border Grid.Row="0"
Background="#22202f"
CornerRadius="10"
CornerRadius="4"
Margin="10,10,10,10"
Padding="0,0,0,5">
<Border.Background>
<LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
<LinearGradientBrush.GradientStops>
<GradientStop Offset="0.2" Color="#212329" />
<GradientStop Offset="1" Color="#1b1c21" />
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Border.Background>
<StackPanel Orientation="Vertical">
<Label Content="General"
Foreground="White"
@ -43,7 +49,7 @@
<Button Name="CheckForUpdateBtn"
Style="{StaticResource UniversalMaterialButton}"
Content="Check for Updates"
Background="#353340"
Background="#2f313b"
Height="25"
Click="CheckForUpdateBtn_OnClick"
Margin="4,10,4,0"/>
@ -51,7 +57,7 @@
<Button Name="createShortcut"
Style="{StaticResource UniversalMaterialButton}"
Content="Create Startmenu Entry"
Background="#353340"
Background="#2f313b"
Height="25"
Click="CreateShortcut_OnClick"
Margin="4,10,4,0"/>
@ -59,7 +65,7 @@
<Button Name="OpenAppdataFolder" Grid.Row="1"
Style="{StaticResource UniversalMaterialButton}"
Content="Open AppData Folder"
Background="#353340"
Background="#2f313b"
Height="25"
Margin="4,10,4,0"
Click="OpenAppdataFolder_Click"/>
@ -70,10 +76,17 @@
</Border>
<Border Grid.Row="1"
Background="#22202f"
CornerRadius="10"
CornerRadius="4"
Margin="10,10,10,10"
Padding="0,0,0,5">
<Border.Background>
<LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
<LinearGradientBrush.GradientStops>
<GradientStop Offset="0.2" Color="#212329" />
<GradientStop Offset="1" Color="#1b1c21" />
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Border.Background>
<StackPanel Orientation="Vertical">
<Label Content="RPC"
Foreground="White"
@ -102,12 +115,12 @@
<TextBox Style="{StaticResource MaterialTextBox}"
Margin="4,0,4,0"
Name="tb_DefaultClientID"
Background="#353340"
Background="#2f313b"
Tag="Default Client ID"/>
<Button Name="SaveDefaultID"
Style="{StaticResource UniversalMaterialButton}"
Content="Set Default ClientID"
Background="#353340"
Background="#2f313b"
Height="25"
Click="SaveDefaultID_Click"
Margin="4,10,4,0"/>
@ -134,14 +147,14 @@
<Button Name="SetRpcLocation"
Style="{StaticResource UniversalMaterialButton}"
Content="Set Rpc Files Path"
Background="#353340"
Background="#2f313b"
Height="25"
Click="SetRpcLocation_OnClick"
Margin="4,10,4,0"/>
<Button Name="SetRpcLocationDefault"
Style="{StaticResource UniversalMaterialButton}"
Content="Set Default Path"
Background="#353340"
Background="#2f313b"
Height="25"
Click="SetRpcLocationDefault_OnClick"
Margin="4,10,4,0"/>
@ -152,11 +165,17 @@
</Border>
<Border Grid.Row="2"
Background="#22202f"
CornerRadius="10"
CornerRadius="4"
Margin="10,10,10,10"
Padding="0,0,0,5">
<Border.Background>
<LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
<LinearGradientBrush.GradientStops>
<GradientStop Offset="0.2" Color="#212329" />
<GradientStop Offset="1" Color="#1b1c21" />
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Border.Background>
<StackPanel Orientation="Vertical">
<Label Content="Key Manager"
Foreground="White"
@ -195,14 +214,14 @@
<Button Name="SetKeyLocation"
Style="{StaticResource UniversalMaterialButton}"
Content="Set Key Files Path"
Background="#353340"
Background="#2f313b"
Height="25"
Click="SetKeyLocation_OnClick"
Margin="4,10,4,0"/>
<Button Name="SetKeyLocationDefault"
Style="{StaticResource UniversalMaterialButton}"
Content="Set Default Path"
Background="#353340"
Background="#2f313b"
Height="25"
Click="SetKeyLocationDefault_OnClick"
Margin="4,10,4,0"/>

View file

@ -6,8 +6,8 @@
xmlns:local="clr-namespace:WeeXnes"
xmlns:viewModel="clr-namespace:WeeXnes.MVVM.ViewModel"
mc:Ignorable="d"
Height="600"
Width="920"
Height="632"
Width="952"
WindowStyle="None"
ResizeMode="NoResize"
Background="Transparent"
@ -23,10 +23,23 @@
<viewModel:MainViewModel/>
</Window.DataContext>
<Border Background="#272537"
CornerRadius="10"
<Border
CornerRadius="4"
MouseDown="Border_MouseDown"
Name="window_border">
Name="window_border"
Margin="16">
<Border.Background>
<LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
<LinearGradientBrush.GradientStops>
<GradientStop Offset="0.2" Color="#2c2e36" />
<GradientStop Offset="1" Color="#212329" />
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Border.Background>
<Border.Effect>
<DropShadowEffect BlurRadius="15" Direction="-90"
RenderingBias="Quality" ShadowDepth="0"/>
</Border.Effect>
<Grid>
<Grid.ColumnDefinitions>
@ -95,7 +108,7 @@
HorizontalAlignment="Left"
Margin="5"
Style="{StaticResource MaterialTextBox}"
Background="#353340" Tag="Search..."
Background="#212329" Tag="Search..."
TextChanged="Searchbox_TextChanged"
Name="Searchbox"
/>

View file

@ -1,30 +1,6 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="{x:Type Button}"
x:Key="ModernAddButton">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border CornerRadius="10"
Background="#353340">
<Grid>
<Rectangle StrokeThickness="1"/>
<TextBlock Text="Add"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Foreground="DarkGray"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="Transparent" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type Button}"
x:Key="ModernCloseButton">
<Setter Property="Template">
@ -57,7 +33,7 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border CornerRadius="0"
Background="#22202f">
Background="#25272e">
<Grid>
<Rectangle StrokeThickness="1"/>
<TextBlock Text="{TemplateBinding Property=Content}"
@ -81,7 +57,7 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border CornerRadius="10"
<Border CornerRadius="4"
Background="{TemplateBinding Background}">
<Grid>
<Rectangle StrokeThickness="1"/>

View file

@ -40,7 +40,7 @@
<Grid VerticalAlignment="Stretch"
HorizontalAlignment="Stretch">
<Border Background="{TemplateBinding Background}"
CornerRadius="10">
CornerRadius="4">
<TextBlock Text="{TemplateBinding Property=Content}"
VerticalAlignment="Center"
Margin="50,0,0,0"/>
@ -56,7 +56,7 @@
</Style.Setters>
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="#22202f"/>
<Setter Property="Background" Value="#212329"/>
</Trigger>
</Style.Triggers>
</Style>

View file

@ -5,7 +5,7 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<Border CornerRadius="10"
<Border CornerRadius="4"
Background="{TemplateBinding Background}">
<Grid>
<Rectangle StrokeThickness="1"/>