changed messagebox + updatebox design to fit the rest
This commit is contained in:
parent
0b689a177b
commit
b9a0096cb7
9 changed files with 189 additions and 42 deletions
|
@ -16,7 +16,7 @@ namespace WeeXnes.Core
|
||||||
public static string encryptionKey = "8zf5#RdyQ]$4x4_";
|
public static string encryptionKey = "8zf5#RdyQ]$4x4_";
|
||||||
public static string AppDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "WeeXnes");
|
public static string AppDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "WeeXnes");
|
||||||
public static string SettingsFileName = "settings.ini";
|
public static string SettingsFileName = "settings.ini";
|
||||||
public static string version = "3.6.3";
|
public static string version = "3.6.4";
|
||||||
public static bool info_isRpcRunning = false;
|
public static bool info_isRpcRunning = false;
|
||||||
public static bool info_RpcAutoStart;
|
public static bool info_RpcAutoStart;
|
||||||
public static string apiUrl = "http://weexnes.com:5169/";
|
public static string apiUrl = "http://weexnes.com:5169/";
|
||||||
|
|
|
@ -318,7 +318,7 @@ namespace WeeXnes.MVVM.View
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Misc.Message message = new Misc.Message(ex.ToString());
|
Misc.CriticalMessage message = new Misc.CriticalMessage(ex.ToString());
|
||||||
message.Show();
|
message.Show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
53
WeeXnes/Misc/CriticalMessage.xaml
Normal file
53
WeeXnes/Misc/CriticalMessage.xaml
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
<Window x:Class="WeeXnes.Misc.CriticalMessage"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="clr-namespace:WeeXnes.Misc"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="Message" Height="150" Width="300"
|
||||||
|
ResizeMode="NoResize"
|
||||||
|
WindowStartupLocation="CenterScreen"
|
||||||
|
SizeToContent="WidthAndHeight"
|
||||||
|
Background="Transparent"
|
||||||
|
AllowsTransparency="True"
|
||||||
|
WindowStyle="None">
|
||||||
|
<Border CornerRadius="4"
|
||||||
|
Margin="16"
|
||||||
|
MouseDown="UIElement_OnMouseDown">
|
||||||
|
<Border.Background>
|
||||||
|
<LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Offset="0.2" Color="#8a1c2c" />
|
||||||
|
<GradientStop Offset="1" Color="#751e2c" />
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Border.Background>
|
||||||
|
|
||||||
|
<Border.Effect>
|
||||||
|
<DropShadowEffect BlurRadius="15" Direction="-90"
|
||||||
|
RenderingBias="Quality" ShadowDepth="0"/>
|
||||||
|
</Border.Effect>
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Label Content="Placeholder"
|
||||||
|
Name="MessageLabel"
|
||||||
|
Foreground="White"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Padding="100,20,100,20"/>
|
||||||
|
<Button Grid.Row="1"
|
||||||
|
Style="{StaticResource UniversalMaterialButton}"
|
||||||
|
Content="OK"
|
||||||
|
Width="140"
|
||||||
|
Height="40"
|
||||||
|
Background="#520b16"
|
||||||
|
Name="okButton"
|
||||||
|
Click="okButton_Click"
|
||||||
|
Margin="0,0,0,20"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Window>
|
26
WeeXnes/Misc/CriticalMessage.xaml.cs
Normal file
26
WeeXnes/Misc/CriticalMessage.xaml.cs
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Input;
|
||||||
|
|
||||||
|
namespace WeeXnes.Misc
|
||||||
|
{
|
||||||
|
public partial class CriticalMessage : Window
|
||||||
|
{
|
||||||
|
public CriticalMessage(string _message, string _title = "Message")
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
MessageLabel.Content = _message;
|
||||||
|
this.Title = _title;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void okButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UIElement_OnMouseDown(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.ChangedButton == MouseButton.Left)
|
||||||
|
this.DragMove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -7,10 +7,27 @@
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Message" Height="150" Width="300"
|
Title="Message" Height="150" Width="300"
|
||||||
ResizeMode="NoResize"
|
ResizeMode="NoResize"
|
||||||
Background="#272537"
|
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
SizeToContent="WidthAndHeight">
|
SizeToContent="WidthAndHeight"
|
||||||
<Grid>
|
Background="Transparent"
|
||||||
|
AllowsTransparency="True"
|
||||||
|
WindowStyle="None">
|
||||||
|
<Border CornerRadius="4"
|
||||||
|
Margin="16"
|
||||||
|
MouseDown="UIElement_OnMouseDown">
|
||||||
|
<Border.Background>
|
||||||
|
<LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Offset="0.2" Color="#212329" />
|
||||||
|
<GradientStop Offset="1" Color="#1f2026" />
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Border.Background>
|
||||||
|
|
||||||
|
<Border.Effect>
|
||||||
|
<DropShadowEffect BlurRadius="15" Direction="-90"
|
||||||
|
RenderingBias="Quality" ShadowDepth="0"/>
|
||||||
|
</Border.Effect>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
|
@ -20,15 +37,17 @@
|
||||||
Name="MessageLabel"
|
Name="MessageLabel"
|
||||||
Foreground="White"
|
Foreground="White"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
HorizontalAlignment="Center"/>
|
HorizontalAlignment="Center"
|
||||||
|
Padding="100,20,100,20"/>
|
||||||
<Button Grid.Row="1"
|
<Button Grid.Row="1"
|
||||||
Style="{StaticResource UniversalMaterialButton}"
|
Style="{StaticResource UniversalMaterialButton}"
|
||||||
Content="OK"
|
Content="OK"
|
||||||
Width="140"
|
Width="140"
|
||||||
Height="40"
|
Height="40"
|
||||||
Background="#353340"
|
Background="#2f313b"
|
||||||
Name="okButton"
|
Name="okButton"
|
||||||
Click="okButton_Click"/>
|
Click="okButton_Click"
|
||||||
|
Margin="0,0,0,20"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Border>
|
||||||
</Window>
|
</Window>
|
||||||
|
|
|
@ -30,5 +30,11 @@ namespace WeeXnes.Misc
|
||||||
{
|
{
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void UIElement_OnMouseDown(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.ChangedButton == MouseButton.Left)
|
||||||
|
this.DragMove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,41 +5,73 @@
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:WeeXnes.Misc"
|
xmlns:local="clr-namespace:WeeXnes.Misc"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Message" Height="150" Width="300"
|
Title="Message" Height="158" Width="308"
|
||||||
ResizeMode="NoResize"
|
ResizeMode="NoResize"
|
||||||
Background="#272537"
|
Background="Transparent"
|
||||||
|
AllowsTransparency="True"
|
||||||
|
WindowStyle="None"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
SizeToContent="WidthAndHeight">
|
SizeToContent="WidthAndHeight">
|
||||||
<Grid>
|
<Window.Resources>
|
||||||
<Grid>
|
<Style TargetType="Image">
|
||||||
<Grid.RowDefinitions>
|
<Setter Property="RenderOptions.BitmapScalingMode" Value="HighQuality" />
|
||||||
<RowDefinition/>
|
</Style>
|
||||||
<RowDefinition/>
|
</Window.Resources>
|
||||||
</Grid.RowDefinitions>
|
<Border CornerRadius="4"
|
||||||
<Label Content="Placeholder"
|
Margin="16"
|
||||||
Name="MessageLabel"
|
MouseDown="UIElement_OnMouseDown">
|
||||||
Foreground="White"
|
|
||||||
VerticalAlignment="Center"
|
<Border.Background>
|
||||||
HorizontalAlignment="Center"/>
|
<LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Offset="0.2" Color="#212329" />
|
||||||
|
<GradientStop Offset="1" Color="#1f2026" />
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Border.Background>
|
||||||
|
|
||||||
|
<Border.Effect>
|
||||||
|
<DropShadowEffect BlurRadius="15" Direction="-90"
|
||||||
|
RenderingBias="Quality" ShadowDepth="0"/>
|
||||||
|
</Border.Effect>
|
||||||
|
|
||||||
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
|
|
||||||
<Button Grid.Row="1"
|
|
||||||
Style="{StaticResource UniversalMaterialButton}"
|
|
||||||
Content="OK"
|
|
||||||
Width="140"
|
|
||||||
Height="40"
|
<Grid>
|
||||||
Background="#353340"
|
<Grid.RowDefinitions>
|
||||||
Name="okButton"
|
<RowDefinition/>
|
||||||
Click="OkButton_OnClick"/>
|
<RowDefinition/>
|
||||||
<Button Grid.Row="1"
|
</Grid.RowDefinitions>
|
||||||
Style="{StaticResource UniversalMaterialButton}"
|
<Label Content="Placeholder"
|
||||||
Content="CANCEL"
|
Name="MessageLabel"
|
||||||
Width="140"
|
Foreground="White"
|
||||||
Height="40"
|
VerticalAlignment="Center"
|
||||||
Background="#353340"
|
HorizontalAlignment="Center"
|
||||||
Name="cancelButton"
|
Padding="100,20,100,20"/>
|
||||||
Click="CancelButton_OnClick"/>
|
|
||||||
</StackPanel>
|
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||||
</Grid>
|
<Button Grid.Row="1"
|
||||||
</Grid>
|
Style="{StaticResource UniversalMaterialButton}"
|
||||||
|
Content="OK"
|
||||||
|
Width="140"
|
||||||
|
Height="40"
|
||||||
|
Background="#2f313b"
|
||||||
|
Name="okButton"
|
||||||
|
Click="OkButton_OnClick"
|
||||||
|
Margin="0,0,10,20"/>
|
||||||
|
<Button Grid.Row="1"
|
||||||
|
Style="{StaticResource UniversalMaterialButton}"
|
||||||
|
Content="CANCEL"
|
||||||
|
Width="140"
|
||||||
|
Height="40"
|
||||||
|
Background="#2f313b"
|
||||||
|
Name="cancelButton"
|
||||||
|
Click="CancelButton_OnClick"
|
||||||
|
Margin="10,0,0,20"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
</Window>
|
</Window>
|
|
@ -3,6 +3,7 @@ using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using System.Windows.Input;
|
||||||
using WeeXnes.Core;
|
using WeeXnes.Core;
|
||||||
using Application = System.Windows.Forms.Application;
|
using Application = System.Windows.Forms.Application;
|
||||||
|
|
||||||
|
@ -57,5 +58,11 @@ namespace WeeXnes.Misc
|
||||||
{
|
{
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void UIElement_OnMouseDown(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.ChangedButton == MouseButton.Left)
|
||||||
|
this.DragMove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -61,6 +61,9 @@
|
||||||
</ApplicationDefinition>
|
</ApplicationDefinition>
|
||||||
<Compile Include="Core\ApiResponse.cs" />
|
<Compile Include="Core\ApiResponse.cs" />
|
||||||
<Compile Include="Core\customEvent.cs" />
|
<Compile Include="Core\customEvent.cs" />
|
||||||
|
<Compile Include="Misc\CriticalMessage.xaml.cs">
|
||||||
|
<DependentUpon>CriticalMessage.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Misc\UpdateMessage.xaml.cs">
|
<Compile Include="Misc\UpdateMessage.xaml.cs">
|
||||||
<DependentUpon>UpdateMessage.xaml</DependentUpon>
|
<DependentUpon>UpdateMessage.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -82,6 +85,7 @@
|
||||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Page Include="Misc\CriticalMessage.xaml" />
|
||||||
<Page Include="Misc\Message.xaml" />
|
<Page Include="Misc\Message.xaml" />
|
||||||
<Page Include="Misc\UpdateMessage.xaml" />
|
<Page Include="Misc\UpdateMessage.xaml" />
|
||||||
<Page Include="MVVM\View\DiscordRpcView.xaml" />
|
<Page Include="MVVM\View\DiscordRpcView.xaml" />
|
||||||
|
|
Loading…
Add table
Reference in a new issue