fixed crashing
This commit is contained in:
parent
4dde7eab20
commit
c3c393c2f1
4 changed files with 15 additions and 4 deletions
|
@ -72,6 +72,7 @@ namespace WeeXnes.Core
|
|||
}
|
||||
|
||||
|
||||
|
||||
Globals.settings_RpcShowElapsedTime.Value = Convert.ToBoolean(SettingsFile.GetValue("rpc", "RpcShowElapsedTime"));
|
||||
Globals.settings_RpcItemsPath_Bool.Value = Convert.ToBoolean(SettingsFile.GetValue("rpc", "RpcItemsPath_Bool"));
|
||||
if (Globals.settings_RpcItemsPath_Bool.Value)
|
||||
|
|
|
@ -51,6 +51,10 @@ namespace WeeXnes.MVVM.View
|
|||
|
||||
public void CheckFolders()
|
||||
{
|
||||
if (!Globals.settings_RpcItemsPath_Bool.Value)
|
||||
{
|
||||
Globals.settings_RpcItemsPath.Value = Globals.settings_RpcItemsPath_Default;
|
||||
}
|
||||
if (!Directory.Exists(Globals.settings_RpcItemsPath.Value))
|
||||
{
|
||||
Directory.CreateDirectory(Globals.settings_RpcItemsPath.Value);
|
||||
|
|
|
@ -149,6 +149,10 @@ namespace WeeXnes.MVVM.View
|
|||
|
||||
private void CheckForFolders()
|
||||
{
|
||||
if (!Globals.settings_KeyManagerItemsPath_Bool.Value)
|
||||
{
|
||||
Globals.settings_KeyManagerItemsPath.Value = Globals.settings_KeyManagerItemsPath_Default;
|
||||
}
|
||||
if (!Directory.Exists(Globals.AppDataPath))
|
||||
{
|
||||
Directory.CreateDirectory(Globals.AppDataPath);
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace WeeXnes.MVVM.View
|
|||
}
|
||||
else
|
||||
{
|
||||
RpcPathLabel.Content = "Default";
|
||||
RpcPathLabel.Content = Globals.settings_RpcItemsPath_Default;
|
||||
}
|
||||
if (!String.IsNullOrEmpty(Globals.settings_KeyManagerItemsPath.Value))
|
||||
{
|
||||
|
@ -52,7 +52,7 @@ namespace WeeXnes.MVVM.View
|
|||
}
|
||||
else
|
||||
{
|
||||
KeyPathLabel.Content = "Default";
|
||||
KeyPathLabel.Content = Globals.settings_KeyManagerItemsPath_Default;
|
||||
}
|
||||
|
||||
if (Globals.settings_alwaysOnTop.Value)
|
||||
|
@ -74,6 +74,8 @@ namespace WeeXnes.MVVM.View
|
|||
{
|
||||
ItemToClipboardSwitch.IsChecked = true;
|
||||
}
|
||||
|
||||
tb_DefaultClientID.Text = Globals.settings_RpcDefaultClientID.Value;
|
||||
}
|
||||
private void SetUiUpdateListeners()
|
||||
{
|
||||
|
@ -85,7 +87,7 @@ namespace WeeXnes.MVVM.View
|
|||
}
|
||||
else
|
||||
{
|
||||
RpcPathLabel.Content = "Default";
|
||||
RpcPathLabel.Content = Globals.settings_RpcItemsPath_Default;
|
||||
}
|
||||
};
|
||||
Globals.settings_KeyManagerItemsPath.ValueChanged += () =>
|
||||
|
@ -96,7 +98,7 @@ namespace WeeXnes.MVVM.View
|
|||
}
|
||||
else
|
||||
{
|
||||
KeyPathLabel.Content = "Default";
|
||||
KeyPathLabel.Content = Globals.settings_KeyManagerItemsPath_Default;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue