This commit is contained in:
Ray 2019-04-20 17:05:55 +01:00
parent 0e70f6b56e
commit 18dc43e491
12 changed files with 523 additions and 470 deletions

View File

@ -125,7 +125,7 @@ namespace bzit.bomg
this.memoBox1.Name = "memoBox1"; this.memoBox1.Name = "memoBox1";
this.memoBox1.Padding = new System.Windows.Forms.Padding(10, 10, 3, 9); this.memoBox1.Padding = new System.Windows.Forms.Padding(10, 10, 3, 9);
this.memoBox1.Size = new System.Drawing.Size(336, 83); this.memoBox1.Size = new System.Drawing.Size(336, 83);
this.memoBox1.TabIndex = 69; this.memoBox1.TabIndex = 3;
// //
// textBox2 // textBox2
// //
@ -137,7 +137,7 @@ namespace bzit.bomg
this.textBox2.Name = "textBox2"; this.textBox2.Name = "textBox2";
this.textBox2.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9); this.textBox2.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
this.textBox2.Size = new System.Drawing.Size(259, 32); this.textBox2.Size = new System.Drawing.Size(259, 32);
this.textBox2.TabIndex = 67; this.textBox2.TabIndex = 0;
// //
// textBox1 // textBox1
// //
@ -149,7 +149,7 @@ namespace bzit.bomg
this.textBox1.Name = "textBox1"; this.textBox1.Name = "textBox1";
this.textBox1.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9); this.textBox1.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
this.textBox1.Size = new System.Drawing.Size(259, 32); this.textBox1.Size = new System.Drawing.Size(259, 32);
this.textBox1.TabIndex = 66; this.textBox1.TabIndex = 2;
// //
// horizontalSeparator1 // horizontalSeparator1
// //
@ -174,7 +174,7 @@ namespace bzit.bomg
this.button1.OverImage = null; this.button1.OverImage = null;
this.button1.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3); this.button1.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
this.button1.Size = new System.Drawing.Size(64, 32); this.button1.Size = new System.Drawing.Size(64, 32);
this.button1.TabIndex = 2; this.button1.TabIndex = 1;
this.button1.Click += new System.EventHandler(this.button1_Click); this.button1.Click += new System.EventHandler(this.button1_Click);
// //
// button2 // button2

View File

