internal improvements for debugging
This commit is contained in:
parent
79933338c9
commit
6fdbc9e74f
5 changed files with 34 additions and 4 deletions
|
@ -40,9 +40,11 @@ namespace WeeXnes.Core
|
|||
File.WriteAllLines(filepath, stringArray, Encoding.UTF8);
|
||||
}
|
||||
|
||||
public static void ThrowTestException()
|
||||
public static void ThrowTestException(Exception ex = null)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
if (ex == null)
|
||||
ex = new NotImplementedException();
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,7 +8,7 @@ namespace WeeXnes.Core
|
|||
{
|
||||
public class Information
|
||||
{
|
||||
public const string Version = "4.4.2";
|
||||
public const string Version = "4.4.3";
|
||||
public const string EncryptionHash = "8zf5#RdyQ]$4x4_";
|
||||
public const string ApiUrl = "https://api.github.com/repos/weexnes/weexnessuite/releases/latest";
|
||||
}
|
||||
|
|
|
@ -103,6 +103,19 @@
|
|||
|
||||
|
||||
</Grid>
|
||||
<StackPanel Orientation="Vertical" Visibility="Collapsed" Name="DebugOptions">
|
||||
<Label Content="Debug" HorizontalAlignment="Center"/>
|
||||
<ui:CardAction Icon="ErrorCircle24"
|
||||
Click="dbg_throwException">
|
||||
<StackPanel>
|
||||
<TextBlock
|
||||
Margin="0,0,0,4"
|
||||
FontWeight="Medium"
|
||||
Text="Throw Exception"
|
||||
/>
|
||||
</StackPanel>
|
||||
</ui:CardAction>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using Application = System.Windows.Forms.Application;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media.Animation;
|
||||
using Newtonsoft.Json;
|
||||
using Nocksoft.IO.ConfigFiles;
|
||||
using WeeXnes.Core;
|
||||
|
@ -23,8 +25,16 @@ namespace WeeXnes.Views.Settings
|
|||
{
|
||||
InitializeComponent();
|
||||
LoadSettingsToGui();
|
||||
EnableDebugOptions();
|
||||
}
|
||||
|
||||
private void EnableDebugOptions()
|
||||
{
|
||||
if(!App.DebugMode)
|
||||
return;
|
||||
|
||||
DebugOptions.Visibility = Visibility.Visible;
|
||||
}
|
||||
private void LoadSettingsToGui()
|
||||
{
|
||||
CheckboxCensorKeys.IsChecked = KeyManagerView.Data.censorKeys.Value;
|
||||
|
@ -131,5 +141,10 @@ namespace WeeXnes.Views.Settings
|
|||
{
|
||||
KeyManagerView.Data.sortList.Value = false;
|
||||
}
|
||||
|
||||
private void dbg_throwException(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Functions.ThrowTestException(new ArithmeticException());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<Version>4.4.2</Version>
|
||||
<Version>4.4.3</Version>
|
||||
<ProjectGuid>{4B33CEE7-C74D-43B9-B99A-8B273D5195BC}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>WeeXnes</RootNamespace>
|
||||
|
|
Loading…
Add table
Reference in a new issue