From 8cf8338c893ea3fdb0188ea5fa4a93042ce48fcf Mon Sep 17 00:00:00 2001 From: NicoAICP Date: Sun, 27 Dec 2020 14:53:41 +0100 Subject: [PATCH] Fixed issues with some tools Added beta version to settings Help button doesnt crash the app now --- UWUVCI AIO WPF/Models/MainViewModel.cs | 49 +++++---------------- UWUVCI AIO WPF/UI/Frames/SettingsFrame.xaml | 2 +- UWUVCI AIO WPF/UI/Windows/TitleKeys.xaml.cs | 2 +- 3 files changed, 14 insertions(+), 39 deletions(-) diff --git a/UWUVCI AIO WPF/Models/MainViewModel.cs b/UWUVCI AIO WPF/Models/MainViewModel.cs index f08308b..573c5e0 100644 --- a/UWUVCI AIO WPF/Models/MainViewModel.cs +++ b/UWUVCI AIO WPF/Models/MainViewModel.cs @@ -1876,7 +1876,16 @@ namespace UWUVCI_AIO_WPF foreach (MissingTool m in missingTools) { - DownloadTool(m.Name,this); + if(m.Name == "blank.ini") + { + StreamWriter sw = new StreamWriter(Path.Combine(Directory.GetCurrentDirectory(), "bin", "Tools", "blank.ini")); + sw.Close(); + } + else + { + DownloadTool(m.Name, this); + } + Progress += Convert.ToInt32(l); } Progress = 100; @@ -3665,26 +3674,7 @@ namespace UWUVCI_AIO_WPF { WebRequest request; //get download link from uwuvciapi - try - { - request = WebRequest.Create("https://uwuvciapi.azurewebsites.net/GetURL?cns=" + console.ToLower()); - - - - - var response = request.GetResponse(); - using (Stream dataStream = response.GetResponseStream()) - { - // Open the stream using a StreamReader for easy access. - StreamReader reader = new StreamReader(dataStream); - // Read the content. - string responseFromServer = reader.ReadToEnd(); - // Display the content. - return responseFromServer; - } - } - catch (Exception) - { + string url = ""; switch (console.ToLower()) { @@ -3724,22 +3714,7 @@ namespace UWUVCI_AIO_WPF url = null; break; } - request = WebRequest.Create(url + console.ToLower()); - - - - - var response = request.GetResponse(); - using (Stream dataStream = response.GetResponseStream()) - { - // Open the stream using a StreamReader for easy access. - StreamReader reader = new StreamReader(dataStream); - // Read the content. - string responseFromServer = reader.ReadToEnd(); - // Display the content. - return responseFromServer; - } - } + return url; } WaveOutEvent waveOutEvent = new WaveOutEvent(); diff --git a/UWUVCI AIO WPF/UI/Frames/SettingsFrame.xaml b/UWUVCI AIO WPF/UI/Frames/SettingsFrame.xaml index ff6bc91..96cbd91 100644 --- a/UWUVCI AIO WPF/UI/Frames/SettingsFrame.xaml +++ b/UWUVCI AIO WPF/UI/Frames/SettingsFrame.xaml @@ -46,7 +46,7 @@ -