diff --git a/BookmarkItem.cs b/BookmarkItem.cs
index 2892057..dcd6993 100644
--- a/BookmarkItem.cs
+++ b/BookmarkItem.cs
@@ -317,7 +317,7 @@ namespace bzit.bomg
}
// load favicon image
- if (!string.IsNullOrEmpty(this.IconAddress))
+ if (!string.IsNullOrWhiteSpace(this.IconAddress))
{
try
{
diff --git a/IconDatabase.cs b/IconDatabase.cs
index 44327d4..e1c7a63 100644
--- a/IconDatabase.cs
+++ b/IconDatabase.cs
@@ -12,9 +12,9 @@ namespace bzit.bomg
this.requiredTableList = new string[] { "bzt_app_bomg_icons" };
}
- protected override bool Prepare()
+ protected override bool prepareDatabase()
{
- if (dbConnection == null)
+ if (this.DBConnection == null)
{
return false;
}
@@ -34,7 +34,7 @@ namespace bzit.bomg
public bool HasIcon(string url)
{
- return this.DoQueryExist("SELECT 1 FROM bzt_app_bomg_icons WHERE ico_key='" + SQLiteDatabase2.EscapeValue(url) + "'");
+ return this.DoQueryExist("SELECT 1 FROM bzt_app_bomg_icons WHERE ico_key='" + escapeValue(url) + "'");
}
/* public bool AddIcon(string url, Image image)
@@ -73,11 +73,11 @@ namespace bzit.bomg
if (this.HasIcon(url))
{
- return this.DoNonQuery("UPDATE bzt_app_bomg_icons SET='" + bytesToSQLString(image) + "' WHERE ico_key='" + SQLiteDatabase2.EscapeValue(url) + "';") >= 0;
+ return this.DoNonQuery("UPDATE bzt_app_bomg_icons SET='" + bytesToSQLString(image) + "' WHERE ico_key='" + escapeValue(url) + "';") >= 0;
}
else
{
- return this.DoNonQuery("INSERT INTO bzt_app_bomg_icons (ico_key, ico_content) VALUES ('" + SQLiteDatabase2.EscapeValue(url) + "', '" + bytesToSQLString(image) + "');") >= 0;
+ return this.DoNonQuery("INSERT INTO bzt_app_bomg_icons (ico_key, ico_content) VALUES ('" + escapeValue(url) + "', '" + bytesToSQLString(image) + "');") >= 0;
}
}
@@ -88,7 +88,7 @@ namespace bzit.bomg
return null;
}
- string rs = this.DoQuerySingle("SELECT ico_content FROM bzt_app_bomg_icons WHERE ico_key='" + SQLiteDatabase2.EscapeValue(url) + "'");
+ string rs = this.DoQuerySingle("SELECT ico_content FROM bzt_app_bomg_icons WHERE ico_key='" + escapeValue(url) + "'");
return sqlStringToImage(rs);
}
@@ -99,7 +99,7 @@ namespace bzit.bomg
return;
}
- this.DoNonQuery("DELETE FROM bzt_app_bomg_icons WHERE ico_key='" + SQLiteDatabase2.EscapeValue(url) + "';");
+ this.DoNonQuery("DELETE FROM bzt_app_bomg_icons WHERE ico_key='" + escapeValue(url) + "';");
}
#endregion
diff --git a/MainForm.Designer.cs b/MainForm.Designer.cs
index 579f3d9..aa7c313 100644
--- a/MainForm.Designer.cs
+++ b/MainForm.Designer.cs
@@ -28,88 +28,88 @@ namespace bzit.bomg
///
private void InitializeComponent()
{
- this.components = new System.ComponentModel.Container();
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
- this.treeMenuItem = new System.Windows.Forms.ContextMenuStrip(this.components);
- this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
- this.toolStripMenuItem8 = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripMenuItem6 = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
- this.listViewMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
- this.moveFileToToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.statusBar1 = new System.Windows.Forms.StatusBar();
- this.statusBarPanel1 = new System.Windows.Forms.StatusBarPanel();
- this.statusBarPanel2 = new System.Windows.Forms.StatusBarPanel();
- this.oToolTip1 = new System.Windows.Forms.ToolTip(this.components);
- this.imageList1 = new System.Windows.Forms.ImageList(this.components);
- this.toolStrip1 = new System.Windows.Forms.ToolStrip();
- this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton();
- this.newFileMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.openFileMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
- this.closeFileMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
- this.saveFileMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.saveAsFileMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
- this.exportFileMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
- this.exitFileMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripDropDownButton2 = new System.Windows.Forms.ToolStripDropDownButton();
- this.findEditMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripDropDownButton3 = new System.Windows.Forms.ToolStripDropDownButton();
- this.expandAllViewMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.collapseAllViewMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripDropDownButton4 = new System.Windows.Forms.ToolStripDropDownButton();
- this.updateIconsToolMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripSeparator14 = new System.Windows.Forms.ToolStripSeparator();
- this.optionsToolMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripDropDownButton5 = new System.Windows.Forms.ToolStripDropDownButton();
- this.viewHelpHelpMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
- this.aboutHelpMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripDropDownButton7 = new System.Windows.Forms.ToolStripDropDownButton();
- this.alwaysOnTopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
- this.treeMenuFolder = new System.Windows.Forms.ContextMenuStrip(this.components);
- this.toolStripMenuItem15 = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripMenuItem16 = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
- this.toolStripMenuItem14 = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripMenuItem9 = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripMenuItem11 = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
- this.sortToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
- this.toolStripMenuItem12 = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripMenuItem13 = new System.Windows.Forms.ToolStripMenuItem();
- this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
- this.toolStrip2 = new System.Windows.Forms.ToolStrip();
- this.newMenuBarItem = new System.Windows.Forms.ToolStripButton();
- this.openMenuBarItem = new System.Windows.Forms.ToolStripButton();
- this.saveMenuBarItem = new System.Windows.Forms.ToolStripButton();
- this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
- this.treeMenuRoot = new System.Windows.Forms.ContextMenuStrip(this.components);
- this.toolStripMenuItem17 = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripMenuItem18 = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
- this.toolStripMenuItem20 = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator();
- this.toolStripMenuItem22 = new System.Windows.Forms.ToolStripMenuItem();
- this.treeView1 = new bzit.bomg.BookmarkTreeView();
- this.treeMenuItem.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).BeginInit();
- this.toolStrip1.SuspendLayout();
- this.treeMenuFolder.SuspendLayout();
- this.toolStrip2.SuspendLayout();
- this.treeMenuRoot.SuspendLayout();
- this.SuspendLayout();
- //
- // treeMenuItem
- //
- this.treeMenuItem.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.components = new System.ComponentModel.Container();
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
+ this.treeMenuItem = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
+ this.toolStripMenuItem8 = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripMenuItem6 = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
+ this.listViewMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
+ this.moveFileToToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.statusBar1 = new System.Windows.Forms.StatusBar();
+ this.statusBarPanel1 = new System.Windows.Forms.StatusBarPanel();
+ this.statusBarPanel2 = new System.Windows.Forms.StatusBarPanel();
+ this.oToolTip1 = new System.Windows.Forms.ToolTip(this.components);
+ this.imageList1 = new System.Windows.Forms.ImageList(this.components);
+ this.toolStrip1 = new System.Windows.Forms.ToolStrip();
+ this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton();
+ this.newFileMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.openFileMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+ this.closeFileMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
+ this.saveFileMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.saveAsFileMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
+ this.exportFileMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
+ this.exitFileMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripDropDownButton2 = new System.Windows.Forms.ToolStripDropDownButton();
+ this.findEditMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripDropDownButton3 = new System.Windows.Forms.ToolStripDropDownButton();
+ this.expandAllViewMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.collapseAllViewMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripDropDownButton4 = new System.Windows.Forms.ToolStripDropDownButton();
+ this.updateIconsToolMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator14 = new System.Windows.Forms.ToolStripSeparator();
+ this.optionsToolMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripDropDownButton5 = new System.Windows.Forms.ToolStripDropDownButton();
+ this.viewHelpHelpMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
+ this.aboutHelpMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripDropDownButton7 = new System.Windows.Forms.ToolStripDropDownButton();
+ this.alwaysOnTopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
+ this.treeMenuFolder = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.toolStripMenuItem15 = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripMenuItem16 = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
+ this.toolStripMenuItem14 = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripMenuItem9 = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripMenuItem11 = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
+ this.sortToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
+ this.toolStripMenuItem12 = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripMenuItem13 = new System.Windows.Forms.ToolStripMenuItem();
+ this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
+ this.toolStrip2 = new System.Windows.Forms.ToolStrip();
+ this.newMenuBarItem = new System.Windows.Forms.ToolStripButton();
+ this.openMenuBarItem = new System.Windows.Forms.ToolStripButton();
+ this.saveMenuBarItem = new System.Windows.Forms.ToolStripButton();
+ this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
+ this.treeMenuRoot = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.toolStripMenuItem17 = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripMenuItem18 = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
+ this.toolStripMenuItem20 = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator();
+ this.toolStripMenuItem22 = new System.Windows.Forms.ToolStripMenuItem();
+ this.treeView1 = new bzit.bomg.BookmarkTreeView();
+ this.treeMenuItem.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).BeginInit();
+ this.toolStrip1.SuspendLayout();
+ this.treeMenuFolder.SuspendLayout();
+ this.toolStrip2.SuspendLayout();
+ this.treeMenuRoot.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // treeMenuItem
+ //
+ this.treeMenuItem.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItem4,
this.toolStripSeparator3,
this.toolStripMenuItem8,
@@ -117,113 +117,113 @@ namespace bzit.bomg
this.toolStripSeparator2,
this.listViewMenuItem1,
this.moveFileToToolStripMenuItem});
- this.treeMenuItem.Name = "listViewMenu";
- this.treeMenuItem.Size = new System.Drawing.Size(139, 126);
- //
- // toolStripMenuItem4
- //
- this.toolStripMenuItem4.Name = "toolStripMenuItem4";
- this.toolStripMenuItem4.Size = new System.Drawing.Size(138, 22);
- this.toolStripMenuItem4.Text = "&Open";
- this.toolStripMenuItem4.Click += new System.EventHandler(this.toolStripMenuItem4_Click);
- //
- // toolStripSeparator3
- //
- this.toolStripSeparator3.Name = "toolStripSeparator3";
- this.toolStripSeparator3.Size = new System.Drawing.Size(135, 6);
- //
- // toolStripMenuItem8
- //
- this.toolStripMenuItem8.Name = "toolStripMenuItem8";
- this.toolStripMenuItem8.Size = new System.Drawing.Size(138, 22);
- this.toolStripMenuItem8.Text = "E&dit";
- this.toolStripMenuItem8.Click += new System.EventHandler(this.toolStripMenuItem8_Click);
- //
- // toolStripMenuItem6
- //
- this.toolStripMenuItem6.Name = "toolStripMenuItem6";
- this.toolStripMenuItem6.Size = new System.Drawing.Size(138, 22);
- this.toolStripMenuItem6.Text = "D&elete";
- this.toolStripMenuItem6.Click += new System.EventHandler(this.toolStripMenuItem6_Click);
- //
- // toolStripSeparator2
- //
- this.toolStripSeparator2.Name = "toolStripSeparator2";
- this.toolStripSeparator2.Size = new System.Drawing.Size(135, 6);
- //
- // listViewMenuItem1
- //
- this.listViewMenuItem1.Name = "listViewMenuItem1";
- this.listViewMenuItem1.Size = new System.Drawing.Size(138, 22);
- this.listViewMenuItem1.Text = "Move &Up";
- this.listViewMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem12_Click);
- //
- // moveFileToToolStripMenuItem
- //
- this.moveFileToToolStripMenuItem.Name = "moveFileToToolStripMenuItem";
- this.moveFileToToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
- this.moveFileToToolStripMenuItem.Text = "Move &Down";
- this.moveFileToToolStripMenuItem.Click += new System.EventHandler(this.toolStripMenuItem13_Click);
- //
- // statusBar1
- //
- this.statusBar1.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.statusBar1.Location = new System.Drawing.Point(0, 634);
- this.statusBar1.Name = "statusBar1";
- this.statusBar1.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] {
+ this.treeMenuItem.Name = "listViewMenu";
+ this.treeMenuItem.Size = new System.Drawing.Size(139, 126);
+ //
+ // toolStripMenuItem4
+ //
+ this.toolStripMenuItem4.Name = "toolStripMenuItem4";
+ this.toolStripMenuItem4.Size = new System.Drawing.Size(138, 22);
+ this.toolStripMenuItem4.Text = "&Open";
+ this.toolStripMenuItem4.Click += new System.EventHandler(this.toolStripMenuItem4_Click);
+ //
+ // toolStripSeparator3
+ //
+ this.toolStripSeparator3.Name = "toolStripSeparator3";
+ this.toolStripSeparator3.Size = new System.Drawing.Size(135, 6);
+ //
+ // toolStripMenuItem8
+ //
+ this.toolStripMenuItem8.Name = "toolStripMenuItem8";
+ this.toolStripMenuItem8.Size = new System.Drawing.Size(138, 22);
+ this.toolStripMenuItem8.Text = "E&dit";
+ this.toolStripMenuItem8.Click += new System.EventHandler(this.toolStripMenuItem8_Click);
+ //
+ // toolStripMenuItem6
+ //
+ this.toolStripMenuItem6.Name = "toolStripMenuItem6";
+ this.toolStripMenuItem6.Size = new System.Drawing.Size(138, 22);
+ this.toolStripMenuItem6.Text = "D&elete";
+ this.toolStripMenuItem6.Click += new System.EventHandler(this.toolStripMenuItem6_Click);
+ //
+ // toolStripSeparator2
+ //
+ this.toolStripSeparator2.Name = "toolStripSeparator2";
+ this.toolStripSeparator2.Size = new System.Drawing.Size(135, 6);
+ //
+ // listViewMenuItem1
+ //
+ this.listViewMenuItem1.Name = "listViewMenuItem1";
+ this.listViewMenuItem1.Size = new System.Drawing.Size(138, 22);
+ this.listViewMenuItem1.Text = "Move &Up";
+ this.listViewMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem12_Click);
+ //
+ // moveFileToToolStripMenuItem
+ //
+ this.moveFileToToolStripMenuItem.Name = "moveFileToToolStripMenuItem";
+ this.moveFileToToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
+ this.moveFileToToolStripMenuItem.Text = "Move &Down";
+ this.moveFileToToolStripMenuItem.Click += new System.EventHandler(this.toolStripMenuItem13_Click);
+ //
+ // statusBar1
+ //
+ this.statusBar1.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.statusBar1.Location = new System.Drawing.Point(0, 634);
+ this.statusBar1.Name = "statusBar1";
+ this.statusBar1.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] {
this.statusBarPanel1,
this.statusBarPanel2});
- this.statusBar1.ShowPanels = true;
- this.statusBar1.Size = new System.Drawing.Size(304, 20);
- this.statusBar1.SizingGrip = false;
- this.statusBar1.TabIndex = 9;
- //
- // statusBarPanel1
- //
- this.statusBarPanel1.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring;
- this.statusBarPanel1.Name = "statusBarPanel1";
- this.statusBarPanel1.Width = 204;
- //
- // statusBarPanel2
- //
- this.statusBarPanel2.Alignment = System.Windows.Forms.HorizontalAlignment.Center;
- this.statusBarPanel2.Name = "statusBarPanel2";
- //
- // imageList1
- //
- this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
- this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
- this.imageList1.Images.SetKeyName(0, "transmit_blue.png");
- this.imageList1.Images.SetKeyName(1, "folder.png");
- this.imageList1.Images.SetKeyName(2, "folder_explore.png");
- this.imageList1.Images.SetKeyName(3, "page_blue.png");
- this.imageList1.Images.SetKeyName(4, "page.png");
- this.imageList1.Images.SetKeyName(5, "page_green.png");
- this.imageList1.Images.SetKeyName(6, "page_red.png");
- //
- // toolStrip1
- //
- this.toolStrip1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
- this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
- this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.statusBar1.ShowPanels = true;
+ this.statusBar1.Size = new System.Drawing.Size(304, 20);
+ this.statusBar1.SizingGrip = false;
+ this.statusBar1.TabIndex = 9;
+ //
+ // statusBarPanel1
+ //
+ this.statusBarPanel1.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring;
+ this.statusBarPanel1.Name = "statusBarPanel1";
+ this.statusBarPanel1.Width = 204;
+ //
+ // statusBarPanel2
+ //
+ this.statusBarPanel2.Alignment = System.Windows.Forms.HorizontalAlignment.Center;
+ this.statusBarPanel2.Name = "statusBarPanel2";
+ //
+ // imageList1
+ //
+ this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
+ this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
+ this.imageList1.Images.SetKeyName(0, "transmit_blue.png");
+ this.imageList1.Images.SetKeyName(1, "folder.png");
+ this.imageList1.Images.SetKeyName(2, "folder_explore.png");
+ this.imageList1.Images.SetKeyName(3, "page_blue.png");
+ this.imageList1.Images.SetKeyName(4, "page.png");
+ this.imageList1.Images.SetKeyName(5, "page_green.png");
+ this.imageList1.Images.SetKeyName(6, "page_red.png");
+ //
+ // toolStrip1
+ //
+ this.toolStrip1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
+ this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
+ this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripDropDownButton1,
this.toolStripDropDownButton2,
this.toolStripDropDownButton3,
this.toolStripDropDownButton4,
this.toolStripDropDownButton5,
this.toolStripDropDownButton7});
- this.toolStrip1.Location = new System.Drawing.Point(0, 0);
- this.toolStrip1.Name = "toolStrip1";
- this.toolStrip1.Padding = new System.Windows.Forms.Padding(5, 0, 1, 0);
- this.toolStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
- this.toolStrip1.Size = new System.Drawing.Size(304, 25);
- this.toolStrip1.TabIndex = 25;
- this.toolStrip1.Text = "toolStrip1";
- //
- // toolStripDropDownButton1
- //
- this.toolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.toolStrip1.Location = new System.Drawing.Point(0, 0);
+ this.toolStrip1.Name = "toolStrip1";
+ this.toolStrip1.Padding = new System.Windows.Forms.Padding(5, 0, 1, 0);
+ this.toolStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
+ this.toolStrip1.Size = new System.Drawing.Size(304, 25);
+ this.toolStrip1.TabIndex = 25;
+ this.toolStrip1.Text = "toolStrip1";
+ //
+ // toolStripDropDownButton1
+ //
+ this.toolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.newFileMenuItem,
this.openFileMenuItem,
this.toolStripSeparator1,
@@ -235,238 +235,239 @@ namespace bzit.bomg
this.exportFileMenuItem,
this.toolStripSeparator6,
this.exitFileMenuItem});
- this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
- this.toolStripDropDownButton1.ShowDropDownArrow = false;
- this.toolStripDropDownButton1.Size = new System.Drawing.Size(29, 22);
- this.toolStripDropDownButton1.Text = "&File";
- //
- // newFileMenuItem
- //
- this.newFileMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("newFileMenuItem.Image")));
- this.newFileMenuItem.Name = "newFileMenuItem";
- this.newFileMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
- this.newFileMenuItem.Size = new System.Drawing.Size(186, 22);
- this.newFileMenuItem.Text = "&New";
- this.newFileMenuItem.Click += new System.EventHandler(this.newSessionToolStripMenuItem_Click);
- //
- // openFileMenuItem
- //
- this.openFileMenuItem.Image = global::bzit.bomg.Properties.Resources.folder_page;
- this.openFileMenuItem.Name = "openFileMenuItem";
- this.openFileMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
- this.openFileMenuItem.Size = new System.Drawing.Size(186, 22);
- this.openFileMenuItem.Text = "&Open";
- this.openFileMenuItem.Click += new System.EventHandler(this.toolStripMenuItem2_Click);
- //
- // toolStripSeparator1
- //
- this.toolStripSeparator1.Name = "toolStripSeparator1";
- this.toolStripSeparator1.Size = new System.Drawing.Size(183, 6);
- //
- // closeFileMenuItem
- //
- this.closeFileMenuItem.Name = "closeFileMenuItem";
- this.closeFileMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W)));
- this.closeFileMenuItem.Size = new System.Drawing.Size(186, 22);
- this.closeFileMenuItem.Text = "&Close";
- this.closeFileMenuItem.Click += new System.EventHandler(this.toolStripMenuItem3_Click);
- //
- // toolStripSeparator4
- //
- this.toolStripSeparator4.Name = "toolStripSeparator4";
- this.toolStripSeparator4.Size = new System.Drawing.Size(183, 6);
- //
- // saveFileMenuItem
- //
- this.saveFileMenuItem.Image = global::bzit.bomg.Properties.Resources.disk;
- this.saveFileMenuItem.Name = "saveFileMenuItem";
- this.saveFileMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
- this.saveFileMenuItem.Size = new System.Drawing.Size(186, 22);
- this.saveFileMenuItem.Text = "&Save";
- this.saveFileMenuItem.Click += new System.EventHandler(this.importSnapshotToolStripMenuItem_Click);
- //
- // saveAsFileMenuItem
- //
- this.saveAsFileMenuItem.Image = global::bzit.bomg.Properties.Resources.page_white_disk;
- this.saveAsFileMenuItem.Name = "saveAsFileMenuItem";
- this.saveAsFileMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
+ this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
+ this.toolStripDropDownButton1.ShowDropDownArrow = false;
+ this.toolStripDropDownButton1.Size = new System.Drawing.Size(29, 22);
+ this.toolStripDropDownButton1.Text = "&File";
+ //
+ // newFileMenuItem
+ //
+ this.newFileMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("newFileMenuItem.Image")));
+ this.newFileMenuItem.Name = "newFileMenuItem";
+ this.newFileMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
+ this.newFileMenuItem.Size = new System.Drawing.Size(186, 22);
+ this.newFileMenuItem.Text = "&New";
+ this.newFileMenuItem.Click += new System.EventHandler(this.newSessionToolStripMenuItem_Click);
+ //
+ // openFileMenuItem
+ //
+ this.openFileMenuItem.Image = global::bzit.bomg.Properties.Resources.folder_page;
+ this.openFileMenuItem.Name = "openFileMenuItem";
+ this.openFileMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
+ this.openFileMenuItem.Size = new System.Drawing.Size(186, 22);
+ this.openFileMenuItem.Text = "&Open";
+ this.openFileMenuItem.Click += new System.EventHandler(this.toolStripMenuItem2_Click);
+ //
+ // toolStripSeparator1
+ //
+ this.toolStripSeparator1.Name = "toolStripSeparator1";
+ this.toolStripSeparator1.Size = new System.Drawing.Size(183, 6);
+ //
+ // closeFileMenuItem
+ //
+ this.closeFileMenuItem.Name = "closeFileMenuItem";
+ this.closeFileMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W)));
+ this.closeFileMenuItem.Size = new System.Drawing.Size(186, 22);
+ this.closeFileMenuItem.Text = "&Close";
+ this.closeFileMenuItem.Click += new System.EventHandler(this.toolStripMenuItem3_Click);
+ //
+ // toolStripSeparator4
+ //
+ this.toolStripSeparator4.Name = "toolStripSeparator4";
+ this.toolStripSeparator4.Size = new System.Drawing.Size(183, 6);
+ //
+ // saveFileMenuItem
+ //
+ this.saveFileMenuItem.Image = global::bzit.bomg.Properties.Resources.disk;
+ this.saveFileMenuItem.Name = "saveFileMenuItem";
+ this.saveFileMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
+ this.saveFileMenuItem.Size = new System.Drawing.Size(186, 22);
+ this.saveFileMenuItem.Text = "&Save";
+ this.saveFileMenuItem.Click += new System.EventHandler(this.importSnapshotToolStripMenuItem_Click);
+ //
+ // saveAsFileMenuItem
+ //
+ this.saveAsFileMenuItem.Image = global::bzit.bomg.Properties.Resources.page_white_disk;
+ this.saveAsFileMenuItem.Name = "saveAsFileMenuItem";
+ this.saveAsFileMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.S)));
- this.saveAsFileMenuItem.Size = new System.Drawing.Size(186, 22);
- this.saveAsFileMenuItem.Text = "Save &As";
- this.saveAsFileMenuItem.Click += new System.EventHandler(this.exportSnapshotToolStripMenuItem_Click);
- //
- // toolStripSeparator8
- //
- this.toolStripSeparator8.Name = "toolStripSeparator8";
- this.toolStripSeparator8.Size = new System.Drawing.Size(183, 6);
- //
- // exportFileMenuItem
- //
- this.exportFileMenuItem.Enabled = false;
- this.exportFileMenuItem.Name = "exportFileMenuItem";
- this.exportFileMenuItem.Size = new System.Drawing.Size(186, 22);
- this.exportFileMenuItem.Text = "&Export";
- this.exportFileMenuItem.Click += new System.EventHandler(this.toolStripMenuItem7_Click);
- //
- // toolStripSeparator6
- //
- this.toolStripSeparator6.Name = "toolStripSeparator6";
- this.toolStripSeparator6.Size = new System.Drawing.Size(183, 6);
- //
- // exitFileMenuItem
- //
- this.exitFileMenuItem.Name = "exitFileMenuItem";
- this.exitFileMenuItem.Size = new System.Drawing.Size(186, 22);
- this.exitFileMenuItem.Text = "E&xit";
- this.exitFileMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem1_Click);
- //
- // toolStripDropDownButton2
- //
- this.toolStripDropDownButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.toolStripDropDownButton2.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.saveAsFileMenuItem.Size = new System.Drawing.Size(186, 22);
+ this.saveAsFileMenuItem.Text = "Save &As";
+ this.saveAsFileMenuItem.Click += new System.EventHandler(this.exportSnapshotToolStripMenuItem_Click);
+ //
+ // toolStripSeparator8
+ //
+ this.toolStripSeparator8.Name = "toolStripSeparator8";
+ this.toolStripSeparator8.Size = new System.Drawing.Size(183, 6);
+ //
+ // exportFileMenuItem
+ //
+ this.exportFileMenuItem.Enabled = false;
+ this.exportFileMenuItem.Name = "exportFileMenuItem";
+ this.exportFileMenuItem.Size = new System.Drawing.Size(186, 22);
+ this.exportFileMenuItem.Text = "&Export";
+ this.exportFileMenuItem.Click += new System.EventHandler(this.toolStripMenuItem7_Click);
+ //
+ // toolStripSeparator6
+ //
+ this.toolStripSeparator6.Name = "toolStripSeparator6";
+ this.toolStripSeparator6.Size = new System.Drawing.Size(183, 6);
+ //
+ // exitFileMenuItem
+ //
+ this.exitFileMenuItem.Name = "exitFileMenuItem";
+ this.exitFileMenuItem.Size = new System.Drawing.Size(186, 22);
+ this.exitFileMenuItem.Text = "E&xit";
+ this.exitFileMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem1_Click);
+ //
+ // toolStripDropDownButton2
+ //
+ this.toolStripDropDownButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.toolStripDropDownButton2.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.findEditMenuItem});
- this.toolStripDropDownButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.toolStripDropDownButton2.Name = "toolStripDropDownButton2";
- this.toolStripDropDownButton2.ShowDropDownArrow = false;
- this.toolStripDropDownButton2.Size = new System.Drawing.Size(31, 22);
- this.toolStripDropDownButton2.Text = "&Edit";
- //
- // findEditMenuItem
- //
- this.findEditMenuItem.Image = global::bzit.bomg.Properties.Resources.magnifier;
- 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(137, 22);
- this.findEditMenuItem.Text = "&Find";
- this.findEditMenuItem.Click += new System.EventHandler(this.toolStripButton5_Click);
- //
- // toolStripDropDownButton3
- //
- this.toolStripDropDownButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.toolStripDropDownButton3.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.toolStripDropDownButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripDropDownButton2.Name = "toolStripDropDownButton2";
+ this.toolStripDropDownButton2.ShowDropDownArrow = false;
+ this.toolStripDropDownButton2.Size = new System.Drawing.Size(31, 22);
+ this.toolStripDropDownButton2.Text = "&Edit";
+ //
+ // findEditMenuItem
+ //
+ this.findEditMenuItem.Image = global::bzit.bomg.Properties.Resources.magnifier;
+ 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(137, 22);
+ this.findEditMenuItem.Text = "&Find";
+ this.findEditMenuItem.Click += new System.EventHandler(this.toolStripButton5_Click);
+ //
+ // toolStripDropDownButton3
+ //
+ this.toolStripDropDownButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.toolStripDropDownButton3.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.expandAllViewMenuItem,
this.collapseAllViewMenuItem});
- this.toolStripDropDownButton3.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.toolStripDropDownButton3.Name = "toolStripDropDownButton3";
- this.toolStripDropDownButton3.ShowDropDownArrow = false;
- this.toolStripDropDownButton3.Size = new System.Drawing.Size(36, 22);
- this.toolStripDropDownButton3.Text = "&View";
- //
- // expandAllViewMenuItem
- //
- this.expandAllViewMenuItem.Enabled = false;
- this.expandAllViewMenuItem.Name = "expandAllViewMenuItem";
- this.expandAllViewMenuItem.Size = new System.Drawing.Size(136, 22);
- this.expandAllViewMenuItem.Text = "&Expand All";
- this.expandAllViewMenuItem.Click += new System.EventHandler(this.expandAllToolStripMenuItem_Click);
- //
- // collapseAllViewMenuItem
- //
- this.collapseAllViewMenuItem.Enabled = false;
- this.collapseAllViewMenuItem.Name = "collapseAllViewMenuItem";
- this.collapseAllViewMenuItem.Size = new System.Drawing.Size(136, 22);
- this.collapseAllViewMenuItem.Text = "&Collapse All";
- this.collapseAllViewMenuItem.Click += new System.EventHandler(this.collapseAllToolStripMenuItem_Click);
- //
- // toolStripDropDownButton4
- //
- this.toolStripDropDownButton4.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.toolStripDropDownButton4.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.toolStripDropDownButton3.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripDropDownButton3.Name = "toolStripDropDownButton3";
+ this.toolStripDropDownButton3.ShowDropDownArrow = false;
+ this.toolStripDropDownButton3.Size = new System.Drawing.Size(36, 22);
+ this.toolStripDropDownButton3.Text = "&View";
+ //
+ // expandAllViewMenuItem
+ //
+ this.expandAllViewMenuItem.Enabled = false;
+ this.expandAllViewMenuItem.Name = "expandAllViewMenuItem";
+ this.expandAllViewMenuItem.Size = new System.Drawing.Size(136, 22);
+ this.expandAllViewMenuItem.Text = "&Expand All";
+ this.expandAllViewMenuItem.Click += new System.EventHandler(this.expandAllToolStripMenuItem_Click);
+ //
+ // collapseAllViewMenuItem
+ //
+ this.collapseAllViewMenuItem.Enabled = false;
+ this.collapseAllViewMenuItem.Name = "collapseAllViewMenuItem";
+ this.collapseAllViewMenuItem.Size = new System.Drawing.Size(136, 22);
+ this.collapseAllViewMenuItem.Text = "&Collapse All";
+ this.collapseAllViewMenuItem.Click += new System.EventHandler(this.collapseAllToolStripMenuItem_Click);
+ //
+ // toolStripDropDownButton4
+ //
+ this.toolStripDropDownButton4.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.toolStripDropDownButton4.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.updateIconsToolMenuItem,
this.toolStripSeparator14,
this.optionsToolMenuItem});
- this.toolStripDropDownButton4.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.toolStripDropDownButton4.Name = "toolStripDropDownButton4";
- this.toolStripDropDownButton4.ShowDropDownArrow = false;
- this.toolStripDropDownButton4.Size = new System.Drawing.Size(39, 22);
- this.toolStripDropDownButton4.Text = "&Tools";
- //
- // updateIconsToolMenuItem
- //
- this.updateIconsToolMenuItem.Name = "updateIconsToolMenuItem";
- this.updateIconsToolMenuItem.Size = new System.Drawing.Size(143, 22);
- this.updateIconsToolMenuItem.Text = "&Update Icons";
- this.updateIconsToolMenuItem.Click += new System.EventHandler(this.toolStripMenuItem1_Click);
- //
- // toolStripSeparator14
- //
- this.toolStripSeparator14.Name = "toolStripSeparator14";
- this.toolStripSeparator14.Size = new System.Drawing.Size(140, 6);
- //
- // optionsToolMenuItem
- //
- this.optionsToolMenuItem.Image = global::bzit.bomg.Properties.Resources.cog;
- this.optionsToolMenuItem.Name = "optionsToolMenuItem";
- this.optionsToolMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F12;
- this.optionsToolMenuItem.Size = new System.Drawing.Size(143, 22);
- this.optionsToolMenuItem.Text = "&Options";
- this.optionsToolMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem1_Click);
- //
- // toolStripDropDownButton5
- //
- this.toolStripDropDownButton5.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.toolStripDropDownButton5.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.toolStripDropDownButton4.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripDropDownButton4.Name = "toolStripDropDownButton4";
+ this.toolStripDropDownButton4.ShowDropDownArrow = false;
+ this.toolStripDropDownButton4.Size = new System.Drawing.Size(39, 22);
+ this.toolStripDropDownButton4.Text = "&Tools";
+ //
+ // updateIconsToolMenuItem
+ //
+ this.updateIconsToolMenuItem.Name = "updateIconsToolMenuItem";
+ this.updateIconsToolMenuItem.Size = new System.Drawing.Size(180, 22);
+ this.updateIconsToolMenuItem.Text = "&Update Icons";
+ this.updateIconsToolMenuItem.Click += new System.EventHandler(this.toolStripMenuItem1_Click);
+ //
+ // toolStripSeparator14
+ //
+ this.toolStripSeparator14.Name = "toolStripSeparator14";
+ this.toolStripSeparator14.Size = new System.Drawing.Size(177, 6);
+ //
+ // optionsToolMenuItem
+ //
+ this.optionsToolMenuItem.Enabled = false;
+ this.optionsToolMenuItem.Image = global::bzit.bomg.Properties.Resources.cog;
+ this.optionsToolMenuItem.Name = "optionsToolMenuItem";
+ this.optionsToolMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F12;
+ this.optionsToolMenuItem.Size = new System.Drawing.Size(180, 22);
+ this.optionsToolMenuItem.Text = "&Options";
+ this.optionsToolMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem1_Click);
+ //
+ // toolStripDropDownButton5
+ //
+ this.toolStripDropDownButton5.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.toolStripDropDownButton5.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.viewHelpHelpMenuItem,
this.toolStripSeparator12,
this.aboutHelpMenuItem});
- this.toolStripDropDownButton5.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.toolStripDropDownButton5.Name = "toolStripDropDownButton5";
- this.toolStripDropDownButton5.ShowDropDownArrow = false;
- this.toolStripDropDownButton5.Size = new System.Drawing.Size(36, 22);
- this.toolStripDropDownButton5.Text = "&Help";
- //
- // viewHelpHelpMenuItem
- //
- this.viewHelpHelpMenuItem.Image = global::bzit.bomg.Properties.Resources.help;
- this.viewHelpHelpMenuItem.Name = "viewHelpHelpMenuItem";
- this.viewHelpHelpMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F1;
- this.viewHelpHelpMenuItem.Size = new System.Drawing.Size(146, 22);
- this.viewHelpHelpMenuItem.Text = "View &Help";
- this.viewHelpHelpMenuItem.Click += new System.EventHandler(this.documentationToolStripMenuItem_Click);
- //
- // toolStripSeparator12
- //
- this.toolStripSeparator12.Name = "toolStripSeparator12";
- this.toolStripSeparator12.Size = new System.Drawing.Size(143, 6);
- //
- // aboutHelpMenuItem
- //
- this.aboutHelpMenuItem.Image = global::bzit.bomg.Properties.Resources.comment;
- this.aboutHelpMenuItem.Name = "aboutHelpMenuItem";
- this.aboutHelpMenuItem.Size = new System.Drawing.Size(146, 22);
- this.aboutHelpMenuItem.Text = "&About";
- this.aboutHelpMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem1_Click);
- //
- // toolStripDropDownButton7
- //
- this.toolStripDropDownButton7.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
- this.toolStripDropDownButton7.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.toolStripDropDownButton5.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripDropDownButton5.Name = "toolStripDropDownButton5";
+ this.toolStripDropDownButton5.ShowDropDownArrow = false;
+ this.toolStripDropDownButton5.Size = new System.Drawing.Size(36, 22);
+ this.toolStripDropDownButton5.Text = "&Help";
+ //
+ // viewHelpHelpMenuItem
+ //
+ this.viewHelpHelpMenuItem.Image = global::bzit.bomg.Properties.Resources.help;
+ this.viewHelpHelpMenuItem.Name = "viewHelpHelpMenuItem";
+ this.viewHelpHelpMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F1;
+ this.viewHelpHelpMenuItem.Size = new System.Drawing.Size(146, 22);
+ this.viewHelpHelpMenuItem.Text = "View &Help";
+ this.viewHelpHelpMenuItem.Click += new System.EventHandler(this.documentationToolStripMenuItem_Click);
+ //
+ // toolStripSeparator12
+ //
+ this.toolStripSeparator12.Name = "toolStripSeparator12";
+ this.toolStripSeparator12.Size = new System.Drawing.Size(143, 6);
+ //
+ // aboutHelpMenuItem
+ //
+ this.aboutHelpMenuItem.Image = global::bzit.bomg.Properties.Resources.comment;
+ this.aboutHelpMenuItem.Name = "aboutHelpMenuItem";
+ this.aboutHelpMenuItem.Size = new System.Drawing.Size(146, 22);
+ this.aboutHelpMenuItem.Text = "&About";
+ this.aboutHelpMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem1_Click);
+ //
+ // toolStripDropDownButton7
+ //
+ this.toolStripDropDownButton7.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.toolStripDropDownButton7.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.alwaysOnTopToolStripMenuItem});
- this.toolStripDropDownButton7.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.toolStripDropDownButton7.Name = "toolStripDropDownButton7";
- this.toolStripDropDownButton7.ShowDropDownArrow = false;
- this.toolStripDropDownButton7.Size = new System.Drawing.Size(16, 22);
- this.toolStripDropDownButton7.Text = "&?";
- this.toolStripDropDownButton7.Visible = false;
- //
- // alwaysOnTopToolStripMenuItem
- //
- this.alwaysOnTopToolStripMenuItem.Name = "alwaysOnTopToolStripMenuItem";
- this.alwaysOnTopToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F11)));
- this.alwaysOnTopToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
- this.alwaysOnTopToolStripMenuItem.Text = "Always On Top";
- this.alwaysOnTopToolStripMenuItem.Click += new System.EventHandler(this.alwaysOnTopToolStripMenuItem_Click);
- //
- // openFileDialog
- //
- this.openFileDialog.DefaultExt = "ryz";
- this.openFileDialog.Filter = "Bookmarks files|*.ryz";
- this.openFileDialog.Title = "Open bookmarks file";
- //
- // treeMenuFolder
- //
- this.treeMenuFolder.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.toolStripDropDownButton7.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripDropDownButton7.Name = "toolStripDropDownButton7";
+ this.toolStripDropDownButton7.ShowDropDownArrow = false;
+ this.toolStripDropDownButton7.Size = new System.Drawing.Size(16, 22);
+ this.toolStripDropDownButton7.Text = "&?";
+ this.toolStripDropDownButton7.Visible = false;
+ //
+ // alwaysOnTopToolStripMenuItem
+ //
+ this.alwaysOnTopToolStripMenuItem.Name = "alwaysOnTopToolStripMenuItem";
+ this.alwaysOnTopToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F11)));
+ this.alwaysOnTopToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
+ this.alwaysOnTopToolStripMenuItem.Text = "Always On Top";
+ this.alwaysOnTopToolStripMenuItem.Click += new System.EventHandler(this.alwaysOnTopToolStripMenuItem_Click);
+ //
+ // openFileDialog
+ //
+ this.openFileDialog.DefaultExt = "ryz";
+ this.openFileDialog.Filter = "Bookmarks files|*.ryz";
+ this.openFileDialog.Title = "Open bookmarks file";
+ //
+ // treeMenuFolder
+ //
+ this.treeMenuFolder.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItem15,
this.toolStripMenuItem16,
this.toolStripSeparator5,
@@ -478,236 +479,236 @@ namespace bzit.bomg
this.toolStripSeparator11,
this.toolStripMenuItem12,
this.toolStripMenuItem13});
- this.treeMenuFolder.Name = "listViewMenu";
- this.treeMenuFolder.Size = new System.Drawing.Size(139, 198);
- //
- // toolStripMenuItem15
- //
- this.toolStripMenuItem15.Name = "toolStripMenuItem15";
- this.toolStripMenuItem15.Size = new System.Drawing.Size(138, 22);
- this.toolStripMenuItem15.Text = "Add &Page";
- this.toolStripMenuItem15.Click += new System.EventHandler(this.toolStripMenuItem15_Click);
- //
- // toolStripMenuItem16
- //
- this.toolStripMenuItem16.Name = "toolStripMenuItem16";
- this.toolStripMenuItem16.Size = new System.Drawing.Size(138, 22);
- this.toolStripMenuItem16.Text = "Add &Folder";
- this.toolStripMenuItem16.Click += new System.EventHandler(this.toolStripMenuItem16_Click);
- //
- // toolStripSeparator5
- //
- this.toolStripSeparator5.Name = "toolStripSeparator5";
- this.toolStripSeparator5.Size = new System.Drawing.Size(135, 6);
- //
- // toolStripMenuItem14
- //
- this.toolStripMenuItem14.Name = "toolStripMenuItem14";
- this.toolStripMenuItem14.Size = new System.Drawing.Size(138, 22);
- this.toolStripMenuItem14.Text = "&Open All";
- this.toolStripMenuItem14.Click += new System.EventHandler(this.toolStripMenuItem14_Click);
- //
- // toolStripMenuItem9
- //
- this.toolStripMenuItem9.Name = "toolStripMenuItem9";
- this.toolStripMenuItem9.Size = new System.Drawing.Size(138, 22);
- this.toolStripMenuItem9.Text = "Edi&t";
- this.toolStripMenuItem9.Click += new System.EventHandler(this.toolStripMenuItem9_Click);
- //
- // toolStripMenuItem11
- //
- this.toolStripMenuItem11.Name = "toolStripMenuItem11";
- this.toolStripMenuItem11.Size = new System.Drawing.Size(138, 22);
- this.toolStripMenuItem11.Text = "D&elete";
- this.toolStripMenuItem11.Click += new System.EventHandler(this.toolStripMenuItem6_Click);
- //
- // toolStripSeparator7
- //
- this.toolStripSeparator7.Name = "toolStripSeparator7";
- this.toolStripSeparator7.Size = new System.Drawing.Size(135, 6);
- //
- // sortToolStripMenuItem
- //
- this.sortToolStripMenuItem.Name = "sortToolStripMenuItem";
- this.sortToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
- this.sortToolStripMenuItem.Text = "&Sort";
- this.sortToolStripMenuItem.Click += new System.EventHandler(this.sortToolStripMenuItem_Click);
- //
- // toolStripSeparator11
- //
- this.toolStripSeparator11.Name = "toolStripSeparator11";
- this.toolStripSeparator11.Size = new System.Drawing.Size(135, 6);
- //
- // toolStripMenuItem12
- //
- this.toolStripMenuItem12.Name = "toolStripMenuItem12";
- this.toolStripMenuItem12.Size = new System.Drawing.Size(138, 22);
- this.toolStripMenuItem12.Text = "Move &Up";
- this.toolStripMenuItem12.Click += new System.EventHandler(this.toolStripMenuItem12_Click);
- //
- // toolStripMenuItem13
- //
- this.toolStripMenuItem13.Name = "toolStripMenuItem13";
- this.toolStripMenuItem13.Size = new System.Drawing.Size(138, 22);
- this.toolStripMenuItem13.Text = "Move &Down";
- this.toolStripMenuItem13.Click += new System.EventHandler(this.toolStripMenuItem13_Click);
- //
- // saveFileDialog
- //
- this.saveFileDialog.DefaultExt = "ryz";
- this.saveFileDialog.Filter = "Bookmarks file|*.ryz|Bookmarks file (password protected)|*.ryz";
- this.saveFileDialog.Title = "Save bookmarks file";
- //
- // toolStrip2
- //
- this.toolStrip2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
- this.toolStrip2.CanOverflow = false;
- this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.treeMenuFolder.Name = "listViewMenu";
+ this.treeMenuFolder.Size = new System.Drawing.Size(139, 198);
+ //
+ // toolStripMenuItem15
+ //
+ this.toolStripMenuItem15.Name = "toolStripMenuItem15";
+ this.toolStripMenuItem15.Size = new System.Drawing.Size(138, 22);
+ this.toolStripMenuItem15.Text = "Add &Page";
+ this.toolStripMenuItem15.Click += new System.EventHandler(this.toolStripMenuItem15_Click);
+ //
+ // toolStripMenuItem16
+ //
+ this.toolStripMenuItem16.Name = "toolStripMenuItem16";
+ this.toolStripMenuItem16.Size = new System.Drawing.Size(138, 22);
+ this.toolStripMenuItem16.Text = "Add &Folder";
+ this.toolStripMenuItem16.Click += new System.EventHandler(this.toolStripMenuItem16_Click);
+ //
+ // toolStripSeparator5
+ //
+ this.toolStripSeparator5.Name = "toolStripSeparator5";
+ this.toolStripSeparator5.Size = new System.Drawing.Size(135, 6);
+ //
+ // toolStripMenuItem14
+ //
+ this.toolStripMenuItem14.Name = "toolStripMenuItem14";
+ this.toolStripMenuItem14.Size = new System.Drawing.Size(138, 22);
+ this.toolStripMenuItem14.Text = "&Open All";
+ this.toolStripMenuItem14.Click += new System.EventHandler(this.toolStripMenuItem14_Click);
+ //
+ // toolStripMenuItem9
+ //
+ this.toolStripMenuItem9.Name = "toolStripMenuItem9";
+ this.toolStripMenuItem9.Size = new System.Drawing.Size(138, 22);
+ this.toolStripMenuItem9.Text = "Edi&t";
+ this.toolStripMenuItem9.Click += new System.EventHandler(this.toolStripMenuItem9_Click);
+ //
+ // toolStripMenuItem11
+ //
+ this.toolStripMenuItem11.Name = "toolStripMenuItem11";
+ this.toolStripMenuItem11.Size = new System.Drawing.Size(138, 22);
+ this.toolStripMenuItem11.Text = "D&elete";
+ this.toolStripMenuItem11.Click += new System.EventHandler(this.toolStripMenuItem6_Click);
+ //
+ // toolStripSeparator7
+ //
+ this.toolStripSeparator7.Name = "toolStripSeparator7";
+ this.toolStripSeparator7.Size = new System.Drawing.Size(135, 6);
+ //
+ // sortToolStripMenuItem
+ //
+ this.sortToolStripMenuItem.Name = "sortToolStripMenuItem";
+ this.sortToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
+ this.sortToolStripMenuItem.Text = "&Sort";
+ this.sortToolStripMenuItem.Click += new System.EventHandler(this.sortToolStripMenuItem_Click);
+ //
+ // toolStripSeparator11
+ //
+ this.toolStripSeparator11.Name = "toolStripSeparator11";
+ this.toolStripSeparator11.Size = new System.Drawing.Size(135, 6);
+ //
+ // toolStripMenuItem12
+ //
+ this.toolStripMenuItem12.Name = "toolStripMenuItem12";
+ this.toolStripMenuItem12.Size = new System.Drawing.Size(138, 22);
+ this.toolStripMenuItem12.Text = "Move &Up";
+ this.toolStripMenuItem12.Click += new System.EventHandler(this.toolStripMenuItem12_Click);
+ //
+ // toolStripMenuItem13
+ //
+ this.toolStripMenuItem13.Name = "toolStripMenuItem13";
+ this.toolStripMenuItem13.Size = new System.Drawing.Size(138, 22);
+ this.toolStripMenuItem13.Text = "Move &Down";
+ this.toolStripMenuItem13.Click += new System.EventHandler(this.toolStripMenuItem13_Click);
+ //
+ // saveFileDialog
+ //
+ this.saveFileDialog.DefaultExt = "ryz";
+ this.saveFileDialog.Filter = "Bookmarks file|*.ryz|Bookmarks file (password protected)|*.ryz";
+ this.saveFileDialog.Title = "Save bookmarks file";
+ //
+ // toolStrip2
+ //
+ this.toolStrip2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
+ this.toolStrip2.CanOverflow = false;
+ this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.newMenuBarItem,
this.openMenuBarItem,
this.saveMenuBarItem,
this.toolStripSeparator9});
- this.toolStrip2.Location = new System.Drawing.Point(0, 25);
- this.toolStrip2.Name = "toolStrip2";
- this.toolStrip2.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
- this.toolStrip2.Size = new System.Drawing.Size(304, 25);
- this.toolStrip2.TabIndex = 26;
- this.toolStrip2.Text = "toolStrip2";
- //
- // newMenuBarItem
- //
- this.newMenuBarItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
- this.newMenuBarItem.Image = ((System.Drawing.Image)(resources.GetObject("newMenuBarItem.Image")));
- this.newMenuBarItem.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.newMenuBarItem.Name = "newMenuBarItem";
- this.newMenuBarItem.Size = new System.Drawing.Size(23, 22);
- this.newMenuBarItem.Text = "toolStripButton1";
- this.newMenuBarItem.ToolTipText = "New";
- this.newMenuBarItem.Click += new System.EventHandler(this.newSessionToolStripMenuItem_Click);
- //
- // openMenuBarItem
- //
- this.openMenuBarItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
- this.openMenuBarItem.Image = global::bzit.bomg.Properties.Resources.folder_page;
- this.openMenuBarItem.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.openMenuBarItem.Name = "openMenuBarItem";
- this.openMenuBarItem.Size = new System.Drawing.Size(23, 22);
- this.openMenuBarItem.Text = "toolStripButton2";
- this.openMenuBarItem.ToolTipText = "Open";
- this.openMenuBarItem.Click += new System.EventHandler(this.toolStripMenuItem2_Click);
- //
- // saveMenuBarItem
- //
- this.saveMenuBarItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
- this.saveMenuBarItem.Image = global::bzit.bomg.Properties.Resources.disk;
- this.saveMenuBarItem.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.saveMenuBarItem.Name = "saveMenuBarItem";
- this.saveMenuBarItem.Size = new System.Drawing.Size(23, 22);
- this.saveMenuBarItem.Text = "toolStripButton3";
- this.saveMenuBarItem.ToolTipText = "Save";
- this.saveMenuBarItem.Click += new System.EventHandler(this.importSnapshotToolStripMenuItem_Click);
- //
- // toolStripSeparator9
- //
- this.toolStripSeparator9.Name = "toolStripSeparator9";
- this.toolStripSeparator9.Size = new System.Drawing.Size(6, 25);
- //
- // treeMenuRoot
- //
- this.treeMenuRoot.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.toolStrip2.Location = new System.Drawing.Point(0, 25);
+ this.toolStrip2.Name = "toolStrip2";
+ this.toolStrip2.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
+ this.toolStrip2.Size = new System.Drawing.Size(304, 25);
+ this.toolStrip2.TabIndex = 26;
+ this.toolStrip2.Text = "toolStrip2";
+ //
+ // newMenuBarItem
+ //
+ this.newMenuBarItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.newMenuBarItem.Image = ((System.Drawing.Image)(resources.GetObject("newMenuBarItem.Image")));
+ this.newMenuBarItem.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.newMenuBarItem.Name = "newMenuBarItem";
+ this.newMenuBarItem.Size = new System.Drawing.Size(23, 22);
+ this.newMenuBarItem.Text = "toolStripButton1";
+ this.newMenuBarItem.ToolTipText = "New";
+ this.newMenuBarItem.Click += new System.EventHandler(this.newSessionToolStripMenuItem_Click);
+ //
+ // openMenuBarItem
+ //
+ this.openMenuBarItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.openMenuBarItem.Image = global::bzit.bomg.Properties.Resources.folder_page;
+ this.openMenuBarItem.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.openMenuBarItem.Name = "openMenuBarItem";
+ this.openMenuBarItem.Size = new System.Drawing.Size(23, 22);
+ this.openMenuBarItem.Text = "toolStripButton2";
+ this.openMenuBarItem.ToolTipText = "Open";
+ this.openMenuBarItem.Click += new System.EventHandler(this.toolStripMenuItem2_Click);
+ //
+ // saveMenuBarItem
+ //
+ this.saveMenuBarItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.saveMenuBarItem.Image = global::bzit.bomg.Properties.Resources.disk;
+ this.saveMenuBarItem.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.saveMenuBarItem.Name = "saveMenuBarItem";
+ this.saveMenuBarItem.Size = new System.Drawing.Size(23, 22);
+ this.saveMenuBarItem.Text = "toolStripButton3";
+ this.saveMenuBarItem.ToolTipText = "Save";
+ this.saveMenuBarItem.Click += new System.EventHandler(this.importSnapshotToolStripMenuItem_Click);
+ //
+ // toolStripSeparator9
+ //
+ this.toolStripSeparator9.Name = "toolStripSeparator9";
+ this.toolStripSeparator9.Size = new System.Drawing.Size(6, 25);
+ //
+ // treeMenuRoot
+ //
+ this.treeMenuRoot.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItem17,
this.toolStripMenuItem18,
this.toolStripSeparator10,
this.toolStripMenuItem20,
this.toolStripSeparator13,
this.toolStripMenuItem22});
- this.treeMenuRoot.Name = "listViewMenu";
- this.treeMenuRoot.Size = new System.Drawing.Size(133, 104);
- //
- // toolStripMenuItem17
- //
- this.toolStripMenuItem17.Name = "toolStripMenuItem17";
- this.toolStripMenuItem17.Size = new System.Drawing.Size(132, 22);
- this.toolStripMenuItem17.Text = "Add &Page";
- this.toolStripMenuItem17.Click += new System.EventHandler(this.toolStripMenuItem15_Click);
- //
- // toolStripMenuItem18
- //
- this.toolStripMenuItem18.Name = "toolStripMenuItem18";
- this.toolStripMenuItem18.Size = new System.Drawing.Size(132, 22);
- this.toolStripMenuItem18.Text = "Add &Folder";
- this.toolStripMenuItem18.Click += new System.EventHandler(this.toolStripMenuItem16_Click);
- //
- // toolStripSeparator10
- //
- this.toolStripSeparator10.Name = "toolStripSeparator10";
- this.toolStripSeparator10.Size = new System.Drawing.Size(129, 6);
- //
- // toolStripMenuItem20
- //
- this.toolStripMenuItem20.Name = "toolStripMenuItem20";
- this.toolStripMenuItem20.Size = new System.Drawing.Size(132, 22);
- this.toolStripMenuItem20.Text = "Edi&t";
- this.toolStripMenuItem20.Click += new System.EventHandler(this.toolStripMenuItem9_Click);
- //
- // toolStripSeparator13
- //
- this.toolStripSeparator13.Name = "toolStripSeparator13";
- this.toolStripSeparator13.Size = new System.Drawing.Size(129, 6);
- //
- // toolStripMenuItem22
- //
- this.toolStripMenuItem22.Name = "toolStripMenuItem22";
- this.toolStripMenuItem22.Size = new System.Drawing.Size(132, 22);
- this.toolStripMenuItem22.Text = "&Sort";
- this.toolStripMenuItem22.Click += new System.EventHandler(this.sortToolStripMenuItem_Click);
- //
- // treeView1
- //
- this.treeView1.AllowDrop = true;
- this.treeView1.BackColor = System.Drawing.Color.White;
- this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.treeView1.HasChanged = false;
- this.treeView1.HideSelection = false;
- this.treeView1.HotTracking = true;
- this.treeView1.ImageIndex = 0;
- this.treeView1.LabelEdit = true;
- this.treeView1.Location = new System.Drawing.Point(0, 50);
- this.treeView1.Name = "treeView1";
- this.treeView1.SelectedImageIndex = 0;
- this.treeView1.ShowNodeToolTips = true;
- this.treeView1.Size = new System.Drawing.Size(304, 584);
- this.treeView1.TabIndex = 24;
- this.treeView1.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick);
- this.treeView1.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView2_NodeMouseDoubleClick);
- this.treeView1.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.treeView1_PreviewKeyDown);
- //
- // MainForm
- //
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
- this.BackColor = System.Drawing.SystemColors.Control;
- this.ClientSize = new System.Drawing.Size(304, 654);
- this.Controls.Add(this.treeView1);
- this.Controls.Add(this.toolStrip2);
- this.Controls.Add(this.statusBar1);
- this.Controls.Add(this.toolStrip1);
- this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
- this.MinimumSize = new System.Drawing.Size(320, 600);
- this.Name = "MainForm";
- this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- this.Text = "Bookmark Manager";
- this.treeMenuItem.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).EndInit();
- this.toolStrip1.ResumeLayout(false);
- this.toolStrip1.PerformLayout();
- this.treeMenuFolder.ResumeLayout(false);
- this.toolStrip2.ResumeLayout(false);
- this.toolStrip2.PerformLayout();
- this.treeMenuRoot.ResumeLayout(false);
- this.ResumeLayout(false);
- this.PerformLayout();
+ this.treeMenuRoot.Name = "listViewMenu";
+ this.treeMenuRoot.Size = new System.Drawing.Size(133, 104);
+ //
+ // toolStripMenuItem17
+ //
+ this.toolStripMenuItem17.Name = "toolStripMenuItem17";
+ this.toolStripMenuItem17.Size = new System.Drawing.Size(132, 22);
+ this.toolStripMenuItem17.Text = "Add &Page";
+ this.toolStripMenuItem17.Click += new System.EventHandler(this.toolStripMenuItem15_Click);
+ //
+ // toolStripMenuItem18
+ //
+ this.toolStripMenuItem18.Name = "toolStripMenuItem18";
+ this.toolStripMenuItem18.Size = new System.Drawing.Size(132, 22);
+ this.toolStripMenuItem18.Text = "Add &Folder";
+ this.toolStripMenuItem18.Click += new System.EventHandler(this.toolStripMenuItem16_Click);
+ //
+ // toolStripSeparator10
+ //
+ this.toolStripSeparator10.Name = "toolStripSeparator10";
+ this.toolStripSeparator10.Size = new System.Drawing.Size(129, 6);
+ //
+ // toolStripMenuItem20
+ //
+ this.toolStripMenuItem20.Name = "toolStripMenuItem20";
+ this.toolStripMenuItem20.Size = new System.Drawing.Size(132, 22);
+ this.toolStripMenuItem20.Text = "Edi&t";
+ this.toolStripMenuItem20.Click += new System.EventHandler(this.toolStripMenuItem9_Click);
+ //
+ // toolStripSeparator13
+ //
+ this.toolStripSeparator13.Name = "toolStripSeparator13";
+ this.toolStripSeparator13.Size = new System.Drawing.Size(129, 6);
+ //
+ // toolStripMenuItem22
+ //
+ this.toolStripMenuItem22.Name = "toolStripMenuItem22";
+ this.toolStripMenuItem22.Size = new System.Drawing.Size(132, 22);
+ this.toolStripMenuItem22.Text = "&Sort";
+ this.toolStripMenuItem22.Click += new System.EventHandler(this.sortToolStripMenuItem_Click);
+ //
+ // treeView1
+ //
+ this.treeView1.AllowDrop = true;
+ this.treeView1.BackColor = System.Drawing.Color.White;
+ this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.treeView1.HasChanged = false;
+ this.treeView1.HideSelection = false;
+ this.treeView1.HotTracking = true;
+ this.treeView1.ImageIndex = 0;
+ this.treeView1.LabelEdit = true;
+ this.treeView1.Location = new System.Drawing.Point(0, 50);
+ this.treeView1.Name = "treeView1";
+ this.treeView1.SelectedImageIndex = 0;
+ this.treeView1.ShowNodeToolTips = true;
+ this.treeView1.Size = new System.Drawing.Size(304, 584);
+ this.treeView1.TabIndex = 24;
+ this.treeView1.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick);
+ this.treeView1.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView2_NodeMouseDoubleClick);
+ this.treeView1.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.treeView1_PreviewKeyDown);
+ //
+ // MainForm
+ //
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+ this.BackColor = System.Drawing.SystemColors.Control;
+ this.ClientSize = new System.Drawing.Size(304, 654);
+ this.Controls.Add(this.treeView1);
+ this.Controls.Add(this.toolStrip2);
+ this.Controls.Add(this.statusBar1);
+ this.Controls.Add(this.toolStrip1);
+ this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.MinimumSize = new System.Drawing.Size(320, 600);
+ this.Name = "MainForm";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
+ this.Text = "Bookmark Manager";
+ this.treeMenuItem.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).EndInit();
+ this.toolStrip1.ResumeLayout(false);
+ this.toolStrip1.PerformLayout();
+ this.treeMenuFolder.ResumeLayout(false);
+ this.toolStrip2.ResumeLayout(false);
+ this.toolStrip2.PerformLayout();
+ this.treeMenuRoot.ResumeLayout(false);
+ this.ResumeLayout(false);
+ this.PerformLayout();
}
diff --git a/MainForm.cs b/MainForm.cs
index ff3764e..d650079 100644
--- a/MainForm.cs
+++ b/MainForm.cs
@@ -32,32 +32,40 @@ namespace bzit.bomg
// toolbar
viewHelpHelpMenuItem.Enabled = File.Exists(Path.ChangeExtension(Application.ExecutablePath, ".chm"));
- string iconDBPath = Path.ChangeExtension(Application.ExecutablePath, ".db");
- bool rv = false;
- if (File.Exists(iconDBPath))
- {
- rv = this.IconDatabase.LoadFile(iconDBPath);
- if (!rv)
- {
- rv = this.IconDatabase.CreateSpecial(iconDBPath, true);
- if (!rv)
- {
- MessageBox.Show("Can not find icon database. [" + this.IconDatabase.LastError + "]");
- this.Close();
- }
- }
- }
- else
- {
- rv = this.IconDatabase.CreateSpecial(iconDBPath, true);
- if (!rv)
- {
- MessageBox.Show("Can not find icon database. [" + this.IconDatabase.LastError + "]");
- this.Close();
- }
- }
+ string iconDBPath = Path.ChangeExtension(Application.ExecutablePath, ".db");
- treeView1.IconDatabase = this.IconDatabase;
+ bool rs = this.IconDatabase.Create(Path.ChangeExtension(Application.ExecutablePath, "db"), false, null, true);
+ if (!rs)
+ {
+ MessageBox.Show("Can not find icon database. [" + this.IconDatabase.LastError + "]");
+ this.Close();
+ }
+
+ //bool rv = false;
+ // if (File.Exists(iconDBPath))
+ // {
+ // rv = this.IconDatabase.LoadFile(iconDBPath);
+ // if (!rv)
+ // {
+ // rv = this.IconDatabase.CreateSpecial(iconDBPath, true);
+ // if (!rv)
+ // {
+ // MessageBox.Show("Can not find icon database. [" + this.IconDatabase.LastError + "]");
+ // this.Close();
+ // }
+ // }
+ // }
+ // else
+ // {
+ // rv = this.IconDatabase.CreateSpecial(iconDBPath, true);
+ // if (!rv)
+ // {
+ // MessageBox.Show("Can not find icon database. [" + this.IconDatabase.LastError + "]");
+ // this.Close();
+ // }
+ // }
+
+ treeView1.IconDatabase = this.IconDatabase;
sessionFileFormat = new SessionFileFormat(this);
this.ApplicationMode = AppMode.Clear;
@@ -440,8 +448,8 @@ namespace bzit.bomg
*/
private void optionsToolStripMenuItem1_Click(object sender, EventArgs e)
{
- OptionsForm frm = new OptionsForm(this);
- frm.ShowDialog();
+ //OptionsForm frm = new OptionsForm(this);
+ //frm.ShowDialog();
}
/**
diff --git a/MainForm.resx b/MainForm.resx
index 5f46a11..5efc7db 100644
--- a/MainForm.resx
+++ b/MainForm.resx
@@ -131,7 +131,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADU
- FwAAAk1TRnQBSQFMAgEBBwEAAVwBAgFcAQIBEAEAARABAAT/AREBAAj/AUIBTQE2BwABNgMAASgDAAFA
+ FwAAAk1TRnQBSQFMAgEBBwEAAWQBAgFkAQIBEAEAARABAAT/AREBAAj/AUIBTQE2BwABNgMAASgDAAFA
AwABIAMAAQEBAAEQBgABEBQAAZkBSgEYAS4BtwEdAbcBGQG3ARkBtwEZAbcBGQG3ARkBtwEZAbcBGQG3
ARkBtwEdARcBLgGZAUoEAAGZAUoBGAEuAbcBHQG3ARkBtwEZAbcBGQG3ARkBtwEZAbcBGQG3ARkBtwEZ
AbcBHQEXAS4BmQFKBAABmQFKARgBLgG3AR0BtwEZAbcBGQG3ARkBtwEZAbcBGQG3ARkBtwEZAbcBGQG3
@@ -268,15 +268,15 @@
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHaSURBVDhPjZM9SxxRFIY1Vv4HhVRCQIK4smUQQgpBiwRT
- SCBgigTSJYpFSsVKG1mWJU1IJ1gI6W1EQsQQd1ZD/ABFLHbdL3d25+PeOzP6es7FGWfcDcmBhy3mvM++
- 9+5sV2z6iBSR/gcPiQdE26Rc1zUNw7gKggCdkFIik8ms0G5HSZrDtm3DcZyIZrOJRqOBcrmsJaVSCdls
- tk3STaR5QQgBpZT+ZCzLgmmaqFQqWkAtwV+Sy+VCiR4t8JsG5OVPLQglHGi1WqhWq4njMJzRaRotEEcf
- If68ixZ839fnDo9Sq9V0k2KxeCe4Pv/Qa+2/Gt1df/pFHryF3JuCPF2CV/+OwLMTEm7C91Gv1+8E8vDN
- Z3X4HvJ4Bt7ZEtTJPMTuc9hbwxD7c4kmfBy+ExZFAuBlj7v34ps8niXBMgkW4BqTcPPTCHylFxnP8/S9
- sISJBDyXvyYeC2Mc6nQB6ugT7M1BeObvKMxwi/ByuU1CYO88GxP5CTg/hmBtPaL6KaiLDR0K4QYMh9sF
- 209e51cHvgayBp8QB4uQ52tt4TgJAU30It0n3iIOP+OMTtNoQaFQuL4v+Bu0e8UZnb6dEfp5HH7QKRCH
- d+h1tijD/95o+okRgq3/A4W7+m8ApNSdQdLieiIAAAAASUVORK5CYII=
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHYSURBVDhPjZO7SxxRFMZNrPI/KKQShBDElS1FEAtBiwQt
+ QiCQFAnY+cAiZcRKm7AsS5qQLpAiYJ9GJEQiOoOKL1DEYtd9ubM7j3vvzOiXcy7OOONuSA782GLO99vv
+ 3p3tSkwPkSGy/+Ax8ZBom4zneZZhGNdhGKITUkrkcrmPtNtRkuWw4zhwXTem2Wyi0WigXC5rSalUQj6f
+ b5M8ILK8IISAUkp/MrZtw7IsVCoVLaCW4C8pFAqRRI8WBE0T8mpLCyIJB1qtFqrVauo4DGd0mkYLxPEc
+ xMG7eCEIAn3u6Ci1Wk03KRaLd4Kbi9lH9t7LkZ3vo5/l4VvI3ReQZyvw6z8R+k5Kwk34Pur1+p1AHr35
+ pI5mIE/m4Z+vQJ1+gNh5BmdjEGJvMdWEj8N3wqJYAEx3e7vP1+TJAglWSbAEz5yCZ7xGGCi9yPi+r++F
+ JUws4LnannwqzAmosyWo4/dw1p/At/bjMMMtosvlNimB83tsXBiTcH8NwN7op/oZqMsfOhTBDRgOtws2
+ h18ZX/u+hLKGgBCHy5AX39rCSVICmvhFuk+yRRJ+xhmdptEC0zRv7gv+Bu1ec0anb2eIfh6XH3QKJOEd
+ ep1tyvC/N55eYohg6/9A4a7eP4kvnS+BaQv8AAAAAElFTkSuQmCC
diff --git a/RyzStudio/Data/SQLite/SQLiteDatabase2.cs b/RyzStudio/Data/SQLite/SQLiteDatabase2.cs
index b45bc56..65b840c 100644
--- a/RyzStudio/Data/SQLite/SQLiteDatabase2.cs
+++ b/RyzStudio/Data/SQLite/SQLiteDatabase2.cs
@@ -8,440 +8,462 @@ using System.Text;
namespace RyzStudio.Data.SQLite
{
- public class SQLiteDatabase2
- {
- #region static methods
-
- public static string EscapeSQL(string query)
- {
- return query.Replace("'", "''").Trim();
- }
-
- public static string EscapeValue(string text)
- {
- return text.Replace("\"", "\\\"").Replace("\t", "\\t").Replace("\r", " \\r").Replace("\n", "\\n");
- }
-
- public static string PrepareQuery(string query, params string[] arguments)
- {
- string rv = query;
-
- if (string.IsNullOrEmpty(rv))
- {
- return string.Empty;
- }
-
- for (int i = 0; i < arguments.Length; i++)
- {
- rv = rv.Replace("[^" + (i + 1).ToString() + "]", EscapeSQL(arguments[i]));
- }
-
- return rv;
- }
-
- public static string Encode64(string text) { return Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); }
-
- #endregion
-
- protected SQLiteConnection dbConnection = null;
- protected string dbLocation = string.Empty;
- protected string lastError = "";
-
- protected string[] requiredTableList = new string[0];
-
- protected const string tableNameConfig = "ryz_app_xxxx_config";
-
- #region public properties
-
- [Browsable(false)]
- public SQLiteConnection DBConnection
- {
- get { return dbConnection; }
- set { dbConnection = value; }
- }
-
- [Browsable(false)]
- public string DBLocation
- {
- get { return dbLocation; }
- set { dbLocation = value; }
- }
-
- public string LastError { get { return lastError; } }
-
- public int LastInsertID
- {
- get
- {
- if (dbConnection == null)
- {
- return 0;
- }
-
- DataTable dt = this.DoQuery("SELECT last_insert_rowid() AS ccc;");
- if (dt == null)
- {
- return 0;
- }
-
- if (dt.Rows.Count <= 0)
- {
- return 0;
- }
-
- return int.Parse(dt.Rows[0]["ccc"].ToString());
- }
- }
-
- #endregion
-
- #region public methods
-
- public bool CreateMemory()
- {
- lastError = string.Empty;
-
- dbLocation = ":memory:";
-
- try
- {
- dbConnection = new SQLiteConnection(string.Concat("Data Source=\"", dbLocation, "\";Version=3;UTF8Encoding=True;"));
- dbConnection.Open();
- }
- catch (Exception exc)
- {
- lastError = exc.Message;
- return false;
- }
-
- return true;
- }
-
- public bool CreateSpecial(string filename, bool overwriteFile = false, string password = null)
- {
- bool rs = this.CreateFile(filename, overwriteFile, password);
- if (!rs)
- {
- return false;
- }
-
- rs = this.Prepare();
- if (!rs)
- {
- return false;
- }
-
- return this.CheckRequiredTables();
- }
-
- public bool CreateFile(string filename, bool overwriteFile = false, string password = null)
- {
- if (File.Exists(filename))
- {
- if (overwriteFile)
- {
- try
- {
- File.Delete(filename);
- }
- catch
- {
- return false;
- }
- }
- else
- {
- return false;
- }
- }
-
- try
- {
- SQLiteConnection.CreateFile(filename);
- }
- catch
- {
- return false;
- }
-
- return this.LoadFile(filename, password);
- }
-
- public bool LoadFile(string filename, string password = null)
- {
- lastError = string.Empty;
-
- if (!File.Exists(filename))
- {
- return false;
- }
-
- dbLocation = filename;
-
- try
- {
- dbConnection = new SQLiteConnection(string.Concat("Data Source=\"", filename, "\";Version=3;UTF8Encoding=True;", (password == null) ? string.Empty : string.Concat("Password=", Encode64(password), ";")));
- dbConnection.Open();
- }
- catch (Exception exc)
- {
- lastError = exc.Message;
- return false;
- }
-
- return true;
- }
-
- public void Close()
- {
- if (dbConnection != null)
- {
- try
- {
- dbConnection.Close();
- }
- catch
- {
- // do nothing
- }
- }
- }
-
- #region query
-
- public DataTable DoQuery(string query)
- {
- lastError = string.Empty;
-
- if (dbConnection == null)
- {
- return null;
- }
-
- try
- {
- SQLiteCommand command = new SQLiteCommand(query, dbConnection);
- SQLiteDataReader dr = command.ExecuteReader();
-
- DataTable dt = new DataTable();
- dt.Load(dr);
-
- return dt;
- }
- catch (Exception exc)
- {
- lastError = exc.Message;
- return null;
- }
- }
-
- public DataTable DoQuery(string query, params string[] args)
- {
- string sql = SQLiteDatabase2.PrepareQuery(query, args);
-
- return DoQuery(sql);
- }
-
- public int DoQueryCount(string query)
- {
- lastError = string.Empty;
-
- if (dbConnection == null)
- {
- return -1;
- }
-
- DataTable dt = this.DoQuery(query);
- if (dt == null)
- {
- return -1;
- }
-
- return dt.Rows.Count;
- }
-
- public int DoQueryCount(string query, params string[] args)
- {
- string sql = SQLiteDatabase2.PrepareQuery(query, args);
-
- return this.DoQueryCount(sql);
- }
-
- public bool DoQueryExist(string query)
- {
- int rv = this.DoQueryCount(query);
-
- return (rv > 0);
- }
-
- public bool DoQueryExist(string query, params string[] args)
- {
- string sql = SQLiteDatabase2.PrepareQuery(query, args);
-
- return this.DoQueryExist(sql);
- }
-
- public string DoQuerySingle(string query)
- {
- lastError = string.Empty;
-
- if (dbConnection == null)
- {
- return string.Empty;
- }
-
- DataTable dt = this.DoQuery(query);
-
- if (dt == null)
- {
- return string.Empty;
- }
-
- if (dt.Columns.Count <= 0)
- {
- return string.Empty;
- }
-
- if (dt.Rows.Count <= 0)
- {
- return string.Empty;
- }
-
- if (dt.Rows[0][0] is byte[])
- {
- return Encoding.UTF8.GetString(dt.Rows[0][0] as byte[]);
- }
- else
- {
- return dt.Rows[0][0].ToString();
- }
- }
-
- public string DoQuerySingle(string query, params string[] args)
- {
- string sql = SQLiteDatabase2.PrepareQuery(query, args);
-
- return this.DoQuerySingle(sql);
- }
-
- public int DoNonQuery(string query)
- {
- lastError = string.Empty;
-
- if (dbConnection == null)
- {
- return -1;
- }
-
- int rv = 0;
-
- try
- {
- SQLiteCommand command = new SQLiteCommand(query, dbConnection);
- rv = command.ExecuteNonQuery();
- }
- catch (Exception exc)
- {
- lastError = exc.Message;
- rv = -1;
- }
-
- return rv;
- }
-
- public int DoNonQuery(string query, params string[] args)
- {
- string sql = SQLiteDatabase2.PrepareQuery(query, args);
-
- return this.DoNonQuery(sql);
- }
-
- public bool HasTable(string tableName)
- {
- lastError = string.Empty;
-
- if (dbConnection == null)
- {
- return false;
- }
-
- int rv = this.DoQueryCount("SELECT 1 FROM sqlite_master WHERE type='table' AND name='" + EscapeSQL(tableName) + "'");
-
- return (rv > 0);
- }
-
- public bool CheckRequiredTables()
- {
- bool rv = true;
- foreach (string tbl in requiredTableList)
- {
- if (string.IsNullOrEmpty(tbl))
- {
- continue;
- }
-
- if (!this.HasTable(tbl))
- {
- rv = false;
- break;
- }
- }
-
- return rv;
- }
-
- #endregion
-
- public bool PrepareConfig()
- {
- if (this.HasTable(tableNameConfig))
- {
- return true;
- }
-
- int rv = this.DoNonQuery("CREATE TABLE " + tableNameConfig + " (cfg_name TEXT, cfg_value TEXT)");
-
- return rv > 0;
- }
-
- public bool SetConfig(string name, string value)
- {
- this.PrepareConfig();
-
- string sql = string.Empty;
- int rv = this.DoQueryCount("SELECT 1 FROM " + tableNameConfig + " WHERE cfg_name='" + EscapeSQL(name) + "'");
- if (rv <= 0)
- {
- sql = "INSERT INTO " + tableNameConfig + " (cfg_name, cfg_value) VALUES ('[^1]', '[^2]');";
- }
- else
- {
- sql = "UPDATE " + tableNameConfig + " SET cfg_value='[^2]' WHERE cfg_name='[^1]';";
- }
-
- sql = PrepareQuery(sql, new string[] { name, value });
-
- return this.DoNonQuery(sql) > 0;
- }
-
- public string GetConfig(string name, string defaultValue = "")
- {
- this.PrepareConfig();
-
- bool rv = this.DoQueryExist("SELECT 1 FROM " + tableNameConfig + " WHERE cfg_name='" + EscapeSQL(name) + "';");
- if (!rv)
- {
- return defaultValue;
- }
-
- return this.DoQuerySingle("SELECT cfg_value FROM " + tableNameConfig + " WHERE cfg_name='" + EscapeSQL(name) + "';");
- }
-
- #endregion
-
- protected virtual bool Prepare()
- {
- return true;
- }
- }
+ public class SQLiteDatabase2
+ {
+ public SQLiteConnection DBConnection { get; protected set; } = null;
+
+ public string DBLocation { get; protected set; } = null;
+
+ public string LastError { get; protected set; } = null;
+
+ public int LastInsertID
+ {
+ get
+ {
+ if (this.DBConnection == null)
+ {
+ return 0;
+ }
+
+ DataTable dt = this.DoQuery("SELECT last_insert_rowid() AS rv;");
+ if (dt == null)
+ {
+ return 0;
+ }
+
+ if (dt.Rows.Count <= 0)
+ {
+ return 0;
+ }
+
+ int n;
+ if (!int.TryParse(dt.Rows[0]["rv"].ToString(), out n))
+ {
+ n = 0;
+ }
+
+ return n;
+ }
+ }
+
+ protected string[] requiredTableList = new string[0];
+
+ protected const string appSettingsTableName = "ryz_app_xxxx_config";
+
+ public bool Create()
+ {
+ this.LastError = string.Empty;
+
+ this.DBLocation = ":memory:";
+
+ try
+ {
+ this.DBConnection = new SQLiteConnection(string.Concat("Data Source=\"", this.DBLocation, "\";Version=3;UTF8Encoding=True;"));
+ this.DBConnection.Open();
+ }
+ catch (Exception exc)
+ {
+ this.LastError = exc.Message;
+
+ return false;
+ }
+
+ return true;
+ }
+
+ public bool Create(string filename, bool overwriteFile = false, string password = null, bool useAppSettings = false)
+ {
+ bool rs = create(filename, overwriteFile, password);
+
+ if (useAppSettings)
+ {
+ if (!rs)
+ {
+ return false;
+ }
+
+ rs = prepareDatabase();
+ if (!rs)
+ {
+ return false;
+ }
+
+ return this.HasRequiredTables();
+ }
+ else
+ {
+ return rs;
+ }
+ }
+
+ public bool LoadFile(string filename, string password = null)
+ {
+ this.LastError = string.Empty;
+
+ if (!File.Exists(filename))
+ {
+ return false;
+ }
+
+ this.DBLocation = filename;
+
+ try
+ {
+ this.DBConnection = new SQLiteConnection(string.Concat("Data Source=\"", filename, "\";Version=3;UTF8Encoding=True;", (password == null) ? string.Empty : string.Concat("Password=", encode64(password), ";")));
+ this.DBConnection.Open();
+ }
+ catch (Exception exc)
+ {
+ this.LastError = exc.Message;
+
+ return false;
+ }
+
+ return true;
+ }
+
+ public void Close()
+ {
+ this.LastError = string.Empty;
+
+ if (this.DBConnection != null)
+ {
+ try
+ {
+ this.DBConnection.Cancel();
+ this.DBConnection.Close();
+ this.DBConnection.Dispose();
+ this.DBConnection = null;
+
+ SQLiteConnection.ClearAllPools();
+ GC.Collect();
+ }
+ catch (Exception exc)
+ {
+ this.LastError = exc.Message;
+ }
+ }
+ }
+
+ public DataTable DoQuery(string query)
+ {
+ this.LastError = string.Empty;
+
+ if (this.DBConnection == null)
+ {
+ return null;
+ }
+
+ try
+ {
+ SQLiteCommand command = new SQLiteCommand(query, this.DBConnection);
+ SQLiteDataReader dr = command.ExecuteReader();
+
+ DataTable dt = new DataTable();
+ dt.Load(dr);
+
+ return dt;
+ }
+ catch (Exception exc)
+ {
+ this.LastError = exc.Message;
+
+ return null;
+ }
+ }
+
+ public DataTable DoQuery(string query, params string[] args) => DoQuery(prepareQuery(query, args));
+
+ public int DoQueryCount(string query)
+ {
+ this.LastError = string.Empty;
+
+ if (this.DBConnection == null)
+ {
+ return -1;
+ }
+
+ DataTable dt = this.DoQuery(query);
+ if (dt == null)
+ {
+ return -1;
+ }
+
+ return dt.Rows.Count;
+ }
+
+ public int DoQueryCount(string query, params string[] args) => this.DoQueryCount(prepareQuery(query, args));
+
+ public bool DoQueryExist(string query) => (this.DoQueryCount(query) > 0);
+
+ public bool DoQueryExist(string query, params string[] args) => this.DoQueryExist(prepareQuery(query, args));
+
+ public string DoQuerySingle(string query)
+ {
+ this.LastError = string.Empty;
+
+ if (this.DBConnection == null)
+ {
+ return string.Empty;
+ }
+
+ DataTable dt = this.DoQuery(query);
+
+ if (dt == null)
+ {
+ return string.Empty;
+ }
+
+ if (dt.Columns.Count <= 0)
+ {
+ return string.Empty;
+ }
+
+ if (dt.Rows.Count <= 0)
+ {
+ return string.Empty;
+ }
+
+ if (dt.Rows[0][0] is byte[])
+ {
+ return Encoding.UTF8.GetString(dt.Rows[0][0] as byte[]);
+ }
+ else
+ {
+ return dt.Rows[0][0].ToString();
+ }
+ }
+
+ public string DoQuerySingle(string query, params string[] args) => this.DoQuerySingle(prepareQuery(query, args));
+
+ public int DoNonQuery(string query)
+ {
+ this.LastError = string.Empty;
+
+ if (this.DBConnection == null)
+ {
+ return -1;
+ }
+
+ int rv = 0;
+
+ try
+ {
+ SQLiteCommand command = new SQLiteCommand(query, this.DBConnection);
+ rv = command.ExecuteNonQuery();
+ }
+ catch (Exception exc)
+ {
+ this.LastError = exc.Message;
+ rv = -1;
+ }
+
+ return rv;
+ }
+
+ public int DoNonQuery(string query, params string[] args) => this.DoNonQuery(prepareQuery(query, args));
+
+ public bool HasTable(string tableName)
+ {
+ this.LastError = string.Empty;
+
+ if (this.DBConnection == null)
+ {
+ return false;
+ }
+
+ int rv = this.DoQueryCount("SELECT 1 FROM sqlite_master WHERE type='table' AND name='" + escapeSQL(tableName) + "'");
+
+ return (rv > 0);
+ }
+
+ public bool HasRequiredTables()
+ {
+ bool rv = true;
+ foreach (string tbl in requiredTableList)
+ {
+ if (string.IsNullOrEmpty(tbl))
+ {
+ continue;
+ }
+
+ if (!this.HasTable(tbl))
+ {
+ rv = false;
+ break;
+ }
+ }
+
+ return rv;
+ }
+
+ public bool SetConfig(string name, bool value) => this.SetConfig(name, (value ? "1" : "0"));
+
+ public bool SetConfig(string name, int value) => this.SetConfig(name, value.ToString());
+
+ public bool SetConfig(string name, string value)
+ {
+ prepareAppSettings();
+
+ string sql = string.Empty;
+ int rv = this.DoQueryCount("SELECT 1 FROM " + appSettingsTableName + " WHERE cfg_name='" + escapeSQL(name) + "'");
+ if (rv <= 0)
+ {
+ sql = "INSERT INTO " + appSettingsTableName + " (cfg_name, cfg_value) VALUES ('[^1]', '[^2]');";
+ }
+ else
+ {
+ sql = "UPDATE " + appSettingsTableName + " SET cfg_value='[^2]' WHERE cfg_name='[^1]';";
+ }
+
+ sql = prepareQuery(sql, new string[] { name, value });
+
+ return this.DoNonQuery(sql) > 0;
+ }
+
+ public string GetConfig(string name, string defaultValue = null)
+ {
+ prepareAppSettings();
+
+ bool rv = this.DoQueryExist("SELECT 1 FROM " + appSettingsTableName + " WHERE cfg_name='" + escapeSQL(name) + "';");
+ if (!rv)
+ {
+ return defaultValue;
+ }
+
+ return this.DoQuerySingle("SELECT cfg_value FROM " + appSettingsTableName + " WHERE cfg_name='" + escapeSQL(name) + "';");
+ }
+
+ public int GetIntConfig(string name, int defaultValue = 0)
+ {
+ string rv = this.GetConfig(name);
+ if (string.IsNullOrWhiteSpace(rv))
+ {
+ return defaultValue;
+ }
+
+ int n;
+ if (!int.TryParse(rv, out n))
+ {
+ n = defaultValue;
+ }
+
+ return n;
+ }
+
+ public bool GetBoolConfig(string name, bool defaultValue = false)
+ {
+ string rv = this.GetConfig(name);
+ if (string.IsNullOrWhiteSpace(rv))
+ {
+ return defaultValue;
+ }
+
+ if (rv.Equals("1"))
+ {
+ return true;
+ }
+
+ if (rv.Equals("true", StringComparison.CurrentCultureIgnoreCase))
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ protected bool create(string filename, bool overwriteFile, string password)
+ {
+ this.LastError = string.Empty;
+
+ if (File.Exists(filename))
+ {
+ if (overwriteFile)
+ {
+ try
+ {
+ File.Delete(filename);
+ }
+ catch (Exception exc)
+ {
+ this.LastError = exc.Message;
+
+ return false;
+ }
+
+ try
+ {
+ SQLiteConnection.CreateFile(filename);
+ }
+ catch (Exception exc)
+ {
+ this.LastError = exc.Message;
+
+ return false;
+ }
+
+ return this.LoadFile(filename, password);
+ }
+ else
+ {
+ return this.LoadFile(filename, password);
+ }
+ }
+ else
+ {
+ try
+ {
+ SQLiteConnection.CreateFile(filename);
+ }
+ catch (Exception exc)
+ {
+ this.LastError = exc.Message;
+
+ return false;
+ }
+
+ return this.LoadFile(filename, password);
+ }
+ }
+
+ protected string prepareQuery(string query, params string[] arguments)
+ {
+ string rv = query;
+
+ if (string.IsNullOrWhiteSpace(rv))
+ {
+ return string.Empty;
+ }
+
+ for (int i = 0; i < arguments.Length; i++)
+ {
+ rv = rv.Replace("[^" + (i + 1).ToString() + "]", escapeSQL(arguments[i]));
+ }
+
+ return rv;
+ }
+
+ protected string escapeSQL(string q) => q.Replace("'", "''").Trim();
+
+ protected string escapeValue(string text) => text.Replace("\"", "\\\"").Replace("\t", "\\t").Replace("\r", " \\r").Replace("\n", "\\n");
+
+ protected string encode64(string text) => Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text));
+
+ protected bool prepareAppSettings()
+ {
+ if (this.HasTable(appSettingsTableName))
+ {
+ return true;
+ }
+
+ int rv = this.DoNonQuery("CREATE TABLE " + appSettingsTableName + " (cfg_name TEXT, cfg_value TEXT)");
+
+ return rv > 0;
+ }
+
+ protected virtual bool prepareDatabase()
+ {
+ return true;
+ }
+ }
}
diff --git a/bomg.csproj b/bomg.csproj
index 4368e87..dabf678 100644
--- a/bomg.csproj
+++ b/bomg.csproj
@@ -15,6 +15,8 @@
512
false
+
+
publish\
true
Disk
@@ -29,8 +31,6 @@
1.0.0.%2a
false
true
-
-
x86
@@ -78,19 +78,17 @@
false
-
- packages\HtmlAgilityPack.1.4.9.5\lib\Net40\HtmlAgilityPack.dll
- True
+
+ packages\HtmlAgilityPack.1.11.2\lib\Net45\HtmlAgilityPack.dll
-
- packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll
- True
+
+ packages\SharpZipLib.1.1.0\lib\net45\ICSharpCode.SharpZipLib.dll
-
- packages\System.Data.SQLite.Core.1.0.105.1\lib\net451\System.Data.SQLite.dll
+
+ packages\System.Data.SQLite.Core.1.0.110.0\lib\net46\System.Data.SQLite.dll
@@ -98,12 +96,6 @@
-
- Form
-
-
- OptionsForm.cs
-
Form
@@ -172,9 +164,6 @@
BookmarkTreeView.cs
-
- OptionsForm.cs
-
UpdateIconForm.cs
@@ -258,12 +247,12 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
+