@ -134,6 +134,16 @@ namespace bzit.bomg
return; return;
} }
if (string.IsNullOrWhiteSpace(textBox1.Text))
{
return;
}
if (string.IsNullOrWhiteSpace(textBox2.Text))
{
return;
}
if (itemModel == null) if (itemModel == null)
{ {
itemModel = new BookmarkItemModel(); itemModel = new BookmarkItemModel();

View File

@ -3,7 +3,7 @@ using System.Drawing;
using System.IO; using System.IO;
using RyzStudio.Data.SQLite; using RyzStudio.Data.SQLite;
namespace bzit.bomg namespace bzit.bomg.Data
{ {
public class IconDatabase : SQLiteDatabase2 public class IconDatabase : SQLiteDatabase2
{ {
@ -19,19 +19,17 @@ namespace bzit.bomg
return false; return false;
} }
return this.DoNonQuery(@" return this.DoNonQuery(@"
CREATE TABLE bzt_app_bomg_icons CREATE TABLE bzt_app_bomg_icons
( (
ico_id INTEGER PRIMARY KEY, ico_id INTEGER PRIMARY KEY,
ico_key TEXT, ico_key TEXT,
ico_hash TEXT, ico_hash TEXT,
ico_content BLOB ico_content BLOB
) )
") >= 0; ") >= 0;
} }
#region public methods
public bool HasIcon(string url) public bool HasIcon(string url)
{ {
return this.DoQueryExist("SELECT 1 FROM bzt_app_bomg_icons WHERE ico_key='" + escapeValue(url) + "'"); return this.DoQueryExist("SELECT 1 FROM bzt_app_bomg_icons WHERE ico_key='" + escapeValue(url) + "'");
@ -102,8 +100,6 @@ namespace bzit.bomg
this.DoNonQuery("DELETE FROM bzt_app_bomg_icons WHERE ico_key='" + escapeValue(url) + "';"); this.DoNonQuery("DELETE FROM bzt_app_bomg_icons WHERE ico_key='" + escapeValue(url) + "';");
} }
#endregion
protected string imageToSQLString(Image image) protected string imageToSQLString(Image image)
{ {
MemoryStream stream = new MemoryStream(); MemoryStream stream = new MemoryStream();
@ -115,10 +111,7 @@ namespace bzit.bomg
return bytesToSQLString(byteArray); return bytesToSQLString(byteArray);
} }
protected string bytesToSQLString(byte[] image) protected string bytesToSQLString(byte[] image) => Convert.ToBase64String(image);
{
return Convert.ToBase64String(image);
}
protected Image sqlStringToImage(string base64_string) protected Image sqlStringToImage(string base64_string)
{ {

309
MainForm.Designer.cs generated
View File

@ -98,6 +98,7 @@ namespace bzit.bomg
this.toolStripMenuItem20 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem20 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem22 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem22 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.treeView1 = new RyzStudio.Windows.Forms.BookmarkTreeView(); this.treeView1 = new RyzStudio.Windows.Forms.BookmarkTreeView();
this.pageTreeNodeMenu.SuspendLayout(); this.pageTreeNodeMenu.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).BeginInit();
@ -107,9 +108,9 @@ namespace bzit.bomg
this.toolStrip2.SuspendLayout(); this.toolStrip2.SuspendLayout();
this.rootTreeNodeMenu.SuspendLayout(); this.rootTreeNodeMenu.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// pageTreeNodeMenu // pageTreeNodeMenu
// //
this.pageTreeNodeMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.pageTreeNodeMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItem4, this.toolStripMenuItem4,
this.toolStripSeparator3, this.toolStripSeparator3,
@ -120,54 +121,54 @@ namespace bzit.bomg
this.moveFileToToolStripMenuItem}); this.moveFileToToolStripMenuItem});
this.pageTreeNodeMenu.Name = "listViewMenu"; this.pageTreeNodeMenu.Name = "listViewMenu";
this.pageTreeNodeMenu.Size = new System.Drawing.Size(139, 126); this.pageTreeNodeMenu.Size = new System.Drawing.Size(139, 126);
// //
// toolStripMenuItem4 // toolStripMenuItem4
// //
this.toolStripMenuItem4.Name = "toolStripMenuItem4"; this.toolStripMenuItem4.Name = "toolStripMenuItem4";
this.toolStripMenuItem4.Size = new System.Drawing.Size(138, 22); this.toolStripMenuItem4.Size = new System.Drawing.Size(138, 22);
this.toolStripMenuItem4.Text = "&Open"; this.toolStripMenuItem4.Text = "&Open";
this.toolStripMenuItem4.Click += new System.EventHandler(this.openContextMenu_Click); this.toolStripMenuItem4.Click += new System.EventHandler(this.openContextMenu_Click);
// //
// toolStripSeparator3 // toolStripSeparator3
// //
this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(135, 6); this.toolStripSeparator3.Size = new System.Drawing.Size(135, 6);
// //
// toolStripMenuItem8 // toolStripMenuItem8
// //
this.toolStripMenuItem8.Name = "toolStripMenuItem8"; this.toolStripMenuItem8.Name = "toolStripMenuItem8";
this.toolStripMenuItem8.Size = new System.Drawing.Size(138, 22); this.toolStripMenuItem8.Size = new System.Drawing.Size(138, 22);
this.toolStripMenuItem8.Text = "E&dit"; this.toolStripMenuItem8.Text = "E&dit";
this.toolStripMenuItem8.Click += new System.EventHandler(this.editContextMenu3_Click); this.toolStripMenuItem8.Click += new System.EventHandler(this.editContextMenu3_Click);
// //
// toolStripMenuItem6 // toolStripMenuItem6
// //
this.toolStripMenuItem6.Name = "toolStripMenuItem6"; this.toolStripMenuItem6.Name = "toolStripMenuItem6";
this.toolStripMenuItem6.Size = new System.Drawing.Size(138, 22); this.toolStripMenuItem6.Size = new System.Drawing.Size(138, 22);
this.toolStripMenuItem6.Text = "D&elete"; this.toolStripMenuItem6.Text = "D&elete";
this.toolStripMenuItem6.Click += new System.EventHandler(this.deleteContextMenu2_Click); this.toolStripMenuItem6.Click += new System.EventHandler(this.deleteContextMenu2_Click);
// //
// toolStripSeparator2 // toolStripSeparator2
// //
this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(135, 6); this.toolStripSeparator2.Size = new System.Drawing.Size(135, 6);
// //
// listViewMenuItem1 // listViewMenuItem1
// //
this.listViewMenuItem1.Name = "listViewMenuItem1"; this.listViewMenuItem1.Name = "listViewMenuItem1";
this.listViewMenuItem1.Size = new System.Drawing.Size(138, 22); this.listViewMenuItem1.Size = new System.Drawing.Size(138, 22);
this.listViewMenuItem1.Text = "Move &Up"; this.listViewMenuItem1.Text = "Move &Up";
this.listViewMenuItem1.Click += new System.EventHandler(this.moveUpContextMenu2_Click); this.listViewMenuItem1.Click += new System.EventHandler(this.moveUpContextMenu2_Click);
// //
// moveFileToToolStripMenuItem // moveFileToToolStripMenuItem
// //
this.moveFileToToolStripMenuItem.Name = "moveFileToToolStripMenuItem"; this.moveFileToToolStripMenuItem.Name = "moveFileToToolStripMenuItem";
this.moveFileToToolStripMenuItem.Size = new System.Drawing.Size(138, 22); this.moveFileToToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.moveFileToToolStripMenuItem.Text = "Move &Down"; this.moveFileToToolStripMenuItem.Text = "Move &Down";
this.moveFileToToolStripMenuItem.Click += new System.EventHandler(this.moveDownContextMenu2_Click); this.moveFileToToolStripMenuItem.Click += new System.EventHandler(this.moveDownContextMenu2_Click);
// //
// statusBar1 // statusBar1
// //
this.statusBar1.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 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.Location = new System.Drawing.Point(0, 634);
this.statusBar1.Name = "statusBar1"; this.statusBar1.Name = "statusBar1";
@ -178,20 +179,20 @@ namespace bzit.bomg
this.statusBar1.Size = new System.Drawing.Size(304, 20); this.statusBar1.Size = new System.Drawing.Size(304, 20);
this.statusBar1.SizingGrip = false; this.statusBar1.SizingGrip = false;
this.statusBar1.TabIndex = 9; this.statusBar1.TabIndex = 9;
// //
// statusBarPanel1 // statusBarPanel1
// //
this.statusBarPanel1.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring; this.statusBarPanel1.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring;
this.statusBarPanel1.Name = "statusBarPanel1"; this.statusBarPanel1.Name = "statusBarPanel1";
this.statusBarPanel1.Width = 204; this.statusBarPanel1.Width = 204;
// //
// statusBarPanel2 // statusBarPanel2
// //
this.statusBarPanel2.Alignment = System.Windows.Forms.HorizontalAlignment.Center; this.statusBarPanel2.Alignment = System.Windows.Forms.HorizontalAlignment.Center;
this.statusBarPanel2.Name = "statusBarPanel2"; this.statusBarPanel2.Name = "statusBarPanel2";
// //
// toolStrip1 // toolStrip1
// //
this.toolStrip1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.toolStrip1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -208,9 +209,9 @@ namespace bzit.bomg
this.toolStrip1.Size = new System.Drawing.Size(304, 25); this.toolStrip1.Size = new System.Drawing.Size(304, 25);
this.toolStrip1.TabIndex = 25; this.toolStrip1.TabIndex = 25;
this.toolStrip1.Text = "toolStrip1"; this.toolStrip1.Text = "toolStrip1";
// //
// toolStripDropDownButton1 // toolStripDropDownButton1
// //
this.toolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.newFileMenuItem, this.newFileMenuItem,
@ -229,89 +230,89 @@ namespace bzit.bomg
this.toolStripDropDownButton1.ShowDropDownArrow = false; this.toolStripDropDownButton1.ShowDropDownArrow = false;
this.toolStripDropDownButton1.Size = new System.Drawing.Size(29, 22); this.toolStripDropDownButton1.Size = new System.Drawing.Size(29, 22);
this.toolStripDropDownButton1.Text = "&File"; this.toolStripDropDownButton1.Text = "&File";
// //
// newFileMenuItem // newFileMenuItem
// //
this.newFileMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("newFileMenuItem.Image"))); this.newFileMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("newFileMenuItem.Image")));
this.newFileMenuItem.Name = "newFileMenuItem"; this.newFileMenuItem.Name = "newFileMenuItem";
this.newFileMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N))); 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.Size = new System.Drawing.Size(186, 22);
this.newFileMenuItem.Text = "&New"; this.newFileMenuItem.Text = "&New";
this.newFileMenuItem.Click += new System.EventHandler(this.newMenuItem_Click); this.newFileMenuItem.Click += new System.EventHandler(this.newMenuItem_Click);
// //
// openFileMenuItem // openFileMenuItem
// //
this.openFileMenuItem.Image = global::bzit.bomg.Properties.Resources.folder_page; this.openFileMenuItem.Image = global::bzit.bomg.Properties.Resources.folder_page;
this.openFileMenuItem.Name = "openFileMenuItem"; this.openFileMenuItem.Name = "openFileMenuItem";
this.openFileMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); 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.Size = new System.Drawing.Size(186, 22);
this.openFileMenuItem.Text = "&Open"; this.openFileMenuItem.Text = "&Open";
this.openFileMenuItem.Click += new System.EventHandler(this.openMenuItem_Click); this.openFileMenuItem.Click += new System.EventHandler(this.openMenuItem_Click);
// //
// toolStripSeparator1 // toolStripSeparator1
// //
this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(183, 6); this.toolStripSeparator1.Size = new System.Drawing.Size(183, 6);
// //
// closeFileMenuItem // closeFileMenuItem
// //
this.closeFileMenuItem.Name = "closeFileMenuItem"; this.closeFileMenuItem.Name = "closeFileMenuItem";
this.closeFileMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W))); 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.Size = new System.Drawing.Size(186, 22);
this.closeFileMenuItem.Text = "&Close"; this.closeFileMenuItem.Text = "&Close";
this.closeFileMenuItem.Click += new System.EventHandler(this.closeMenuItem_Click); this.closeFileMenuItem.Click += new System.EventHandler(this.closeMenuItem_Click);
// //
// toolStripSeparator4 // toolStripSeparator4
// //
this.toolStripSeparator4.Name = "toolStripSeparator4"; this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(183, 6); this.toolStripSeparator4.Size = new System.Drawing.Size(183, 6);
// //
// saveFileMenuItem // saveFileMenuItem
// //
this.saveFileMenuItem.Image = global::bzit.bomg.Properties.Resources.disk; this.saveFileMenuItem.Image = global::bzit.bomg.Properties.Resources.disk;
this.saveFileMenuItem.Name = "saveFileMenuItem"; this.saveFileMenuItem.Name = "saveFileMenuItem";
this.saveFileMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S))); 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.Size = new System.Drawing.Size(186, 22);
this.saveFileMenuItem.Text = "&Save"; this.saveFileMenuItem.Text = "&Save";
this.saveFileMenuItem.Click += new System.EventHandler(this.importSnapshotToolStripMenuItem_Click); this.saveFileMenuItem.Click += new System.EventHandler(this.importSnapshotToolStripMenuItem_Click);
// //
// saveAsFileMenuItem // saveAsFileMenuItem
// //
this.saveAsFileMenuItem.Image = global::bzit.bomg.Properties.Resources.page_white_disk; this.saveAsFileMenuItem.Image = global::bzit.bomg.Properties.Resources.page_white_disk;
this.saveAsFileMenuItem.Name = "saveAsFileMenuItem"; this.saveAsFileMenuItem.Name = "saveAsFileMenuItem";
this.saveAsFileMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) this.saveAsFileMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.S))); | System.Windows.Forms.Keys.S)));
this.saveAsFileMenuItem.Size = new System.Drawing.Size(186, 22); this.saveAsFileMenuItem.Size = new System.Drawing.Size(186, 22);
this.saveAsFileMenuItem.Text = "Save &As"; this.saveAsFileMenuItem.Text = "Save &As";
this.saveAsFileMenuItem.Click += new System.EventHandler(this.exportSnapshotToolStripMenuItem_Click); this.saveAsFileMenuItem.Click += new System.EventHandler(this.exportSnapshotToolStripMenuItem_Click);
// //
// toolStripSeparator8 // toolStripSeparator8
// //
this.toolStripSeparator8.Name = "toolStripSeparator8"; this.toolStripSeparator8.Name = "toolStripSeparator8";
this.toolStripSeparator8.Size = new System.Drawing.Size(183, 6); this.toolStripSeparator8.Size = new System.Drawing.Size(183, 6);
// //
// exportFileMenuItem // exportFileMenuItem
// //
this.exportFileMenuItem.Enabled = false; this.exportFileMenuItem.Enabled = false;
this.exportFileMenuItem.Name = "exportFileMenuItem"; this.exportFileMenuItem.Name = "exportFileMenuItem";
this.exportFileMenuItem.Size = new System.Drawing.Size(186, 22); this.exportFileMenuItem.Size = new System.Drawing.Size(186, 22);
this.exportFileMenuItem.Text = "&Export"; this.exportFileMenuItem.Text = "&Export";
this.exportFileMenuItem.Click += new System.EventHandler(this.toolStripMenuItem7_Click); this.exportFileMenuItem.Click += new System.EventHandler(this.toolStripMenuItem7_Click);
// //
// toolStripSeparator6 // toolStripSeparator6
// //
this.toolStripSeparator6.Name = "toolStripSeparator6"; this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(183, 6); this.toolStripSeparator6.Size = new System.Drawing.Size(183, 6);
// //
// exitFileMenuItem // exitFileMenuItem
// //
this.exitFileMenuItem.Name = "exitFileMenuItem"; this.exitFileMenuItem.Name = "exitFileMenuItem";
this.exitFileMenuItem.Size = new System.Drawing.Size(186, 22); this.exitFileMenuItem.Size = new System.Drawing.Size(186, 22);
this.exitFileMenuItem.Text = "E&xit"; this.exitFileMenuItem.Text = "E&xit";
this.exitFileMenuItem.Click += new System.EventHandler(this.exitMenuItem_Click); this.exitFileMenuItem.Click += new System.EventHandler(this.exitMenuItem_Click);
// //
// toolStripDropDownButton2 // toolStripDropDownButton2
// //
this.toolStripDropDownButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolStripDropDownButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.toolStripDropDownButton2.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripDropDownButton2.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.findEditMenuItem}); this.findEditMenuItem});
@ -320,18 +321,18 @@ namespace bzit.bomg
this.toolStripDropDownButton2.ShowDropDownArrow = false; this.toolStripDropDownButton2.ShowDropDownArrow = false;
this.toolStripDropDownButton2.Size = new System.Drawing.Size(31, 22); this.toolStripDropDownButton2.Size = new System.Drawing.Size(31, 22);
this.toolStripDropDownButton2.Text = "&Edit"; this.toolStripDropDownButton2.Text = "&Edit";
// //
// findEditMenuItem // findEditMenuItem
// //
this.findEditMenuItem.Image = global::bzit.bomg.Properties.Resources.magnifier; this.findEditMenuItem.Image = global::bzit.bomg.Properties.Resources.magnifier;
this.findEditMenuItem.Name = "findEditMenuItem"; this.findEditMenuItem.Name = "findEditMenuItem";
this.findEditMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F))); 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.Text = "&Find";
this.findEditMenuItem.Click += new System.EventHandler(this.toolStripButton5_Click); this.findEditMenuItem.Click += new System.EventHandler(this.toolStripButton5_Click);
// //
// toolStripDropDownButton3 // toolStripDropDownButton3
// //
this.toolStripDropDownButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolStripDropDownButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.toolStripDropDownButton3.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripDropDownButton3.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.expandAllViewMenuItem, this.expandAllViewMenuItem,
@ -341,25 +342,25 @@ namespace bzit.bomg
this.toolStripDropDownButton3.ShowDropDownArrow = false; this.toolStripDropDownButton3.ShowDropDownArrow = false;
this.toolStripDropDownButton3.Size = new System.Drawing.Size(36, 22); this.toolStripDropDownButton3.Size = new System.Drawing.Size(36, 22);
this.toolStripDropDownButton3.Text = "&View"; this.toolStripDropDownButton3.Text = "&View";
// //
// expandAllViewMenuItem // expandAllViewMenuItem
// //
this.expandAllViewMenuItem.Enabled = false; this.expandAllViewMenuItem.Enabled = false;
this.expandAllViewMenuItem.Name = "expandAllViewMenuItem"; this.expandAllViewMenuItem.Name = "expandAllViewMenuItem";
this.expandAllViewMenuItem.Size = new System.Drawing.Size(180, 22); this.expandAllViewMenuItem.Size = new System.Drawing.Size(136, 22);
this.expandAllViewMenuItem.Text = "&Expand All"; this.expandAllViewMenuItem.Text = "&Expand All";
this.expandAllViewMenuItem.Click += new System.EventHandler(this.expandAllToolStripMenuItem_Click); this.expandAllViewMenuItem.Click += new System.EventHandler(this.expandAllToolStripMenuItem_Click);
// //
// collapseAllViewMenuItem // collapseAllViewMenuItem
// //
this.collapseAllViewMenuItem.Enabled = false; this.collapseAllViewMenuItem.Enabled = false;
this.collapseAllViewMenuItem.Name = "collapseAllViewMenuItem"; this.collapseAllViewMenuItem.Name = "collapseAllViewMenuItem";
this.collapseAllViewMenuItem.Size = new System.Drawing.Size(180, 22); this.collapseAllViewMenuItem.Size = new System.Drawing.Size(136, 22);
this.collapseAllViewMenuItem.Text = "&Collapse All"; this.collapseAllViewMenuItem.Text = "&Collapse All";
this.collapseAllViewMenuItem.Click += new System.EventHandler(this.collapseAllToolStripMenuItem_Click); this.collapseAllViewMenuItem.Click += new System.EventHandler(this.collapseAllToolStripMenuItem_Click);
// //
// toolStripDropDownButton4 // toolStripDropDownButton4
// //
this.toolStripDropDownButton4.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolStripDropDownButton4.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.toolStripDropDownButton4.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripDropDownButton4.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.updateIconsToolMenuItem, this.updateIconsToolMenuItem,
@ -370,31 +371,31 @@ namespace bzit.bomg
this.toolStripDropDownButton4.ShowDropDownArrow = false; this.toolStripDropDownButton4.ShowDropDownArrow = false;
this.toolStripDropDownButton4.Size = new System.Drawing.Size(39, 22); this.toolStripDropDownButton4.Size = new System.Drawing.Size(39, 22);
this.toolStripDropDownButton4.Text = "&Tools"; this.toolStripDropDownButton4.Text = "&Tools";
// //
// updateIconsToolMenuItem // updateIconsToolMenuItem
// //
this.updateIconsToolMenuItem.Name = "updateIconsToolMenuItem"; this.updateIconsToolMenuItem.Name = "updateIconsToolMenuItem";
this.updateIconsToolMenuItem.Size = new System.Drawing.Size(180, 22); this.updateIconsToolMenuItem.Size = new System.Drawing.Size(143, 22);
this.updateIconsToolMenuItem.Text = "&Update Icons"; this.updateIconsToolMenuItem.Text = "&Update Icons";
this.updateIconsToolMenuItem.Click += new System.EventHandler(this.toolStripMenuItem1_Click); this.updateIconsToolMenuItem.Click += new System.EventHandler(this.toolStripMenuItem1_Click);
// //
// toolStripSeparator14 // toolStripSeparator14
// //
this.toolStripSeparator14.Name = "toolStripSeparator14"; this.toolStripSeparator14.Name = "toolStripSeparator14";
this.toolStripSeparator14.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator14.Size = new System.Drawing.Size(140, 6);
// //
// optionsToolMenuItem // optionsToolMenuItem
// //
this.optionsToolMenuItem.Enabled = false; this.optionsToolMenuItem.Enabled = false;
this.optionsToolMenuItem.Image = global::bzit.bomg.Properties.Resources.cog; this.optionsToolMenuItem.Image = global::bzit.bomg.Properties.Resources.cog;
this.optionsToolMenuItem.Name = "optionsToolMenuItem"; this.optionsToolMenuItem.Name = "optionsToolMenuItem";
this.optionsToolMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F12; this.optionsToolMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F12;
this.optionsToolMenuItem.Size = new System.Drawing.Size(180, 22); this.optionsToolMenuItem.Size = new System.Drawing.Size(143, 22);
this.optionsToolMenuItem.Text = "&Options"; this.optionsToolMenuItem.Text = "&Options";
this.optionsToolMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem1_Click); this.optionsToolMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem1_Click);
// //
// toolStripDropDownButton5 // toolStripDropDownButton5
// //
this.toolStripDropDownButton5.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolStripDropDownButton5.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.toolStripDropDownButton5.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripDropDownButton5.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.viewHelpHelpMenuItem, this.viewHelpHelpMenuItem,
@ -405,31 +406,31 @@ namespace bzit.bomg
this.toolStripDropDownButton5.ShowDropDownArrow = false; this.toolStripDropDownButton5.ShowDropDownArrow = false;
this.toolStripDropDownButton5.Size = new System.Drawing.Size(36, 22); this.toolStripDropDownButton5.Size = new System.Drawing.Size(36, 22);
this.toolStripDropDownButton5.Text = "&Help"; this.toolStripDropDownButton5.Text = "&Help";
// //
// viewHelpHelpMenuItem // viewHelpHelpMenuItem
// //
this.viewHelpHelpMenuItem.Image = global::bzit.bomg.Properties.Resources.help; this.viewHelpHelpMenuItem.Image = global::bzit.bomg.Properties.Resources.help;
this.viewHelpHelpMenuItem.Name = "viewHelpHelpMenuItem"; this.viewHelpHelpMenuItem.Name = "viewHelpHelpMenuItem";
this.viewHelpHelpMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F1; this.viewHelpHelpMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F1;
this.viewHelpHelpMenuItem.Size = new System.Drawing.Size(180, 22); this.viewHelpHelpMenuItem.Size = new System.Drawing.Size(146, 22);
this.viewHelpHelpMenuItem.Text = "View &Help"; this.viewHelpHelpMenuItem.Text = "View &Help";
this.viewHelpHelpMenuItem.Click += new System.EventHandler(this.documentationToolStripMenuItem_Click); this.viewHelpHelpMenuItem.Click += new System.EventHandler(this.documentationToolStripMenuItem_Click);
// //
// toolStripSeparator12 // toolStripSeparator12
// //
this.toolStripSeparator12.Name = "toolStripSeparator12"; this.toolStripSeparator12.Name = "toolStripSeparator12";
this.toolStripSeparator12.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator12.Size = new System.Drawing.Size(143, 6);
// //
// aboutHelpMenuItem // aboutHelpMenuItem
// //
this.aboutHelpMenuItem.Image = global::bzit.bomg.Properties.Resources.comment; this.aboutHelpMenuItem.Image = global::bzit.bomg.Properties.Resources.comment;
this.aboutHelpMenuItem.Name = "aboutHelpMenuItem"; this.aboutHelpMenuItem.Name = "aboutHelpMenuItem";
this.aboutHelpMenuItem.Size = new System.Drawing.Size(180, 22); this.aboutHelpMenuItem.Size = new System.Drawing.Size(146, 22);
this.aboutHelpMenuItem.Text = "&About"; this.aboutHelpMenuItem.Text = "&About";
this.aboutHelpMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem1_Click); this.aboutHelpMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem1_Click);
// //
// toolStripDropDownButton7 // toolStripDropDownButton7
// //
this.toolStripDropDownButton7.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolStripDropDownButton7.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.toolStripDropDownButton7.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripDropDownButton7.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.alwaysOnTopToolStripMenuItem}); this.alwaysOnTopToolStripMenuItem});
@ -439,23 +440,23 @@ namespace bzit.bomg
this.toolStripDropDownButton7.Size = new System.Drawing.Size(16, 22); this.toolStripDropDownButton7.Size = new System.Drawing.Size(16, 22);
this.toolStripDropDownButton7.Text = "&?"; this.toolStripDropDownButton7.Text = "&?";
this.toolStripDropDownButton7.Visible = false; this.toolStripDropDownButton7.Visible = false;
// //
// alwaysOnTopToolStripMenuItem // alwaysOnTopToolStripMenuItem
// //
this.alwaysOnTopToolStripMenuItem.Name = "alwaysOnTopToolStripMenuItem"; this.alwaysOnTopToolStripMenuItem.Name = "alwaysOnTopToolStripMenuItem";
this.alwaysOnTopToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F11))); 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.Size = new System.Drawing.Size(205, 22);
this.alwaysOnTopToolStripMenuItem.Text = "Always On Top"; this.alwaysOnTopToolStripMenuItem.Text = "Always On Top";
this.alwaysOnTopToolStripMenuItem.Click += new System.EventHandler(this.alwaysOnTopToolStripMenuItem_Click); this.alwaysOnTopToolStripMenuItem.Click += new System.EventHandler(this.alwaysOnTopToolStripMenuItem_Click);
// //
// openFileDialog // openFileDialog
// //
this.openFileDialog.DefaultExt = "ryz"; this.openFileDialog.DefaultExt = "ryz";
this.openFileDialog.Filter = "Bookmarks files|*.ryz"; this.openFileDialog.Filter = "Bookmarks files|*.ryz";
this.openFileDialog.Title = "Open bookmarks file"; this.openFileDialog.Title = "Open bookmarks file";
// //
// folderTreeNodeMenu // folderTreeNodeMenu
// //
this.folderTreeNodeMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.folderTreeNodeMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItem15, this.toolStripMenuItem15,
this.toolStripMenuItem16, this.toolStripMenuItem16,
@ -470,102 +471,103 @@ namespace bzit.bomg
this.toolStripMenuItem13}); this.toolStripMenuItem13});
this.folderTreeNodeMenu.Name = "listViewMenu"; this.folderTreeNodeMenu.Name = "listViewMenu";
this.folderTreeNodeMenu.Size = new System.Drawing.Size(139, 198); this.folderTreeNodeMenu.Size = new System.Drawing.Size(139, 198);
// //
// toolStripMenuItem15 // toolStripMenuItem15
// //
this.toolStripMenuItem15.Name = "toolStripMenuItem15"; this.toolStripMenuItem15.Name = "toolStripMenuItem15";
this.toolStripMenuItem15.Size = new System.Drawing.Size(138, 22); this.toolStripMenuItem15.Size = new System.Drawing.Size(138, 22);
this.toolStripMenuItem15.Text = "Add &Page"; this.toolStripMenuItem15.Text = "Add &Page";
this.toolStripMenuItem15.Click += new System.EventHandler(this.addPageContextMenu2_Click); this.toolStripMenuItem15.Click += new System.EventHandler(this.addPageContextMenu2_Click);
// //
// toolStripMenuItem16 // toolStripMenuItem16
// //
this.toolStripMenuItem16.Name = "toolStripMenuItem16"; this.toolStripMenuItem16.Name = "toolStripMenuItem16";
this.toolStripMenuItem16.Size = new System.Drawing.Size(138, 22); this.toolStripMenuItem16.Size = new System.Drawing.Size(138, 22);
this.toolStripMenuItem16.Text = "Add &Folder"; this.toolStripMenuItem16.Text = "Add &Folder";
this.toolStripMenuItem16.Click += new System.EventHandler(this.addFolderContextMenu2_Click); this.toolStripMenuItem16.Click += new System.EventHandler(this.addFolderContextMenu2_Click);
// //
// toolStripSeparator5 // toolStripSeparator5
// //
this.toolStripSeparator5.Name = "toolStripSeparator5"; this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(135, 6); this.toolStripSeparator5.Size = new System.Drawing.Size(135, 6);
// //
// toolStripMenuItem14 // toolStripMenuItem14
// //
this.toolStripMenuItem14.Name = "toolStripMenuItem14"; this.toolStripMenuItem14.Name = "toolStripMenuItem14";
this.toolStripMenuItem14.Size = new System.Drawing.Size(138, 22); this.toolStripMenuItem14.Size = new System.Drawing.Size(138, 22);
this.toolStripMenuItem14.Text = "&Open All"; this.toolStripMenuItem14.Text = "&Open All";
this.toolStripMenuItem14.Click += new System.EventHandler(this.openAllContextMenu_Click); this.toolStripMenuItem14.Click += new System.EventHandler(this.openAllContextMenu_Click);
// //
// toolStripMenuItem9 // toolStripMenuItem9
// //
this.toolStripMenuItem9.Name = "toolStripMenuItem9"; this.toolStripMenuItem9.Name = "toolStripMenuItem9";
this.toolStripMenuItem9.Size = new System.Drawing.Size(138, 22); this.toolStripMenuItem9.Size = new System.Drawing.Size(138, 22);
this.toolStripMenuItem9.Text = "Edi&t"; this.toolStripMenuItem9.Text = "Edi&t";
this.toolStripMenuItem9.Click += new System.EventHandler(this.editContextMenu2_Click); this.toolStripMenuItem9.Click += new System.EventHandler(this.editContextMenu2_Click);
// //
// toolStripMenuItem11 // toolStripMenuItem11
// //
this.toolStripMenuItem11.Name = "toolStripMenuItem11"; this.toolStripMenuItem11.Name = "toolStripMenuItem11";
this.toolStripMenuItem11.Size = new System.Drawing.Size(138, 22); this.toolStripMenuItem11.Size = new System.Drawing.Size(138, 22);
this.toolStripMenuItem11.Text = "D&elete"; this.toolStripMenuItem11.Text = "D&elete";
this.toolStripMenuItem11.Click += new System.EventHandler(this.deleteContextMenu_Click); this.toolStripMenuItem11.Click += new System.EventHandler(this.deleteContextMenu_Click);
// //
// toolStripSeparator7 // toolStripSeparator7
// //
this.toolStripSeparator7.Name = "toolStripSeparator7"; this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(135, 6); this.toolStripSeparator7.Size = new System.Drawing.Size(135, 6);
// //
// sortToolStripMenuItem // sortToolStripMenuItem
// //
this.sortToolStripMenuItem.Name = "sortToolStripMenuItem"; this.sortToolStripMenuItem.Name = "sortToolStripMenuItem";
this.sortToolStripMenuItem.Size = new System.Drawing.Size(138, 22); this.sortToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.sortToolStripMenuItem.Text = "&Sort"; this.sortToolStripMenuItem.Text = "&Sort";
this.sortToolStripMenuItem.Click += new System.EventHandler(this.sortContextMenu2_Click); this.sortToolStripMenuItem.Click += new System.EventHandler(this.sortContextMenu2_Click);
// //
// toolStripSeparator11 // toolStripSeparator11
// //
this.toolStripSeparator11.Name = "toolStripSeparator11"; this.toolStripSeparator11.Name = "toolStripSeparator11";
this.toolStripSeparator11.Size = new System.Drawing.Size(135, 6); this.toolStripSeparator11.Size = new System.Drawing.Size(135, 6);
// //
// toolStripMenuItem12 // toolStripMenuItem12
// //
this.toolStripMenuItem12.Name = "toolStripMenuItem12"; this.toolStripMenuItem12.Name = "toolStripMenuItem12";
this.toolStripMenuItem12.Size = new System.Drawing.Size(138, 22); this.toolStripMenuItem12.Size = new System.Drawing.Size(138, 22);
this.toolStripMenuItem12.Text = "Move &Up"; this.toolStripMenuItem12.Text = "Move &Up";
this.toolStripMenuItem12.Click += new System.EventHandler(this.moveUpContextMenu_Click); this.toolStripMenuItem12.Click += new System.EventHandler(this.moveUpContextMenu_Click);
// //
// toolStripMenuItem13 // toolStripMenuItem13
// //
this.toolStripMenuItem13.Name = "toolStripMenuItem13"; this.toolStripMenuItem13.Name = "toolStripMenuItem13";
this.toolStripMenuItem13.Size = new System.Drawing.Size(138, 22); this.toolStripMenuItem13.Size = new System.Drawing.Size(138, 22);
this.toolStripMenuItem13.Text = "Move &Down"; this.toolStripMenuItem13.Text = "Move &Down";
this.toolStripMenuItem13.Click += new System.EventHandler(this.moveDownContextMenu_Click); this.toolStripMenuItem13.Click += new System.EventHandler(this.moveDownContextMenu_Click);
// //
// saveFileDialog // saveFileDialog
// //
this.saveFileDialog.DefaultExt = "ryz"; this.saveFileDialog.DefaultExt = "jsnx";
this.saveFileDialog.Filter = "Bookmarks file|*.ryz|Bookmarks file (password protected)|*.ryz"; this.saveFileDialog.Filter = "Bookmarks file|*.jsnx|Bookmarks file (password protected)|*.jsnx";
this.saveFileDialog.Title = "Save bookmarks file"; this.saveFileDialog.Title = "Save bookmarks file";
// //
// toolStrip2 // toolStrip2
// //
this.toolStrip2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.toolStrip2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.toolStrip2.CanOverflow = false; this.toolStrip2.CanOverflow = false;
this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.newMenuBarItem, this.newMenuBarItem,
this.openMenuBarItem, this.openMenuBarItem,
this.saveMenuBarItem, this.saveMenuBarItem,
this.toolStripSeparator9}); this.toolStripSeparator9,
this.toolStripButton1});
this.toolStrip2.Location = new System.Drawing.Point(0, 25); this.toolStrip2.Location = new System.Drawing.Point(0, 25);
this.toolStrip2.Name = "toolStrip2"; this.toolStrip2.Name = "toolStrip2";
this.toolStrip2.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; this.toolStrip2.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
this.toolStrip2.Size = new System.Drawing.Size(304, 25); this.toolStrip2.Size = new System.Drawing.Size(304, 25);
this.toolStrip2.TabIndex = 26; this.toolStrip2.TabIndex = 26;
this.toolStrip2.Text = "toolStrip2"; this.toolStrip2.Text = "toolStrip2";
// //
// newMenuBarItem // newMenuBarItem
// //
this.newMenuBarItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.newMenuBarItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.newMenuBarItem.Image = ((System.Drawing.Image)(resources.GetObject("newMenuBarItem.Image"))); this.newMenuBarItem.Image = ((System.Drawing.Image)(resources.GetObject("newMenuBarItem.Image")));
this.newMenuBarItem.ImageTransparentColor = System.Drawing.Color.Magenta; this.newMenuBarItem.ImageTransparentColor = System.Drawing.Color.Magenta;
@ -574,9 +576,9 @@ namespace bzit.bomg
this.newMenuBarItem.Text = "toolStripButton1"; this.newMenuBarItem.Text = "toolStripButton1";
this.newMenuBarItem.ToolTipText = "New"; this.newMenuBarItem.ToolTipText = "New";
this.newMenuBarItem.Click += new System.EventHandler(this.newMenuItem_Click); this.newMenuBarItem.Click += new System.EventHandler(this.newMenuItem_Click);
// //
// openMenuBarItem // openMenuBarItem
// //
this.openMenuBarItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.openMenuBarItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.openMenuBarItem.Image = global::bzit.bomg.Properties.Resources.folder_page; this.openMenuBarItem.Image = global::bzit.bomg.Properties.Resources.folder_page;
this.openMenuBarItem.ImageTransparentColor = System.Drawing.Color.Magenta; this.openMenuBarItem.ImageTransparentColor = System.Drawing.Color.Magenta;
@ -585,9 +587,9 @@ namespace bzit.bomg
this.openMenuBarItem.Text = "toolStripButton2"; this.openMenuBarItem.Text = "toolStripButton2";
this.openMenuBarItem.ToolTipText = "Open"; this.openMenuBarItem.ToolTipText = "Open";
this.openMenuBarItem.Click += new System.EventHandler(this.openMenuItem_Click); this.openMenuBarItem.Click += new System.EventHandler(this.openMenuItem_Click);
// //
// saveMenuBarItem // saveMenuBarItem
// //
this.saveMenuBarItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.saveMenuBarItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.saveMenuBarItem.Image = global::bzit.bomg.Properties.Resources.disk; this.saveMenuBarItem.Image = global::bzit.bomg.Properties.Resources.disk;
this.saveMenuBarItem.ImageTransparentColor = System.Drawing.Color.Magenta; this.saveMenuBarItem.ImageTransparentColor = System.Drawing.Color.Magenta;
@ -596,14 +598,14 @@ namespace bzit.bomg
this.saveMenuBarItem.Text = "toolStripButton3"; this.saveMenuBarItem.Text = "toolStripButton3";
this.saveMenuBarItem.ToolTipText = "Save"; this.saveMenuBarItem.ToolTipText = "Save";
this.saveMenuBarItem.Click += new System.EventHandler(this.importSnapshotToolStripMenuItem_Click); this.saveMenuBarItem.Click += new System.EventHandler(this.importSnapshotToolStripMenuItem_Click);
// //
// toolStripSeparator9 // toolStripSeparator9
// //
this.toolStripSeparator9.Name = "toolStripSeparator9"; this.toolStripSeparator9.Name = "toolStripSeparator9";
this.toolStripSeparator9.Size = new System.Drawing.Size(6, 25); this.toolStripSeparator9.Size = new System.Drawing.Size(6, 25);
// //
// rootTreeNodeMenu // rootTreeNodeMenu
// //
this.rootTreeNodeMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.rootTreeNodeMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItem17, this.toolStripMenuItem17,
this.toolStripMenuItem18, this.toolStripMenuItem18,
@ -613,56 +615,68 @@ namespace bzit.bomg
this.toolStripMenuItem22}); this.toolStripMenuItem22});
this.rootTreeNodeMenu.Name = "listViewMenu"; this.rootTreeNodeMenu.Name = "listViewMenu";
this.rootTreeNodeMenu.Size = new System.Drawing.Size(133, 104); this.rootTreeNodeMenu.Size = new System.Drawing.Size(133, 104);
// //
// toolStripMenuItem17 // toolStripMenuItem17
// //
this.toolStripMenuItem17.Name = "toolStripMenuItem17"; this.toolStripMenuItem17.Name = "toolStripMenuItem17";
this.toolStripMenuItem17.Size = new System.Drawing.Size(132, 22); this.toolStripMenuItem17.Size = new System.Drawing.Size(132, 22);
this.toolStripMenuItem17.Text = "Add &Page"; this.toolStripMenuItem17.Text = "Add &Page";
this.toolStripMenuItem17.Click += new System.EventHandler(this.addPageContextMenu_Click); this.toolStripMenuItem17.Click += new System.EventHandler(this.addPageContextMenu_Click);
// //
// toolStripMenuItem18 // toolStripMenuItem18
// //
this.toolStripMenuItem18.Name = "toolStripMenuItem18"; this.toolStripMenuItem18.Name = "toolStripMenuItem18";
this.toolStripMenuItem18.Size = new System.Drawing.Size(132, 22); this.toolStripMenuItem18.Size = new System.Drawing.Size(132, 22);
this.toolStripMenuItem18.Text = "Add &Folder"; this.toolStripMenuItem18.Text = "Add &Folder";
this.toolStripMenuItem18.Click += new System.EventHandler(this.addFolderContextMenu_Click); this.toolStripMenuItem18.Click += new System.EventHandler(this.addFolderContextMenu_Click);
// //
// toolStripSeparator10 // toolStripSeparator10
// //
this.toolStripSeparator10.Name = "toolStripSeparator10"; this.toolStripSeparator10.Name = "toolStripSeparator10";
this.toolStripSeparator10.Size = new System.Drawing.Size(129, 6); this.toolStripSeparator10.Size = new System.Drawing.Size(129, 6);
// //
// toolStripMenuItem20 // toolStripMenuItem20
// //
this.toolStripMenuItem20.Name = "toolStripMenuItem20"; this.toolStripMenuItem20.Name = "toolStripMenuItem20";
this.toolStripMenuItem20.Size = new System.Drawing.Size(132, 22); this.toolStripMenuItem20.Size = new System.Drawing.Size(132, 22);
this.toolStripMenuItem20.Text = "Edi&t"; this.toolStripMenuItem20.Text = "Edi&t";
this.toolStripMenuItem20.Click += new System.EventHandler(this.editContextMenu_Click); this.toolStripMenuItem20.Click += new System.EventHandler(this.editContextMenu_Click);
// //
// toolStripSeparator13 // toolStripSeparator13
// //
this.toolStripSeparator13.Name = "toolStripSeparator13"; this.toolStripSeparator13.Name = "toolStripSeparator13";
this.toolStripSeparator13.Size = new System.Drawing.Size(129, 6); this.toolStripSeparator13.Size = new System.Drawing.Size(129, 6);
// //
// toolStripMenuItem22 // toolStripMenuItem22
// //
this.toolStripMenuItem22.Name = "toolStripMenuItem22"; this.toolStripMenuItem22.Name = "toolStripMenuItem22";
this.toolStripMenuItem22.Size = new System.Drawing.Size(132, 22); this.toolStripMenuItem22.Size = new System.Drawing.Size(132, 22);
this.toolStripMenuItem22.Text = "&Sort"; this.toolStripMenuItem22.Text = "&Sort";
this.toolStripMenuItem22.Click += new System.EventHandler(this.sortContextMenu_Click); this.toolStripMenuItem22.Click += new System.EventHandler(this.sortContextMenu_Click);
// //
// toolStripButton1
//
this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(23, 22);
this.toolStripButton1.Text = "toolStripButton1";
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
//
// treeView1 // treeView1
// //
this.treeView1.AllowDrop = true; this.treeView1.AllowDrop = true;
this.treeView1.BackColor = System.Drawing.Color.White; this.treeView1.BackColor = System.Drawing.Color.White;
this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill; this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.treeView1.HasChanged = false;
this.treeView1.HideSelection = false; this.treeView1.HideSelection = false;
this.treeView1.HotTracking = true; this.treeView1.HotTracking = true;
this.treeView1.ImageIndex = 0; this.treeView1.ImageIndex = 0;
this.treeView1.LabelEdit = true; this.treeView1.LabelEdit = true;
this.treeView1.Location = new System.Drawing.Point(0, 50); this.treeView1.Location = new System.Drawing.Point(0, 50);
this.treeView1.Name = "treeView1"; this.treeView1.Name = "treeView1";
this.treeView1.PathSeparator = "\n";
this.treeView1.SelectedImageIndex = 0; this.treeView1.SelectedImageIndex = 0;
this.treeView1.ShowNodeToolTips = true; this.treeView1.ShowNodeToolTips = true;
this.treeView1.Size = new System.Drawing.Size(304, 584); this.treeView1.Size = new System.Drawing.Size(304, 584);
@ -670,9 +684,9 @@ namespace bzit.bomg
this.treeView1.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick); this.treeView1.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick);
this.treeView1.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseDoubleClick); this.treeView1.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseDoubleClick);
this.treeView1.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.treeView1_PreviewKeyDown); this.treeView1.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.treeView1_PreviewKeyDown);
// //
// MainForm // MainForm
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.SystemColors.Control; this.BackColor = System.Drawing.SystemColors.Control;
this.ClientSize = new System.Drawing.Size(304, 654); this.ClientSize = new System.Drawing.Size(304, 654);
@ -769,6 +783,7 @@ namespace bzit.bomg
private System.Windows.Forms.ToolStripMenuItem findEditMenuItem; private System.Windows.Forms.ToolStripMenuItem findEditMenuItem;
private System.Windows.Forms.ToolStripMenuItem updateIconsToolMenuItem; private System.Windows.Forms.ToolStripMenuItem updateIconsToolMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator14; private System.Windows.Forms.ToolStripSeparator toolStripSeparator14;
private System.Windows.Forms.ToolStripButton toolStripButton1;
} }
} }

