mirror of
https://github.com/RomanBelkov/DiskImager.git
synced 2026-05-15 14:15:51 -06:00
Refactored UI + added notification when operation ends
This commit is contained in:
parent
7a09f7d1aa
commit
55cd4b67cc
8 changed files with 697 additions and 712 deletions
|
|
@ -298,15 +298,15 @@
|
|||
{
|
||||
"Name" = "8:Microsoft Visual Studio"
|
||||
"ProductName" = "8:Disk Imager"
|
||||
"ProductCode" = "8:{AB8B2722-1FDB-41F6-B57A-5D90AE5D1770}"
|
||||
"PackageCode" = "8:{0C6D2267-6898-48CC-A4E3-51696761DE50}"
|
||||
"ProductCode" = "8:{7BBABAB6-EC36-43A5-958B-1009330760E1}"
|
||||
"PackageCode" = "8:{7ED773B2-6F52-46ED-AD6A-FD08665FD478}"
|
||||
"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.3.1"
|
||||
"ProductVersion" = "8:1.3.2"
|
||||
"Manufacturer" = "8:Dynamic Devices"
|
||||
"ARPHELPTELEPHONE" = "8:"
|
||||
"ARPHELPLINK" = "8:"
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ namespace DynamicDevices.DiskWriter
|
|||
checkBoxUseMBR.Checked = true;
|
||||
checkBoxUnmount.Checked = true;
|
||||
|
||||
MessageBoxEx.Owner = Handle;
|
||||
//MessageBoxEx.Owner = Handle;
|
||||
|
||||
toolStripStatusLabel1.Text = Resources.MainForm_MainForm_Initialised__Licensed_under_GPLv3__Use_at_own_risk_;
|
||||
|
||||
|
|
@ -146,15 +146,18 @@ namespace DynamicDevices.DiskWriter
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
toolStripStatusLabel1.Text = ex.Message;
|
||||
Invoke(new Action(() => MessageBox.Show(ex.Message, @"Exception at ReadDrive", MessageBoxButtons.OK, MessageBoxIcon.Error)));
|
||||
}
|
||||
|
||||
if (!res && !disk.IsCancelling)
|
||||
{
|
||||
MessageBoxEx.Show(Resources.MainForm_ButtonReadClick_Problem_with_reading_from_disk_, Resources.MainForm_ButtonReadClick_Read_Error,
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
Invoke(new Action ( () => MessageBox.Show(Resources.MainForm_ButtonReadClick_Problem_with_reading_from_disk_, Resources.MainForm_ButtonReadClick_Read_Error,
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error)));
|
||||
}
|
||||
|
||||
Invoke((MethodInvoker) EnableButtons);
|
||||
if (res)
|
||||
Invoke((MethodInvoker) EndInfo);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -184,6 +187,12 @@ namespace DynamicDevices.DiskWriter
|
|||
if (GetPathIfEmpty() == false)
|
||||
return;
|
||||
|
||||
if (!File.Exists(textBoxFileName.Text))
|
||||
{
|
||||
MessageBox.Show(Resources.MainForm_ButtonWriteClick_File_does_not_exist_, Resources.MainForm_ButtonWriteClick_I_O_Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
DisableButtons(true);
|
||||
|
||||
Task.Factory.StartNew(() =>
|
||||
|
|
@ -209,21 +218,27 @@ namespace DynamicDevices.DiskWriter
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
toolStripStatusLabel1.Text = ex.Message;
|
||||
Invoke(new Action( () => MessageBox.Show(ex.Message, @"Exception at WriteDrive", MessageBoxButtons.OK, MessageBoxIcon.Error)));
|
||||
}
|
||||
|
||||
if (!res && !disk.IsCancelling)
|
||||
{
|
||||
MessageBoxEx.Show(Resources.MainForm_ButtonWriteClick_Problem_writing_to_disk__Is_it_write_protected_, Resources.MainForm_ButtonWriteClick_Write_Error,
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
Invoke(new Action ( () => MessageBox.Show(Resources.MainForm_ButtonWriteClick_Problem_writing_to_disk__Is_it_write_protected_, Resources.MainForm_ButtonWriteClick_Write_Error,
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error)));
|
||||
}
|
||||
|
||||
})).ToArray();
|
||||
|
||||
Task.WaitAll(tasks);
|
||||
|
||||
Invoke((MethodInvoker) EnableButtons);
|
||||
Invoke((MethodInvoker)EndInfo);
|
||||
Invoke((MethodInvoker)EnableButtons);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private static void EndInfo()
|
||||
{
|
||||
System.Media.SystemSounds.Beep.Play();
|
||||
MessageBox.Show(Resources.MainForm_ButtonWriteClick_All_drives_are_ready, Resources.MainForm_ButtonWriteClick_All_done, MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -134,7 +134,7 @@
|
|||
<value>Открыть диалог выбора файла</value>
|
||||
</data>
|
||||
<data name="saveFileDialog1.Filter" xml:space="preserve">
|
||||
<value>Образы файлов (*.img,*.bin,*.sdcard)|*.img;*.bin;*.sdcard|Сжатые файлы (*.zip,*.gz,*tgz)|*.zip;*.gz;*.tgz|Все файлы (*.*)|*.*</value>
|
||||
<value>Файлы образов (*.img,*.bin,*.sdcard)|*.img;*.bin;*.sdcard|XZ архивы (*.xz)|*.xz|ZIP архивы (*.zip)|*.zip|GZ архивы (*.gz,*.tgz)|*.gz;*.tgz|Все файлы (*.*)|*.*</value>
|
||||
</data>
|
||||
<data name="labelFileName.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>64, 13</value>
|
||||
|
|
|
|||
|
|
@ -47,5 +47,5 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.3.1.*")]
|
||||
[assembly: AssemblyFileVersion("1.3.1.0")]
|
||||
[assembly: AssemblyVersion("1.3.2.*")]
|
||||
[assembly: AssemblyFileVersion("1.3.2.0")]
|
||||
|
|
|
|||
38
DiskImager/Properties/Resources.Designer.cs
generated
38
DiskImager/Properties/Resources.Designer.cs
generated
|
|
@ -285,6 +285,24 @@ namespace DynamicDevices.DiskWriter.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to All done!.
|
||||
/// </summary>
|
||||
internal static string MainForm_ButtonWriteClick_All_done {
|
||||
get {
|
||||
return ResourceManager.GetString("MainForm_ButtonWriteClick_All_done", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to All drives are ready.
|
||||
/// </summary>
|
||||
internal static string MainForm_ButtonWriteClick_All_drives_are_ready {
|
||||
get {
|
||||
return ResourceManager.GetString("MainForm_ButtonWriteClick_All_drives_are_ready", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to C: is almost certainly your main hard drive. Writing to this will likely destroy your data, and brick your PC. Are you absolutely sure you want to do this?.
|
||||
/// </summary>
|
||||
|
|
@ -294,6 +312,24 @@ namespace DynamicDevices.DiskWriter.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to File does not exist!.
|
||||
/// </summary>
|
||||
internal static string MainForm_ButtonWriteClick_File_does_not_exist_ {
|
||||
get {
|
||||
return ResourceManager.GetString("MainForm_ButtonWriteClick_File_does_not_exist_", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to I/O Error.
|
||||
/// </summary>
|
||||
internal static string MainForm_ButtonWriteClick_I_O_Error {
|
||||
get {
|
||||
return ResourceManager.GetString("MainForm_ButtonWriteClick_I_O_Error", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Problem writing to disk. Is it write-protected?.
|
||||
/// </summary>
|
||||
|
|
@ -313,7 +349,7 @@ namespace DynamicDevices.DiskWriter.Properties {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Image Files (*.img,*.bin,*.sdcard)|*.img;*.bin;*.sdcard|Compressed Files (*.zip,*.gz,*.tgz, *.xz)|*.zip;*.gz;*.tgz; *.xz|All files (*.*)|*.*.
|
||||
/// Looks up a localized string similar to Image Files (*.img,*.bin,*.sdcard)|*.img;*.bin;*.sdcard|XZ archives (*.xz)|*.xz|ZIP archives (*.zip)|*.zip|GZ archives (*.gz,*.tgz)|*.gz;*.tgz|All files (*.*)|*.*.
|
||||
/// </summary>
|
||||
internal static string MainForm_MainForm_Image_Files__Choose {
|
||||
get {
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@
|
|||
<value>Initialised. Licensed under GPLv3. Use at own risk!</value>
|
||||
</data>
|
||||
<data name="MainForm_MainForm_Image_Files__Choose" xml:space="preserve">
|
||||
<value>Image Files (*.img,*.bin,*.sdcard)|*.img;*.bin;*.sdcard|Compressed Files (*.zip,*.gz,*.tgz, *.xz)|*.zip;*.gz;*.tgz; *.xz|All files (*.*)|*.*</value>
|
||||
<value>Image Files (*.img,*.bin,*.sdcard)|*.img;*.bin;*.sdcard|XZ archives (*.xz)|*.xz|ZIP archives (*.zip)|*.zip|GZ archives (*.gz,*.tgz)|*.gz;*.tgz|All files (*.*)|*.*</value>
|
||||
</data>
|
||||
<data name="MainForm_ButtonReadClick_You_can_read_from_only_one_drive_at_a_time" xml:space="preserve">
|
||||
<value>You can read from only one drive at a time. Please select only one drive from drive list.</value>
|
||||
|
|
@ -204,4 +204,16 @@
|
|||
<data name="Disk_ReadDrive_All_Done___Read_" xml:space="preserve">
|
||||
<value>All Done - Read </value>
|
||||
</data>
|
||||
<data name="MainForm_ButtonWriteClick_File_does_not_exist_" xml:space="preserve">
|
||||
<value>File does not exist!</value>
|
||||
</data>
|
||||
<data name="MainForm_ButtonWriteClick_I_O_Error" xml:space="preserve">
|
||||
<value>I/O Error</value>
|
||||
</data>
|
||||
<data name="MainForm_ButtonWriteClick_All_drives_are_ready" xml:space="preserve">
|
||||
<value>All drives are ready</value>
|
||||
</data>
|
||||
<data name="MainForm_ButtonWriteClick_All_done" xml:space="preserve">
|
||||
<value>All done!</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -139,7 +139,7 @@
|
|||
<value>Ошибка записи</value>
|
||||
</data>
|
||||
<data name="MainForm_MainForm_Image_Files__Choose" xml:space="preserve">
|
||||
<value>Образы файлов (*.img,*.bin,*.sdcard)|*.img;*.bin;*.sdcard|Сжатые файлы (*.zip,*.gz,*.tgz, *.xz)|*.zip;*.gz;*.tgz; *.xz|Все файлы (*.*)|*.*</value>
|
||||
<value>Файлы образов (*.img,*.bin,*.sdcard)|*.img;*.bin;*.sdcard|XZ архивы (*.xz)|*.xz|ZIP архивы (*.zip)|*.zip|GZ архивы (*.gz,*.tgz)|*.gz;*.tgz|Все файлы (*.*)|*.*</value>
|
||||
</data>
|
||||
<data name="MainForm_MainForm_Initialised__Licensed_under_GPLv3__Use_at_own_risk_" xml:space="preserve">
|
||||
<value>Программа лицензирована GNU GPL v3. Авторы не несут ответственность за ущерб!</value>
|
||||
|
|
@ -207,4 +207,16 @@
|
|||
<data name="Disk_ReadDrive_All_Done___Read_" xml:space="preserve">
|
||||
<value>Прочитано</value>
|
||||
</data>
|
||||
<data name="MainForm_ButtonWriteClick_File_does_not_exist_" xml:space="preserve">
|
||||
<value>Файла по введённому пути не существует!</value>
|
||||
</data>
|
||||
<data name="MainForm_ButtonWriteClick_I_O_Error" xml:space="preserve">
|
||||
<value>Ошибка ввода/вывода</value>
|
||||
</data>
|
||||
<data name="MainForm_ButtonWriteClick_All_done" xml:space="preserve">
|
||||
<value>Готово!</value>
|
||||
</data>
|
||||
<data name="MainForm_ButtonWriteClick_All_drives_are_ready" xml:space="preserve">
|
||||
<value>Программа завершила заданные операции</value>
|
||||
</data>
|
||||
</root>
|
||||
Loading…
Add table
Add a link
Reference in a new issue