mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Added startup exception handling
This commit is contained in:
parent
65888d1725
commit
e8c6951e89
@ -204,7 +204,7 @@
|
||||
<value>TypeWave</value>
|
||||
</setting>
|
||||
<setting name="LastKeyboard" serializeAs="String">
|
||||
<value>Razer BlackWidow Chroma</value>
|
||||
<value>Logitech G910 Orion Spark</value>
|
||||
</setting>
|
||||
<setting name="EnablePointersUpdate" serializeAs="String">
|
||||
<value>True</value>
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
using System.Windows;
|
||||
using System;
|
||||
using System.Windows;
|
||||
using Artemis.ViewModels;
|
||||
using Caliburn.Micro;
|
||||
using MessageBox = System.Windows.Forms.MessageBox;
|
||||
|
||||
namespace Artemis
|
||||
{
|
||||
@ -13,7 +15,16 @@ namespace Artemis
|
||||
|
||||
protected override void OnStartup(object sender, StartupEventArgs e)
|
||||
{
|
||||
DisplayRootViewFor<ShellViewModel>();
|
||||
try
|
||||
{
|
||||
DisplayRootViewFor<ShellViewModel>();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("Startup failed :c \n" + ex.InnerException.Message);
|
||||
throw;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,5 @@
|
||||
using System.Drawing;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Threading;
|
||||
using Artemis.KeyboardProviders.Logitech.Utilities;
|
||||
|
||||
|
||||
2
Artemis/Artemis/Settings/General.Designer.cs
generated
2
Artemis/Artemis/Settings/General.Designer.cs
generated
@ -37,7 +37,7 @@ namespace Artemis.Settings {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Razer BlackWidow Chroma")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Logitech G910 Orion Spark")]
|
||||
public string LastKeyboard {
|
||||
get {
|
||||
return ((string)(this["LastKeyboard"]));
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<Value Profile="(Default)">TypeWave</Value>
|
||||
</Setting>
|
||||
<Setting Name="LastKeyboard" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">Razer BlackWidow Chroma</Value>
|
||||
<Value Profile="(Default)">Logitech G910 Orion Spark</Value>
|
||||
</Setting>
|
||||
<Setting Name="EnablePointersUpdate" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
|
||||
@ -31,8 +31,7 @@ namespace Artemis.Utilities.GameState
|
||||
return;
|
||||
|
||||
_listener.Prefixes.Clear();
|
||||
//Port = FreeTcpPort();
|
||||
Port = 5821;
|
||||
Port = FreeTcpPort();
|
||||
_listener.Prefixes.Add($"http://127.0.0.1:{Port}/");
|
||||
|
||||
_listener.Start();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user