View File

@ -1,8 +1,10 @@
using bzit.bomg.Models; using bzit.bomg.Models;
using System; using System;
using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.IO; using System.IO;
using System.Windows.Forms; using System.Windows.Forms;
using static RyzStudio.Windows.Forms.BookmarkTreeView;
namespace bzit.bomg namespace bzit.bomg
{ {
@ -382,7 +384,7 @@ namespace bzit.bomg
/** /**
* File -> Exit * File -> Exit
*/ */
private void exitMenuItem_Click(object sender, EventArgs e) { this.Close(); } private void exitMenuItem_Click(object sender, EventArgs e) => this.Close();
/** /**
* Find * Find
@ -490,89 +492,6 @@ namespace bzit.bomg
#endregion #endregion
//#region TreeView Menu - item
/**
* Node -> Open
*/
//private void toolStripMenuItem4_Click(object sender, EventArgs e)
//{
// openBookmark(treeView1.SelectedNode);
//}
/**
* Node -> Edit
*/
//private void toolStripMenuItem8_Click(object sender, EventArgs e)
//{
// if (treeView1.SelectedNode == null)
// {
// return;
// }
// treeView1.HasChanged = true;
// TreeNode tn = treeView1.SelectedNode;
// //##BookmarkEditForm oBookmarkEdit = new BookmarkEditForm(ref tn);
// //##oBookmarkEdit.ShowDialog();
//}
/**
* Node -> Delete
*/
//private void toolStripMenuItem6_Click(object sender, EventArgs e) => treeView1.SNode.Delete();
//{
// treeView1.DeleteNode();
//}
//#endregion
//#region TreeView Menu - folder
/**
* Add Page
*/
//private void toolStripMenuItem15_Click(object sender, EventArgs e) { treeView1.AddBookmarkPage(); }
/**
* Add Folder
*/
//private void toolStripMenuItem16_Click(object sender, EventArgs e) => treeView1.SelectedNode = treeView1.SNode.AddFolder();
/**
* Open All
*/
//private void toolStripMenuItem14_Click(object sender, EventArgs e)
//{
// if (treeView1.SelectedNode == null)
// {
// return;
// }
// foreach (TreeNode tn in treeView1.SelectedNode.Nodes)
// {
// if (tn.Tag == null)
// {
// continue;
// }
// openBookmark(tn);
// }
//}
/**
* Edit
*/
//private void toolStripMenuItem9_Click(object sender, EventArgs e)
//{
// treeView1.HasChanged = true;
// //##treeView1.EditNode();
//}
//#endregion
protected void OpenBookmarkFile(string filename) protected void OpenBookmarkFile(string filename)
{ {
treeView1.HasChanged = false; treeView1.HasChanged = false;
@ -640,6 +559,9 @@ namespace bzit.bomg
return rv; return rv;
} }
private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
{ {
if (e.Button != MouseButtons.Right) if (e.Button != MouseButtons.Right)
@ -673,59 +595,31 @@ namespace bzit.bomg
return; return;
} }
NodeType nodeType = treeView1.SNode.GetNodeType();
switch (e.KeyCode) switch (e.KeyCode)
{ {
case Keys.Apps: case Keys.Apps:
treeView1_NodeMouseClick(sender, new TreeNodeMouseClickEventArgs(tn, MouseButtons.Right, 1, tn.Bounds.X, tn.Bounds.Y)); treeView1_NodeMouseClick(sender, new TreeNodeMouseClickEventArgs(tn, MouseButtons.Right, 1, tn.Bounds.X, tn.Bounds.Y));
return; return;
//case Keys.F2:
//if (tn.Tag == null)
//{
// return;
//}
//if (!(tn.Tag is BookmarkItem))
//{
// return;
//}
//toolStripMenuItem8_Click(sender, null);
//break;
case Keys.F3:
if (tn.Tag == null)
{
return;
}
if (!(tn.Tag is BookmarkItem))
{
return;
}
BookmarkItem bookmarkItem = (BookmarkItem)tn.Tag;
if (bookmarkItem == null)
{
return;
}
if (string.IsNullOrEmpty(bookmarkItem.SiteAddress))
{
return;
}
try
{
Clipboard.SetText(bookmarkItem.SiteAddress.Trim());
}
catch
{
// do nothing
}
break;
case Keys.Enter: case Keys.Enter:
openBookmark(tn); openBookmark(tn);
break;
case Keys.Insert:
if (e.Modifiers != Keys.Shift)
{
if ((nodeType == NodeType.Root) || (nodeType == NodeType.Folder))
{
(new BookmarkEditForm(treeView1)).ShowDialog();
}
else if (nodeType == NodeType.Page)
{
treeView1.SelectedNode = tn.Parent;
(new BookmarkEditForm(treeView1)).ShowDialog();
}
}
break; break;
default: break; default: break;
} }
@ -881,8 +775,15 @@ namespace bzit.bomg
private void moveUpContextMenu2_Click(object sender, EventArgs e) => treeView1.SNode.MoveUp(); private void moveUpContextMenu2_Click(object sender, EventArgs e) => treeView1.SNode.MoveUp();
private void moveDownContextMenu2_Click(object sender, EventArgs e) => treeView1.SNode.MoveDown(); private void moveDownContextMenu2_Click(object sender, EventArgs e) => treeView1.SNode.MoveDown();
#endregion #endregion
private void toolStripButton1_Click(object sender, EventArgs e)
{
List<BookmarkItemViewModel> rs = treeView1.GetBookmarkList();
//MessageBox.Show(treeView1.GetNodePath(treeView1.SelectedNode));
MessageBox.Show("!");
}
} }
} }

