mirror of
https://github.com/RomanBelkov/DiskImager.git
synced 2026-05-15 14:15:51 -06:00
Fixed registry issue on clean install
Misc. credits given
This commit is contained in:
parent
55734b3079
commit
e6facdd339
4 changed files with 17 additions and 7 deletions
|
|
@ -229,15 +229,15 @@
|
|||
{
|
||||
"Name" = "8:Microsoft Visual Studio"
|
||||
"ProductName" = "8:Disk Imager"
|
||||
"ProductCode" = "8:{51B52296-A8DC-4D25-9823-E85F0F7AADCF}"
|
||||
"PackageCode" = "8:{43DD1045-2E31-4B8B-8299-C4C2D7BF62D1}"
|
||||
"ProductCode" = "8:{0FAB4085-4FC8-40A6-A5A2-AEE3C3BF3964}"
|
||||
"PackageCode" = "8:{EBCC8810-7797-4808-8316-34B4078546BC}"
|
||||
"UpgradeCode" = "8:{A2F957D8-23F6-44DB-A22C-CCA8275E1FCE}"
|
||||
"AspNetVersion" = "8:4.0.30319.0"
|
||||
"RestartWWWService" = "11:FALSE"
|
||||
"RemovePreviousVersions" = "11:FALSE"
|
||||
"DetectNewerInstalledVersion" = "11:TRUE"
|
||||
"InstallAllUsers" = "11:FALSE"
|
||||
"ProductVersion" = "8:1.2.1"
|
||||
"ProductVersion" = "8:1.2.2"
|
||||
"Manufacturer" = "8:Dynamic Devices"
|
||||
"ARPHELPTELEPHONE" = "8:"
|
||||
"ARPHELPLINK" = "8:"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
/**
|
||||
* DiskImager - a tool for writing / reading images on SD cards
|
||||
*
|
||||
* Copyright 2015 by Roman Belkov <romanbelkov@gmail.com>
|
||||
* Copyright 2013, 2014 by Alex J. Lennon <ajlennon@dynamicdevices.co.uk>
|
||||
*
|
||||
* Licensed under GNU General Public License 3.0 or later.
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ namespace DynamicDevices.DiskWriter
|
|||
{
|
||||
InitializeComponent();
|
||||
|
||||
CreateRegistry();
|
||||
ChangeLanguage("en-US");
|
||||
|
||||
checkBoxUseMBR.Checked = true;
|
||||
|
|
@ -566,15 +567,22 @@ namespace DynamicDevices.DiskWriter
|
|||
ctrl.ResumeLayout(false);
|
||||
}
|
||||
|
||||
private const string RegistryPath = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Dynamic Devices Ltd\\DiskImager";
|
||||
|
||||
private static void CreateRegistry()
|
||||
{
|
||||
if ((string) Registry.GetValue(RegistryPath, "Language", "") != null) return;
|
||||
Registry.SetValue(RegistryPath, "FileName", "");
|
||||
Registry.SetValue(RegistryPath, "Language", "en-US");
|
||||
}
|
||||
|
||||
private void ReadRegistry()
|
||||
{
|
||||
const string registryPath = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Dynamic Devices Ltd\\DiskImager";
|
||||
|
||||
var file = (string)Registry.GetValue(registryPath, "FileName", "");
|
||||
var file = (string)Registry.GetValue(RegistryPath, "FileName", "");
|
||||
if (File.Exists(file))
|
||||
textBoxFileName.Text = file;
|
||||
|
||||
var lang = (string)Registry.GetValue(registryPath, "Language", "en-US");
|
||||
var lang = (string)Registry.GetValue(RegistryPath, "Language", "en-US");
|
||||
if (lang != "en-US")
|
||||
{
|
||||
ChangeLanguage(lang);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
/**
|
||||
* DiskImager - a tool for writing / reading images on SD cards
|
||||
*
|
||||
* Copyright 2015 by Roman Belkov <romanbelkov@gmail.com>
|
||||
* Copyright 2013, 2014 by Alex J. Lennon <ajlennon@dynamicdevices.co.uk>
|
||||
*
|
||||
* Licensed under GNU General Public License 3.0 or later.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue