This commit is contained in:
Ray 2019-04-19 03:51:55 +01:00
parent 35eb3a92ae
commit 0e70f6b56e
11 changed files with 391 additions and 732 deletions

View File

@ -28,20 +28,18 @@ namespace bzit.bomg
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.label3 = new System.Windows.Forms.Label();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.button2 = new RyzStudio.Windows.ThemedForms.Button();
this.button1 = new RyzStudio.Windows.ThemedForms.Button();
this.label5 = new System.Windows.Forms.Label();
this.horizontalSeparator1 = new RyzStudio.Windows.Forms.HorizontalSeparator();
this.textBox1 = new RyzStudio.Windows.ThemedForms.TextBox();
this.textBox2 = new RyzStudio.Windows.ThemedForms.TextBox();
this.memoBox1 = new RyzStudio.Windows.ThemedForms.MemoBox();
this.textBox2 = new RyzStudio.Windows.ThemedForms.TextBox();
this.textBox1 = new RyzStudio.Windows.ThemedForms.TextBox();
this.horizontalSeparator1 = new RyzStudio.Windows.Forms.HorizontalSeparator();
this.button1 = new RyzStudio.Windows.ThemedForms.Button();
this.button2 = new RyzStudio.Windows.ThemedForms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
@ -66,11 +64,6 @@ namespace bzit.bomg
this.label2.TabIndex = 4;
this.label2.Text = "Address";
//
// toolTip1
//
this.toolTip1.Active = false;
this.toolTip1.BackColor = System.Drawing.Color.IndianRed;
//
// label3
//
this.label3.AutoSize = true;
@ -102,27 +95,72 @@ namespace bzit.bomg
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.pictureBox1.ErrorImage = null;
this.pictureBox1.InitialImage = null;
this.pictureBox1.Location = new System.Drawing.Point(287, 237);
this.pictureBox1.Location = new System.Drawing.Point(286, 217);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(32, 32);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.pictureBox1.TabIndex = 60;
this.pictureBox1.TabStop = false;
//
// button2
// label5
//
this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button2.BackColor = System.Drawing.Color.Transparent;
this.button2.DefaultImage = null;
this.button2.DownImage = null;
this.button2.LabelText = "&Save";
this.button2.Location = new System.Drawing.Point(325, 237);
this.button2.Name = "button2";
this.button2.OverImage = null;
this.button2.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
this.button2.Size = new System.Drawing.Size(107, 32);
this.button2.TabIndex = 4;
this.button2.Click += new System.EventHandler(this.button2_Click);
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label5.ForeColor = System.Drawing.Color.OrangeRed;
this.label5.Location = new System.Drawing.Point(9, 217);
this.label5.Margin = new System.Windows.Forms.Padding(3);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(271, 32);
this.label5.TabIndex = 64;
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// memoBox1
//
this.memoBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.memoBox1.BackColor = System.Drawing.Color.Transparent;
this.memoBox1.Location = new System.Drawing.Point(96, 103);
this.memoBox1.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
this.memoBox1.Name = "memoBox1";
this.memoBox1.Padding = new System.Windows.Forms.Padding(10, 10, 3, 9);
this.memoBox1.Size = new System.Drawing.Size(336, 83);
this.memoBox1.TabIndex = 69;
//
// textBox2
//
this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox2.BackColor = System.Drawing.Color.Transparent;
this.textBox2.Location = new System.Drawing.Point(96, 59);
this.textBox2.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
this.textBox2.Name = "textBox2";
this.textBox2.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
this.textBox2.Size = new System.Drawing.Size(259, 32);
this.textBox2.TabIndex = 67;
//
// textBox1
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox1.BackColor = System.Drawing.Color.Transparent;
this.textBox1.Location = new System.Drawing.Point(96, 15);
this.textBox1.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
this.textBox1.Name = "textBox1";
this.textBox1.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
this.textBox1.Size = new System.Drawing.Size(259, 32);
this.textBox1.TabIndex = 66;
//
// horizontalSeparator1
//
this.horizontalSeparator1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.horizontalSeparator1.Location = new System.Drawing.Point(12, 202);
this.horizontalSeparator1.Margin = new System.Windows.Forms.Padding(3, 10, 3, 10);
this.horizontalSeparator1.MaximumSize = new System.Drawing.Size(4920, 2);
this.horizontalSeparator1.Name = "horizontalSeparator1";
this.horizontalSeparator1.Size = new System.Drawing.Size(420, 2);
this.horizontalSeparator1.TabIndex = 65;
//
// button1
//
@ -139,71 +177,26 @@ namespace bzit.bomg
this.button1.TabIndex = 2;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label5
// button2
//
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label5.ForeColor = System.Drawing.Color.OrangeRed;
this.label5.Location = new System.Drawing.Point(9, 237);
this.label5.Margin = new System.Windows.Forms.Padding(3);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(272, 32);
this.label5.TabIndex = 64;
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// horizontalSeparator1
//
this.horizontalSeparator1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.horizontalSeparator1.Location = new System.Drawing.Point(12, 222);
this.horizontalSeparator1.Margin = new System.Windows.Forms.Padding(3, 10, 3, 10);
this.horizontalSeparator1.MaximumSize = new System.Drawing.Size(4920, 2);
this.horizontalSeparator1.Name = "horizontalSeparator1";
this.horizontalSeparator1.Size = new System.Drawing.Size(420, 2);
this.horizontalSeparator1.TabIndex = 65;
//
// textBox1
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox1.BackColor = System.Drawing.Color.Transparent;
this.textBox1.Location = new System.Drawing.Point(96, 15);
this.textBox1.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
this.textBox1.Name = "textBox1";
this.textBox1.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
this.textBox1.Size = new System.Drawing.Size(259, 32);
this.textBox1.TabIndex = 66;
//
// textBox2
//
this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox2.BackColor = System.Drawing.Color.Transparent;
this.textBox2.Location = new System.Drawing.Point(96, 59);
this.textBox2.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
this.textBox2.Name = "textBox2";
this.textBox2.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
this.textBox2.Size = new System.Drawing.Size(259, 32);
this.textBox2.TabIndex = 67;
//
// memoBox1
//
this.memoBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.memoBox1.BackColor = System.Drawing.Color.Transparent;
this.memoBox1.Location = new System.Drawing.Point(96, 103);
this.memoBox1.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
this.memoBox1.Name = "memoBox1";
this.memoBox1.Padding = new System.Windows.Forms.Padding(10, 10, 3, 9);
this.memoBox1.Size = new System.Drawing.Size(336, 103);
this.memoBox1.TabIndex = 69;
this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button2.BackColor = System.Drawing.Color.Transparent;
this.button2.DefaultImage = null;
this.button2.DownImage = null;
this.button2.LabelText = "&Save";
this.button2.Location = new System.Drawing.Point(324, 217);
this.button2.Name = "button2";
this.button2.OverImage = null;
this.button2.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
this.button2.Size = new System.Drawing.Size(108, 32);
this.button2.TabIndex = 4;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// BookmarkEditForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(444, 281);
this.ClientSize = new System.Drawing.Size(444, 261);
this.Controls.Add(this.memoBox1);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
@ -236,7 +229,6 @@ namespace bzit.bomg
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.PictureBox pictureBox1;