View File

@ -156,15 +156,30 @@
<data name="newMenuBarItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="newMenuBarItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHaSURBVDhPjZO9S1tRGMZtnfo/VHASCkWkCRlFKB0KdVB0 YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHZSURBVDhPjZM7SxxRGIY1qfwPClaCICFkZUsRxELQQkmK
KIWCDgpuanHoWOlklxJCcBG3QoeCe5dEpEXRBBW/oCIOSfNlbnI/zjn3Xn36vofe670mpb7wI8N9n1+e EAjEQsHOCxYpFSttZFmWNJJOsAik2yKwBAkJiu6i4g0iYrGbvbmzO5dzzszE1+87OOOOay4fPEyx5332
c3LTE5nHRIJI/Yd+4iHRMQnHcYxcLnft+z66IaVEOp3+TLtdJSkOW5YF27ZDWq0Wms0mKpWKlpTLZWQy PWfmtDVNJxEj4v+gm3hCtEzMcRwjk8n89n0fjyGlRCKRWKe1j0riHLYsC7Zth9TrddRqNRSLRS0pFApI
mQ7JAyLFC0IIKKX0J2OaJgzDQLVa1QJqCf6SbDYbSPRogdcqQl7taEEg4UC73UatVosdh+GMTtNogThd JpMtknYizguEEFBK6SdjmiYMw0CpVNICagn+k1QqFUj0aIFXz0Fe72pBIOFAo9FAuVyObIfhjE7TaIE4
gDiaDRc8z9PnDo5Sr9d1k1KpdCu4uZx/ZB68Gdn79nxNHs9A7r+GPF+B29iC71oxCTfh+2g0GrcCeTK9 m4M4ng4XeJ6n9x1spVKp6Cb5fP5ecHM122Eevhnc/zS0IU+mIA9eQ16swq1+g+9aEQk34fOoVqv3Ank6
qk7mIM8W4V6sQP36ALE3BmvzGcTBUqwJH4fvhEWhAJjsdfbHN+TZOxJ8IsEynOIEnMIUfE/pRcZ1XX0v +UGdzkCez8O9XIX6uQSxPw5r+wXE4WKkCW+Hz4RFoQB49dQ5mPgszxdIsEaCZTi5l3Cy7+B7Si9kXNfV
LGFCAc/V7uigKL6COl+GOn0PK/cUrnEYhhluEVwut4kJrO0XL0VhFPaPIZibT6h+Aur3dx0K4AYMhzsF 58ISJhTwXO+NPRO5UaiLZaiz97C+9sE1jsIwwy2Cw+U2EYG1MzwismOwvz+Hud1L9WNQv77oUAA3YDjc
P4ffFr4MrPuyDo8Qxx8hL792hKPEBDThi3SXaIso/IwzOk2jBfl8/uau4F/Q7jVndPrvJOnnsflBt0AU Kvgx8Da72fPRlxV4hDhZgbzaagk3ExHQhB/SQ5pbNMO/cUanabQgnU7fPBT8Cf7sOaPTd9NPr8f+22UK
3qHX2aQM/3vD6SOSBFvvA4V7+v4ABhqcM6lhVZQAAAAASUVORK5CYII= uLszJmX49obTRfQTbP0fKNzWdQu5+pvuDaXQ3AAAAABJRU5ErkJggg==
</value>
</data>
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value> </value>
</data> </data>
<metadata name="rootTreeNodeMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="rootTreeNodeMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">

