diff --git a/WeeXnes/Core/Globals.cs b/WeeXnes/Core/Globals.cs index 485e280..dbcb936 100644 --- a/WeeXnes/Core/Globals.cs +++ b/WeeXnes/Core/Globals.cs @@ -16,7 +16,7 @@ namespace WeeXnes.Core public static string encryptionKey = "8zf5#RdyQ]$4x4_"; public static string AppDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "WeeXnes"); public static string SettingsFileName = "settings.ini"; - public static string version = "3.7.0"; + public static string version = "3.7.1"; public static bool info_isRpcRunning = false; public static bool info_RpcAutoStart; public static string apiUrl = "https://api.github.com/repos/weexnes/weexnessuite/releases/latest"; diff --git a/WeeXnes/MVVM/View/DiscordRpcView.xaml b/WeeXnes/MVVM/View/DiscordRpcView.xaml index b05ba3f..0d30e9b 100644 --- a/WeeXnes/MVVM/View/DiscordRpcView.xaml +++ b/WeeXnes/MVVM/View/DiscordRpcView.xaml @@ -41,7 +41,35 @@ Name="RpcItemList" Foreground="White" SelectionChanged="RpcItemList_SelectionChanged" - MouseDoubleClick="RpcItemList_MouseDoubleClick"/> + MouseDoubleClick="RpcItemList_MouseDoubleClick"> + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WeeXnes/MVVM/View/DiscordRpcView.xaml.cs b/WeeXnes/MVVM/View/DiscordRpcView.xaml.cs index 2ff76f5..2727530 100644 --- a/WeeXnes/MVVM/View/DiscordRpcView.xaml.cs +++ b/WeeXnes/MVVM/View/DiscordRpcView.xaml.cs @@ -228,6 +228,11 @@ namespace WeeXnes.MVVM.View Games.Add(game); } } + else + { + Games.Clear(); + } + } public void LoadGamesIntoListBox() { @@ -258,12 +263,26 @@ namespace WeeXnes.MVVM.View } } + private void clearInputs() + { + tb_FormClient.Text = ""; + tb_FormDetails.Text = ""; + tb_FormName.Text = ""; + tb_FormState.Text = ""; + tb_FormPName.Text = ""; + tb_FormLargeImgKey.Text = ""; + tb_FormLargeImgTxt.Text = ""; + tb_FormSmallImgKey.Text = ""; + tb_FormSmallImgTxt.Text = ""; + } + private void RpcItemList_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (RpcItemList.SelectedItem != null) { deleteGameFile((Game)RpcItemList.SelectedItem); } + clearInputs(); Refresh(); } @@ -315,6 +334,16 @@ namespace WeeXnes.MVVM.View { } + + private void MenuItem_OnClick(object sender, RoutedEventArgs e) + { + if (RpcItemList.SelectedItem != null) + { + deleteGameFile((Game)RpcItemList.SelectedItem); + } + clearInputs(); + Refresh(); + } } } diff --git a/WeeXnes/MVVM/View/KeyManagerView.xaml b/WeeXnes/MVVM/View/KeyManagerView.xaml index 8beeeec..994e3b1 100644 --- a/WeeXnes/MVVM/View/KeyManagerView.xaml +++ b/WeeXnes/MVVM/View/KeyManagerView.xaml @@ -38,6 +38,33 @@ BorderThickness="0" SelectionChanged="KeyListView_SelectionChanged" MouseDoubleClick="KeyListView_MouseDoubleClick" > + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WeeXnes/MVVM/View/KeyManagerView.xaml.cs b/WeeXnes/MVVM/View/KeyManagerView.xaml.cs index 8bf604d..0fa1ac4 100644 --- a/WeeXnes/MVVM/View/KeyManagerView.xaml.cs +++ b/WeeXnes/MVVM/View/KeyManagerView.xaml.cs @@ -249,6 +249,35 @@ namespace WeeXnes.MVVM.View tb.Text = censored_string; } } + + private void MenuItem_OnClick(object sender, RoutedEventArgs e) + { + + KeyItem selectedItem = (KeyItem)KeyListView.SelectedItem; + Console.WriteLine("Doubleclicked " + selectedItem.name); + KeyManagerLib.KeyList.Remove(selectedItem); + string[] files = SaveInterface.GetFilesInDir(Globals.settings_KeyManagerItemsPath.Value); + foreach (string file in files) + { + Console.WriteLine(file); + try + { + wxfile inifile = new wxfile(file); + string name = inifile.GetName(); + string value = inifile.GetValue(); + if(name == selectedItem.name) + { + File.Delete(file); + Console.WriteLine("Removed File: " + file); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + FillList(); + } } public static class SaveInterface { diff --git a/WeeXnes/MainWindow.xaml b/WeeXnes/MainWindow.xaml index 5d2dc60..159b828 100644 --- a/WeeXnes/MainWindow.xaml +++ b/WeeXnes/MainWindow.xaml @@ -270,6 +270,26 @@ + + + + + + + + + + + + + + + + + + + diff --git a/WeeXnes/WeeXnes.csproj b/WeeXnes/WeeXnes.csproj index b3c2bee..7e7a5e7 100644 --- a/WeeXnes/WeeXnes.csproj +++ b/WeeXnes/WeeXnes.csproj @@ -4,7 +4,7 @@ Debug AnyCPU - 3.7.0 + 3.7.1 {4B33CEE7-C74D-43B9-B99A-8B273D5195BC} WinExe WeeXnes