Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
HovKlan-DH committed May 17, 2023
1 parent b2bbc60 commit e9701de
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 59 deletions.
2 changes: 0 additions & 2 deletions HovText/HovText.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,6 @@
<ItemGroup>
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.NetAnalyzers.7.0.1\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll" />
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.NetAnalyzers.7.0.1\analyzers\dotnet\cs\Microsoft.CodeAnalysis.NetAnalyzers.dll" />
<Analyzer Include="..\packages\SecurityCodeScan.VS2019.5.6.7\analyzers\dotnet\SecurityCodeScan.VS2019.dll" />
<Analyzer Include="..\packages\SecurityCodeScan.VS2019.5.6.7\analyzers\dotnet\YamlDotNet.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets')" />
Expand Down
4 changes: 2 additions & 2 deletions HovText/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("03fbad69-cd44-4a0c-b4bf-90406561f14f")]
//[assembly: AssemblyVersion("2021.01.23.1")]
[assembly: AssemblyFileVersion("2023.05.14.1")]
[assembly: AssemblyFileVersion("2023.05.17.0")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
[assembly: NeutralResourcesLanguage("en")]
[assembly: AssemblyVersion("2023.05.14.1")]
[assembly: AssemblyVersion("2023.05.17.0")]
26 changes: 13 additions & 13 deletions HovText/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 18 additions & 20 deletions HovText/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
using NHotkey.WindowsForms; // https://github.com/thomaslevesque/NHotkey
using Newtonsoft.Json; // https://www.newtonsoft.com/json
using System.Management;
using System.Net.Http;

// ----------------------------------------------------------------------------
// Upload application to these places:
Expand Down Expand Up @@ -1262,18 +1261,18 @@ private void UpdateTimer_Tick(object sender, EventArgs e)
byte[] responseBytes = webClient.UploadValues(hovtextPage + "/autoupdate/", postData);

// Convert the response bytes to a string
string versionOnline = Encoding.UTF8.GetString(responseBytes);
string checkedVersion = Encoding.UTF8.GetString(responseBytes);

// Download the new stable version
// string versionOnline = webClient.DownloadString(hovtextPage + "/autoupdate/");
if (versionOnline.Substring(0, 7) == "Version")
if (checkedVersion.Substring(0, 7) == "Version")
{
versionOnline = versionOnline.Substring(9);
Logging.Log(" Stable version available = [" + versionOnline + "]");
checkedVersion = checkedVersion.Substring(9);
Logging.Log(" Stable version available = [" + checkedVersion + "]");
update.GuiAppVerYours.Text = appVer;
update.GuiAppVerOnline.Text = versionOnline;
string lastVersionOnline = GetRegistryKey(registryPath, "VersionOnline");
if (lastVersionOnline != versionOnline && versionOnline != appVer)
update.GuiAppVerOnline.Text = checkedVersion;
string lastCheckedVersion = GetRegistryKey(registryPath, "CheckedVersion");
if (lastCheckedVersion != checkedVersion && checkedVersion != appVer)
{
update.Show();
update.Activate();
Expand Down Expand Up @@ -1337,14 +1336,6 @@ private static void ConvertLegacyRegistry()

// Check if the following registry entries exists, and if so convert them to new values

// Convert "CheckedVersion" => "VersionOnline"
regVal = GetRegistryKey(registryPath, "CheckedVersion");
if (regVal != null || regVal?.Length == 0)
{
RegistryKeyCheckOrCreate(registryPath, "VersionOnline", regVal);
DeleteRegistryKey(registryPath, "CheckedVersion");
}

// Convert "Hotkey1" => "HotkeyToggleApplication"
regVal = GetRegistryKey(registryPath, "Hotkey1");
if (regVal != null || regVal?.Length == 0)
Expand Down Expand Up @@ -1456,6 +1447,13 @@ private static void ConvertLegacyRegistry()
DeleteRegistryKey(registryPath, "CheckUpdates");
}

// Delete "VersionOnline" - it was something used in development versions until I reverted back to "CheckedVersion"
regVal = GetRegistryKey(registryPath, "VersionOnline");
if (regVal != null || regVal?.Length == 0)
{
DeleteRegistryKey(registryPath, "VersionOnline");
}

// Delete "HistoryColorCustomBorder"
regVal = GetRegistryKey(registryPath, "HistoryColorCustomBorder");
if (regVal != null || regVal?.Length == 0)
Expand Down Expand Up @@ -1602,9 +1600,9 @@ private static void InitializeRegistry()
RegistryKeyCheckOrCreate(registryPath, "NotificationShown", "0");
regVal = GetRegistryKey(registryPath, "NotificationShown");
Logging.Log(" \"NotificationShown\" = [" + regVal + "]");
RegistryKeyCheckOrCreate(registryPath, "VersionOnline", appVer);
regVal = GetRegistryKey(registryPath, "VersionOnline");
Logging.Log(" \"VersionOnline\" = [" + regVal + "]");
RegistryKeyCheckOrCreate(registryPath, "CheckedVersion", appVer);
regVal = GetRegistryKey(registryPath, "checkedVersion");
Logging.Log(" \"CheckedVersion\" = [" + regVal + "]");
}


Expand Down Expand Up @@ -4378,7 +4376,7 @@ private void CheckIfUpdatedFromDevelopmentToStable()
long fileSize = fileInfo.Length;

// React if the file is larger than 5MB
if (fileSize > 5 * 1_024_000)
if (fileSize > (10 * 1_024_000))
{
Logging.Log("Shown popup that the troubleshooting logfile is bigger than 5MB");
tooBigLogfile.Show();
Expand Down
40 changes: 20 additions & 20 deletions HovText/Settings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,26 @@
drhN/ut0/Hp0iHDif3E9fI44oh/X6KuIK6NGjZpVNTW19Ii2hH5p+t+AbGm3FYs1dWvUqFGpZs2alamu
Da9Tt1U45u8g2KJ59KpXr/4DUZWirjdhTBiVQnktY21NDWNtDdHfxagSpZpiUZ86depUrV+/vjY5Vlcs
FrejtO1/EX2C22xDfqvym1YQ/R/WwXyKz7DvmgAAAABJRU5ErkJggg==
</value>
</data>
<data name="GuiDevelopmentRefresh.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAVCAYAAABG1c6oAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
DAAACwwBP0AiyAAAA1ZJREFUOE+lVd1Lk1Ecfvfhqn3pdKOtodKFzG1eKHohXkSEhjYxceRcOChoKYLf
uPk1hXnZXfdhBtEfEBJiUF1UV1lm0BfYhXUXYlFm5rae5/Ce8Ta9a/B4znnPeZ7zO78vlVwul8fMzIwx
lUrpOB8ZGXE2NzdfLysre64oyh7hdDqftbS0XBsdHS3jGZzVz87OGlWuiWNebG5uTghNTU0db2tru1Je
Xr5qNBq3IbQP/FGxz2+VlZUroVAoNj09LUQgpucYj8d9Qkxjldfn890FEVcJUIzIqpBrse/3+5eGh4e9
5Pb09Jy3Wq3rijQZYqfwe8yDer3+J8bfkmgwGHYIueYezvzgvKKiYrmrqysMsU8Wi+UdBQ00vaqq6p5K
/oYxS9GamprFSCTSiqf4gUB3d/eFQCCwpNPpfvEsxl2eBejjnMPhWBNPpj/wIaPemsFNWxAKce8ohMPh
TpvNtomzBwBfwjFbXFy8oSBiDgaAH3Hjnslk2u7t7T1DIixn1IXDCfoaQSvivKOjI6oRpF8zJSUl60pT
U1MSC/EEor6+/oYqJohayEzo6+sLut3up5IjYTabPyper/dBaWnpOrABvOzv7/el0+m8VYWYnJy0wI+3
QN5yuVwvkKevkZ+Cj5cuKxMTE45kMmlNJBI2jGZJlKlUCDzZND4+7sJoJg8gT8JyiPC/UFRlu+YWG6tF
teLEUSSt9XiZGSDfOjY25lL4fkD4QfXHGpJ0E+V1H8nu0QpJMDgLCwt65GYQuUffvwLeNjY2JhCcfyNF
2O32D7FY7CzJ8/Pzh3wpM6C2tvamljc4OOjBKLKcecR84jzb2toaJ4E5p30ec1KKRaPRc0VFRTvMXXAO
kC0P+Z0/2UlkkmaQ8e9RZh1SqBDYu4i0+UKOrK7Ozs5L3FPUuqQYIeuTDWI3GAzeBlnWsl+t5TsqJ4u6
/86z1dXVS+wJgB5rkeGfUc9XkZgrqhhvLew2bBrSX/lug6euonxP0joGS0F03sDcCD8MDQ2VF/RD0akB
2Q9pWb5MYe0ixNzkSl8rAwMDpzlB1zVwhNOPsft4PJ4nkghIH4s1rHrU3t5+WQZIGzjxB6aK2mUUCbmJ
buyqq6tLQ2Qbfvva0NCQkv9PCPpMez6Xyyl/AWgTtp7WXyHsAAAAAElFTkSuQmCC
</value>
</data>
<data name="PictureBox5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
Expand Down Expand Up @@ -578,26 +598,6 @@
d5phfHJeXp6JtFpqLJBXkBc7u7rk0QMYPd67QwejBckfOb/xPmdIBZ+TxdyR8Iy4wc1hvr1Om37OJ9qS
rA2e6upqUwPjK9AgfYybFBYWfo3ypdbWtiYzzOJWOa9pcnRZ27nKZW2Xg9PqFpMZpnv1d8RvfKYikcgI
wxgT/gMxJXum+LKFagAAAABJRU5ErkJggg==
</value>
</data>
<data name="GuiDevelopmentRefresh.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAVCAYAAABG1c6oAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
DAAACwwBP0AiyAAAA1ZJREFUOE+lVd1Lk1Ecfvfhqn3pdKOtodKFzG1eKHohXkSEhjYxceRcOChoKYLf
uPk1hXnZXfdhBtEfEBJiUF1UV1lm0BfYhXUXYlFm5rae5/Ce8Ta9a/B4znnPeZ7zO78vlVwul8fMzIwx
lUrpOB8ZGXE2NzdfLysre64oyh7hdDqftbS0XBsdHS3jGZzVz87OGlWuiWNebG5uTghNTU0db2tru1Je
Xr5qNBq3IbQP/FGxz2+VlZUroVAoNj09LUQgpucYj8d9Qkxjldfn890FEVcJUIzIqpBrse/3+5eGh4e9
5Pb09Jy3Wq3rijQZYqfwe8yDer3+J8bfkmgwGHYIueYezvzgvKKiYrmrqysMsU8Wi+UdBQ00vaqq6p5K
/oYxS9GamprFSCTSiqf4gUB3d/eFQCCwpNPpfvEsxl2eBejjnMPhWBNPpj/wIaPemsFNWxAKce8ohMPh
TpvNtomzBwBfwjFbXFy8oSBiDgaAH3Hjnslk2u7t7T1DIixn1IXDCfoaQSvivKOjI6oRpF8zJSUl60pT
U1MSC/EEor6+/oYqJohayEzo6+sLut3up5IjYTabPyper/dBaWnpOrABvOzv7/el0+m8VYWYnJy0wI+3
QN5yuVwvkKevkZ+Cj5cuKxMTE45kMmlNJBI2jGZJlKlUCDzZND4+7sJoJg8gT8JyiPC/UFRlu+YWG6tF
teLEUSSt9XiZGSDfOjY25lL4fkD4QfXHGpJ0E+V1H8nu0QpJMDgLCwt65GYQuUffvwLeNjY2JhCcfyNF
2O32D7FY7CzJ8/Pzh3wpM6C2tvamljc4OOjBKLKcecR84jzb2toaJ4E5p30ec1KKRaPRc0VFRTvMXXAO
kC0P+Z0/2UlkkmaQ8e9RZh1SqBDYu4i0+UKOrK7Ozs5L3FPUuqQYIeuTDWI3GAzeBlnWsl+t5TsqJ4u6
/86z1dXVS+wJgB5rkeGfUc9XkZgrqhhvLew2bBrSX/lug6euonxP0joGS0F03sDcCD8MDQ2VF/RD0akB
2Q9pWb5MYe0ixNzkSl8rAwMDpzlB1zVwhNOPsft4PJ4nkghIH4s1rHrU3t5+WQZIGzjxB6aK2mUUCbmJ
buyqq6tLQ2Qbfvva0NCQkv9PCPpMez6Xyyl/AWgTtp7WXyHsAAAAAElFTkSuQmCC
</value>
</data>
<data name="AdvancedLabelInfoCleanup.Text" xml:space="preserve">
Expand Down
2 changes: 1 addition & 1 deletion HovText/Update.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private void SkipVersion_Click(object sender, EventArgs e)
{
Logging.Log("Update popup: Clicked the \"Skip this version\"");
Hide();
Settings.SetRegistryKey(Settings.registryPath, "VersionOnline", GuiAppVerOnline.Text);
Settings.SetRegistryKey(Settings.registryPath, "CheckedVersion", GuiAppVerOnline.Text);
}


Expand Down
1 change: 0 additions & 1 deletion HovText/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
<package id="NHotkey" version="2.1.1" targetFramework="net48" />
<package id="NHotkey.WindowsForms" version="2.1.1" targetFramework="net48" />
<package id="SecurityCodeScan.VS2019" version="5.6.7" targetFramework="net48" developmentDependency="true" />
</packages>

0 comments on commit e9701de

Please sign in to comment.