View File

@ -43,7 +43,7 @@ namespace bzit.bomg
this.textBox2.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6); this.textBox2.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
this.textBox2.Name = "textBox2"; this.textBox2.Name = "textBox2";
this.textBox2.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9); this.textBox2.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
this.textBox2.Size = new System.Drawing.Size(276, 33); this.textBox2.Size = new System.Drawing.Size(276, 32);
this.textBox2.TabIndex = 68; this.textBox2.TabIndex = 68;
// //
// label2 // label2
@ -98,6 +98,7 @@ namespace bzit.bomg
this.ShowIcon = false; this.ShowIcon = false;
this.ShowInTaskbar = false; this.ShowInTaskbar = false;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Text = "New Session";
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();

View File

@ -60,34 +60,34 @@ namespace bzit.bomg
protected override void saveToXmlTextWriter(ref XmlTextWriter writer) protected override void saveToXmlTextWriter(ref XmlTextWriter writer)
{ {
if (parentForm.treeView1.Nodes.Count <= 0) //if (parentForm.treeView1.Nodes.Count <= 0)
{ //{
return; // return;
} //}
writer.Formatting = Formatting.Indented; //writer.Formatting = Formatting.Indented;
writer.WriteStartDocument(); //writer.WriteStartDocument();
writer.WriteStartElement(CONST_PRODUCT); //writer.WriteStartElement(CONST_PRODUCT);
writer.WriteStartElement("b"); //writer.WriteStartElement("b");
writer.WriteStartElement("g"); //writer.WriteStartElement("g");
writer.WriteAttributeString("name", parentForm.treeView1.Nodes[0].Text); //writer.WriteAttributeString("name", parentForm.treeView1.Nodes[0].Text);
foreach (TreeNode tn in parentForm.treeView1.NodeList) //foreach (TreeNode tn in parentForm.treeView1.NodeList)
{ //{
BookmarkItem bi = (BookmarkItem)tn.Tag; // BookmarkItem bi = (BookmarkItem)tn.Tag;
writer.WriteStartElement("m"); // writer.WriteStartElement("m");
writer.WriteElementString("name", parentForm.treeView1.GetNodeFullPath(tn)); // writer.WriteElementString("name", parentForm.treeView1.GetNodeFullPath(tn));
writer.WriteElementString("address", bi.SiteAddress); // writer.WriteElementString("address", bi.SiteAddress);
writer.WriteElementString("description", bi.Description); // writer.WriteElementString("description", bi.Description);
writer.WriteElementString("created", bi.Created.ToString()); // writer.WriteElementString("created", bi.Created.ToString());
writer.WriteEndElement(); // writer.WriteEndElement();
} //}
writer.WriteEndElement(); //writer.WriteEndElement();
writer.WriteEndElement(); //writer.WriteEndElement();
writer.WriteEndElement(); //writer.WriteEndElement();
writer.WriteEndDocument(); //writer.WriteEndDocument();
} }
} }
} }

