diff --git a/MainForm.Designer.cs b/MainForm.Designer.cs index a94f3fb..0913441 100644 --- a/MainForm.Designer.cs +++ b/MainForm.Designer.cs @@ -43,7 +43,7 @@ namespace bzit.bomg 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.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.toolStrip1 = new System.Windows.Forms.ToolStrip(); this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton(); this.newFileMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -54,24 +54,20 @@ namespace bzit.bomg 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.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator(); + this.alwaysOnTopToolStripMenuItem1 = 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.folderTreeNodeMenu = new System.Windows.Forms.ContextMenuStrip(this.components); this.toolStripMenuItem15 = new System.Windows.Forms.ToolStripMenuItem(); @@ -91,7 +87,6 @@ namespace bzit.bomg this.openMenuBarItem = new System.Windows.Forms.ToolStripButton(); this.saveMenuBarItem = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator(); - this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); this.rootTreeNodeMenu = new System.Windows.Forms.ContextMenuStrip(this.components); this.toolStripMenuItem17 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem18 = new System.Windows.Forms.ToolStripMenuItem(); @@ -120,50 +115,54 @@ namespace bzit.bomg this.listViewMenuItem1, this.moveFileToToolStripMenuItem}); this.pageTreeNodeMenu.Name = "listViewMenu"; - this.pageTreeNodeMenu.Size = new System.Drawing.Size(139, 126); + this.pageTreeNodeMenu.Size = new System.Drawing.Size(181, 148); // // toolStripMenuItem4 // + this.toolStripMenuItem4.Image = global::bzit.bomg.Properties.Resources.bookmark; this.toolStripMenuItem4.Name = "toolStripMenuItem4"; - this.toolStripMenuItem4.Size = new System.Drawing.Size(138, 22); + this.toolStripMenuItem4.Size = new System.Drawing.Size(180, 22); this.toolStripMenuItem4.Text = "&Open"; this.toolStripMenuItem4.Click += new System.EventHandler(this.openContextMenu_Click); // // toolStripSeparator3 // this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.Size = new System.Drawing.Size(135, 6); + this.toolStripSeparator3.Size = new System.Drawing.Size(177, 6); // // toolStripMenuItem8 // this.toolStripMenuItem8.Name = "toolStripMenuItem8"; - this.toolStripMenuItem8.Size = new System.Drawing.Size(138, 22); + this.toolStripMenuItem8.Size = new System.Drawing.Size(180, 22); this.toolStripMenuItem8.Text = "E&dit"; this.toolStripMenuItem8.Click += new System.EventHandler(this.editContextMenu3_Click); // // toolStripMenuItem6 // + this.toolStripMenuItem6.Image = global::bzit.bomg.Properties.Resources.trash_2; this.toolStripMenuItem6.Name = "toolStripMenuItem6"; - this.toolStripMenuItem6.Size = new System.Drawing.Size(138, 22); + this.toolStripMenuItem6.Size = new System.Drawing.Size(180, 22); this.toolStripMenuItem6.Text = "D&elete"; this.toolStripMenuItem6.Click += new System.EventHandler(this.deleteContextMenu2_Click); // // toolStripSeparator2 // this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(135, 6); + this.toolStripSeparator2.Size = new System.Drawing.Size(177, 6); // // listViewMenuItem1 // + this.listViewMenuItem1.Image = global::bzit.bomg.Properties.Resources.arrow_up_circle; this.listViewMenuItem1.Name = "listViewMenuItem1"; - this.listViewMenuItem1.Size = new System.Drawing.Size(138, 22); + this.listViewMenuItem1.Size = new System.Drawing.Size(180, 22); this.listViewMenuItem1.Text = "Move &Up"; this.listViewMenuItem1.Click += new System.EventHandler(this.moveUpContextMenu2_Click); // // moveFileToToolStripMenuItem // + this.moveFileToToolStripMenuItem.Image = global::bzit.bomg.Properties.Resources.arrow_down_circle; this.moveFileToToolStripMenuItem.Name = "moveFileToToolStripMenuItem"; - this.moveFileToToolStripMenuItem.Size = new System.Drawing.Size(138, 22); + this.moveFileToToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.moveFileToToolStripMenuItem.Text = "Move &Down"; this.moveFileToToolStripMenuItem.Click += new System.EventHandler(this.moveDownContextMenu2_Click); // @@ -200,8 +199,7 @@ namespace bzit.bomg this.toolStripDropDownButton2, this.toolStripDropDownButton3, this.toolStripDropDownButton4, - this.toolStripDropDownButton5, - this.toolStripDropDownButton7}); + this.toolStripDropDownButton5}); 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); @@ -222,8 +220,6 @@ namespace bzit.bomg this.saveFileMenuItem, this.saveAsFileMenuItem, this.toolStripSeparator8, - this.exportFileMenuItem, - this.toolStripSeparator6, this.exitFileMenuItem}); this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripDropDownButton1.Name = "toolStripDropDownButton1"; @@ -233,21 +229,21 @@ namespace bzit.bomg // // newFileMenuItem // - this.newFileMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("newFileMenuItem.Image"))); + this.newFileMenuItem.Image = global::bzit.bomg.Properties.Resources.file; 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.newMenuItem_Click); + this.newFileMenuItem.Click += new System.EventHandler(this.fileNewMenuItem_Click); // // openFileMenuItem // - this.openFileMenuItem.Image = global::bzit.bomg.Properties.Resources.folder_page; + this.openFileMenuItem.Image = global::bzit.bomg.Properties.Resources.folder1; 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.openMenuItem_Click); + this.openFileMenuItem.Click += new System.EventHandler(this.fileOpenMenuItem_Click); // // toolStripSeparator1 // @@ -260,7 +256,7 @@ namespace bzit.bomg 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.closeMenuItem_Click); + this.closeFileMenuItem.Click += new System.EventHandler(this.fileCloseMenuItem_Click); // // toolStripSeparator4 // @@ -269,47 +265,33 @@ namespace bzit.bomg // // saveFileMenuItem // - this.saveFileMenuItem.Image = global::bzit.bomg.Properties.Resources.disk; + this.saveFileMenuItem.Image = global::bzit.bomg.Properties.Resources.save; 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); + this.saveFileMenuItem.Click += new System.EventHandler(this.fileSaveMenuItem_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); + this.saveAsFileMenuItem.Click += new System.EventHandler(this.fileSaveAsMenuItem_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.exitMenuItem_Click); + this.exitFileMenuItem.Click += new System.EventHandler(this.fileExitMenuItem_Click); // // toolStripDropDownButton2 // @@ -324,7 +306,7 @@ namespace bzit.bomg // // findEditMenuItem // - this.findEditMenuItem.Image = global::bzit.bomg.Properties.Resources.magnifier; + this.findEditMenuItem.Image = global::bzit.bomg.Properties.Resources.search; this.findEditMenuItem.Name = "findEditMenuItem"; this.findEditMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F))); this.findEditMenuItem.Size = new System.Drawing.Size(137, 22); @@ -336,7 +318,9 @@ namespace bzit.bomg this.toolStripDropDownButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolStripDropDownButton3.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.expandAllViewMenuItem, - this.collapseAllViewMenuItem}); + this.collapseAllViewMenuItem, + this.toolStripMenuItem1, + this.alwaysOnTopToolStripMenuItem1}); this.toolStripDropDownButton3.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripDropDownButton3.Name = "toolStripDropDownButton3"; this.toolStripDropDownButton3.ShowDropDownArrow = false; @@ -347,24 +331,35 @@ namespace bzit.bomg // this.expandAllViewMenuItem.Enabled = false; this.expandAllViewMenuItem.Name = "expandAllViewMenuItem"; - this.expandAllViewMenuItem.Size = new System.Drawing.Size(136, 22); + this.expandAllViewMenuItem.Size = new System.Drawing.Size(205, 22); this.expandAllViewMenuItem.Text = "&Expand All"; - this.expandAllViewMenuItem.Click += new System.EventHandler(this.expandAllToolStripMenuItem_Click); + this.expandAllViewMenuItem.Click += new System.EventHandler(this.viewExpandAllMenuItem_Click); // // collapseAllViewMenuItem // this.collapseAllViewMenuItem.Enabled = false; this.collapseAllViewMenuItem.Name = "collapseAllViewMenuItem"; - this.collapseAllViewMenuItem.Size = new System.Drawing.Size(136, 22); + this.collapseAllViewMenuItem.Size = new System.Drawing.Size(205, 22); this.collapseAllViewMenuItem.Text = "&Collapse All"; - this.collapseAllViewMenuItem.Click += new System.EventHandler(this.collapseAllToolStripMenuItem_Click); + this.collapseAllViewMenuItem.Click += new System.EventHandler(this.viewCollapseAllMenuItem_Click); + // + // toolStripMenuItem1 + // + this.toolStripMenuItem1.Name = "toolStripMenuItem1"; + this.toolStripMenuItem1.Size = new System.Drawing.Size(202, 6); + // + // alwaysOnTopToolStripMenuItem1 + // + this.alwaysOnTopToolStripMenuItem1.Name = "alwaysOnTopToolStripMenuItem1"; + this.alwaysOnTopToolStripMenuItem1.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F11))); + this.alwaysOnTopToolStripMenuItem1.Size = new System.Drawing.Size(205, 22); + this.alwaysOnTopToolStripMenuItem1.Text = "Always On &Top"; + this.alwaysOnTopToolStripMenuItem1.Click += new System.EventHandler(this.viewAlwaysOnTopMenuItem_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"; @@ -372,27 +367,15 @@ namespace bzit.bomg 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.Enabled = false; - this.optionsToolMenuItem.Image = global::bzit.bomg.Properties.Resources.cog; + this.optionsToolMenuItem.Image = global::bzit.bomg.Properties.Resources.settings; this.optionsToolMenuItem.Name = "optionsToolMenuItem"; this.optionsToolMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F12; - this.optionsToolMenuItem.Size = new System.Drawing.Size(143, 22); + this.optionsToolMenuItem.Size = new System.Drawing.Size(141, 22); this.optionsToolMenuItem.Text = "&Options"; - this.optionsToolMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem1_Click); + this.optionsToolMenuItem.Click += new System.EventHandler(this.toolsOptionsMenuItem_Click); // // toolStripDropDownButton5 // @@ -409,12 +392,12 @@ namespace bzit.bomg // // viewHelpHelpMenuItem // - this.viewHelpHelpMenuItem.Image = global::bzit.bomg.Properties.Resources.help; + this.viewHelpHelpMenuItem.Image = global::bzit.bomg.Properties.Resources.help_circle; 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); + this.viewHelpHelpMenuItem.Click += new System.EventHandler(this.helpViewHelpMenuItem_Click); // // toolStripSeparator12 // @@ -423,31 +406,10 @@ namespace bzit.bomg // // 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); + this.aboutHelpMenuItem.Click += new System.EventHandler(this.helpAboutMenuItem_Click); // // openFileDialog // @@ -474,6 +436,7 @@ namespace bzit.bomg // // toolStripMenuItem15 // + this.toolStripMenuItem15.Image = global::bzit.bomg.Properties.Resources.file_plus; this.toolStripMenuItem15.Name = "toolStripMenuItem15"; this.toolStripMenuItem15.Size = new System.Drawing.Size(138, 22); this.toolStripMenuItem15.Text = "Add &Page"; @@ -481,6 +444,7 @@ namespace bzit.bomg // // toolStripMenuItem16 // + this.toolStripMenuItem16.Image = global::bzit.bomg.Properties.Resources.folder_plus; this.toolStripMenuItem16.Name = "toolStripMenuItem16"; this.toolStripMenuItem16.Size = new System.Drawing.Size(138, 22); this.toolStripMenuItem16.Text = "Add &Folder"; @@ -493,6 +457,7 @@ namespace bzit.bomg // // toolStripMenuItem14 // + this.toolStripMenuItem14.Image = global::bzit.bomg.Properties.Resources.bookmark; this.toolStripMenuItem14.Name = "toolStripMenuItem14"; this.toolStripMenuItem14.Size = new System.Drawing.Size(138, 22); this.toolStripMenuItem14.Text = "&Open All"; @@ -507,6 +472,7 @@ namespace bzit.bomg // // toolStripMenuItem11 // + this.toolStripMenuItem11.Image = global::bzit.bomg.Properties.Resources.trash_2; this.toolStripMenuItem11.Name = "toolStripMenuItem11"; this.toolStripMenuItem11.Size = new System.Drawing.Size(138, 22); this.toolStripMenuItem11.Text = "D&elete"; @@ -531,6 +497,7 @@ namespace bzit.bomg // // toolStripMenuItem12 // + this.toolStripMenuItem12.Image = global::bzit.bomg.Properties.Resources.arrow_up_circle; this.toolStripMenuItem12.Name = "toolStripMenuItem12"; this.toolStripMenuItem12.Size = new System.Drawing.Size(138, 22); this.toolStripMenuItem12.Text = "Move &Up"; @@ -538,6 +505,7 @@ namespace bzit.bomg // // toolStripMenuItem13 // + this.toolStripMenuItem13.Image = global::bzit.bomg.Properties.Resources.arrow_down_circle; this.toolStripMenuItem13.Name = "toolStripMenuItem13"; this.toolStripMenuItem13.Size = new System.Drawing.Size(138, 22); this.toolStripMenuItem13.Text = "Move &Down"; @@ -546,7 +514,7 @@ namespace bzit.bomg // saveFileDialog // this.saveFileDialog.DefaultExt = "jsnx"; - this.saveFileDialog.Filter = "Bookmarks file|*.jsnx|Bookmarks file (password protected)|*.jsnx"; + this.saveFileDialog.Filter = "Bookmarks files (*.jsnx)|*.jsnx|Protected bookmarks files (*.jsnx)|*.jsnx"; this.saveFileDialog.Title = "Save bookmarks file"; // // toolStrip2 @@ -557,8 +525,7 @@ namespace bzit.bomg this.newMenuBarItem, this.openMenuBarItem, this.saveMenuBarItem, - this.toolStripSeparator9, - this.toolStripButton1}); + this.toolStripSeparator9}); this.toolStrip2.Location = new System.Drawing.Point(0, 25); this.toolStrip2.Name = "toolStrip2"; this.toolStrip2.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; @@ -569,51 +536,41 @@ namespace bzit.bomg // newMenuBarItem // this.newMenuBarItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.newMenuBarItem.Image = ((System.Drawing.Image)(resources.GetObject("newMenuBarItem.Image"))); + this.newMenuBarItem.Image = global::bzit.bomg.Properties.Resources.file; 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.newMenuItem_Click); + this.newMenuBarItem.Click += new System.EventHandler(this.fileNewMenuItem_Click); // // openMenuBarItem // 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.folder1; 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.openMenuItem_Click); + this.openMenuBarItem.Click += new System.EventHandler(this.fileOpenMenuItem_Click); // // saveMenuBarItem // 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.save; 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); + this.saveMenuBarItem.Click += new System.EventHandler(this.fileSaveMenuItem_Click); // // toolStripSeparator9 // this.toolStripSeparator9.Name = "toolStripSeparator9"; this.toolStripSeparator9.Size = new System.Drawing.Size(6, 25); // - // 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); - // // rootTreeNodeMenu // this.rootTreeNodeMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -628,6 +585,7 @@ namespace bzit.bomg // // toolStripMenuItem17 // + this.toolStripMenuItem17.Image = global::bzit.bomg.Properties.Resources.file_plus; this.toolStripMenuItem17.Name = "toolStripMenuItem17"; this.toolStripMenuItem17.Size = new System.Drawing.Size(132, 22); this.toolStripMenuItem17.Text = "Add &Page"; @@ -635,6 +593,7 @@ namespace bzit.bomg // // toolStripMenuItem18 // + this.toolStripMenuItem18.Image = global::bzit.bomg.Properties.Resources.folder_plus; this.toolStripMenuItem18.Name = "toolStripMenuItem18"; this.toolStripMenuItem18.Size = new System.Drawing.Size(132, 22); this.toolStripMenuItem18.Text = "Add &Folder"; @@ -722,7 +681,7 @@ namespace bzit.bomg private System.Windows.Forms.ContextMenuStrip pageTreeNodeMenu; private System.Windows.Forms.ToolStripMenuItem listViewMenuItem1; private System.Windows.Forms.ToolStripMenuItem moveFileToToolStripMenuItem; - private System.Windows.Forms.ToolTip oToolTip1; + private System.Windows.Forms.ToolTip toolTip1; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem8; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem6; private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; @@ -733,7 +692,6 @@ namespace bzit.bomg private System.Windows.Forms.ToolStripMenuItem newFileMenuItem; private System.Windows.Forms.ToolStripMenuItem saveFileMenuItem; private System.Windows.Forms.ToolStripMenuItem saveAsFileMenuItem; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator6; private System.Windows.Forms.ToolStripMenuItem exitFileMenuItem; private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButton3; private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButton4; @@ -742,8 +700,6 @@ namespace bzit.bomg private System.Windows.Forms.ToolStripMenuItem viewHelpHelpMenuItem; private System.Windows.Forms.ToolStripSeparator toolStripSeparator12; private System.Windows.Forms.ToolStripMenuItem aboutHelpMenuItem; - private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButton7; - private System.Windows.Forms.ToolStripMenuItem alwaysOnTopToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem openFileMenuItem; private System.Windows.Forms.ToolStripMenuItem closeFileMenuItem; private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; @@ -759,7 +715,6 @@ namespace bzit.bomg private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem12; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem13; private System.Windows.Forms.ToolStripSeparator toolStripSeparator8; - private System.Windows.Forms.ToolStripMenuItem exportFileMenuItem; private System.Windows.Forms.SaveFileDialog saveFileDialog; private System.Windows.Forms.ToolStrip toolStrip2; private System.Windows.Forms.ToolStripButton newMenuBarItem; @@ -781,9 +736,8 @@ namespace bzit.bomg private System.Windows.Forms.ToolStripMenuItem expandAllViewMenuItem; private System.Windows.Forms.ToolStripMenuItem collapseAllViewMenuItem; private System.Windows.Forms.ToolStripMenuItem findEditMenuItem; - private System.Windows.Forms.ToolStripMenuItem updateIconsToolMenuItem; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator14; - private System.Windows.Forms.ToolStripButton toolStripButton1; + private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem alwaysOnTopToolStripMenuItem1; } } diff --git a/MainForm.cs b/MainForm.cs index 05ab05d..fc1c8b1 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -10,7 +10,7 @@ using System.Windows.Forms; using System.Xml; using static RyzStudio.Windows.Forms.BookmarkTreeView; using TextBoxForm = RyzStudio.Windows.ThemedForms.TextBoxForm; - +using Resources = bzit.bomg.Properties.Resources; namespace bzit.bomg { @@ -46,23 +46,6 @@ namespace bzit.bomg this.Close(); } - // toolbar - viewHelpHelpMenuItem.Enabled = File.Exists(Path.ChangeExtension(Application.ExecutablePath, ".chm")); - - - - //bool rv = false; - //string iconDBFilename = Path.ChangeExtension(Application.ExecutablePath, ".db"); - - //string errorMessage; - //rv = treeView1.InitialiseIconDatabase(out errorMessage, iconDBFilename); - //if (!rv) - //{ - // MessageBox.Show("Can not find icon database. [" + errorMessage + "]"); - // this.Close(); - //} - - //sessionFileFormat = new SessionFileFormat(this); this.ApplicationMode = AppMode.Clear; sessionFilename = null; @@ -136,87 +119,70 @@ namespace bzit.bomg { if (this.ApplicationMode == AppMode.Clear) { - this.ApplicationMode = AppMode.Clear; - Application.Exit(); - return; + // do later } - - if (!treeView1.HasChanged) + else { - this.ApplicationMode = AppMode.Clear; - Application.Exit(); - return; + if (treeView1.HasChanged) + { + if (this.ApplicationMode == AppMode.New) + { + DialogResult response = MessageBox.Show("Save bookmarks", "Save?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question); + if (response == DialogResult.Yes) + { + bool hasSaved = saveAsBookmarkFile(); + if (!hasSaved) + { + e.Cancel = true; + return; + } + } + else if (response == DialogResult.No) + { + // do later + } + else if (response == DialogResult.Cancel) + { + e.Cancel = true; + return; + } + } + else if (this.ApplicationMode == AppMode.Open) + { + DialogResult response = MessageBox.Show("Save changes to open bookmarks", "Save?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question); + if (response == DialogResult.Yes) + { + saveBookmarkFile_ForJSNX(sessionFilename); + } + else if (response == DialogResult.No) + { + // do later + } + else if (response == DialogResult.Cancel) + { + e.Cancel = true; + return; + } + } + } + else + { + // do later + } } - //if (this.ApplicationMode == AppMode.Open) - //{ - // if (string.IsNullOrEmpty(sessionFilename)) - // { - // this.ApplicationMode = AppMode.Clear; - // Application.Exit(); - // return; - // } + treeView1.CloseIconDatabase(); - // if (MessageBox.Show("Save changes to open bookmarks.", "Save?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) - // { - // this.ApplicationMode = AppMode.Clear; - // Application.Exit(); - // return; - // } + treeView1.Clear(); + this.ApplicationMode = AppMode.Clear; + sessionFilename = null; - // while (true) - // { - // bool rv = sessionFileFormat.saveToRyz(sessionFilename); - // if (!rv) - // { - // switch (MessageBox.Show("There was a problem saving bookmarks. Retry?", "Retry?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question)) - // { - // case DialogResult.Yes: - // break; - // case DialogResult.No: - // this.ApplicationMode = AppMode.Clear; - // Application.Exit(); - // break; - // case DialogResult.Cancel: - // e.Cancel = true; - // break; - // default: break; - // } - // } - // else - // { - // this.ApplicationMode = AppMode.Clear; - // Application.Exit(); - // break; - // } - // } - //} - //else if (this.ApplicationMode == AppMode.New) - //{ - // if (MessageBox.Show("Save changes to open bookmarks.", "Save?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) - // { - // bool rt = SaveBookmarkFile(); - // if (rt) - // { - // this.ApplicationMode = AppMode.Clear; - // Application.Exit(); - // return; - // } - // } - // else - // { - // this.ApplicationMode = AppMode.Clear; - // Application.Exit(); - // return; - // } - //} + Application.Exit(); } - //#region public properties - public AppMode ApplicationMode { - get { return appMode; } + get => appMode; set { appMode = value; @@ -225,55 +191,85 @@ namespace bzit.bomg { case AppMode.Clear: this.Text = Properties.Resources.app_name; - statusBarPanel2.Text = string.Empty; - - treeView1.Clear(); - - sessionFilename = null; closeFileMenuItem.Enabled = false; saveFileMenuItem.Enabled = saveMenuBarItem.Enabled = false; saveAsFileMenuItem.Enabled = false; - updateIconsToolMenuItem.Enabled = false; break; case AppMode.Open: closeFileMenuItem.Enabled = true; - saveFileMenuItem.Enabled = saveMenuBarItem.Enabled = false; + saveFileMenuItem.Enabled = saveMenuBarItem.Enabled = true; saveAsFileMenuItem.Enabled = true; - updateIconsToolMenuItem.Enabled = true; break; case AppMode.New: this.Text = Properties.Resources.app_name; - statusBarPanel2.Text = string.Empty; - - sessionFilename = null; closeFileMenuItem.Enabled = true; - saveFileMenuItem.Enabled = saveMenuBarItem.Enabled = false; + saveFileMenuItem.Enabled = saveMenuBarItem.Enabled = true; saveAsFileMenuItem.Enabled = true; - updateIconsToolMenuItem.Enabled = true; break; } } } - //[DefaultValue(null)] - //public IconDatabase IconDatabase { get; set; } - - //#endregion - #region Toolbar #1 - /// - /// File New - /// - /// - /// - private void newMenuItem_Click(object sender, EventArgs e) + private void fileNewMenuItem_Click(object sender, EventArgs e) { + if (this.ApplicationMode == AppMode.Clear) + { + // do later + } + else + { + if (treeView1.HasChanged) + { + if (this.ApplicationMode == AppMode.New) + { + DialogResult response = MessageBox.Show("Save bookmarks", "Save?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question); + if (response == DialogResult.Yes) + { + bool hasSaved = saveAsBookmarkFile(); + if (!hasSaved) + { + return; + } + } + else if (response == DialogResult.No) + { + // do later + } + else if (response == DialogResult.Cancel) + { + return; + } + } + else if (this.ApplicationMode == AppMode.Open) + { + DialogResult response = MessageBox.Show("Save changes to open bookmarks", "Save?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question); + if (response == DialogResult.Yes) + { + saveBookmarkFile_ForJSNX(sessionFilename); + } + else if (response == DialogResult.No) + { + // do later + } + else if (response == DialogResult.Cancel) + { + return; + } + } + } + else + { + // do later + } + } + TextBoxForm newSessionForm = new TextBoxForm("New Session", "Name"); string rv = newSessionForm.ShowDialog(); if (string.IsNullOrWhiteSpace(rv)) @@ -281,126 +277,177 @@ namespace bzit.bomg return; } + treeView1.Clear(rv); + + this.ApplicationMode = AppMode.New; + sessionFilename = null; + } + + private void fileOpenMenuItem_Click(object sender, EventArgs e) + { if (this.ApplicationMode == AppMode.Clear) { - + // do later } else { - + if (treeView1.HasChanged) + { + if (this.ApplicationMode == AppMode.New) + { + DialogResult response = MessageBox.Show("Save bookmarks", "Save?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question); + if (response == DialogResult.Yes) + { + bool hasSaved = saveAsBookmarkFile(); + if (!hasSaved) + { + return; + } + } + else if (response == DialogResult.No) + { + // do later + } + else if (response == DialogResult.Cancel) + { + return; + } + } + else if (this.ApplicationMode == AppMode.Open) + { + DialogResult response = MessageBox.Show("Save changes to open bookmarks", "Save?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question); + if (response == DialogResult.Yes) + { + saveBookmarkFile_ForJSNX(sessionFilename); + } + else if (response == DialogResult.No) + { + // do later + } + else if (response == DialogResult.Cancel) + { + return; + } + } + } + else + { + // do later + } } - //treeView1.HasChanged.ToString() - - } - - /// - /// File Open - /// - /// - /// - private void openMenuItem_Click(object sender, EventArgs e) - { if (openFileDialog.ShowDialog() == DialogResult.OK) { - //##sessionFilename = openFileDialog.FileName; - loadBookmarkFile(openFileDialog.FileName, openFileDialog.FilterIndex); } } - /** - * File -> Close - */ - private void closeMenuItem_Click(object sender, EventArgs e) + private void fileCloseMenuItem_Click(object sender, EventArgs e) { - //if (ApplicationMode == AppMode.Clear) - //{ - // return; - //} + if (this.ApplicationMode == AppMode.Clear) + { + // do later + } + else + { + if (treeView1.HasChanged) + { + if (this.ApplicationMode == AppMode.New) + { + DialogResult response = MessageBox.Show("Save bookmarks", "Save?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question); + if (response == DialogResult.Yes) + { + bool hasSaved = saveAsBookmarkFile(); + if (!hasSaved) + { + return; + } + } + else if (response == DialogResult.No) + { + // do later + } + else if (response == DialogResult.Cancel) + { + return; + } + } + else if (this.ApplicationMode == AppMode.Open) + { + DialogResult response = MessageBox.Show("Save changes to open bookmarks", "Save?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question); + if (response == DialogResult.Yes) + { + saveBookmarkFile_ForJSNX(sessionFilename); + } + else if (response == DialogResult.No) + { + // do later + } + else if (response == DialogResult.Cancel) + { + return; + } + } + } + else + { + // do later + } + } - //if (!treeView1.HasChanged) - //{ - // ApplicationMode = AppMode.Clear; - // return; - //} - - //if (ApplicationMode == AppMode.Open) - //{ - // if (string.IsNullOrEmpty(sessionFilename)) - // { - // ApplicationMode = AppMode.Clear; - // return; - // } - - // if (MessageBox.Show("Save changes to open bookmarks.", "Save?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) - // { - // ApplicationMode = AppMode.Clear; - // return; - // } - - // bool rv = sessionFileFormat.saveToRyz(sessionFilename); - // if (!rv) - // { - // if (MessageBox.Show("There was a problem saving bookmarks. Bookmarks are not saved", "Not Saved", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.Cancel) return; - // } - - // ApplicationMode = AppMode.Clear; - //} - //else if (ApplicationMode == AppMode.New) - //{ - // if (MessageBox.Show("Save changes to open bookmarks.", "Save?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) - // { - // ApplicationMode = AppMode.Clear; - // return; - // } - - // bool rt = SaveBookmarkFile(); - // if (rt) - // { - // ApplicationMode = AppMode.Clear; - // } - //} + treeView1.Clear(); + this.ApplicationMode = AppMode.Clear; + sessionFilename = null; } - /** - * File -> Save - */ - private void importSnapshotToolStripMenuItem_Click(object sender, EventArgs e) + private void fileSaveMenuItem_Click(object sender, EventArgs e) { - //if (string.IsNullOrEmpty(sessionFilename)) - //{ - // return; - //} - - //bool rv = sessionFileFormat.saveToRyz(sessionFilename); - //if (rv) - //{ - // treeView1.HasChanged = false; - //} + if (this.ApplicationMode == AppMode.New) + { + DialogResult response = MessageBox.Show("Save bookmarks", "Save?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question); + if (response == DialogResult.Yes) + { + bool hasSaved = saveAsBookmarkFile(); + if (!hasSaved) + { + return; + } + } + else if (response == DialogResult.No) + { + return; + } + else if (response == DialogResult.Cancel) + { + return; + } + } + else if (this.ApplicationMode == AppMode.Open) + { + saveBookmarkFile_ForJSNX(sessionFilename); + } } - /** - * File -> Save As - */ - private void exportSnapshotToolStripMenuItem_Click(object sender, EventArgs e) + private void fileSaveAsMenuItem_Click(object sender, EventArgs e) { - //if (SaveBookmarkFile()) - //{ - // ApplicationMode = AppMode.Open; - // treeView1.HasChanged = false; - //} + if (this.ApplicationMode == AppMode.Clear) + { + return; + } + + bool hasSaved = saveAsBookmarkFile(); + if (!hasSaved) + { + return; + } + } + + private void fileExitMenuItem_Click(object sender, EventArgs e) + { + this.Close(); } - /** - * File -> Export - */ - private void toolStripMenuItem7_Click(object sender, EventArgs e) { } - /** - * File -> Exit - */ - private void exitMenuItem_Click(object sender, EventArgs e) => this.Close(); /** * Find @@ -411,10 +458,8 @@ namespace bzit.bomg frm.Show(); } - /** - * View -> Expand All - */ - private void expandAllToolStripMenuItem_Click(object sender, EventArgs e) + + private void viewExpandAllMenuItem_Click(object sender, EventArgs e) { if (treeView1.SelectedNode == null) { @@ -426,10 +471,7 @@ namespace bzit.bomg } } - /** - * View -> Collapse All - */ - private void collapseAllToolStripMenuItem_Click(object sender, EventArgs e) + private void viewCollapseAllMenuItem_Click(object sender, EventArgs e) { if (treeView1.SelectedNode == null) { @@ -441,48 +483,43 @@ namespace bzit.bomg } } - /** - * Tools -> Refresh Icons - */ - private void toolStripMenuItem1_Click(object sender, EventArgs e) + private void viewAlwaysOnTopMenuItem_Click(object sender, EventArgs e) { - if (string.IsNullOrEmpty(sessionFilename)) - { - return; - } + this.TopMost = !this.TopMost; - if (this.ApplicationMode == AppMode.Clear) - { - return; - } - - UpdateIconForm frm = new UpdateIconForm(this); - frm.ShowDialog(); + alwaysOnTopToolStripMenuItem1.Checked = this.TopMost; } /** - * Tools -> Options + * Tools -> Refresh Icons */ - private void optionsToolStripMenuItem1_Click(object sender, EventArgs e) + //private void toolStripMenuItem1_Click(object sender, EventArgs e) + //{ + // if (string.IsNullOrEmpty(sessionFilename)) + // { + // return; + // } + + // if (this.ApplicationMode == AppMode.Clear) + // { + // return; + // } + + // UpdateIconForm frm = new UpdateIconForm(this); + // frm.ShowDialog(); + //} + + private void toolsOptionsMenuItem_Click(object sender, EventArgs e) { //OptionsForm frm = new OptionsForm(this); //frm.ShowDialog(); } - /** - * Help -> Documentation - */ - public void documentationToolStripMenuItem_Click(object sender, EventArgs e) + private void helpViewHelpMenuItem_Click(object sender, EventArgs e) { - string chm = Path.ChangeExtension(Application.ExecutablePath, ".chm"); - if (!File.Exists(chm)) - { - return; - } - try { - System.Diagnostics.Process.Start(chm); + System.Diagnostics.Process.Start(Resources.url_help); } catch { @@ -490,63 +527,24 @@ namespace bzit.bomg } } - /** - * Help -> About - */ - private void aboutToolStripMenuItem1_Click(object sender, EventArgs e) + private void helpAboutMenuItem_Click(object sender, EventArgs e) { - MessageBox.Show("Name: " + Properties.Resources.app_name + Environment.NewLine + "Version: " + Properties.Resources.app_version + Environment.NewLine + "Author: " + Properties.Resources.app_author, "About", MessageBoxButtons.OK, MessageBoxIcon.Information); + try + { + System.Diagnostics.Process.Start(Resources.url_about); + } + catch + { + // do nothing + } } - /** - * ? -> Always-On-Top - */ - private void alwaysOnTopToolStripMenuItem_Click(object sender, EventArgs e) => this.TopMost = !this.TopMost; - #endregion - protected bool SaveBookmarkFile() - { - bool rv = false; - - //if (saveFileDialog.ShowDialog() == DialogResult.OK) - //{ - // switch (saveFileDialog.FilterIndex) - // { - // case 1: - // sessionFileFormat.passkey = ""; - - // rv = sessionFileFormat.saveToRyz(saveFileDialog.FileName); - // break; - // case 2: - // PasswordForm oPassword = new PasswordForm(this); - // sessionFileFormat.passkey = oPassword.ShowDialog(); - - // rv = sessionFileFormat.saveToRyz(saveFileDialog.FileName); - // if (rv) - // { - // treeView1.HasChanged = false; - // } - - // break; - // default: break; - // } - - //} - - //if (rv) - //{ - // ApplicationMode = AppMode.Open; - // sessionFilename = saveFileDialog.FileName; - // this.Text = Path.GetFileNameWithoutExtension(saveFileDialog.FileName) + " - " + Properties.Resources.app_name; - //} - - return rv; - } protected void loadBookmarkFile(string filename, int filterIndex) { @@ -555,7 +553,7 @@ namespace bzit.bomg case 1: if (RyzStudio.IO.SharpZipLib.IsZipEncrypted(filename)) { - PasswordForm passwordForm = new PasswordForm(this); + TextBoxForm passwordForm = new TextBoxForm("Password", "Password", true); string password = string.Empty; while (true) @@ -568,6 +566,8 @@ namespace bzit.bomg if (RyzStudio.IO.SharpZipLib.TestZipEncrypted(filename, password)) { + sessionFilename = filename; + //this.ApplicationMode = AppMode.Open; loadBookmarkFile_ForJSNX(filename, password); break; } @@ -575,6 +575,8 @@ namespace bzit.bomg } else { + sessionFilename = filename; + //this.ApplicationMode = AppMode.Open; loadBookmarkFile_ForJSNX(filename); } @@ -582,7 +584,7 @@ namespace bzit.bomg case 2: if (RyzStudio.IO.SharpZipLib.IsZipEncrypted(filename)) { - PasswordForm passwordForm = new PasswordForm(this); + TextBoxForm passwordForm = new TextBoxForm("Password", "Password", true); string password = string.Empty; while (true) @@ -596,6 +598,9 @@ namespace bzit.bomg if (RyzStudio.IO.SharpZipLib.TestZipEncrypted(filename, password)) { loadBookmarkFile_ForRYZ(filename, password); + + sessionFilename = null; + this.ApplicationMode = AppMode.New; break; } } @@ -603,6 +608,9 @@ namespace bzit.bomg else { loadBookmarkFile_ForRYZ(filename); + + sessionFilename = null; + this.ApplicationMode = AppMode.New; } break; @@ -665,7 +673,16 @@ namespace bzit.bomg break; } + readStream.Flush(); + readStream.Close(); + readStream.Dispose(); + readStream = null; + treeView1.AddItem(rs); + treeView1.HasChanged = false; + this.ApplicationMode = AppMode.Open; + + setAppTitle(Path.GetFileNameWithoutExtension(filename)); } protected void loadBookmarkFile_ForRYZ(string filename, string password = "") @@ -788,10 +805,57 @@ namespace bzit.bomg break; } + readStream.Flush(); + readStream.Close(); + readStream.Dispose(); + readStream = null; + treeView1.AddItem(rs); + treeView1.HasChanged = false; + //this.ApplicationMode = AppMode.New; + + setAppTitle(Path.GetFileNameWithoutExtension(filename)); } - protected void saveBookmarkFile(string filename, string password = "") + protected bool saveAsBookmarkFile() + { + if (saveFileDialog.ShowDialog() == DialogResult.OK) + { + switch (saveFileDialog.FilterIndex) + { + case 1: + saveBookmarkFile_ForJSNX(saveFileDialog.FileName); + + setAppTitle(Path.GetFileNameWithoutExtension(saveFileDialog.FileName)); + + sessionFilename = saveFileDialog.FileName; + this.ApplicationMode = AppMode.Open; + treeView1.HasChanged = false; + break; + case 2: + TextBoxForm passwordForm = new TextBoxForm("Password", "Password", true); + string password = passwordForm.ShowDialog(); + + saveBookmarkFile_ForJSNX(saveFileDialog.FileName, password ?? string.Empty); + + setAppTitle(Path.GetFileNameWithoutExtension(saveFileDialog.FileName)); + + sessionFilename = saveFileDialog.FileName; + this.ApplicationMode = AppMode.Open; + treeView1.HasChanged = false; + break; + default: break; + } + + return true; + } + else + { + return false; + } + } + + protected void saveBookmarkFile_ForJSNX(string filename, string password = "") { List rs = treeView1.GetBookmarkList(); @@ -830,9 +894,14 @@ namespace bzit.bomg zipStream.Close(); zipStream.Dispose(); zipStream = null; + + treeView1.HasChanged = false; } - + protected void setAppTitle(string title) + { + this.Text = title + " - " + Properties.Resources.app_name; + } protected void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { @@ -1049,15 +1118,5 @@ namespace bzit.bomg #endregion - private void toolStripButton1_Click(object sender, EventArgs e) - { - List rs = treeView1.GetBookmarkList(); - - //string filename = @"N:\test.jsnx"; - - //saveBookmarkFile(filename, string.Empty); - //loadBookmarkFile(filename, string.Empty); - - } } } diff --git a/MainForm.resx b/MainForm.resx index 7a6034f..3cd9a8b 100644 --- a/MainForm.resx +++ b/MainForm.resx @@ -120,27 +120,12 @@ 1034, 17 - + 17, 17 123, 17 - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAAddJREFUOE+Nk7tLHFEUhzVW/g8KdhIIQVzZUoRgEYiFIRYSCGihYOeDFCmVVKaR - ZWHThHSBFAF7GxFRFN1FxRcoYrGbfbmzO49778zoL+fcZMYZd4Me+Jhizu+bc+7MtEWqi0gQyUfoIZ4R - TZUQQhiu6976vo9WSCmRSqVWqLelJMlhy7Jg23ZIvV5HrVZDsVjUkkKhgHQ63SRpJ5LcQFNAKaWvjGma - MAwDpVJJCxzHAT8kk8kEEl1a4NVzkDe7WhBIONBoNFAul2PrMJzRaSotEGdzEMfTYYPneXrvYJVKpaIn - yefz94K769lO8/D90P6vV9/kyRTkwTjk5TLc6iZ814pJeBI+j2q1ei+Qp5Nf1ekM5Pk83KtlqItFiP1R - WBv9EIcfY5PwOnwmLAoFwFiHOHi7Ks8XSPCFBEtwcu/gZCfge0o3MvSG9LmwhAkFXDd7Iy9F7g3U5RLU - 2SdY6y/gGkdhmOEpgsPlaWICa2f4tciOwN7qg7nxnMZPQP1e06EAnoDhcLNge/BD9kfvd19W4BHi5DPk - 9c+mcJSYgCr8kB4SnSIK3+OMTlP9/ZA87+6h4H9Q7y1ndPpfDdBuNt9oFYjCPdRrUob/3rC6iQGCrU+B - wm3dfwBRcqBbhKA6hAAAAABJRU5ErkJggg== - - 443, 17 @@ -153,41 +138,13 @@ 228, 17 - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHZSURBVDhPjZM7SxxRGIY1qfwPClaCICFkZUsRxELQQkmK - EAjEQsHOCxYpFSttZFmWNJJOsAik2C6wBAkJiu6i4g0iYrGbvbmzO5dzzszE1+87OOOOay4fPEyx5332 - PWfmtDVNJxEj4v+gm3hCtEzMcRwjk8n89n0fjyGlRCKRWKe1j0riHLYsC7Zth9TrddRqNRSLRS0pFApI - JpMtknYizguEEFBK6SdjmiYMw0CpVNICagn+k1QqFUj0aIFXz0Fe72pBIOFAo9FAuVyObIfhjE7TaIE4 - m4M4ng4XeJ6n9x1spVKp6Cb5fP5ecHM122Eevhnc/zS0IU+mIA9eQ16swq1+g+9aEQk34fOoVqv3Ank6 - +UGdzkCez8O9XIX6uQSxPw5r+wXE4WKkCW+Hz4RFoQB49dQ5mPgszxdIsEaCZTi5l3Cy7+B7Si9kXNfV - 58ISJhTwXO+NPRO5UaiLZaiz97C+9sE1jsIwwy2Cw+U2EYG1MzwismOwvz+Hud1L9WNQv77oUAA3YDjc - Kvgx8Da72fPRlxV4hDhZgbzaagk3ExHQhB/SQ5pbNMO/cUanabQgnU7fPBT8Cf7sOaPTd9NPr8f+22UK - uLszJmX49obTRfQTbP0fKNzWdQuznZvllfjFsQAAAABJRU5ErkJggg== - - - - - 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== - - 705, 17 108 + AAABAAMAMDAAAAEAIACoJQAANgAAACAgAAABACAAqBAAAN4lAAAQEAAAAQAgAGgEAACGNgAAKAAAADAA diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index fe32468..0fe47ac 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -100,9 +100,9 @@ namespace bzit.bomg.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap cog { + internal static System.Drawing.Bitmap arrow_down_circle { get { - object obj = ResourceManager.GetObject("cog", resourceCulture); + object obj = ResourceManager.GetObject("arrow_down_circle", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -110,9 +110,9 @@ namespace bzit.bomg.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap comment { + internal static System.Drawing.Bitmap arrow_up_circle { get { - object obj = ResourceManager.GetObject("comment", resourceCulture); + object obj = ResourceManager.GetObject("arrow_up_circle", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -120,9 +120,29 @@ namespace bzit.bomg.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap disk { + internal static System.Drawing.Bitmap bookmark { get { - object obj = ResourceManager.GetObject("disk", resourceCulture); + object obj = ResourceManager.GetObject("bookmark", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap file { + get { + object obj = ResourceManager.GetObject("file", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap file_plus { + get { + object obj = ResourceManager.GetObject("file_plus", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -150,9 +170,9 @@ namespace bzit.bomg.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap folder_page { + internal static System.Drawing.Bitmap folder_plus { get { - object obj = ResourceManager.GetObject("folder_page", resourceCulture); + object obj = ResourceManager.GetObject("folder_plus", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -160,9 +180,9 @@ namespace bzit.bomg.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap help { + internal static System.Drawing.Bitmap folder1 { get { - object obj = ResourceManager.GetObject("help", resourceCulture); + object obj = ResourceManager.GetObject("folder1", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -170,39 +190,9 @@ namespace bzit.bomg.Properties { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap magnifier { + internal static System.Drawing.Bitmap help_circle { get { - object obj = ResourceManager.GetObject("magnifier", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap page_white_disk { - get { - object obj = ResourceManager.GetObject("page_white_disk", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap page_white_gray_green { - get { - object obj = ResourceManager.GetObject("page_white_gray_green", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap page_white_star { - get { - object obj = ResourceManager.GetObject("page_white_star", resourceCulture); + object obj = ResourceManager.GetObject("help_circle", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -217,6 +207,36 @@ namespace bzit.bomg.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap save { + get { + object obj = ResourceManager.GetObject("save", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap search { + get { + object obj = ResourceManager.GetObject("search", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap settings { + get { + object obj = ResourceManager.GetObject("settings", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -226,5 +246,33 @@ namespace bzit.bomg.Properties { return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap trash_2 { + get { + object obj = ResourceManager.GetObject("trash_2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized string similar to https://www.hiimray.co.uk. + /// + internal static string url_about { + get { + return ResourceManager.GetString("url_about", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://www.hiimray.co.uk/software-bookmark-manager. + /// + internal static string url_help { + get { + return ResourceManager.GetString("url_help", resourceCulture); + } + } } } diff --git a/Properties/Resources.resx b/Properties/Resources.resx index 8637a55..6d715ff 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -130,43 +130,58 @@ 0.2.1.001 beta - - ..\Resources\cog.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\2\arrow-down-circle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\comment.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\2\arrow-up-circle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\disk.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\2\bookmark.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\2\file.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\2\file-plus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\folder.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\2\folder.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\folder_explore.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\folder_page.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\2\folder-plus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\help.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\magnifier.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\page_white_disk.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\page_white_gray_green.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\page_white_star.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\2\help-circle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\page_white_world_bw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\2\save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\2\search.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\2\settings.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\transmit_blue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\2\trash-2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + https://www.hiimray.co.uk + + + https://www.hiimray.co.uk/software-bookmark-manager + \ No newline at end of file diff --git a/Resources/2/arrow-down-circle.png b/Resources/2/arrow-down-circle.png new file mode 100644 index 0000000..c89f58b Binary files /dev/null and b/Resources/2/arrow-down-circle.png differ diff --git a/Resources/2/arrow-up-circle.png b/Resources/2/arrow-up-circle.png new file mode 100644 index 0000000..c2f96cd Binary files /dev/null and b/Resources/2/arrow-up-circle.png differ diff --git a/Resources/2/bookmark.png b/Resources/2/bookmark.png new file mode 100644 index 0000000..786e869 Binary files /dev/null and b/Resources/2/bookmark.png differ diff --git a/Resources/2/file-plus.png b/Resources/2/file-plus.png new file mode 100644 index 0000000..b17222e Binary files /dev/null and b/Resources/2/file-plus.png differ diff --git a/Resources/2/file.png b/Resources/2/file.png new file mode 100644 index 0000000..ca50d97 Binary files /dev/null and b/Resources/2/file.png differ diff --git a/Resources/2/folder-plus.png b/Resources/2/folder-plus.png new file mode 100644 index 0000000..7af2ebb Binary files /dev/null and b/Resources/2/folder-plus.png differ diff --git a/Resources/2/folder.png b/Resources/2/folder.png new file mode 100644 index 0000000..e0efb07 Binary files /dev/null and b/Resources/2/folder.png differ diff --git a/Resources/2/help-circle.png b/Resources/2/help-circle.png new file mode 100644 index 0000000..9d6d673 Binary files /dev/null and b/Resources/2/help-circle.png differ diff --git a/Resources/2/save.png b/Resources/2/save.png new file mode 100644 index 0000000..b5669a1 Binary files /dev/null and b/Resources/2/save.png differ diff --git a/Resources/2/search.png b/Resources/2/search.png new file mode 100644 index 0000000..b1feec0 Binary files /dev/null and b/Resources/2/search.png differ diff --git a/Resources/2/settings.png b/Resources/2/settings.png new file mode 100644 index 0000000..d0643de Binary files /dev/null and b/Resources/2/settings.png differ diff --git a/Resources/2/svg/arrow-down-circle.svg b/Resources/2/svg/arrow-down-circle.svg new file mode 100644 index 0000000..3238091 --- /dev/null +++ b/Resources/2/svg/arrow-down-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Resources/2/svg/arrow-up-circle.svg b/Resources/2/svg/arrow-up-circle.svg new file mode 100644 index 0000000..044a75d --- /dev/null +++ b/Resources/2/svg/arrow-up-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Resources/2/svg/bookmark.svg b/Resources/2/svg/bookmark.svg new file mode 100644 index 0000000..2239cc5 --- /dev/null +++ b/Resources/2/svg/bookmark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Resources/2/svg/file-plus.svg b/Resources/2/svg/file-plus.svg new file mode 100644 index 0000000..eed1200 --- /dev/null +++ b/Resources/2/svg/file-plus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Resources/2/svg/file-text.svg b/Resources/2/svg/file-text.svg new file mode 100644 index 0000000..4197ddd --- /dev/null +++ b/Resources/2/svg/file-text.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Resources/2/svg/file.svg b/Resources/2/svg/file.svg new file mode 100644 index 0000000..378519a --- /dev/null +++ b/Resources/2/svg/file.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Resources/2/svg/folder-plus.svg b/Resources/2/svg/folder-plus.svg new file mode 100644 index 0000000..898f2fc --- /dev/null +++ b/Resources/2/svg/folder-plus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Resources/2/svg/folder.svg b/Resources/2/svg/folder.svg new file mode 100644 index 0000000..134458b --- /dev/null +++ b/Resources/2/svg/folder.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Resources/2/svg/help-circle.svg b/Resources/2/svg/help-circle.svg new file mode 100644 index 0000000..c9cd11a --- /dev/null +++ b/Resources/2/svg/help-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Resources/2/svg/save.svg b/Resources/2/svg/save.svg new file mode 100644 index 0000000..46c7299 --- /dev/null +++ b/Resources/2/svg/save.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Resources/2/svg/search.svg b/Resources/2/svg/search.svg new file mode 100644 index 0000000..8710306 --- /dev/null +++ b/Resources/2/svg/search.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Resources/2/svg/settings.svg b/Resources/2/svg/settings.svg new file mode 100644 index 0000000..19c2726 --- /dev/null +++ b/Resources/2/svg/settings.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Resources/2/svg/trash-2.svg b/Resources/2/svg/trash-2.svg new file mode 100644 index 0000000..f24d55b --- /dev/null +++ b/Resources/2/svg/trash-2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Resources/2/trash-2.png b/Resources/2/trash-2.png new file mode 100644 index 0000000..f1fe113 Binary files /dev/null and b/Resources/2/trash-2.png differ diff --git a/RyzStudio/Windows/ThemedForms/TextBoxForm.cs b/RyzStudio/Windows/ThemedForms/TextBoxForm.cs index 92c94c3..ba3c49e 100644 --- a/RyzStudio/Windows/ThemedForms/TextBoxForm.cs +++ b/RyzStudio/Windows/ThemedForms/TextBoxForm.cs @@ -3,7 +3,7 @@ using System.Windows.Forms; namespace RyzStudio.Windows.ThemedForms { - public partial class TextBoxForm : Form + public partial class TextBoxForm : System.Windows.Forms.Form { public TextBoxForm(string title, string labelText, string defaultValue) { diff --git a/Windows/Forms/BookmarkTreeView.cs b/Windows/Forms/BookmarkTreeView.cs index 7c5c0d8..5cd01f5 100644 --- a/Windows/Forms/BookmarkTreeView.cs +++ b/Windows/Forms/BookmarkTreeView.cs @@ -34,18 +34,9 @@ namespace RyzStudio.Windows.Forms protected IconDatabase iconDatabase = null; - - //public delegate void NodeCountUpdated(ulong v); - - //public EventHandler OnChanged = null; - //public NodeCountUpdated OnNodeCountUpdate = null; - - //protected const char pathSeparator = '|'; - protected TreeNode draggingNode = null; protected bool allowBeginEdit = false; protected bool hasChanged = false; - //protected ulong nodeCount = 0; public BookmarkTreeView() : base() { @@ -72,55 +63,6 @@ namespace RyzStudio.Windows.Forms [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public new ImageList ImageList { get => base.ImageList; set => base.ImageList = value; } - //[Browsable(false)] - //public TreeNode[] NodeList - //{ - // get - // { - // TreeNode[] rv = new TreeNode[0]; - // if (this.Nodes.Count <= 0) - // { - // return rv; - // } - - // foreach (TreeNode tn in this.Nodes) - // { - // traverseNodeList(ref rv, tn); - // } - - // return rv; - // } - //} - - //[Browsable(false)] - //public ulong NodeCount - //{ - // get - // { - // return nodeCount; - // } - //} - - //[Browsable(false)] - //public ulong NodeCountCalc - //{ - // get - // { - // ulong rv = 0; - // if (this.Nodes.Count <= 0) - // { - // return rv; - // } - - // foreach (TreeNode tn in this.Nodes) - // { - // traverseNodeCount(ref rv, tn); - // } - - // return rv; - // } - //} - [Browsable(false)] public bool HasChanged { @@ -248,6 +190,26 @@ namespace RyzStudio.Windows.Forms } } + public void Clear() + { + this.Nodes.Clear(); + + this.HasChanged = true; + } + + public void Clear(string name) + { + this.Nodes.Clear(); + this.Nodes.Add("", name?.Trim(), (int)IconSet.Root, (int)IconSet.Root); + + this.HasChanged = true; + } + + public void CloseIconDatabase() + { + iconDatabase.Close(); + } + public NodeType GetNodeType(TreeNode node) { if (node.Tag == null) @@ -319,36 +281,6 @@ namespace RyzStudio.Windows.Forms 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) { if (node == null) @@ -419,21 +351,6 @@ namespace RyzStudio.Windows.Forms return rt; } - public void Clear() - { - this.Nodes.Clear(); - - this.HasChanged = true; - } - - public void Clear(string name) - { - this.Nodes.Clear(); - this.Nodes.Add("", name?.Trim(), (int)IconSet.Root, (int)IconSet.Root); - - this.HasChanged = true; - } - #endregion #region integrated behaviour diff --git a/bomg.csproj b/bomg.csproj index f6620c3..0de7fdf 100644 --- a/bomg.csproj +++ b/bomg.csproj @@ -180,13 +180,6 @@ TextBoxForm.cs - - Form - - - PasswordForm.cs - - @@ -244,9 +237,6 @@ TextBoxForm.cs - - PasswordForm.cs - ResXFileCodeGenerator Resources.Designer.cs @@ -276,6 +266,19 @@ + + + + + + + + + + + + +