Skip to content

Portable Tool for an Ideal Windows Setup

-edit light theme & fixed crash - eror code WebException

Greedekse775c8fceb70
diff --git a/.Source/GTweak/Styles/Themes/Light/Colors.xaml b/.Source/GTweak/Styles/Themes/Light/Colors.xaml
index edd34c64..fe437e29 100644
--- a/.Source/GTweak/Styles/Themes/Light/Colors.xaml
+++ b/.Source/GTweak/Styles/Themes/Light/Colors.xaml
@@ -1,33 +1,33 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <SolidColorBrush x:Key="Color_Background" Color="#E2E2E2"/>
- <SolidColorBrush x:Key="Color_Background_Dark" Color="#F5F5F5"/>
+ <SolidColorBrush x:Key="Color_Background" Color="#DCDCDC"/>
+ <SolidColorBrush x:Key="Color_Background_Dark" Color="#EAEAEA"/>
<SolidColorBrush x:Key="Color_Accent" Color="#3CB671"/>
<SolidColorBrush x:Key="Color_Inactive" Color="#707070"/>
- <SolidColorBrush x:Key="Color_Highlighted" Color="#111111"/>
+ <SolidColorBrush x:Key="Color_Highlighted" Color="#000000"/>
<SolidColorBrush x:Key="Color_Over" Color="#4CA874"/>
- <SolidColorBrush x:Key="Color_MButton" Color="#c9c9c9"/>
+ <SolidColorBrush x:Key="Color_MButton" Color="#B8B8B8"/>
<SolidColorBrush x:Key="Color_ButtonOver" Color="#45AB77"/>
- <SolidColorBrush x:Key="Color_ButtonOver_Navigation" Color="#E1E1E1"/>
- <SolidColorBrush x:Key="Color_MButtonOver" Color="#a9a9a9"/>
+ <SolidColorBrush x:Key="Color_ButtonOver_Navigation" Color="#DADADA"/>
+ <SolidColorBrush x:Key="Color_MButtonOver" Color="#989898"/>
<SolidColorBrush x:Key="Color_Border" Color="#009843"/>
- <SolidColorBrush x:Key="Color_ComboBoxOver" Color="#E1E1E1"/>
- <SolidColorBrush x:Key="Color_Background_ScrollBar" Color="#B8B8B8"/>
- <SolidColorBrush x:Key="Color_Background_Slider" Color="#828282"/>
+ <SolidColorBrush x:Key="Color_ComboBoxOver" Color="#DADADA"/>
+ <SolidColorBrush x:Key="Color_Background_ScrollBar" Color="#A9A9A9"/>
+ <SolidColorBrush x:Key="Color_Background_Slider" Color="#737373"/>
<SolidColorBrush x:Key="Color_TetBlock_Inactivity" Color="#202020"/>
<SolidColorBrush x:Key="Color_TetBox_Border" Color="#242527"/>
- <SolidColorBrush x:Key="Color_Background_RadialProgressBar" Color="#B8B8B8"/>
+ <SolidColorBrush x:Key="Color_Background_RadialProgressBar" Color="#A9A9A9"/>
<SolidColorBrush x:Key="Color_DeletedTime" Color="#1A94C6"/>
<Color x:Key="Color_Shadow">#13B65A</Color>
<Color x:Key="Color_Border_Gradient_1">#3CB671</Color>
<Color x:Key="Color_Border_Gradient_2">#13B65A</Color>
- <Color x:Key="Color_ToggleButton_OFF_1">#B0B0B0</Color>
- <Color x:Key="Color_ToggleButton_OFF_2">#BCBCBC</Color>
+ <Color x:Key="Color_ToggleButton_OFF_1">#A8A8A8</Color>
+ <Color x:Key="Color_ToggleButton_OFF_2">#B4B4B4</Color>
<Color x:Key="Color_ToggleButton_ON_1">#3CB671</Color>
<Color x:Key="Color_ToggleButton_ON_2">#1AB65E</Color>
diff --git a/.Source/GTweak/Utilities/Control/SearchUpdates.cs b/.Source/GTweak/Utilities/Control/SearchUpdates.cs
index ad73223f..7d951e98 100644
--- a/.Source/GTweak/Utilities/Control/SearchUpdates.cs
+++ b/.Source/GTweak/Utilities/Control/SearchUpdates.cs
@@ -1,4 +1,5 @@
using Newtonsoft.Json;
+using System;
using System.IO;
using System.Net;
@@ -20,20 +21,29 @@ namespace GTweak.Utilities.Control
if (!Settings.IsСheckingUpdate)
return;
- if (!(WebRequest.Create("https://api.github.com/repos/greedeks/gtweak/releases/latest") is HttpWebRequest webRequest))
- return;
+ try
+ {
+ HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create("https://api.github.com/repos/greedeks/gtweak/releases/latest");
- webRequest.ContentType = "application/json";
- webRequest.UserAgent = "Nothing";
+ webRequest.ContentType = "application/json";
+ webRequest.UserAgent = "Nothing";
- using StreamReader sreader = new StreamReader(webRequest.GetResponse().GetResponseStream());
- string DataAsJson = sreader.ReadToEnd();
- GitVersionUtility gitVersionUtility = JsonConvert.DeserializeObject<GitVersionUtility>(DataAsJson);
+ using (HttpWebResponse response = (HttpWebResponse)webRequest.GetResponse())
+ using (StreamReader sreader = new StreamReader(response.GetResponseStream()))
+ {
+ string DataAsJson = sreader.ReadToEnd();
+ GitVersionUtility gitVersionUtility = JsonConvert.DeserializeObject<GitVersionUtility>(DataAsJson);
- if (!string.IsNullOrEmpty(gitVersionUtility.СurrentVersion) && gitVersionUtility.СurrentVersion.CompareTo(Settings.currentRelease) > 0)
+ if (!string.IsNullOrEmpty(gitVersionUtility.СurrentVersion) && gitVersionUtility.СurrentVersion.CompareTo(Settings.currentRelease) > 0)
+ {
+ IsNeedUpdate = true;
+ DownloadVersion = gitVersionUtility.СurrentVersion;
+ }
+ }
+ }
+ catch
{
- IsNeedUpdate = true;
- DownloadVersion = gitVersionUtility.СurrentVersion;
+ IsNeedUpdate = false;
}
}
}