View File

@ -59,57 +59,57 @@ namespace bzit.bomg
private void mainThread_DoWork(object sender, DoWorkEventArgs e) private void mainThread_DoWork(object sender, DoWorkEventArgs e)
{ {
TreeNode[] nodeList = parentForm.treeView1.NodeList; //TreeNode[] nodeList = parentForm.treeView1.NodeList;
for (int i=0; i< nodeList.Length; i++) //for (int i=0; i< nodeList.Length; i++)
{ //{
if (progressBar1.InvokeRequired) // if (progressBar1.InvokeRequired)
{ // {
progressBar1.Invoke(new Action(() => progressBar1.Value = (i + 1) )); // progressBar1.Invoke(new Action(() => progressBar1.Value = (i + 1) ));
} // }
else // else
{ // {
progressBar1.Value = (i + 1); // progressBar1.Value = (i + 1);
} // }
if (label2.InvokeRequired) // if (label2.InvokeRequired)
{ // {
label2.Invoke(new Action(() => label2.Text = string.Concat((i + 1).ToString(), "/", progressBar1.Maximum.ToString()))); // label2.Invoke(new Action(() => label2.Text = string.Concat((i + 1).ToString(), "/", progressBar1.Maximum.ToString())));
} // }
else // else
{ // {
label2.Text = string.Concat((i + 1).ToString(), "/", progressBar1.Maximum.ToString()); // label2.Text = string.Concat((i + 1).ToString(), "/", progressBar1.Maximum.ToString());
} // }
TreeNode node = nodeList[i]; // TreeNode node = nodeList[i];
if (node == null) // if (node == null)
{ // {
continue; // continue;
} // }
if (node.Tag == null) // if (node.Tag == null)
{ // {
continue; // continue;
} // }
if (!(node.Tag is BookmarkItem)) // if (!(node.Tag is BookmarkItem))
{ // {
continue; // continue;
} // }
BookmarkItem bookmarkItem = (BookmarkItem)node.Tag; // BookmarkItem bookmarkItem = (BookmarkItem)node.Tag;
if (bookmarkItem == null) // if (bookmarkItem == null)
{ // {
continue; // continue;
} // }
bookmarkItem.GetFaviconAddress(); // bookmarkItem.GetFaviconAddress();
if (bookmarkItem.IconData == null) // if (bookmarkItem.IconData == null)
{ // {
continue; // continue;
} // }
//##parentForm.treeView1.AddIcon(bookmarkItem); //##parentForm.treeView1.AddIcon(bookmarkItem);
} //}
} }
private void mainThread_OnCompleted(object sender, RunWorkerCompletedEventArgs e) private void mainThread_OnCompleted(object sender, RunWorkerCompletedEventArgs e)