View File

@ -11,29 +11,25 @@ namespace bzit.bomg
{
public partial class BookmarkEditForm : Form
{
protected BackgroundWorker threadWorker1 = null;
protected BackgroundWorker threadWorker = null;
protected BookmarkItemModel itemModel = null;
protected BookmarkTreeView treeView = null;
//protected TreeNode treeNode = null;
//public BookmarkEditForm(ref TreeNode node) : base()
public BookmarkEditForm(BookmarkTreeView treeview) : base()
{
InitializeComponent();
treeView = treeview;
//treeNode = node;
this.StartPosition = FormStartPosition.WindowsDefaultLocation;
if (threadWorker1 == null)
if (threadWorker == null)
{
threadWorker1 = new BackgroundWorker();
threadWorker1.WorkerReportsProgress = threadWorker1.WorkerSupportsCancellation = true;
threadWorker1.DoWork += threadWorker1_DoWork;
threadWorker1.RunWorkerCompleted += threadWorker1_RunWorkerCompleted;
threadWorker = new BackgroundWorker();
threadWorker.WorkerReportsProgress = threadWorker.WorkerSupportsCancellation = true;
threadWorker.DoWork += threadWorker1_DoWork;
threadWorker.RunWorkerCompleted += threadWorker1_RunWorkerCompleted;
}
}
@ -78,30 +74,6 @@ namespace bzit.bomg
updateViewModel(bookmarkItem);
}
}
//if (parentNode.Tag != null)
//{
// if (parentNode.Tag is BookmarkItem)
// {
// bookmarkItem = (BookmarkItem)parentNode.Tag;
// tbxName.Text = bookmarkItem.GetName();
// tbxAddress.Text = bookmarkItem.SiteAddress;
// tbxDescription.Text = bookmarkItem.Description;
// if (parentNode.TreeView.ImageList != null)
// {
// if (parentNode.ImageIndex >= 0)
// {
// pbxIcon.Image = parentNode.TreeView.ImageList.Images[parentNode.ImageIndex];
// }
// else
// {
// pbxIcon.Image = parentNode.TreeView.ImageList.Images[parentNode.ImageKey];
// }
// }
// }
//}
}
protected override void OnClosing(CancelEventArgs e)
@ -116,7 +88,7 @@ namespace bzit.bomg
protected bool IsBusy
{
get => threadWorker1.IsBusy;
get => threadWorker.IsBusy;
set
{
textBox1.Enabled = textBox2.Enabled = memoBox1.Enabled = !value;
@ -152,7 +124,7 @@ namespace bzit.bomg
this.IsBusy = true;
threadWorker1.RunWorkerAsync();
threadWorker.RunWorkerAsync();
}
private void button2_Click(object sender, EventArgs e)
@ -175,51 +147,5 @@ namespace bzit.bomg
this.Close();
}
// private void btnSave_Click(object sender, EventArgs e)
// {
// if (this.IsBusy)
// {
// return;
// }
// if (itemModel == null)
// {
// itemModel = new BookmarkItemModel();
// }
// itemModel.SiteName = textBox1.Text?.Trim();
// itemModel.SiteAddress = textBox2.Text?.Trim();
// itemModel.SiteDescription = memoBox1.Text?.Trim();
// treeView?.AddOrUpdateItem_OnSelectedNode(itemModel.ToViewModel());
//// if (bookmarkItem == null)
//// {
//// bookmarkItem = new BookmarkItem();
//// }
//// bookmarkItem.ChangeName(textBox1.Text.Trim());
//// bookmarkItem.SiteAddress = textBox2.Text.Trim();
//// bookmarkItem.Description = memoBox1.Text.Trim();
//// parentNode.Text = textBox1.Text.Trim();
//////// parentNode.ImageIndex = parentNode.SelectedImageIndex = 3;
//// parentNode.ToolTipText = string.Concat(bookmarkItem.SiteAddress, Environment.NewLine, bookmarkItem.Description).Trim();
//// parentNode.Tag = bookmarkItem;
//// BookmarkTreeView bookmarkTreeView = (BookmarkTreeView)parentNode.TreeView;
//// if (bookmarkTreeView != null)
//// {
//// //##parentNode.ImageIndex = parentNode.SelectedImageIndex = bookmarkTreeView.AddToIconList(bookmarkItem);
//// }
// this.Close();
// }
}
}

