diff --git a/BookmarkEditForm.cs b/BookmarkEditForm.cs
index 058b7ec..c2ef952 100644
--- a/BookmarkEditForm.cs
+++ b/BookmarkEditForm.cs
@@ -61,7 +61,7 @@ namespace bzit.bomg
isBusy = value;
textBox1.Enabled = textBox2.Enabled = memoBox1.Enabled = !value;
- pictureBox1.Image = (value) ? Resources.aniZomq2x32 : null;
+ ThreadControl.SetImage(pictureBox1, (value) ? Resources.aniZomq2x32 : null);
}
}
@@ -92,7 +92,6 @@ namespace bzit.bomg
this.IsBusy = true;
- //threadWorker.RunWorkerAsync();
await Task.Run(() =>
{
if (itemModel == null) itemModel = new BookmarkItemModel();
diff --git a/MainForm.Designer.cs b/MainForm.Designer.cs
index 133506f..5a9963c 100644
--- a/MainForm.Designer.cs
+++ b/MainForm.Designer.cs
@@ -310,7 +310,7 @@ namespace bzit.bomg
this.findEditMenuItem.Image = global::bzit.bomg.Properties.Resources.search;
this.findEditMenuItem.Name = "findEditMenuItem";
this.findEditMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F)));
- this.findEditMenuItem.Size = new System.Drawing.Size(180, 22);
+ this.findEditMenuItem.Size = new System.Drawing.Size(137, 22);
this.findEditMenuItem.Text = "&Find";
this.findEditMenuItem.Click += new System.EventHandler(this.editFindMenuItem_Click);
//
@@ -370,7 +370,7 @@ namespace bzit.bomg
//
this.optionsToolMenuItem.Name = "optionsToolMenuItem";
this.optionsToolMenuItem.Size = new System.Drawing.Size(180, 22);
- this.optionsToolMenuItem.Text = "&Update Icons";
+ this.optionsToolMenuItem.Text = "&Update Favicons";
this.optionsToolMenuItem.Click += new System.EventHandler(this.toolsOptionsMenuItem_Click);
//
// toolStripDropDownButton5
diff --git a/MainForm.cs b/MainForm.cs
index 2392009..d01f885 100644
--- a/MainForm.cs
+++ b/MainForm.cs
@@ -659,83 +659,49 @@ namespace bzit.bomg
protected void loadBookmarkFile(string filename, int filterIndex)
{
+ sessionFilename = sessionPassword = null;
+ usePassword = false;
+
+ //sessionFilename = filename;
+ //sessionPassword = null;
+ //usePassword = false;
+
+ if (RyzStudio.IO.SharpZipLib.IsZipEncrypted(filename))
+ {
+ TextBoxForm passwordForm = new TextBoxForm("Password", "Password", true);
+ string password = string.Empty;
+
+ while (true)
+ {
+ password = passwordForm.ShowDialog();
+ if (string.IsNullOrWhiteSpace(password))
+ {
+ break;
+ }
+
+ if (RyzStudio.IO.SharpZipLib.TestZipEncrypted(filename, password))
+ {
+ sessionFilename = filename;
+ sessionPassword = password;
+ usePassword = true;
+
+ loadFileType = LoadFileType.Jsnx;
+
+ break;
+ }
+ }
+ }
+
switch (filterIndex)
{
case 1:
- if (RyzStudio.IO.SharpZipLib.IsZipEncrypted(filename))
- {
- TextBoxForm passwordForm = new TextBoxForm("Password", "Password", true);
- string password = string.Empty;
-
- while (true)
- {
- password = passwordForm.ShowDialog();
- if (string.IsNullOrWhiteSpace(password))
- {
- break;
- }
-
- if (RyzStudio.IO.SharpZipLib.TestZipEncrypted(filename, password))
- {
- sessionFilename = filename;
- sessionPassword = password;
- usePassword = true;
-
- loadFileType = LoadFileType.Jsnx;
-
- break;
- }
- }
- }
- else
- {
- sessionFilename = filename;
- sessionPassword = null;
- usePassword = false;
-
- loadFileType = LoadFileType.Jsnx;
- }
-
+ loadFileType = LoadFileType.Jsnx;
break;
case 2:
- if (RyzStudio.IO.SharpZipLib.IsZipEncrypted(filename))
- {
- TextBoxForm passwordForm = new TextBoxForm("Password", "Password", true);
- string password = string.Empty;
-
- while (true)
- {
- password = passwordForm.ShowDialog();
- if (string.IsNullOrWhiteSpace(password))
- {
- break;
- }
-
- if (RyzStudio.IO.SharpZipLib.TestZipEncrypted(filename, password))
- {
- sessionFilename = filename;
- sessionPassword = password;
- usePassword = true;
-
- loadFileType = LoadFileType.Ryz;
-
- break;
- }
- }
- }
- else
- {
- sessionFilename = filename;
- sessionPassword = null;
- usePassword = false;
-
- loadFileType = LoadFileType.Ryz;
- }
-
+ loadFileType = LoadFileType.Ryz;
break;
default:
- sessionFilename = sessionPassword = null;
- usePassword = false;
+ loadFileType = LoadFileType.None;
break;
}
@@ -1228,6 +1194,8 @@ namespace bzit.bomg
}
}
+
+
private void loadFileThread_DoWork(object sender, DoWorkEventArgs e)
{
if (loadFileType == LoadFileType.Jsnx)
diff --git a/RyzStudio/Windows/ThemedForms/TextBoxForm.cs b/RyzStudio/Windows/ThemedForms/TextBoxForm.cs
index a4b7a9b..f72c5da 100644
--- a/RyzStudio/Windows/ThemedForms/TextBoxForm.cs
+++ b/RyzStudio/Windows/ThemedForms/TextBoxForm.cs
@@ -1,10 +1,13 @@
using System;
+using System.ComponentModel;
using System.Windows.Forms;
namespace RyzStudio.Windows.ThemedForms
{
public partial class TextBoxForm : System.Windows.Forms.Form
{
+ protected bool returnValue = false;
+
public TextBoxForm(string title, string labelText, string defaultValue)
{
InitializeComponent();
@@ -54,8 +57,20 @@ namespace RyzStudio.Windows.ThemedForms
textBox1.UseSystemPasswordChar = password;
}
+ protected override void OnClosing(CancelEventArgs e)
+ {
+ base.OnClosing(e);
+
+ if (!returnValue)
+ {
+ textBox1.Text = string.Empty;
+ }
+ }
+
private void button2_Click(object sender, EventArgs e)
{
+ returnValue = true;
+
this.Close();
}
@@ -73,9 +88,12 @@ namespace RyzStudio.Windows.ThemedForms
public new string ShowDialog()
{
+ returnValue = false;
+
base.ShowDialog();
return textBox1.Text;
}
+
}
}
\ No newline at end of file
diff --git a/UpdateIconsForm.Designer.cs b/UpdateIconsForm.Designer.cs
index 77af899..771436b 100644
--- a/UpdateIconsForm.Designer.cs
+++ b/UpdateIconsForm.Designer.cs
@@ -134,7 +134,7 @@ namespace bzit.bomg
this.progressBar1.TabIndex = 66;
this.progressBar1.Value = 0;
//
- // OptionForm
+ // UpdateIconsForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
@@ -149,12 +149,12 @@ namespace bzit.bomg
this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.MaximizeBox = false;
this.MinimizeBox = false;
- this.Name = "OptionForm";
+ this.Name = "UpdateIconsForm";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "Update Icons";
+ this.Text = "Update Favicons";
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
diff --git a/bomg.csproj b/bomg.csproj
index 76666bd..e4f9989 100644
--- a/bomg.csproj
+++ b/bomg.csproj
@@ -102,6 +102,12 @@
+
+ Form
+
+
+ LoadFileForm.cs
+
Form
@@ -199,6 +205,9 @@
Component
+
+ LoadFileForm.cs
+
UpdateIconsForm.cs