View File

@ -1,9 +1,12 @@
using bzit.bomg; using bzit.bomg;
using bzit.bomg.Data;
using bzit.bomg.Models; using bzit.bomg.Models;
using System; using System;
using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using Resources = bzit.bomg.Properties.Resources; using Resources = bzit.bomg.Properties.Resources;
@ -37,12 +40,12 @@ namespace RyzStudio.Windows.Forms
//public EventHandler OnChanged = null; //public EventHandler OnChanged = null;
//public NodeCountUpdated OnNodeCountUpdate = null; //public NodeCountUpdated OnNodeCountUpdate = null;
protected const char pathSeparator = '|'; //protected const char pathSeparator = '|';
protected TreeNode draggingNode = null; protected TreeNode draggingNode = null;
protected bool allowBeginEdit = false; protected bool allowBeginEdit = false;
//protected ulong nodeCount = 0;
protected bool hasChanged = false; protected bool hasChanged = false;
//protected ulong nodeCount = 0;
public BookmarkTreeView() : base() public BookmarkTreeView() : base()
{ {
@ -62,30 +65,32 @@ namespace RyzStudio.Windows.Forms
this.ImageList.Images.Add(Resources.folder); this.ImageList.Images.Add(Resources.folder);
this.ImageList.Images.Add(Resources.folder_explore); this.ImageList.Images.Add(Resources.folder_explore);
this.ImageList.Images.Add(Resources.page_white_world_bw); this.ImageList.Images.Add(Resources.page_white_world_bw);
this.PathSeparator = "\n";
} }
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public new ImageList ImageList { get => base.ImageList; set => base.ImageList = value; } public new ImageList ImageList { get => base.ImageList; set => base.ImageList = value; }
[Browsable(false)] //[Browsable(false)]
public TreeNode[] NodeList //public TreeNode[] NodeList
{ //{
get // get
{ // {
TreeNode[] rv = new TreeNode[0]; // TreeNode[] rv = new TreeNode[0];
if (this.Nodes.Count <= 0) // if (this.Nodes.Count <= 0)
{ // {
return rv; // return rv;
} // }
foreach (TreeNode tn in this.Nodes) // foreach (TreeNode tn in this.Nodes)
{ // {
traverseNodeList(ref rv, tn); // traverseNodeList(ref rv, tn);
} // }
return rv; // return rv;
} // }
} //}
//[Browsable(false)] //[Browsable(false)]
//public ulong NodeCount //public ulong NodeCount
@ -172,6 +177,27 @@ namespace RyzStudio.Windows.Forms
return true; return true;
} }
public TreeNode AddFolder(TreeNode node)
{
//return this.AddFolder("New Folder " + (new Random()).Next(10001, 99999).ToString());
return this.AddFolder(node, "New Folder (" + DateTime.Now.ToString("yyyy-MM-dd-HHmmss") + ")");
}
public TreeNode AddFolder(TreeNode node, string name)
{
if (node == null)
{
return null;
}
if (node.Tag != null)
{
return null;
}
return node.Nodes.Add(encodePath(name), name, (int)IconSet.Folder1, (int)IconSet.Folder2);
}
public void AddItem(BookmarkItemViewModel viewModel) public void AddItem(BookmarkItemViewModel viewModel)
{ {
int iconIndex = addIcon(viewModel); int iconIndex = addIcon(viewModel);
@ -233,31 +259,78 @@ namespace RyzStudio.Windows.Forms
} }
} }
public string GetNodeFullPath(TreeNode node) public string GetNodePath(TreeNode node)
{ {
string rv = PathEncode(node.Text); string[] folderList = node.FullPath.Split('\n');
if (folderList.Length < 2)
TreeNode tn = node;
while (true)
{ {
tn = tn.Parent; return null;
if (tn == null)
{
break;
}
if (tn.Level == 0)
{
break;
}
rv = PathEncode(tn.Text) + pathSeparator.ToString() + rv;
} }
return rv; if (folderList.Length < 2)
{
return "/";
}
StringBuilder sb = new StringBuilder();
for (int i=1; i<(folderList.Length - 1); i++)
{
sb.Append("\\");
sb.Append(encodePath(folderList[i] ?? string.Empty));
}
sb.Append("\\");
return sb.ToString();
} }
public BookmarkItemViewModel GetViewModel(TreeNode node) => (BookmarkItemViewModel)node.Tag;
public List<BookmarkItemViewModel> GetBookmarkList()
{
List<BookmarkItemViewModel> rs = new List<BookmarkItemViewModel>();
if (this.Nodes.Count <= 0)
{
return rs;
}
traverseBookmarkList(rs, this.Nodes[0]);
return rs;
}
//public string GetNodeFullPath(TreeNode node)
//{
// string rv = PathEncode(node.Text);
// TreeNode tn = node;
// while (true)
// {
// tn = tn.Parent;
// if (tn == null)
// {
// break;
// }
// if (tn.Level == 0)
// {
// break;
// }
// //rv = PathEncode(tn.Text) + pathSeparator.ToString() + rv;
// }
// return rv;
//}
public bool FindTextNode(TreeNode node, string term) public bool FindTextNode(TreeNode node, string term)
{ {
if (node == null) if (node == null)
@ -470,16 +543,22 @@ namespace RyzStudio.Windows.Forms
return; return;
} }
NodeType nodeType = this.SNode.GetNodeType();
switch (e.KeyCode) switch (e.KeyCode)
{ {
case Keys.Insert: case Keys.Insert:
if (e.Modifiers == Keys.Shift) if (e.Modifiers == Keys.Shift)
{ {
this.SelectedNode = this.SNode.AddFolder(); if ((nodeType == NodeType.Root) || (nodeType == NodeType.Folder))
} {
else this.SelectedNode = this.SNode.AddFolder();
{ }
//##AddBookmarkPage(); else if (nodeType == NodeType.Page)
{
this.SelectedNode = tn.Parent;
this.SelectedNode = this.SNode.AddFolder();
}
} }
break; break;
@ -494,6 +573,39 @@ namespace RyzStudio.Windows.Forms
allowBeginEdit = true; allowBeginEdit = true;
this.SNode.Edit(); this.SNode.Edit();
break;
case Keys.F3:
switch (nodeType)
{
case NodeType.Root:
case NodeType.Folder:
try
{
Clipboard.SetText(tn.Text ?? string.Empty);
}
catch
{
}
break;
case NodeType.Page:
BookmarkItemViewModel viewModel = this.SNode.GetViewModel();
if (viewModel != null)
{
try
{
Clipboard.SetText(viewModel.SiteAddress ?? string.Empty);
}
catch
{
}
}
break;
default:
break;
}
break; break;
case Keys.Up: case Keys.Up:
if (e.Modifiers == Keys.Control) if (e.Modifiers == Keys.Control)
@ -617,6 +729,32 @@ namespace RyzStudio.Windows.Forms
this.SelectedNode = this.SelectedNode.Nodes[n]; this.SelectedNode = this.SelectedNode.Nodes[n];
} }
protected string decodePath(string value) => System.Web.HttpUtility.UrlDecode(value);
protected string encodePath(string value) => System.Web.HttpUtility.UrlEncode(value);
protected void traverseBookmarkList(List<BookmarkItemViewModel> rs, TreeNode node)
{
foreach (TreeNode tn in node.Nodes)
{
NodeType nodeType = this.GetNodeType(tn);
if (nodeType == NodeType.Folder)
{
traverseBookmarkList(rs, tn);
}
else if (nodeType == NodeType.Page)
{
BookmarkItemViewModel nodeTag = this.GetViewModel(tn);
nodeTag.TreeviewPath = this.GetNodePath(tn);
if (nodeTag != null)
{
rs.Add(nodeTag);
}
}
}
}
protected void updateItem_OnSelectedNode(BookmarkItemViewModel viewModel) protected void updateItem_OnSelectedNode(BookmarkItemViewModel viewModel)
{ {
if (this.SelectedNode == null) if (this.SelectedNode == null)
@ -654,36 +792,36 @@ namespace RyzStudio.Windows.Forms
return false; return false;
} }
protected void traverseNodeList(ref TreeNode[] results, TreeNode node) //protected void traverseNodeList(ref TreeNode[] results, TreeNode node)
{ //{
foreach (TreeNode tn in node.Nodes) // foreach (TreeNode tn in node.Nodes)
{ // {
if (tn.Tag == null) // if (tn.Tag == null)
{ // {
traverseNodeList(ref results, tn); // traverseNodeList(ref results, tn);
} // }
else // else
{ // {
Array.Resize(ref results, (results.Length + 1)); // Array.Resize(ref results, (results.Length + 1));
results[(results.Length - 1)] = tn; // results[(results.Length - 1)] = tn;
} // }
} // }
} //}
protected void traverseNodeCount(ref ulong results, TreeNode node) //protected void traverseNodeCount(ref ulong results, TreeNode node)
{ //{
foreach (TreeNode tn in node.Nodes) // foreach (TreeNode tn in node.Nodes)
{ // {
if (tn.Tag == null) // if (tn.Tag == null)
{ // {
traverseNodeCount(ref results, tn); // traverseNodeCount(ref results, tn);
} // }
else // else
{ // {
results++; // results++;
} // }
} // }
} //}
@ -698,8 +836,7 @@ namespace RyzStudio.Windows.Forms
////protected string PathEncode(string text) { return RyzStudio.String.EncodeTo64(text); } ////protected string PathEncode(string text) { return RyzStudio.String.EncodeTo64(text); }
//protected string PathDecode(string text) { return RyzStudio.String.DecodeFrom64(text); } //protected string PathDecode(string text) { return RyzStudio.String.DecodeFrom64(text); }
protected string PathEncode(string text) { return System.Web.HttpUtility.UrlEncode(text); }
protected string PathDecode(string text) { return System.Web.HttpUtility.UrlDecode(text); }