View File

@ -117,7 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

61
MainForm.Designer.cs generated
View File

@ -44,7 +44,6 @@ namespace bzit.bomg
this.statusBarPanel1 = new System.Windows.Forms.StatusBarPanel();
this.statusBarPanel2 = new System.Windows.Forms.StatusBarPanel();
this.oToolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton();
this.newFileMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -92,8 +91,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.toolStripButton2 = 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();
@ -193,18 +190,6 @@ namespace bzit.bomg
this.statusBarPanel2.Alignment = System.Windows.Forms.HorizontalAlignment.Center;
this.statusBarPanel2.Name = "statusBarPanel2";
//
// imageList1
//
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
this.imageList1.Images.SetKeyName(0, "transmit_blue.png");
this.imageList1.Images.SetKeyName(1, "folder.png");
this.imageList1.Images.SetKeyName(2, "folder_explore.png");
this.imageList1.Images.SetKeyName(3, "page_blue.png");
this.imageList1.Images.SetKeyName(4, "page.png");
this.imageList1.Images.SetKeyName(5, "page_green.png");
this.imageList1.Images.SetKeyName(6, "page_red.png");
//
// toolStrip1
//
this.toolStrip1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
@ -341,7 +326,7 @@ namespace bzit.bomg
this.findEditMenuItem.Image = global::bzit.bomg.Properties.Resources.magnifier;
this.findEditMenuItem.Name = "findEditMenuItem";
this.findEditMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F)));
this.findEditMenuItem.Size = new System.Drawing.Size(137, 22);
this.findEditMenuItem.Size = new System.Drawing.Size(180, 22);
this.findEditMenuItem.Text = "&Find";
this.findEditMenuItem.Click += new System.EventHandler(this.toolStripButton5_Click);
//
@ -361,7 +346,7 @@ 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(180, 22);
this.expandAllViewMenuItem.Text = "&Expand All";
this.expandAllViewMenuItem.Click += new System.EventHandler(this.expandAllToolStripMenuItem_Click);
//
@ -369,7 +354,7 @@ namespace bzit.bomg
//
this.collapseAllViewMenuItem.Enabled = false;
this.collapseAllViewMenuItem.Name = "collapseAllViewMenuItem";
this.collapseAllViewMenuItem.Size = new System.Drawing.Size(136, 22);
this.collapseAllViewMenuItem.Size = new System.Drawing.Size(180, 22);
this.collapseAllViewMenuItem.Text = "&Collapse All";
this.collapseAllViewMenuItem.Click += new System.EventHandler(this.collapseAllToolStripMenuItem_Click);
//
@ -389,14 +374,14 @@ namespace bzit.bomg
// updateIconsToolMenuItem
//
this.updateIconsToolMenuItem.Name = "updateIconsToolMenuItem";
this.updateIconsToolMenuItem.Size = new System.Drawing.Size(143, 22);
this.updateIconsToolMenuItem.Size = new System.Drawing.Size(180, 22);
this.updateIconsToolMenuItem.Text = "&Update Icons";
this.updateIconsToolMenuItem.Click += new System.EventHandler(this.toolStripMenuItem1_Click);
//
// toolStripSeparator14
//
this.toolStripSeparator14.Name = "toolStripSeparator14";
this.toolStripSeparator14.Size = new System.Drawing.Size(140, 6);
this.toolStripSeparator14.Size = new System.Drawing.Size(177, 6);
//
// optionsToolMenuItem
//
@ -404,7 +389,7 @@ namespace bzit.bomg
this.optionsToolMenuItem.Image = global::bzit.bomg.Properties.Resources.cog;
this.optionsToolMenuItem.Name = "optionsToolMenuItem";
this.optionsToolMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F12;
this.optionsToolMenuItem.Size = new System.Drawing.Size(143, 22);
this.optionsToolMenuItem.Size = new System.Drawing.Size(180, 22);
this.optionsToolMenuItem.Text = "&Options";
this.optionsToolMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem1_Click);
//
@ -426,20 +411,20 @@ namespace bzit.bomg
this.viewHelpHelpMenuItem.Image = global::bzit.bomg.Properties.Resources.help;
this.viewHelpHelpMenuItem.Name = "viewHelpHelpMenuItem";
this.viewHelpHelpMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F1;
this.viewHelpHelpMenuItem.Size = new System.Drawing.Size(146, 22);
this.viewHelpHelpMenuItem.Size = new System.Drawing.Size(180, 22);
this.viewHelpHelpMenuItem.Text = "View &Help";
this.viewHelpHelpMenuItem.Click += new System.EventHandler(this.documentationToolStripMenuItem_Click);
//
// toolStripSeparator12
//
this.toolStripSeparator12.Name = "toolStripSeparator12";
this.toolStripSeparator12.Size = new System.Drawing.Size(143, 6);
this.toolStripSeparator12.Size = new System.Drawing.Size(177, 6);
//
// aboutHelpMenuItem
//
this.aboutHelpMenuItem.Image = global::bzit.bomg.Properties.Resources.comment;
this.aboutHelpMenuItem.Name = "aboutHelpMenuItem";
this.aboutHelpMenuItem.Size = new System.Drawing.Size(146, 22);
this.aboutHelpMenuItem.Size = new System.Drawing.Size(180, 22);
this.aboutHelpMenuItem.Text = "&About";
this.aboutHelpMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem1_Click);
//
@ -571,9 +556,7 @@ namespace bzit.bomg
this.newMenuBarItem,
this.openMenuBarItem,
this.saveMenuBarItem,
this.toolStripSeparator9,
this.toolStripButton1,
this.toolStripButton2});
this.toolStripSeparator9});
this.toolStrip2.Location = new System.Drawing.Point(0, 25);
this.toolStrip2.Name = "toolStrip2";
this.toolStrip2.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
@ -619,24 +602,6 @@ namespace bzit.bomg
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";
//
// toolStripButton2
//
this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image")));
this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton2.Name = "toolStripButton2";
this.toolStripButton2.Size = new System.Drawing.Size(23, 22);
this.toolStripButton2.Text = "toolStripButton2";
//
// rootTreeNodeMenu
//
this.rootTreeNodeMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -692,7 +657,6 @@ namespace bzit.bomg
this.treeView1.AllowDrop = true;
this.treeView1.BackColor = System.Drawing.Color.White;
this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.treeView1.HasChanged = false;
this.treeView1.HideSelection = false;
this.treeView1.HotTracking = true;
this.treeView1.ImageIndex = 0;
@ -704,7 +668,7 @@ namespace bzit.bomg
this.treeView1.Size = new System.Drawing.Size(304, 584);
this.treeView1.TabIndex = 24;
this.treeView1.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick);
this.treeView1.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView2_NodeMouseDoubleClick);
this.treeView1.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseDoubleClick);
this.treeView1.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.treeView1_PreviewKeyDown);
//
// MainForm
@ -764,7 +728,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.ImageList imageList1;
private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButton7;
private System.Windows.Forms.ToolStripMenuItem alwaysOnTopToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem openFileMenuItem;
@ -806,8 +769,6 @@ namespace bzit.bomg
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.ToolStripButton toolStripButton2;
}
}

