added option for automatic shutdown & temporarily removed some debugging info
This commit is contained in:
parent
2225790af2
commit
17931a3103
5 changed files with 38 additions and 7 deletions
|
@ -21,11 +21,11 @@ namespace WeeXnes.Core
|
||||||
|
|
||||||
public static class Formatting
|
public static class Formatting
|
||||||
{
|
{
|
||||||
public static string success_char = "✓";
|
public static string success_char = "";
|
||||||
public static string warning_char = "⌬";
|
public static string warning_char = "";
|
||||||
public static string info_char = "◈";
|
public static string info_char = "";
|
||||||
public static string error_char = "☓";
|
public static string error_char = "";
|
||||||
public static string writeline_char = "•";
|
public static string writeline_char = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ namespace WeeXnes.Core
|
||||||
{
|
{
|
||||||
public class Information
|
public class Information
|
||||||
{
|
{
|
||||||
public const string Version = "4.4.4";
|
public const string Version = "4.4.5";
|
||||||
public const string EncryptionHash = "8zf5#RdyQ]$4x4_";
|
public const string EncryptionHash = "8zf5#RdyQ]$4x4_";
|
||||||
public const string ApiUrl = "https://api.github.com/repos/weexnes/weexnessuite/releases/latest";
|
public const string ApiUrl = "https://api.github.com/repos/weexnes/weexnessuite/releases/latest";
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,6 +103,15 @@
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
<StackPanel Orientation="Vertical" Name="MiscOptions" Margin="0,0,0,5">
|
||||||
|
<Label Content="set automatic shutdown" HorizontalAlignment="Center"/>
|
||||||
|
<ui:NumberBox Name="ShutdownTimer"/>
|
||||||
|
<ui:Button Content="Set" HorizontalAlignment="Stretch" Margin="0,5,0,5" Click="TimedShutdown_OnClick"/>
|
||||||
|
<ui:Button Content="Reset" HorizontalAlignment="Stretch" Click="ResetShutdown_OnClick"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Orientation="Vertical" Visibility="Collapsed" Name="DebugOptions">
|
<StackPanel Orientation="Vertical" Visibility="Collapsed" Name="DebugOptions">
|
||||||
<Label Content="Debug" HorizontalAlignment="Center"/>
|
<Label Content="Debug" HorizontalAlignment="Center"/>
|
||||||
<ui:CardAction Icon="ErrorCircle24"
|
<ui:CardAction Icon="ErrorCircle24"
|
||||||
|
|
|
@ -146,5 +146,27 @@ namespace WeeXnes.Views.Settings
|
||||||
{
|
{
|
||||||
Functions.ThrowTestException(new ArithmeticException());
|
Functions.ThrowTestException(new ArithmeticException());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void TimedShutdown_OnClick(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
System.Diagnostics.Process process = new System.Diagnostics.Process();
|
||||||
|
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
|
||||||
|
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
|
||||||
|
startInfo.FileName = "cmd.exe";
|
||||||
|
startInfo.Arguments = "/C shutdown -s -t " + (Convert.ToInt32(ShutdownTimer.Value)*60).ToString();
|
||||||
|
process.StartInfo = startInfo;
|
||||||
|
process.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ResetShutdown_OnClick(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
System.Diagnostics.Process process = new System.Diagnostics.Process();
|
||||||
|
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
|
||||||
|
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
|
||||||
|
startInfo.FileName = "cmd.exe";
|
||||||
|
startInfo.Arguments = "/C shutdown -a";
|
||||||
|
process.StartInfo = startInfo;
|
||||||
|
process.Start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -4,7 +4,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
<Version>4.4.4</Version>
|
<Version>4.4.5</Version>
|
||||||
<ProjectGuid>{4B33CEE7-C74D-43B9-B99A-8B273D5195BC}</ProjectGuid>
|
<ProjectGuid>{4B33CEE7-C74D-43B9-B99A-8B273D5195BC}</ProjectGuid>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<RootNamespace>WeeXnes</RootNamespace>
|
<RootNamespace>WeeXnes</RootNamespace>
|
||||||
|
|
Loading…
Add table
Reference in a new issue