View File

@ -19,28 +19,9 @@ namespace RyzStudio.Windows.Forms
set => this.Treeview.SelectedNode = value; set => this.Treeview.SelectedNode = value;
} }
protected string encodeName(string name) => Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(name)); public TreeNode AddFolder() => this.Treeview.AddFolder(this.SelectedNode);
public TreeNode AddFolder() public TreeNode AddFolder(string name) => this.Treeview.AddFolder(this.SelectedNode, name);
{
//return this.AddFolder("New Folder " + (new Random()).Next(10001, 99999).ToString());
return this.AddFolder("New Folder (" + DateTime.Now.ToString("yyyy-MM-dd-HHmmss") + ")");
}
public TreeNode AddFolder(string name)
{
if (this.SelectedNode == null)
{
return null;
}
if (this.SelectedNode.Tag != null)
{
return null;
}
return this.SelectedNode.Nodes.Add(encodeName(name), name, (int)BookmarkTreeView.IconSet.Folder1, (int)BookmarkTreeView.IconSet.Folder2);
}
public TreeNode AddItem(string name, object tag) public TreeNode AddItem(string name, object tag)
{ {
@ -124,6 +105,8 @@ namespace RyzStudio.Windows.Forms
public BookmarkTreeView.NodeType GetNodeType() => this.Treeview.GetNodeType(this.SelectedNode); public BookmarkTreeView.NodeType GetNodeType() => this.Treeview.GetNodeType(this.SelectedNode);
public BookmarkItemViewModel GetViewModel() => this.Treeview.GetViewModel(this.SelectedNode);
public void MoveDown() public void MoveDown()
{ {
if (this.SelectedNode == null) if (this.SelectedNode == null)

View File

@ -159,7 +159,7 @@
<DependentUpon>UpdateIconForm.cs</DependentUpon> <DependentUpon>UpdateIconForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="SessionFileFormat.cs" /> <Compile Include="SessionFileFormat.cs" />
<Compile Include="IconDatabase.cs" /> <Compile Include="Data\IconDatabase.cs" />
<Compile Include="BookmarkEditForm.cs"> <Compile Include="BookmarkEditForm.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@ -311,9 +311,7 @@
<Install>true</Install> <Install>true</Install>
</BootstrapperPackage> </BootstrapperPackage>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup />
<Folder Include="Data\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="packages\System.Data.SQLite.Core.1.0.110.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('packages\System.Data.SQLite.Core.1.0.110.0\build\net46\System.Data.SQLite.Core.targets')" /> <Import Project="packages\System.Data.SQLite.Core.1.0.110.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('packages\System.Data.SQLite.Core.1.0.110.0\build\net46\System.Data.SQLite.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">