View File

@ -64,20 +64,20 @@ namespace bzit.bomg
sessionFileFormat = new SessionFileFormat(this);
this.ApplicationMode = AppMode.Clear;
treeView1.OnNodeCountUpdate = delegate (ulong v) {
statusBarPanel2.Text = v.ToString();
};
treeView1.OnChanged = delegate (object sender, EventArgs ev) {
if (this.ApplicationMode == AppMode.New)
{
saveMenuBarItem.Enabled = saveFileMenuItem.Enabled = false;
}
else
{
saveMenuBarItem.Enabled = saveFileMenuItem.Enabled = treeView1.HasChanged;
}
//treeView1.OnNodeCountUpdate = delegate (ulong v) {
// statusBarPanel2.Text = v.ToString();
//};
//treeView1.OnChanged = delegate (object sender, EventArgs ev) {
// if (this.ApplicationMode == AppMode.New)
// {
// saveMenuBarItem.Enabled = saveFileMenuItem.Enabled = false;
// }
// else
// {
// saveMenuBarItem.Enabled = saveFileMenuItem.Enabled = treeView1.HasChanged;
// }
};
//};
}
protected override void OnShown(EventArgs e)
@ -265,15 +265,22 @@ namespace bzit.bomg
#region Toolbar #1
/// <summary>
/// File New
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void newMenuItem_Click(object sender, EventArgs e)
{
NewSessionForm newSessionForm = new NewSessionForm(this);
newSessionForm.ShowDialog();
}
/*
* File -> Open
*/
/// <summary>
/// File Open
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void openMenuItem_Click(object sender, EventArgs e)
{
if (openFileDialog.ShowDialog() == DialogResult.OK)
@ -483,7 +490,7 @@ namespace bzit.bomg
#endregion
#region TreeView Menu - item
//#region TreeView Menu - item
/**
* Node -> Open
@ -518,7 +525,7 @@ namespace bzit.bomg
// treeView1.DeleteNode();
//}
#endregion
//#endregion
//#region TreeView Menu - folder
@ -654,63 +661,9 @@ namespace bzit.bomg
default:
break;
}
//BookmarkEditForm editForm = new BookmarkEditForm(treeView1);
//editForm.ShowDialog();
return;
if (e.Node == null)
{
return;
}
if (e.Node.Text.Equals(""))
{
return;
}
// view ui
expandAllViewMenuItem.Enabled = false;
collapseAllViewMenuItem.Enabled = false;
if (e.Node != null)
{
if (e.Node.Tag == null)
{
expandAllViewMenuItem.Enabled = true;
collapseAllViewMenuItem.Enabled = true;
}
}
if (e.Button == MouseButtons.Right)
{
// folder
if (e.Node.Tag == null)
{
if (e.Node.Equals(e.Node.TreeView.Nodes[0]))
{
rootTreeNodeMenu.Show(Cursor.Position);
}
else
{
folderTreeNodeMenu.Show(Cursor.Position);
}
}
else
{
if (!(e.Node.Tag is BookmarkItem))
{
return;
}
BookmarkItem bi = (BookmarkItem)e.Node.Tag;
pageTreeNodeMenu.Show(Cursor.Position);
}
}
}
private void treeView2_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) { openBookmark(e.Node); }
private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) => openBookmark(e.Node);
private void treeView1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
{
@ -880,7 +833,6 @@ namespace bzit.bomg
//}
}
#region root context menu
private void addPageContextMenu_Click(object sender, EventArgs e) => (new BookmarkEditForm(treeView1)).ShowDialog();

View File

@ -123,118 +123,6 @@
<metadata name="oToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>333, 17</value>
</metadata>
<data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADU
FwAAAk1TRnQBSQFMAgEBBwEAAcwBAgHMAQIBEAEAARABAAT/AREBAAj/AUIBTQE2BwABNgMAASgDAAFA
AwABIAMAAQEBAAEQBgABEBQAAZkBSgEYAS4BtwEdAbcBGQG3ARkBtwEZAbcBGQG3ARkBtwEZAbcBGQG3
ARkBtwEdARcBLgGZAUoEAAGZAUoBGAEuAbcBHQG3ARkBtwEZAbcBGQG3ARkBtwEZAbcBGQG3ARkBtwEZ
AbcBHQEXAS4BmQFKBAABmQFKARgBLgG3AR0BtwEZAbcBGQG3ARkBtwEZAbcBGQG3ARkBtwEZAbcBGQG3
AR0BFwEuAZkBSiQAAdcBIQHeAXcBvgFvAb4BbwG+AW8BvgFvAb4BbwHfAXcB3wF3Ad8BdwHfAXsB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D/wEAAYABAQGAAQEBgAEBAgABgAEB
AYABAQGAAQECAAGAAQEBgAEBAYABAQIAAYABAQGAAQEBgAEBAgABgAEBAYABAQGAAQECAAGAAQEBgAEB
AYABAQIAAYABAQGAAQEBgAEBAgABgAEBAYABAQGAAQECAAGAAQEBgAEBAYABAQIAAYABAQGAAQEBgAEB
AgABgAEBAYABAQGAAQECAAGAAQEBgAEBAYABAQIAAYABAQGAAQEBgAEBAgABgAEBAYABAQGAAQECAAGA
AQMBgAEDAYABAwIAAYABBwGAAQcBgAEHAgAF/wH4AYABAQX/AQABgAEBAv8BgAEBAYABAAGAAQEBHwH8
AYABAQGAAQEBgAEBAQcB4AGAAQEBgAEBAYACAQKAAQEBgAEBAYABAQIAAYABAQGAAQEBgAEBAgABgAEB
AYABAQGAAQECAAGAAQEBgAEBAYABAQIAAYABAQGAAQEBgAEBAoEBgAEBAYABAQGAAQEBgAEBAYABAQGA
AQEBgAEBAeABBwGAAQEBgAEBAYABAQHwAQ8E/wGAAQEG/wGAAQMG/wGAAQcL
</value>
</data>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>123, 17</value>
</metadata>
@ -268,45 +156,15 @@
<data name="newMenuBarItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHaSURBVDhPjZNNSxtRFIatXfU/KHQlFEqRJmRZhNJFoS6U
uiiC0C4UuquWLlxWurIbCSF0I90VXAju3ZhBLC01QUv9gEpxkZgvM8l83HtnRt+ec3HGGRPRAw9ZzHmf
vPdm0hebASJFZG7gPtFPdE3KdV2zUCicBUGAXkgpkc1ml2i3pyTDYdu24ThORLvdRqvVQrVa1ZJKpYJc
LtcluUNkeEEIAaWU/mQsy4JpmqjValpALcFfks/nQ4keLfDbJcjTn1oQSjjQ6XRQr9cTx2E4o9M0WiAO
ZiH+zEQLvu/rc4dHaTQaukm5XL4UnB+/u2ftTo5srz5dlnvTkDuvII8W4TU3EXh2QsJN+D6azealQO6/
+aL230IezsH7twj19yPE9hhs4zHE7odEEz4O3wmLIgEwcdfdGV+Th+9J8JkEC3BLL+EWXyPwlV5kPM/T
98ISJhLwnP4afSRKL6COFqAO5mFvPIRn/o7CDLcIL5fbJAT2j2fPRXEUztYwLOMB1U9BnazrUAg3YDjc
Lfj+ZKr4behrIBvwCbH3CfJ4pSscJyGgiV6kq8RbxOFnnNFpGi0wDOP8quA6aPeMMzp9MWn6eRx+0CsQ
h3fodbYow//eaAaJNMHW20DhvsH/Ib+cRcWEtS4AAAAASUVORK5CYII=
</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>
</data>
<data name="toolStripButton2.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==
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHaSURBVDhPjZO9S1tRGMZtnfo/VHASCkWkCRlFKB0KdVB0
KIWCDgpuanHoWOlklxJCcBG3QoeCe5dEpEXRBBW/oCIOSfNlbnI/zjn3Xn36vofe670mpb7wI8N9n1+e
c3LTE5nHRIJI/Yd+4iHRMQnHcYxcLnft+z66IaVEOp3+TLtdJSkOW5YF27ZDWq0Wms0mKpWKlpTLZWQy
mQ7JAyLFC0IIKKX0J2OaJgzDQLVa1QJqCf6SbDYbSPRogdcqQl7taEEg4UC73UatVosdh+GMTtNogThd
gDiaDRc8z9PnDo5Sr9d1k1KpdCu4uZx/ZB68Gdn79nxNHs9A7r+GPF+B29iC71oxCTfh+2g0GrcCeTK9
qk7mIM8W4V6sQP36ALE3BmvzGcTBUqwJH4fvhEWhAJjsdfbHN+TZOxJ8IsEynOIEnMIUfE/pRcZ1XX0v
LGFCAc/V7uigKL6COl+GOn0PK/cUrnEYhhluEVwut4kJrO0XL0VhFPaPIZibT6h+Aur3dx0K4AYMhzsF
P4ffFr4MrPuyDo8Qxx8hL792hKPEBDThi3SXaIso/IwzOk2jBfl8/uau4F/Q7jVndPrvJOnnsflBt0AU
3qHX2aQM/3vD6SOSBFvvA4V7+v4ABhqcM6lhVZQAAAAASUVORK5CYII=
</value>
</data>
<metadata name="rootTreeNodeMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">

View File

@ -28,74 +28,85 @@ namespace bzit.bomg
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NewSessionForm));
this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.btnSave = new RyzStudio.Windows.Forms.BigButton();
this.textBox2 = new RyzStudio.Windows.ThemedForms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.horizontalSeparator1 = new RyzStudio.Windows.Forms.HorizontalSeparator();
this.button2 = new RyzStudio.Windows.ThemedForms.Button();
this.SuspendLayout();
//
// label1
// textBox2
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 12);
this.label1.Margin = new System.Windows.Forms.Padding(3);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(132, 13);
this.label1.TabIndex = 0;
this.label1.Text = "Enter a new session name";
//
// textBox1
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox1.Location = new System.Drawing.Point(12, 31);
this.textBox1.MaxLength = 128;
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(280, 21);
this.textBox1.TabIndex = 0;
this.textBox1.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.textBox1_PreviewKeyDown);
this.textBox2.BackColor = System.Drawing.Color.Transparent;
this.textBox2.Location = new System.Drawing.Point(96, 15);
this.textBox2.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
this.textBox2.Name = "textBox2";
this.textBox2.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
this.textBox2.Size = new System.Drawing.Size(276, 33);
this.textBox2.TabIndex = 68;
//
// btnSave
// label2
//
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnSave.BackColor = System.Drawing.Color.WhiteSmoke;
this.btnSave.Location = new System.Drawing.Point(196, 67);
this.btnSave.MaximumSize = new System.Drawing.Size(120, 32);
this.btnSave.MinimumSize = new System.Drawing.Size(32, 32);
this.btnSave.Name = "btnSave";
this.btnSave.Padding = new System.Windows.Forms.Padding(4);
this.btnSave.Size = new System.Drawing.Size(96, 32);
this.btnSave.TabIndex = 22;
this.btnSave.Value = "&OK";
this.btnSave.Click += new System.EventHandler(this.button2_Click);
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 25);
this.label2.Margin = new System.Windows.Forms.Padding(3);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(34, 13);
this.label2.TabIndex = 67;
this.label2.Text = "Name";
//
// horizontalSeparator1
//
this.horizontalSeparator1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.horizontalSeparator1.Location = new System.Drawing.Point(12, 63);
this.horizontalSeparator1.Margin = new System.Windows.Forms.Padding(3, 10, 3, 10);
this.horizontalSeparator1.MaximumSize = new System.Drawing.Size(4920, 2);
this.horizontalSeparator1.Name = "horizontalSeparator1";
this.horizontalSeparator1.Size = new System.Drawing.Size(360, 2);
this.horizontalSeparator1.TabIndex = 69;
//
// button2
//
this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button2.BackColor = System.Drawing.Color.Transparent;
this.button2.DefaultImage = null;
this.button2.DownImage = null;
this.button2.LabelText = "&OK";
this.button2.Location = new System.Drawing.Point(264, 78);
this.button2.Name = "button2";
this.button2.OverImage = null;
this.button2.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
this.button2.Size = new System.Drawing.Size(108, 32);
this.button2.TabIndex = 70;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// NewSessionForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(304, 111);
this.Controls.Add(this.btnSave);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label1);
this.ClientSize = new System.Drawing.Size(384, 122);
this.Controls.Add(this.button2);
this.Controls.Add(this.horizontalSeparator1);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.label2);
this.Font = new System.Drawing.Font("Tahoma", 8.25F);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "NewSessionForm";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "New";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox1;
private RyzStudio.Windows.Forms.BigButton btnSave;
private RyzStudio.Windows.ThemedForms.TextBox textBox2;
private System.Windows.Forms.Label label2;
private RyzStudio.Windows.Forms.HorizontalSeparator horizontalSeparator1;
private RyzStudio.Windows.ThemedForms.Button button2;
}
}

View File

@ -21,20 +21,18 @@ namespace bzit.bomg
return;
}
if (string.IsNullOrEmpty(textBox1.Text))
if (string.IsNullOrEmpty(textBox2.Text))
{
return;
}
parentForm.treeView1.Clear();
parentForm.treeView1.Nodes.Add("", textBox1.Text.Trim(), 0, 0);
parentForm.treeView1.Nodes.Add("", textBox2.Text.Trim(), 0, 0);
parentForm.ApplicationMode = MainForm.AppMode.New;
this.Close();
}
#region behaviour
private void textBox1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
{
switch (e.KeyCode)
@ -49,7 +47,5 @@ namespace bzit.bomg
}
}
#endregion
}
}

View File

@ -117,29 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAB0AAAA0AAAANgAAADYAAAA2AAAANgAAADYAAAA2AAAANgAAADYAAAA2AAAANgAA
ADMAAAAdAAAAAAAAAAAAAAA0+fn59fz8/P38/Pz//Pz8//z8/P/8/Pz//Pz8//z8/P/8/Pz//Pz8//z8
/P35+fnzAAAAMwAAAAAAAAABAAAANvz8/P78/Pz//Pz8//z8/P/8/Pz//Pz8//z8/P/8/Pz//Pz8//z8
/P/8/Pz//Pz8/QAAADYAAAAAAAAAAQAAADb8/Pz//Pz8//z8/P/8/Pz//Pz8//v7+//7+/v/+/v7//v7
+//7+/v/+/v7//z8/P8AAAA2AAAAAD3K814np8+g7Pj8/+z4+/+E1/f/qeL4//v7+//7+/v/+vr6//r6
+v/6+vr/+vr6//r6+v/8/Pz/AAAANgAAAABEzPNJTM/3/y/H9f8owvP/MsL0/7vo+f/7+/v/+/v7//v7
+//6+vr/+vr6//j4+P/4+Pj//Pz8/wAAADYAAAAASsvwLkvQ9/+C3vn/edn5/yvA9P/U8Pr//Pz8//z8
/P/8/Pz/+/v7//n5+f/5+fn/+Pj4//z8/P8AAAA2W9f4A1HS+LFz2vj/i+D6/4Ld+f9T0Pb/YM/2//n7
/P/8/Pz//Pz8//r6+v/5+fn/9vb2//b29v/8/Pz/AAAANmHZ+Jlp2Pn/ctr4/4rg+v+B3fn/UM73/zHC
9P910/f//Pz8//v7+//4+Pj/9vb2//Pz8//y8vL//Pz8/wAAADZk2fgJWtT0QEOuz55l1/j/WNL4/4re
+P/E7fr/9Pr8//v7+//4+Pj/9fX1//Ly8v/v7+//7e3t//z8/P8AAAA2AAAAAAAAAAEAAAA2cdn3/2bW
9//8/Pz//Pz8//v7+//4+Pj/9fX1//Hx8f/s7Oz/6urq/+bm5v/8/Pz/AAAANgAAAAAAAAABAAAANtDx
+//L7vj/+fn5//n5+f/39/f/9vb2//Ly8v/r6+v//Pz8//z8/P/8/Pz//Pz8/wAAADYAAAAAAAAAAQAA
ADb8/Pz/9/f3//n5+f/39/f/9/f3//Pz8//w8PD/6urq//z8/P/29vb/9PT0/5iYmJEAAAAgAAAAAAAA
AAAAAAA2+/v7/fT09P/19fX/9fX1//X19f/x8fH/7+/v/+np6f/8/Pz/5+fn/5SUlJEAAAAgAAAAAgAA
AAAAAAAAAAAAM/j4+PD7+/v9/Pz8//z8/P/8/Pz//Pz8//z8/P/8/Pz/+Pj4/5OTk5EAAAAgAAAAAgAA
AAAAAAAAAAAAAAAAABwAAAAzAAAANgAAADYAAAA2AAAANgAAADYAAAA2AAAANgAAADYAAAAgAAAAAgAA
AAAAAAAAwACsQcAArEGAAKxBgACsQYAArEGAAKxBgACsQQAArEEAAKxBAACsQYAArEGAAKxBgACsQcAA
rEHAAaxBwAOsQQ==
</value>
</data>
</root>

View File

@ -27,12 +27,12 @@ namespace bzit.bomg
{
base.OnShown(e);
int nodeCount = (int)parentForm.treeView1.NodeCountCalc;
progressBar1.Minimum = 0;
progressBar1.Value = 0;
progressBar1.Maximum = nodeCount;
//##int nodeCount = (int)parentForm.treeView1.NodeCountCalc;
//progressBar1.Minimum = 0;
//progressBar1.Value = 0;
//progressBar1.Maximum = nodeCount;
label2.Text = string.Concat("0", "/", nodeCount.ToString());
//label2.Text = string.Concat("0", "/", nodeCount.ToString());
}
protected override void OnClosing(CancelEventArgs e)

View File

@ -32,16 +32,16 @@ namespace RyzStudio.Windows.Forms
protected IconDatabase iconDatabase = null;
public delegate void NodeCountUpdated(ulong v);
//public delegate void NodeCountUpdated(ulong v);
public EventHandler OnChanged = null;
public NodeCountUpdated OnNodeCountUpdate = null;
//public EventHandler OnChanged = null;
//public NodeCountUpdated OnNodeCountUpdate = null;
protected const char pathSeparator = '|';
protected TreeNode draggingNode = null;
//protected bool allowBeginEdit = false;
protected ulong nodeCount = 0;
protected bool allowBeginEdit = false;
//protected ulong nodeCount = 0;
protected bool hasChanged = false;
public BookmarkTreeView() : base()
@ -87,34 +87,34 @@ namespace RyzStudio.Windows.Forms
}
}
[Browsable(false)]
public ulong NodeCount
{
get
{
return nodeCount;
}
}
//[Browsable(false)]
//public ulong NodeCount
//{
// get
// {
// return nodeCount;
// }
//}
[Browsable(false)]
public ulong NodeCountCalc
{
get
{
ulong rv = 0;
if (this.Nodes.Count <= 0)
{
return rv;
}
//[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);
}
// foreach (TreeNode tn in this.Nodes)
// {
// traverseNodeCount(ref rv, tn);
// }
return rv;
}
}
// return rv;
// }
//}
[Browsable(false)]
public bool HasChanged
@ -124,7 +124,7 @@ namespace RyzStudio.Windows.Forms
{
hasChanged = value;
OnChanged?.Invoke(null, null);
//OnChanged?.Invoke(null, null);
}
}
@ -183,6 +183,8 @@ namespace RyzStudio.Windows.Forms
TreeNode tn2 = addFolderPath(viewModel.TreeviewPath);
tn2.Nodes.Add(tn);
this.HasChanged = true;
}
public void AddOrUpdateItem_OnSelectedNode(BookmarkItemViewModel viewModel)
@ -192,9 +194,13 @@ namespace RyzStudio.Windows.Forms
case NodeType.Root:
case NodeType.Folder:
addItem_OnSelectedNode(viewModel);
this.HasChanged = true;
break;
case NodeType.Page:
updateItem_OnSelectedNode(viewModel);
this.HasChanged = true;
break;
default:
break;
@ -227,25 +233,6 @@ namespace RyzStudio.Windows.Forms
}
}
//public void EditNode()
//{
// this.SNode.
// //this.HasChanged = true;
// //if (this.SelectedNode == null)
// //{
// // return;
// //}
// //if (!this.SelectedNode.IsEditing)
// //{
// // allowBeginEdit = true;
// // this.SelectedNode.BeginEdit();
// //}
//}
public string GetNodeFullPath(TreeNode node)
{
string rv = PathEncode(node.Text);
@ -343,8 +330,8 @@ namespace RyzStudio.Windows.Forms
public void Clear()
{
nodeCount = 0;
NodeCountUpdate(nodeCount);
//nodeCount = 0;
//NodeCountUpdate(nodeCount);
this.Nodes.Clear();
this.HasChanged = true;
@ -420,15 +407,17 @@ namespace RyzStudio.Windows.Forms
protected override void OnBeforeLabelEdit(NodeLabelEditEventArgs e)
{
//if (!allowBeginEdit)
//{
// e.CancelEdit = true;
// return;
//}
if (!allowBeginEdit)
{
allowBeginEdit = false;
//this.HasChanged = true;
e.CancelEdit = true;
return;
}
//base.OnBeforeLabelEdit(e);
this.HasChanged = true;
base.OnBeforeLabelEdit(e);
//if (e.Node == null)
//{
@ -470,7 +459,7 @@ namespace RyzStudio.Windows.Forms
// e.CancelEdit = true;
//}
//allowBeginEdit = false;
allowBeginEdit = false;
}
protected override void OnPreviewKeyDown(PreviewKeyDownEventArgs e)
@ -502,6 +491,8 @@ namespace RyzStudio.Windows.Forms
break;
case Keys.F2:
allowBeginEdit = true;
this.SNode.Edit();
break;
case Keys.Up:
@ -521,13 +512,13 @@ namespace RyzStudio.Windows.Forms
default: break;
}
//base.OnPreviewKeyDown(e);
base.OnPreviewKeyDown(e);
}
protected virtual void NodeCountUpdate(ulong v)
{
this.OnNodeCountUpdate?.Invoke(v);
}
//protected virtual void NodeCountUpdate(ulong v)
//{
// this.OnNodeCountUpdate?.Invoke(v);
//}
#endregion
@ -700,9 +691,9 @@ namespace RyzStudio.Windows.Forms
protected virtual void OnAddFolderNode(TreeNode node) { }
//protected virtual void OnAddFolderNode(TreeNode node) { }
protected virtual void OnAddItemNode(TreeNode node) { }
//protected virtual void OnAddItemNode(TreeNode node) { }
////protected string PathEncode(string text) { return RyzStudio.String.EncodeTo64(text); }