WIP: rebuild context menu functionality
This commit is contained in:
parent
050bff5a00
commit
35eb3a92ae
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,6 +1,5 @@
|
|||||||
/skye.sln
|
|
||||||
/bomg.csproj.user
|
/bomg.csproj.user
|
||||||
/bin
|
/bin
|
||||||
/obj
|
/obj
|
||||||
/packages
|
/packages
|
||||||
/.vs/skye/v14/*.suo
|
/.vs
|
||||||
|
387
BookmarkEditForm.Designer.cs
generated
387
BookmarkEditForm.Designer.cs
generated
@ -28,197 +28,224 @@ namespace bzit.bomg
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.components = new System.ComponentModel.Container();
|
this.components = new System.ComponentModel.Container();
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BookmarkEditForm));
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
this.label1 = new System.Windows.Forms.Label();
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
this.tbxAddress = new System.Windows.Forms.TextBox();
|
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||||
this.tbxName = new System.Windows.Forms.TextBox();
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
this.label2 = new System.Windows.Forms.Label();
|
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
||||||
this.tbxDescription = new System.Windows.Forms.TextBox();
|
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||||
this.oToolTip = new System.Windows.Forms.ToolTip(this.components);
|
this.button2 = new RyzStudio.Windows.ThemedForms.Button();
|
||||||
this.label3 = new System.Windows.Forms.Label();
|
this.button1 = new RyzStudio.Windows.ThemedForms.Button();
|
||||||
this.pbxIcon = new System.Windows.Forms.PictureBox();
|
this.label5 = new System.Windows.Forms.Label();
|
||||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
this.horizontalSeparator1 = new RyzStudio.Windows.Forms.HorizontalSeparator();
|
||||||
this.button1 = new RyzStudio.Windows.Forms.BigButton();
|
this.textBox1 = new RyzStudio.Windows.ThemedForms.TextBox();
|
||||||
this.btnSave = new RyzStudio.Windows.Forms.BigButton();
|
this.textBox2 = new RyzStudio.Windows.ThemedForms.TextBox();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pbxIcon)).BeginInit();
|
this.memoBox1 = new RyzStudio.Windows.ThemedForms.MemoBox();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
|
||||||
this.SuspendLayout();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||||
//
|
this.SuspendLayout();
|
||||||
// label1
|
//
|
||||||
//
|
// label1
|
||||||
this.label1.AutoSize = true;
|
//
|
||||||
this.label1.Location = new System.Drawing.Point(12, 12);
|
this.label1.AutoSize = true;
|
||||||
this.label1.Margin = new System.Windows.Forms.Padding(3);
|
this.label1.Location = new System.Drawing.Point(12, 25);
|
||||||
this.label1.Name = "label1";
|
this.label1.Margin = new System.Windows.Forms.Padding(3);
|
||||||
this.label1.Size = new System.Drawing.Size(39, 13);
|
this.label1.Name = "label1";
|
||||||
this.label1.TabIndex = 0;
|
this.label1.Size = new System.Drawing.Size(28, 13);
|
||||||
this.label1.Text = "Name:";
|
this.label1.TabIndex = 0;
|
||||||
//
|
this.label1.Text = "Title";
|
||||||
// tbxAddress
|
//
|
||||||
//
|
// label2
|
||||||
this.tbxAddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Location = new System.Drawing.Point(12, 69);
|
||||||
|
this.label2.Margin = new System.Windows.Forms.Padding(3);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(48, 13);
|
||||||
|
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;
|
||||||
|
this.label3.Location = new System.Drawing.Point(12, 113);
|
||||||
|
this.label3.Margin = new System.Windows.Forms.Padding(3);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(66, 13);
|
||||||
|
this.label3.TabIndex = 55;
|
||||||
|
this.label3.Text = "Description";
|
||||||
|
//
|
||||||
|
// pictureBox2
|
||||||
|
//
|
||||||
|
this.pictureBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.pictureBox2.BackColor = System.Drawing.SystemColors.Window;
|
||||||
|
this.pictureBox2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||||
|
this.pictureBox2.ErrorImage = null;
|
||||||
|
this.pictureBox2.InitialImage = null;
|
||||||
|
this.pictureBox2.Location = new System.Drawing.Point(368, 15);
|
||||||
|
this.pictureBox2.Name = "pictureBox2";
|
||||||
|
this.pictureBox2.Size = new System.Drawing.Size(32, 32);
|
||||||
|
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||||
|
this.pictureBox2.TabIndex = 57;
|
||||||
|
this.pictureBox2.TabStop = false;
|
||||||
|
//
|
||||||
|
// pictureBox1
|
||||||
|
//
|
||||||
|
this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
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.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
|
||||||
|
//
|
||||||
|
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);
|
||||||
|
//
|
||||||
|
// button1
|
||||||
|
//
|
||||||
|
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.button1.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.button1.DefaultImage = null;
|
||||||
|
this.button1.DownImage = null;
|
||||||
|
this.button1.LabelText = "S&can";
|
||||||
|
this.button1.Location = new System.Drawing.Point(368, 59);
|
||||||
|
this.button1.Name = "button1";
|
||||||
|
this.button1.OverImage = null;
|
||||||
|
this.button1.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
|
||||||
|
this.button1.Size = new System.Drawing.Size(64, 32);
|
||||||
|
this.button1.TabIndex = 2;
|
||||||
|
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||||
|
//
|
||||||
|
// label5
|
||||||
|
//
|
||||||
|
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.tbxAddress.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51)))));
|
this.label5.ForeColor = System.Drawing.Color.OrangeRed;
|
||||||
this.tbxAddress.Location = new System.Drawing.Point(12, 78);
|
this.label5.Location = new System.Drawing.Point(9, 237);
|
||||||
this.tbxAddress.MaxLength = 4096;
|
this.label5.Margin = new System.Windows.Forms.Padding(3);
|
||||||
this.tbxAddress.Name = "tbxAddress";
|
this.label5.Name = "label5";
|
||||||
this.tbxAddress.Size = new System.Drawing.Size(240, 22);
|
this.label5.Size = new System.Drawing.Size(272, 32);
|
||||||
this.tbxAddress.TabIndex = 1;
|
this.label5.TabIndex = 64;
|
||||||
this.tbxAddress.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.textBox_PreviewKeyDown);
|
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
//
|
//
|
||||||
// tbxName
|
// horizontalSeparator1
|
||||||
//
|
//
|
||||||
this.tbxName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
this.horizontalSeparator1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.tbxName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51)))));
|
this.horizontalSeparator1.Location = new System.Drawing.Point(12, 222);
|
||||||
this.tbxName.Location = new System.Drawing.Point(12, 31);
|
this.horizontalSeparator1.Margin = new System.Windows.Forms.Padding(3, 10, 3, 10);
|
||||||
this.tbxName.MaxLength = 4096;
|
this.horizontalSeparator1.MaximumSize = new System.Drawing.Size(4920, 2);
|
||||||
this.tbxName.Name = "tbxName";
|
this.horizontalSeparator1.Name = "horizontalSeparator1";
|
||||||
this.tbxName.Size = new System.Drawing.Size(212, 22);
|
this.horizontalSeparator1.Size = new System.Drawing.Size(420, 2);
|
||||||
this.tbxName.TabIndex = 0;
|
this.horizontalSeparator1.TabIndex = 65;
|
||||||
this.tbxName.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.textBox_PreviewKeyDown);
|
//
|
||||||
//
|
// textBox1
|
||||||
// label2
|
//
|
||||||
//
|
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
this.label2.AutoSize = true;
|
|
||||||
this.label2.Location = new System.Drawing.Point(12, 59);
|
|
||||||
this.label2.Margin = new System.Windows.Forms.Padding(3);
|
|
||||||
this.label2.Name = "label2";
|
|
||||||
this.label2.Size = new System.Drawing.Size(51, 13);
|
|
||||||
this.label2.TabIndex = 4;
|
|
||||||
this.label2.Text = "Address:";
|
|
||||||
//
|
|
||||||
// tbxDescription
|
|
||||||
//
|
|
||||||
this.tbxDescription.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.tbxDescription.BackColor = System.Drawing.SystemColors.Window;
|
this.textBox1.BackColor = System.Drawing.Color.Transparent;
|
||||||
this.tbxDescription.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51)))));
|
this.textBox1.Location = new System.Drawing.Point(96, 15);
|
||||||
this.tbxDescription.Location = new System.Drawing.Point(12, 125);
|
this.textBox1.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
|
||||||
this.tbxDescription.MaxLength = 4096;
|
this.textBox1.Name = "textBox1";
|
||||||
this.tbxDescription.Multiline = true;
|
this.textBox1.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
|
||||||
this.tbxDescription.Name = "tbxDescription";
|
this.textBox1.Size = new System.Drawing.Size(259, 32);
|
||||||
this.tbxDescription.Size = new System.Drawing.Size(240, 84);
|
this.textBox1.TabIndex = 66;
|
||||||
this.tbxDescription.TabIndex = 2;
|
//
|
||||||
this.tbxDescription.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.textBox_PreviewKeyDown);
|
// textBox2
|
||||||
//
|
//
|
||||||
// oToolTip
|
this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
//
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.oToolTip.Active = false;
|
this.textBox2.BackColor = System.Drawing.Color.Transparent;
|
||||||
this.oToolTip.BackColor = System.Drawing.Color.IndianRed;
|
this.textBox2.Location = new System.Drawing.Point(96, 59);
|
||||||
//
|
this.textBox2.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
|
||||||
// label3
|
this.textBox2.Name = "textBox2";
|
||||||
//
|
this.textBox2.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
|
||||||
this.label3.AutoSize = true;
|
this.textBox2.Size = new System.Drawing.Size(259, 32);
|
||||||
this.label3.Location = new System.Drawing.Point(12, 106);
|
this.textBox2.TabIndex = 67;
|
||||||
this.label3.Margin = new System.Windows.Forms.Padding(3);
|
//
|
||||||
this.label3.Name = "label3";
|
// memoBox1
|
||||||
this.label3.Size = new System.Drawing.Size(69, 13);
|
//
|
||||||
this.label3.TabIndex = 55;
|
this.memoBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
this.label3.Text = "Description:";
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
//
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
// pbxIcon
|
this.memoBox1.BackColor = System.Drawing.Color.Transparent;
|
||||||
//
|
this.memoBox1.Location = new System.Drawing.Point(96, 103);
|
||||||
this.pbxIcon.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.memoBox1.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
|
||||||
this.pbxIcon.BackColor = System.Drawing.SystemColors.Window;
|
this.memoBox1.Name = "memoBox1";
|
||||||
this.pbxIcon.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
this.memoBox1.Padding = new System.Windows.Forms.Padding(10, 10, 3, 9);
|
||||||
this.pbxIcon.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
this.memoBox1.Size = new System.Drawing.Size(336, 103);
|
||||||
this.pbxIcon.ErrorImage = null;
|
this.memoBox1.TabIndex = 69;
|
||||||
this.pbxIcon.InitialImage = null;
|
//
|
||||||
this.pbxIcon.Location = new System.Drawing.Point(230, 31);
|
// BookmarkEditForm
|
||||||
this.pbxIcon.Name = "pbxIcon";
|
//
|
||||||
this.pbxIcon.Size = new System.Drawing.Size(22, 22);
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
this.pbxIcon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
this.BackColor = System.Drawing.Color.White;
|
||||||
this.pbxIcon.TabIndex = 57;
|
this.ClientSize = new System.Drawing.Size(444, 281);
|
||||||
this.pbxIcon.TabStop = false;
|
this.Controls.Add(this.memoBox1);
|
||||||
//
|
this.Controls.Add(this.textBox2);
|
||||||
// pictureBox1
|
this.Controls.Add(this.textBox1);
|
||||||
//
|
this.Controls.Add(this.horizontalSeparator1);
|
||||||
this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.Controls.Add(this.label5);
|
||||||
this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
|
this.Controls.Add(this.button1);
|
||||||
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
this.Controls.Add(this.button2);
|
||||||
this.pictureBox1.ErrorImage = null;
|
this.Controls.Add(this.pictureBox1);
|
||||||
this.pictureBox1.InitialImage = null;
|
this.Controls.Add(this.pictureBox2);
|
||||||
this.pictureBox1.Location = new System.Drawing.Point(12, 227);
|
this.Controls.Add(this.label3);
|
||||||
this.pictureBox1.Name = "pictureBox1";
|
this.Controls.Add(this.label1);
|
||||||
this.pictureBox1.Size = new System.Drawing.Size(32, 32);
|
this.Controls.Add(this.label2);
|
||||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.pictureBox1.TabIndex = 60;
|
this.MaximizeBox = false;
|
||||||
this.pictureBox1.TabStop = false;
|
this.MinimizeBox = false;
|
||||||
//
|
this.Name = "BookmarkEditForm";
|
||||||
// button1
|
this.ShowIcon = false;
|
||||||
//
|
this.ShowInTaskbar = false;
|
||||||
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||||
this.button1.BackColor = System.Drawing.Color.WhiteSmoke;
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
this.button1.Location = new System.Drawing.Point(118, 227);
|
this.Text = "Edit Bookmark";
|
||||||
this.button1.MaximumSize = new System.Drawing.Size(120, 32);
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
|
||||||
this.button1.MinimumSize = new System.Drawing.Size(32, 32);
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||||
this.button1.Name = "button1";
|
this.ResumeLayout(false);
|
||||||
this.button1.Padding = new System.Windows.Forms.Padding(4);
|
this.PerformLayout();
|
||||||
this.button1.Size = new System.Drawing.Size(32, 32);
|
|
||||||
this.button1.TabIndex = 3;
|
|
||||||
this.button1.Value = "";
|
|
||||||
this.button1.Click += new System.EventHandler(this.btnRetrievePage_Click);
|
|
||||||
//
|
|
||||||
// btnSave
|
|
||||||
//
|
|
||||||
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(156, 227);
|
|
||||||
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 = 4;
|
|
||||||
this.btnSave.Value = "&OK";
|
|
||||||
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
|
|
||||||
//
|
|
||||||
// BookmarkEditForm
|
|
||||||
//
|
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
|
||||||
this.BackColor = System.Drawing.Color.White;
|
|
||||||
this.ClientSize = new System.Drawing.Size(264, 271);
|
|
||||||
this.Controls.Add(this.button1);
|
|
||||||
this.Controls.Add(this.pictureBox1);
|
|
||||||
this.Controls.Add(this.pbxIcon);
|
|
||||||
this.Controls.Add(this.tbxDescription);
|
|
||||||
this.Controls.Add(this.label3);
|
|
||||||
this.Controls.Add(this.tbxName);
|
|
||||||
this.Controls.Add(this.label1);
|
|
||||||
this.Controls.Add(this.tbxAddress);
|
|
||||||
this.Controls.Add(this.btnSave);
|
|
||||||
this.Controls.Add(this.label2);
|
|
||||||
this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
|
||||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
|
||||||
this.MaximizeBox = false;
|
|
||||||
this.MinimizeBox = false;
|
|
||||||
this.Name = "BookmarkEditForm";
|
|
||||||
this.ShowInTaskbar = false;
|
|
||||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
|
||||||
this.Text = "Edit Bookmark";
|
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pbxIcon)).EndInit();
|
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
|
||||||
this.ResumeLayout(false);
|
|
||||||
this.PerformLayout();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private System.Windows.Forms.Label label1;
|
private System.Windows.Forms.Label label1;
|
||||||
private System.Windows.Forms.TextBox tbxAddress;
|
|
||||||
private System.Windows.Forms.TextBox tbxName;
|
|
||||||
private System.Windows.Forms.Label label2;
|
private System.Windows.Forms.Label label2;
|
||||||
private System.Windows.Forms.TextBox tbxDescription;
|
private System.Windows.Forms.ToolTip toolTip1;
|
||||||
private System.Windows.Forms.ToolTip oToolTip;
|
|
||||||
private RyzStudio.Windows.Forms.BigButton btnSave;
|
|
||||||
private System.Windows.Forms.Label label3;
|
private System.Windows.Forms.Label label3;
|
||||||
private System.Windows.Forms.PictureBox pbxIcon;
|
private System.Windows.Forms.PictureBox pictureBox2;
|
||||||
private System.Windows.Forms.PictureBox pictureBox1;
|
private System.Windows.Forms.PictureBox pictureBox1;
|
||||||
private RyzStudio.Windows.Forms.BigButton button1;
|
private RyzStudio.Windows.ThemedForms.Button button2;
|
||||||
|
private RyzStudio.Windows.ThemedForms.Button button1;
|
||||||
|
private System.Windows.Forms.Label label5;
|
||||||
|
private RyzStudio.Windows.Forms.HorizontalSeparator horizontalSeparator1;
|
||||||
|
private RyzStudio.Windows.ThemedForms.TextBox textBox1;
|
||||||
|
private RyzStudio.Windows.ThemedForms.TextBox textBox2;
|
||||||
|
private RyzStudio.Windows.ThemedForms.MemoBox memoBox1;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,192 +1,225 @@
|
|||||||
|
using bzit.bomg.Models;
|
||||||
|
using RyzStudio.Windows.Forms;
|
||||||
|
using RyzStudio.Windows.ThemedForms;
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using Form = System.Windows.Forms.Form;
|
||||||
|
using Resources = bzit.bomg.Properties.Resources;
|
||||||
|
|
||||||
namespace bzit.bomg
|
namespace bzit.bomg
|
||||||
{
|
{
|
||||||
public partial class BookmarkEditForm : Form
|
public partial class BookmarkEditForm : Form
|
||||||
{
|
{
|
||||||
private TreeNode parentNode = null;
|
protected BackgroundWorker threadWorker1 = null;
|
||||||
private BookmarkItem bookmarkItem;
|
|
||||||
private bool isWorking = false;
|
|
||||||
|
|
||||||
public BookmarkEditForm(ref TreeNode node)
|
protected BookmarkItemModel itemModel = null;
|
||||||
|
protected BookmarkTreeView treeView = null;
|
||||||
|
//protected TreeNode treeNode = null;
|
||||||
|
|
||||||
|
//public BookmarkEditForm(ref TreeNode node) : base()
|
||||||
|
public BookmarkEditForm(BookmarkTreeView treeview) : base()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
parentNode = node;
|
treeView = treeview;
|
||||||
|
|
||||||
|
//treeNode = node;
|
||||||
|
|
||||||
this.StartPosition = FormStartPosition.WindowsDefaultLocation;
|
this.StartPosition = FormStartPosition.WindowsDefaultLocation;
|
||||||
|
|
||||||
|
if (threadWorker1 == null)
|
||||||
|
{
|
||||||
|
threadWorker1 = new BackgroundWorker();
|
||||||
|
threadWorker1.WorkerReportsProgress = threadWorker1.WorkerSupportsCancellation = true;
|
||||||
|
threadWorker1.DoWork += threadWorker1_DoWork;
|
||||||
|
threadWorker1.RunWorkerCompleted += threadWorker1_RunWorkerCompleted;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnLoad(EventArgs e)
|
protected void threadWorker1_DoWork(object sender, DoWorkEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnLoad(e);
|
if (itemModel == null)
|
||||||
|
{
|
||||||
|
itemModel = new BookmarkItemModel();
|
||||||
|
}
|
||||||
|
|
||||||
button1.Button.Image = Properties.Resources.magnifier;
|
itemModel.SiteAddress = textBox2.Text;
|
||||||
|
|
||||||
|
bool rv = itemModel.Update();
|
||||||
|
if (rv)
|
||||||
|
{
|
||||||
|
ThreadHelper.SetText(textBox1, itemModel.SiteName);
|
||||||
|
ThreadHelper.SetText(textBox2, itemModel.SiteAddress);
|
||||||
|
ThreadHelper.SetText(memoBox1, itemModel.SiteDescription);
|
||||||
|
ThreadHelper.SetImage(pictureBox2, itemModel.RetrieveFavicon());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void threadWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
|
||||||
|
{
|
||||||
|
this.IsBusy = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnShown(EventArgs e)
|
protected override void OnShown(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnShown(e);
|
base.OnShown(e);
|
||||||
|
|
||||||
if (parentNode.Tag != null)
|
if (treeView.SNode.GetNodeType() == BookmarkTreeView.NodeType.Page)
|
||||||
{
|
{
|
||||||
if (parentNode.Tag is BookmarkItem)
|
BookmarkItemViewModel bookmarkItem = (BookmarkItemViewModel)treeView.SelectedNode.Tag;
|
||||||
|
if (bookmarkItem != null)
|
||||||
{
|
{
|
||||||
bookmarkItem = (BookmarkItem)parentNode.Tag;
|
if (itemModel == null)
|
||||||
tbxName.Text = bookmarkItem.GetName();
|
|
||||||
tbxAddress.Text = bookmarkItem.SiteAddress;
|
|
||||||
tbxDescription.Text = bookmarkItem.Description;
|
|
||||||
|
|
||||||
if (parentNode.TreeView.ImageList != null)
|
|
||||||
{
|
{
|
||||||
if (parentNode.ImageIndex >= 0)
|
itemModel = new BookmarkItemModel();
|
||||||
{
|
|
||||||
pbxIcon.Image = parentNode.TreeView.ImageList.Images[parentNode.ImageIndex];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pbxIcon.Image = parentNode.TreeView.ImageList.Images[parentNode.ImageKey];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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)
|
protected override void OnClosing(CancelEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnClosing(e);
|
base.OnClosing(e);
|
||||||
|
|
||||||
if (this.IsWorking)
|
if (this.IsBusy)
|
||||||
{
|
{
|
||||||
e.Cancel = true;
|
e.Cancel = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsWorking
|
protected bool IsBusy
|
||||||
{
|
{
|
||||||
get { return isWorking; }
|
get => threadWorker1.IsBusy;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
isWorking = value;
|
textBox1.Enabled = textBox2.Enabled = memoBox1.Enabled = !value;
|
||||||
|
|
||||||
tbxName.Enabled = tbxAddress.Enabled = tbxDescription.Enabled = !value;
|
pictureBox1.Image = (value) ? Resources.aniZomq2x32 : null;
|
||||||
btnSave.Enabled = !value;
|
|
||||||
button1.Enabled = !value;
|
|
||||||
|
|
||||||
pictureBox1.Image = (value) ? Properties.Resources.aniZomq2x32 : null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void textBox_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
|
protected void updateViewModel(BookmarkItemViewModel viewModel)
|
||||||
{
|
{
|
||||||
if (this.IsWorking)
|
itemModel.SiteName = viewModel.SiteName?.Trim();
|
||||||
{
|
itemModel.SiteAddress = viewModel.SiteAddress?.Trim();
|
||||||
return;
|
itemModel.SiteDescription = viewModel.SiteDescription?.Trim();
|
||||||
}
|
itemModel.FaviconAddress = viewModel.FaviconAddress?.Trim();
|
||||||
|
|
||||||
if (e.KeyCode == Keys.Escape)
|
textBox1.Text = itemModel.SiteName;
|
||||||
{
|
textBox2.Text = itemModel.SiteAddress;
|
||||||
this.Close();
|
memoBox1.Text = itemModel.SiteDescription;
|
||||||
}
|
pictureBox2.Image = treeView.ImageList.Images[treeView.SelectedNode.ImageIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnRetrievePage_Click(object sender, EventArgs e)
|
private void button1_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (this.IsWorking)
|
if (this.IsBusy)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(tbxAddress.Text))
|
if (string.IsNullOrWhiteSpace(textBox2.Text))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.IsWorking = true;
|
this.IsBusy = true;
|
||||||
oToolTip.SetToolTip(pictureBox1, "");
|
|
||||||
|
|
||||||
BookmarkItem bi = new BookmarkItem();
|
threadWorker1.RunWorkerAsync();
|
||||||
bi.OnRetrieveCompleted += bookmarkItem_OnRetrieveCompleted;
|
|
||||||
bi.RetrieveAsync(tbxAddress.Text.Trim());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnSave_Click(object sender, EventArgs e)
|
private void button2_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (this.IsWorking)
|
if (this.IsBusy)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bookmarkItem == null)
|
if (itemModel == null)
|
||||||
{
|
{
|
||||||
bookmarkItem = new BookmarkItem();
|
itemModel = new BookmarkItemModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
bookmarkItem.ChangeName(tbxName.Text.Trim());
|
itemModel.SiteName = textBox1.Text?.Trim();
|
||||||
bookmarkItem.SiteAddress = tbxAddress.Text.Trim();
|
itemModel.SiteAddress = textBox2.Text?.Trim();
|
||||||
bookmarkItem.Description = tbxDescription.Text.Trim();
|
itemModel.SiteDescription = memoBox1.Text?.Trim();
|
||||||
|
|
||||||
parentNode.Text = tbxName.Text.Trim();
|
treeView?.AddOrUpdateItem_OnSelectedNode(itemModel.ToViewModel());
|
||||||
//// 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();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void bookmarkItem_OnRetrieveCompleted(BookmarkItem sender, bool hasError, string message)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(sender.SiteName))
|
|
||||||
{
|
|
||||||
if (MessageBox.Show("The page could not be retrieved or the title is blank. Do you want to keep your original title?", "Keep original?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
|
||||||
{
|
|
||||||
bookmarkItem.SiteName = sender.SiteName;
|
|
||||||
|
|
||||||
tbxName.Text = bookmarkItem.SiteName;
|
|
||||||
|
|
||||||
// don't replace with blank
|
|
||||||
if (!string.IsNullOrEmpty(sender.Description))
|
|
||||||
{
|
|
||||||
bookmarkItem.Description = sender.Description;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
bookmarkItem.SiteName = sender.SiteName;
|
|
||||||
|
|
||||||
tbxName.Text = bookmarkItem.SiteName;
|
// private void btnSave_Click(object sender, EventArgs e)
|
||||||
|
// {
|
||||||
|
// if (this.IsBusy)
|
||||||
|
// {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
// don't replace with blank
|
// if (itemModel == null)
|
||||||
if (!string.IsNullOrEmpty(sender.Description))
|
// {
|
||||||
{
|
// itemModel = new BookmarkItemModel();
|
||||||
bookmarkItem.Description = sender.Description;
|
// }
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// don't replace with blank
|
// itemModel.SiteName = textBox1.Text?.Trim();
|
||||||
if (sender.IconData != null)
|
// itemModel.SiteAddress = textBox2.Text?.Trim();
|
||||||
{
|
// itemModel.SiteDescription = memoBox1.Text?.Trim();
|
||||||
bookmarkItem.IconData = sender.IconData;
|
|
||||||
}
|
|
||||||
|
|
||||||
tbxDescription.Text = bookmarkItem.Description;
|
// treeView?.AddOrUpdateItem_OnSelectedNode(itemModel.ToViewModel());
|
||||||
pbxIcon.Image = (bookmarkItem.Icon == null) ? parentNode.TreeView.ImageList.Images[3] : bookmarkItem.Icon;
|
|
||||||
|
//// 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();
|
||||||
|
// }
|
||||||
|
|
||||||
if (hasError)
|
|
||||||
{
|
|
||||||
oToolTip.SetToolTip(pictureBox1, message);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.IsWorking = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -117,32 +117,7 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<metadata name="oToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<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
|
|
||||||
AAAAAAAAAAAAHQAAADQAAAA2AAAANgAAADYAAAA2AAAANgAAADYAAAA2AAAANgAAADYAAAA2AAAAMwAA
|
|
||||||
AB0AAAAAAAAAAAAAADT5+fn1/Pz8/fz8/P/8/Pz//Pz8//z8/P/8/Pz//Pz8//z8/P/8/Pz//Pz8/fn5
|
|
||||||
+fMAAAAzAAAAAAAAAAEAAAA2/Pz8/vz8/P/8/Pz//Pz8//z8/P/8/Pz//Pz8//z8/P/8/Pz//Pz8//z8
|
|
||||||
/P/8/Pz9AAAANgAAAAAAAAABAAAANvz8/P/8/Pz/F0JZ/ypgiP9Lib3/bqfL/+Dp8f/7+/v/+/v7//v7
|
|
||||||
+//7+/v//Pz8/wAAADYAAAABAAAAAQAAADb8/Pz//Pz8/y1mhP+Tx/n/kMn5/0CEyf8laq3/1OLu//r6
|
|
||||||
+v/6+vr/+vr6//z8/P8AAAA2AAAAAQAAAAEAAAA2/Pz8//z8/P9CiKn/4PL//1OZ2P8Zeb3/SJfE/0eN
|
|
||||||
x//Y5vP/+Pj4//j4+P/8/Pz/AAAANgAAAAEAAAABAAAANvz8/P/8/Pz/pMLX/3m11f+PttH/VMnk/1rf
|
|
||||||
9f930O3/UJzd/9/r9f/4+Pj//Pz8/wAAADYAAAABAAAAAQAAADb8/Pz//Pz8//z8/P+x1eX/dbnX/8H2
|
|
||||||
/f9i3/f/XOL4/3jT8P9Il9z/3uny//z8/P8AAAA2AAAAAQAAAAEAAAA2/Pz8//z8/P/8/Pz//Pz8/67U
|
|
||||||
5f92y+f/x/f9/13c9f9Z4ff/etTx/0qZ3f/U5fX/AAAANgAAAAEAAAABAAAANvz8/P/8/Pz//Pz8//z8
|
|
||||||
/P/8/Pz/vOXy/3jT7v/H9/3/Xtz1/1ri9/951vL/UKHi/yJJalwAAAABAAAAAQAAADb8/Pz/+/v7//z8
|
|
||||||
/P/8/Pz/+/v7//j4+P+54/D/fNTu/8P2/f9r3fb/bMrt/2Ki1/9bmM/wTo3DJwAAAAEAAAA2/Pz8//n5
|
|
||||||
+f/5+fn/+fn5//f39//29vb/8vLy/6fZ6P+A1u7/seP5/4q/5/+t0/b/w+D8/2We0/cAAAABAAAANvz8
|
|
||||||
/P/39/f/+fn5//f39//39/f/8/Pz//Dw8P/q6ur/ruTz/3a95/+z0vD/5fP//6vS7/9Hi8foAAAAAAAA
|
|
||||||
ADb7+/v99PT0//X19f/19fX/9fX1//Hx8f/v7+//6enp//z8/P+r1eT/V6TY/4Sw2/9FnND/KpTRXgAA
|
|
||||||
AAAAAAAz+Pj48Pv7+/38/Pz//Pz8//z8/P/8/Pz//Pz8//z8/P/4+Pj/k5OTkQAAACAAAAACAAAAAAAA
|
|
||||||
AAAAAAAAAAAAHAAAADMAAAA2AAAANgAAADYAAAA2AAAANgAAADYAAAA2AAAANgAAACAAAAACAAAAAAAA
|
|
||||||
AAAAAAAAgAGsQYABrEEAAaxBAACsQQAArEEAAKxBAACsQQAArEEAAKxBAACsQQAArEEAAKxBAACsQYAA
|
|
||||||
rEGAA6xBgAesQQ==
|
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
@ -22,7 +22,7 @@ namespace bzit.bomg
|
|||||||
public string SiteName { get; set; } = null;
|
public string SiteName { get; set; } = null;
|
||||||
public string SiteAddress { get; set; }
|
public string SiteAddress { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
public string IconAddress { get; protected set; }
|
public string IconAddress { get; set; }
|
||||||
public string Fullpath { get; set; }
|
public string Fullpath { get; set; }
|
||||||
public string Created { get; set; }
|
public string Created { get; set; }
|
||||||
|
|
||||||
|
@ -9,211 +9,13 @@ namespace bzit.bomg
|
|||||||
{
|
{
|
||||||
public partial class BookmarkTreeView : RyzStudio.Windows.Forms.MovableTreeView
|
public partial class BookmarkTreeView : RyzStudio.Windows.Forms.MovableTreeView
|
||||||
{
|
{
|
||||||
protected IconDatabase iconDatabase = null;
|
|
||||||
|
|
||||||
public BookmarkTreeView()
|
public BookmarkTreeView()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
if (this.ImageList == null)
|
|
||||||
{
|
|
||||||
this.ImageList = new ImageList();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.ImageList.ColorDepth = ColorDepth.Depth16Bit;
|
|
||||||
this.ImageList.ImageSize = new Size(16, 16);
|
|
||||||
this.ImageList.TransparentColor = Color.Transparent;
|
|
||||||
|
|
||||||
this.ImageList.Images.Clear();
|
|
||||||
this.ImageList.Images.Add(Properties.Resources.transmit_blue);
|
|
||||||
this.ImageList.Images.Add(Properties.Resources.folder);
|
|
||||||
this.ImageList.Images.Add(Properties.Resources.folder_explore);
|
|
||||||
this.ImageList.Images.Add(Properties.Resources.page_white_world_bw);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
|
||||||
public new ImageList ImageList { get => base.ImageList; set => base.ImageList = value; }
|
|
||||||
|
|
||||||
protected override void OnPreviewKeyDown(PreviewKeyDownEventArgs e)
|
|
||||||
{
|
|
||||||
base.OnPreviewKeyDown(e);
|
|
||||||
|
|
||||||
TreeNode tn = this.SelectedNode;
|
|
||||||
if (tn == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (e.KeyCode)
|
|
||||||
{
|
|
||||||
case Keys.Insert:
|
|
||||||
if (e.Modifiers == Keys.Shift)
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MessageBox.Show("!");
|
|
||||||
//AddBookmarkPage();
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
default: break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool InitialiseIconDatabase(out string message, string filename)
|
|
||||||
{
|
|
||||||
message = string.Empty;
|
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(filename))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (iconDatabase == null)
|
|
||||||
{
|
|
||||||
iconDatabase = new IconDatabase();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool rv = false;
|
|
||||||
if (File.Exists(filename))
|
|
||||||
{
|
|
||||||
rv = iconDatabase.LoadFile(filename);
|
|
||||||
if (!rv)
|
|
||||||
{
|
|
||||||
rv = iconDatabase.Create(filename, true, null, true);
|
|
||||||
if (!rv)
|
|
||||||
{
|
|
||||||
message = iconDatabase.LastError;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
rv = iconDatabase.Create(filename, true, null, true);
|
|
||||||
if (!rv)
|
|
||||||
{
|
|
||||||
message = iconDatabase.LastError;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddItem(BookmarkItemViewModel viewModel)
|
|
||||||
{
|
|
||||||
int iconIndex = addIcon(viewModel);
|
|
||||||
|
|
||||||
TreeNode tn = new TreeNode(viewModel.SiteName, iconIndex, iconIndex);
|
|
||||||
tn.Tag = viewModel;
|
|
||||||
tn.ToolTipText = viewModel.ToString();
|
|
||||||
|
|
||||||
TreeNode tn2 = addFolderPath(viewModel.TreeviewPath);
|
|
||||||
|
|
||||||
tn2.Nodes.Add(tn);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddItem_OnSelectedNode(BookmarkItemViewModel viewModel)
|
|
||||||
{
|
|
||||||
if (this.SelectedNode == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.SelectedNode.Tag != null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int iconIndex = addIcon(viewModel);
|
|
||||||
|
|
||||||
TreeNode tn = new TreeNode(viewModel.SiteName, iconIndex, iconIndex);
|
|
||||||
tn.Tag = viewModel;
|
|
||||||
tn.ToolTipText = viewModel.ToString();
|
|
||||||
|
|
||||||
int n = this.SelectedNode.Nodes.Add(tn);
|
|
||||||
|
|
||||||
this.SelectedNode = this.SelectedNode.Nodes[n];
|
|
||||||
}
|
|
||||||
|
|
||||||
protected int addIcon(BookmarkItemViewModel viewModel) => addIcon(viewModel.ToModel());
|
|
||||||
|
|
||||||
protected int addIcon(BookmarkItemModel model)
|
|
||||||
{
|
|
||||||
if (this.ImageList.Images.ContainsKey(model.SiteAddress))
|
|
||||||
{
|
|
||||||
return this.ImageList.Images.IndexOfKey(model.SiteAddress);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (iconDatabase.HasIcon(model.SiteAddress))
|
|
||||||
{
|
|
||||||
Image rs = iconDatabase.GetIcon(model.SiteAddress);
|
|
||||||
if (rs == null)
|
|
||||||
{
|
|
||||||
return (int)IconSet.Default;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.ImageList.Images.Add(model.SiteAddress, rs);
|
|
||||||
|
|
||||||
return this.ImageList.Images.IndexOfKey(model.SiteAddress);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Bitmap bmp = model.RetrieveFavicon();
|
|
||||||
if (bmp == null)
|
|
||||||
{
|
|
||||||
return (int)IconSet.Default;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.ImageList.Images.Add(model.SiteAddress, bmp);
|
|
||||||
|
|
||||||
return this.ImageList.Images.IndexOfKey(model.SiteAddress);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected TreeNode addFolderPath(string path)
|
|
||||||
{
|
|
||||||
TreeNode tn = this.Nodes[0];
|
|
||||||
if (tn == null)
|
|
||||||
{
|
|
||||||
return tn;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(path))
|
|
||||||
{
|
|
||||||
return tn;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(path.Trim('\\')))
|
|
||||||
{
|
|
||||||
return tn;
|
|
||||||
}
|
|
||||||
|
|
||||||
string[] folderList = path.Trim('\\').Split('\\');
|
|
||||||
if (folderList.Length <= 0)
|
|
||||||
{
|
|
||||||
return tn;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (string item in folderList)
|
|
||||||
{
|
|
||||||
if (tn.Nodes.ContainsKey(item))
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tn.Nodes.Add(item, item, (int)IconSet.Folder1, (int)IconSet.Folder2);
|
|
||||||
}
|
|
||||||
|
|
||||||
tn = tn.Nodes[item];
|
|
||||||
}
|
|
||||||
|
|
||||||
return tn;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
129
MainForm.Designer.cs
generated
129
MainForm.Designer.cs
generated
@ -1,3 +1,5 @@
|
|||||||
|
using RyzStudio.Windows.Forms;
|
||||||
|
|
||||||
namespace bzit.bomg
|
namespace bzit.bomg
|
||||||
{
|
{
|
||||||
partial class MainForm
|
partial class MainForm
|
||||||
@ -30,7 +32,7 @@ namespace bzit.bomg
|
|||||||
{
|
{
|
||||||
this.components = new System.ComponentModel.Container();
|
this.components = new System.ComponentModel.Container();
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
|
||||||
this.treeMenuItem = new System.Windows.Forms.ContextMenuStrip(this.components);
|
this.pageTreeNodeMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.toolStripMenuItem8 = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripMenuItem8 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
@ -72,7 +74,7 @@ namespace bzit.bomg
|
|||||||
this.toolStripDropDownButton7 = new System.Windows.Forms.ToolStripDropDownButton();
|
this.toolStripDropDownButton7 = new System.Windows.Forms.ToolStripDropDownButton();
|
||||||
this.alwaysOnTopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.alwaysOnTopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
|
this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
|
||||||
this.treeMenuFolder = new System.Windows.Forms.ContextMenuStrip(this.components);
|
this.folderTreeNodeMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
this.toolStripMenuItem15 = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripMenuItem15 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripMenuItem16 = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripMenuItem16 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
@ -90,27 +92,28 @@ namespace bzit.bomg
|
|||||||
this.openMenuBarItem = new System.Windows.Forms.ToolStripButton();
|
this.openMenuBarItem = new System.Windows.Forms.ToolStripButton();
|
||||||
this.saveMenuBarItem = new System.Windows.Forms.ToolStripButton();
|
this.saveMenuBarItem = new System.Windows.Forms.ToolStripButton();
|
||||||
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.treeMenuRoot = new System.Windows.Forms.ContextMenuStrip(this.components);
|
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.toolStripMenuItem17 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripMenuItem18 = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripMenuItem18 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.toolStripMenuItem20 = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripMenuItem20 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.toolStripMenuItem22 = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripMenuItem22 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.treeView1 = new bzit.bomg.BookmarkTreeView();
|
this.treeView1 = new RyzStudio.Windows.Forms.BookmarkTreeView();
|
||||||
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
|
this.pageTreeNodeMenu.SuspendLayout();
|
||||||
this.treeMenuItem.SuspendLayout();
|
|
||||||
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).BeginInit();
|
||||||
this.toolStrip1.SuspendLayout();
|
this.toolStrip1.SuspendLayout();
|
||||||
this.treeMenuFolder.SuspendLayout();
|
this.folderTreeNodeMenu.SuspendLayout();
|
||||||
this.toolStrip2.SuspendLayout();
|
this.toolStrip2.SuspendLayout();
|
||||||
this.treeMenuRoot.SuspendLayout();
|
this.rootTreeNodeMenu.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// treeMenuItem
|
// pageTreeNodeMenu
|
||||||
//
|
//
|
||||||
this.treeMenuItem.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.pageTreeNodeMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.toolStripMenuItem4,
|
this.toolStripMenuItem4,
|
||||||
this.toolStripSeparator3,
|
this.toolStripSeparator3,
|
||||||
this.toolStripMenuItem8,
|
this.toolStripMenuItem8,
|
||||||
@ -118,15 +121,15 @@ namespace bzit.bomg
|
|||||||
this.toolStripSeparator2,
|
this.toolStripSeparator2,
|
||||||
this.listViewMenuItem1,
|
this.listViewMenuItem1,
|
||||||
this.moveFileToToolStripMenuItem});
|
this.moveFileToToolStripMenuItem});
|
||||||
this.treeMenuItem.Name = "listViewMenu";
|
this.pageTreeNodeMenu.Name = "listViewMenu";
|
||||||
this.treeMenuItem.Size = new System.Drawing.Size(139, 126);
|
this.pageTreeNodeMenu.Size = new System.Drawing.Size(139, 126);
|
||||||
//
|
//
|
||||||
// toolStripMenuItem4
|
// toolStripMenuItem4
|
||||||
//
|
//
|
||||||
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
|
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
|
||||||
this.toolStripMenuItem4.Size = new System.Drawing.Size(138, 22);
|
this.toolStripMenuItem4.Size = new System.Drawing.Size(138, 22);
|
||||||
this.toolStripMenuItem4.Text = "&Open";
|
this.toolStripMenuItem4.Text = "&Open";
|
||||||
this.toolStripMenuItem4.Click += new System.EventHandler(this.toolStripMenuItem4_Click);
|
this.toolStripMenuItem4.Click += new System.EventHandler(this.openContextMenu_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator3
|
// toolStripSeparator3
|
||||||
//
|
//
|
||||||
@ -138,14 +141,14 @@ namespace bzit.bomg
|
|||||||
this.toolStripMenuItem8.Name = "toolStripMenuItem8";
|
this.toolStripMenuItem8.Name = "toolStripMenuItem8";
|
||||||
this.toolStripMenuItem8.Size = new System.Drawing.Size(138, 22);
|
this.toolStripMenuItem8.Size = new System.Drawing.Size(138, 22);
|
||||||
this.toolStripMenuItem8.Text = "E&dit";
|
this.toolStripMenuItem8.Text = "E&dit";
|
||||||
this.toolStripMenuItem8.Click += new System.EventHandler(this.toolStripMenuItem8_Click);
|
this.toolStripMenuItem8.Click += new System.EventHandler(this.editContextMenu3_Click);
|
||||||
//
|
//
|
||||||
// toolStripMenuItem6
|
// toolStripMenuItem6
|
||||||
//
|
//
|
||||||
this.toolStripMenuItem6.Name = "toolStripMenuItem6";
|
this.toolStripMenuItem6.Name = "toolStripMenuItem6";
|
||||||
this.toolStripMenuItem6.Size = new System.Drawing.Size(138, 22);
|
this.toolStripMenuItem6.Size = new System.Drawing.Size(138, 22);
|
||||||
this.toolStripMenuItem6.Text = "D&elete";
|
this.toolStripMenuItem6.Text = "D&elete";
|
||||||
this.toolStripMenuItem6.Click += new System.EventHandler(this.toolStripMenuItem6_Click);
|
this.toolStripMenuItem6.Click += new System.EventHandler(this.deleteContextMenu2_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator2
|
// toolStripSeparator2
|
||||||
//
|
//
|
||||||
@ -157,14 +160,14 @@ namespace bzit.bomg
|
|||||||
this.listViewMenuItem1.Name = "listViewMenuItem1";
|
this.listViewMenuItem1.Name = "listViewMenuItem1";
|
||||||
this.listViewMenuItem1.Size = new System.Drawing.Size(138, 22);
|
this.listViewMenuItem1.Size = new System.Drawing.Size(138, 22);
|
||||||
this.listViewMenuItem1.Text = "Move &Up";
|
this.listViewMenuItem1.Text = "Move &Up";
|
||||||
this.listViewMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem12_Click);
|
this.listViewMenuItem1.Click += new System.EventHandler(this.moveUpContextMenu2_Click);
|
||||||
//
|
//
|
||||||
// moveFileToToolStripMenuItem
|
// moveFileToToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.moveFileToToolStripMenuItem.Name = "moveFileToToolStripMenuItem";
|
this.moveFileToToolStripMenuItem.Name = "moveFileToToolStripMenuItem";
|
||||||
this.moveFileToToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
|
this.moveFileToToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
|
||||||
this.moveFileToToolStripMenuItem.Text = "Move &Down";
|
this.moveFileToToolStripMenuItem.Text = "Move &Down";
|
||||||
this.moveFileToToolStripMenuItem.Click += new System.EventHandler(this.toolStripMenuItem13_Click);
|
this.moveFileToToolStripMenuItem.Click += new System.EventHandler(this.moveDownContextMenu2_Click);
|
||||||
//
|
//
|
||||||
// statusBar1
|
// statusBar1
|
||||||
//
|
//
|
||||||
@ -249,7 +252,7 @@ namespace bzit.bomg
|
|||||||
this.newFileMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
|
this.newFileMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
|
||||||
this.newFileMenuItem.Size = new System.Drawing.Size(186, 22);
|
this.newFileMenuItem.Size = new System.Drawing.Size(186, 22);
|
||||||
this.newFileMenuItem.Text = "&New";
|
this.newFileMenuItem.Text = "&New";
|
||||||
this.newFileMenuItem.Click += new System.EventHandler(this.newSessionToolStripMenuItem_Click);
|
this.newFileMenuItem.Click += new System.EventHandler(this.newMenuItem_Click);
|
||||||
//
|
//
|
||||||
// openFileMenuItem
|
// openFileMenuItem
|
||||||
//
|
//
|
||||||
@ -258,7 +261,7 @@ namespace bzit.bomg
|
|||||||
this.openFileMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
|
this.openFileMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
|
||||||
this.openFileMenuItem.Size = new System.Drawing.Size(186, 22);
|
this.openFileMenuItem.Size = new System.Drawing.Size(186, 22);
|
||||||
this.openFileMenuItem.Text = "&Open";
|
this.openFileMenuItem.Text = "&Open";
|
||||||
this.openFileMenuItem.Click += new System.EventHandler(this.toolStripMenuItem2_Click);
|
this.openFileMenuItem.Click += new System.EventHandler(this.openMenuItem_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator1
|
// toolStripSeparator1
|
||||||
//
|
//
|
||||||
@ -271,7 +274,7 @@ namespace bzit.bomg
|
|||||||
this.closeFileMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W)));
|
this.closeFileMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W)));
|
||||||
this.closeFileMenuItem.Size = new System.Drawing.Size(186, 22);
|
this.closeFileMenuItem.Size = new System.Drawing.Size(186, 22);
|
||||||
this.closeFileMenuItem.Text = "&Close";
|
this.closeFileMenuItem.Text = "&Close";
|
||||||
this.closeFileMenuItem.Click += new System.EventHandler(this.toolStripMenuItem3_Click);
|
this.closeFileMenuItem.Click += new System.EventHandler(this.closeMenuItem_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator4
|
// toolStripSeparator4
|
||||||
//
|
//
|
||||||
@ -320,7 +323,7 @@ namespace bzit.bomg
|
|||||||
this.exitFileMenuItem.Name = "exitFileMenuItem";
|
this.exitFileMenuItem.Name = "exitFileMenuItem";
|
||||||
this.exitFileMenuItem.Size = new System.Drawing.Size(186, 22);
|
this.exitFileMenuItem.Size = new System.Drawing.Size(186, 22);
|
||||||
this.exitFileMenuItem.Text = "E&xit";
|
this.exitFileMenuItem.Text = "E&xit";
|
||||||
this.exitFileMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem1_Click);
|
this.exitFileMenuItem.Click += new System.EventHandler(this.exitMenuItem_Click);
|
||||||
//
|
//
|
||||||
// toolStripDropDownButton2
|
// toolStripDropDownButton2
|
||||||
//
|
//
|
||||||
@ -466,9 +469,9 @@ namespace bzit.bomg
|
|||||||
this.openFileDialog.Filter = "Bookmarks files|*.ryz";
|
this.openFileDialog.Filter = "Bookmarks files|*.ryz";
|
||||||
this.openFileDialog.Title = "Open bookmarks file";
|
this.openFileDialog.Title = "Open bookmarks file";
|
||||||
//
|
//
|
||||||
// treeMenuFolder
|
// folderTreeNodeMenu
|
||||||
//
|
//
|
||||||
this.treeMenuFolder.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.folderTreeNodeMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.toolStripMenuItem15,
|
this.toolStripMenuItem15,
|
||||||
this.toolStripMenuItem16,
|
this.toolStripMenuItem16,
|
||||||
this.toolStripSeparator5,
|
this.toolStripSeparator5,
|
||||||
@ -480,20 +483,22 @@ namespace bzit.bomg
|
|||||||
this.toolStripSeparator11,
|
this.toolStripSeparator11,
|
||||||
this.toolStripMenuItem12,
|
this.toolStripMenuItem12,
|
||||||
this.toolStripMenuItem13});
|
this.toolStripMenuItem13});
|
||||||
this.treeMenuFolder.Name = "listViewMenu";
|
this.folderTreeNodeMenu.Name = "listViewMenu";
|
||||||
this.treeMenuFolder.Size = new System.Drawing.Size(139, 198);
|
this.folderTreeNodeMenu.Size = new System.Drawing.Size(139, 198);
|
||||||
//
|
//
|
||||||
// toolStripMenuItem15
|
// toolStripMenuItem15
|
||||||
//
|
//
|
||||||
this.toolStripMenuItem15.Name = "toolStripMenuItem15";
|
this.toolStripMenuItem15.Name = "toolStripMenuItem15";
|
||||||
this.toolStripMenuItem15.Size = new System.Drawing.Size(138, 22);
|
this.toolStripMenuItem15.Size = new System.Drawing.Size(138, 22);
|
||||||
this.toolStripMenuItem15.Text = "Add &Page";
|
this.toolStripMenuItem15.Text = "Add &Page";
|
||||||
|
this.toolStripMenuItem15.Click += new System.EventHandler(this.addPageContextMenu2_Click);
|
||||||
//
|
//
|
||||||
// toolStripMenuItem16
|
// toolStripMenuItem16
|
||||||
//
|
//
|
||||||
this.toolStripMenuItem16.Name = "toolStripMenuItem16";
|
this.toolStripMenuItem16.Name = "toolStripMenuItem16";
|
||||||
this.toolStripMenuItem16.Size = new System.Drawing.Size(138, 22);
|
this.toolStripMenuItem16.Size = new System.Drawing.Size(138, 22);
|
||||||
this.toolStripMenuItem16.Text = "Add &Folder";
|
this.toolStripMenuItem16.Text = "Add &Folder";
|
||||||
|
this.toolStripMenuItem16.Click += new System.EventHandler(this.addFolderContextMenu2_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator5
|
// toolStripSeparator5
|
||||||
//
|
//
|
||||||
@ -505,21 +510,21 @@ namespace bzit.bomg
|
|||||||
this.toolStripMenuItem14.Name = "toolStripMenuItem14";
|
this.toolStripMenuItem14.Name = "toolStripMenuItem14";
|
||||||
this.toolStripMenuItem14.Size = new System.Drawing.Size(138, 22);
|
this.toolStripMenuItem14.Size = new System.Drawing.Size(138, 22);
|
||||||
this.toolStripMenuItem14.Text = "&Open All";
|
this.toolStripMenuItem14.Text = "&Open All";
|
||||||
this.toolStripMenuItem14.Click += new System.EventHandler(this.toolStripMenuItem14_Click);
|
this.toolStripMenuItem14.Click += new System.EventHandler(this.openAllContextMenu_Click);
|
||||||
//
|
//
|
||||||
// toolStripMenuItem9
|
// toolStripMenuItem9
|
||||||
//
|
//
|
||||||
this.toolStripMenuItem9.Name = "toolStripMenuItem9";
|
this.toolStripMenuItem9.Name = "toolStripMenuItem9";
|
||||||
this.toolStripMenuItem9.Size = new System.Drawing.Size(138, 22);
|
this.toolStripMenuItem9.Size = new System.Drawing.Size(138, 22);
|
||||||
this.toolStripMenuItem9.Text = "Edi&t";
|
this.toolStripMenuItem9.Text = "Edi&t";
|
||||||
this.toolStripMenuItem9.Click += new System.EventHandler(this.toolStripMenuItem9_Click);
|
this.toolStripMenuItem9.Click += new System.EventHandler(this.editContextMenu2_Click);
|
||||||
//
|
//
|
||||||
// toolStripMenuItem11
|
// toolStripMenuItem11
|
||||||
//
|
//
|
||||||
this.toolStripMenuItem11.Name = "toolStripMenuItem11";
|
this.toolStripMenuItem11.Name = "toolStripMenuItem11";
|
||||||
this.toolStripMenuItem11.Size = new System.Drawing.Size(138, 22);
|
this.toolStripMenuItem11.Size = new System.Drawing.Size(138, 22);
|
||||||
this.toolStripMenuItem11.Text = "D&elete";
|
this.toolStripMenuItem11.Text = "D&elete";
|
||||||
this.toolStripMenuItem11.Click += new System.EventHandler(this.toolStripMenuItem6_Click);
|
this.toolStripMenuItem11.Click += new System.EventHandler(this.deleteContextMenu_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator7
|
// toolStripSeparator7
|
||||||
//
|
//
|
||||||
@ -531,7 +536,7 @@ namespace bzit.bomg
|
|||||||
this.sortToolStripMenuItem.Name = "sortToolStripMenuItem";
|
this.sortToolStripMenuItem.Name = "sortToolStripMenuItem";
|
||||||
this.sortToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
|
this.sortToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
|
||||||
this.sortToolStripMenuItem.Text = "&Sort";
|
this.sortToolStripMenuItem.Text = "&Sort";
|
||||||
this.sortToolStripMenuItem.Click += new System.EventHandler(this.sortToolStripMenuItem_Click);
|
this.sortToolStripMenuItem.Click += new System.EventHandler(this.sortContextMenu2_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator11
|
// toolStripSeparator11
|
||||||
//
|
//
|
||||||
@ -543,14 +548,14 @@ namespace bzit.bomg
|
|||||||
this.toolStripMenuItem12.Name = "toolStripMenuItem12";
|
this.toolStripMenuItem12.Name = "toolStripMenuItem12";
|
||||||
this.toolStripMenuItem12.Size = new System.Drawing.Size(138, 22);
|
this.toolStripMenuItem12.Size = new System.Drawing.Size(138, 22);
|
||||||
this.toolStripMenuItem12.Text = "Move &Up";
|
this.toolStripMenuItem12.Text = "Move &Up";
|
||||||
this.toolStripMenuItem12.Click += new System.EventHandler(this.toolStripMenuItem12_Click);
|
this.toolStripMenuItem12.Click += new System.EventHandler(this.moveUpContextMenu_Click);
|
||||||
//
|
//
|
||||||
// toolStripMenuItem13
|
// toolStripMenuItem13
|
||||||
//
|
//
|
||||||
this.toolStripMenuItem13.Name = "toolStripMenuItem13";
|
this.toolStripMenuItem13.Name = "toolStripMenuItem13";
|
||||||
this.toolStripMenuItem13.Size = new System.Drawing.Size(138, 22);
|
this.toolStripMenuItem13.Size = new System.Drawing.Size(138, 22);
|
||||||
this.toolStripMenuItem13.Text = "Move &Down";
|
this.toolStripMenuItem13.Text = "Move &Down";
|
||||||
this.toolStripMenuItem13.Click += new System.EventHandler(this.toolStripMenuItem13_Click);
|
this.toolStripMenuItem13.Click += new System.EventHandler(this.moveDownContextMenu_Click);
|
||||||
//
|
//
|
||||||
// saveFileDialog
|
// saveFileDialog
|
||||||
//
|
//
|
||||||
@ -567,7 +572,8 @@ namespace bzit.bomg
|
|||||||
this.openMenuBarItem,
|
this.openMenuBarItem,
|
||||||
this.saveMenuBarItem,
|
this.saveMenuBarItem,
|
||||||
this.toolStripSeparator9,
|
this.toolStripSeparator9,
|
||||||
this.toolStripButton1});
|
this.toolStripButton1,
|
||||||
|
this.toolStripButton2});
|
||||||
this.toolStrip2.Location = new System.Drawing.Point(0, 25);
|
this.toolStrip2.Location = new System.Drawing.Point(0, 25);
|
||||||
this.toolStrip2.Name = "toolStrip2";
|
this.toolStrip2.Name = "toolStrip2";
|
||||||
this.toolStrip2.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
|
this.toolStrip2.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
|
||||||
@ -584,7 +590,7 @@ namespace bzit.bomg
|
|||||||
this.newMenuBarItem.Size = new System.Drawing.Size(23, 22);
|
this.newMenuBarItem.Size = new System.Drawing.Size(23, 22);
|
||||||
this.newMenuBarItem.Text = "toolStripButton1";
|
this.newMenuBarItem.Text = "toolStripButton1";
|
||||||
this.newMenuBarItem.ToolTipText = "New";
|
this.newMenuBarItem.ToolTipText = "New";
|
||||||
this.newMenuBarItem.Click += new System.EventHandler(this.newSessionToolStripMenuItem_Click);
|
this.newMenuBarItem.Click += new System.EventHandler(this.newMenuItem_Click);
|
||||||
//
|
//
|
||||||
// openMenuBarItem
|
// openMenuBarItem
|
||||||
//
|
//
|
||||||
@ -595,7 +601,7 @@ namespace bzit.bomg
|
|||||||
this.openMenuBarItem.Size = new System.Drawing.Size(23, 22);
|
this.openMenuBarItem.Size = new System.Drawing.Size(23, 22);
|
||||||
this.openMenuBarItem.Text = "toolStripButton2";
|
this.openMenuBarItem.Text = "toolStripButton2";
|
||||||
this.openMenuBarItem.ToolTipText = "Open";
|
this.openMenuBarItem.ToolTipText = "Open";
|
||||||
this.openMenuBarItem.Click += new System.EventHandler(this.toolStripMenuItem2_Click);
|
this.openMenuBarItem.Click += new System.EventHandler(this.openMenuItem_Click);
|
||||||
//
|
//
|
||||||
// saveMenuBarItem
|
// saveMenuBarItem
|
||||||
//
|
//
|
||||||
@ -613,29 +619,49 @@ namespace bzit.bomg
|
|||||||
this.toolStripSeparator9.Name = "toolStripSeparator9";
|
this.toolStripSeparator9.Name = "toolStripSeparator9";
|
||||||
this.toolStripSeparator9.Size = new System.Drawing.Size(6, 25);
|
this.toolStripSeparator9.Size = new System.Drawing.Size(6, 25);
|
||||||
//
|
//
|
||||||
// treeMenuRoot
|
// toolStripButton1
|
||||||
//
|
//
|
||||||
this.treeMenuRoot.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
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[] {
|
||||||
this.toolStripMenuItem17,
|
this.toolStripMenuItem17,
|
||||||
this.toolStripMenuItem18,
|
this.toolStripMenuItem18,
|
||||||
this.toolStripSeparator10,
|
this.toolStripSeparator10,
|
||||||
this.toolStripMenuItem20,
|
this.toolStripMenuItem20,
|
||||||
this.toolStripSeparator13,
|
this.toolStripSeparator13,
|
||||||
this.toolStripMenuItem22});
|
this.toolStripMenuItem22});
|
||||||
this.treeMenuRoot.Name = "listViewMenu";
|
this.rootTreeNodeMenu.Name = "listViewMenu";
|
||||||
this.treeMenuRoot.Size = new System.Drawing.Size(133, 104);
|
this.rootTreeNodeMenu.Size = new System.Drawing.Size(133, 104);
|
||||||
//
|
//
|
||||||
// toolStripMenuItem17
|
// toolStripMenuItem17
|
||||||
//
|
//
|
||||||
this.toolStripMenuItem17.Name = "toolStripMenuItem17";
|
this.toolStripMenuItem17.Name = "toolStripMenuItem17";
|
||||||
this.toolStripMenuItem17.Size = new System.Drawing.Size(132, 22);
|
this.toolStripMenuItem17.Size = new System.Drawing.Size(132, 22);
|
||||||
this.toolStripMenuItem17.Text = "Add &Page";
|
this.toolStripMenuItem17.Text = "Add &Page";
|
||||||
|
this.toolStripMenuItem17.Click += new System.EventHandler(this.addPageContextMenu_Click);
|
||||||
//
|
//
|
||||||
// toolStripMenuItem18
|
// toolStripMenuItem18
|
||||||
//
|
//
|
||||||
this.toolStripMenuItem18.Name = "toolStripMenuItem18";
|
this.toolStripMenuItem18.Name = "toolStripMenuItem18";
|
||||||
this.toolStripMenuItem18.Size = new System.Drawing.Size(132, 22);
|
this.toolStripMenuItem18.Size = new System.Drawing.Size(132, 22);
|
||||||
this.toolStripMenuItem18.Text = "Add &Folder";
|
this.toolStripMenuItem18.Text = "Add &Folder";
|
||||||
|
this.toolStripMenuItem18.Click += new System.EventHandler(this.addFolderContextMenu_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator10
|
// toolStripSeparator10
|
||||||
//
|
//
|
||||||
@ -647,7 +673,7 @@ namespace bzit.bomg
|
|||||||
this.toolStripMenuItem20.Name = "toolStripMenuItem20";
|
this.toolStripMenuItem20.Name = "toolStripMenuItem20";
|
||||||
this.toolStripMenuItem20.Size = new System.Drawing.Size(132, 22);
|
this.toolStripMenuItem20.Size = new System.Drawing.Size(132, 22);
|
||||||
this.toolStripMenuItem20.Text = "Edi&t";
|
this.toolStripMenuItem20.Text = "Edi&t";
|
||||||
this.toolStripMenuItem20.Click += new System.EventHandler(this.toolStripMenuItem9_Click);
|
this.toolStripMenuItem20.Click += new System.EventHandler(this.editContextMenu_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator13
|
// toolStripSeparator13
|
||||||
//
|
//
|
||||||
@ -659,7 +685,7 @@ namespace bzit.bomg
|
|||||||
this.toolStripMenuItem22.Name = "toolStripMenuItem22";
|
this.toolStripMenuItem22.Name = "toolStripMenuItem22";
|
||||||
this.toolStripMenuItem22.Size = new System.Drawing.Size(132, 22);
|
this.toolStripMenuItem22.Size = new System.Drawing.Size(132, 22);
|
||||||
this.toolStripMenuItem22.Text = "&Sort";
|
this.toolStripMenuItem22.Text = "&Sort";
|
||||||
this.toolStripMenuItem22.Click += new System.EventHandler(this.sortToolStripMenuItem_Click);
|
this.toolStripMenuItem22.Click += new System.EventHandler(this.sortContextMenu_Click);
|
||||||
//
|
//
|
||||||
// treeView1
|
// treeView1
|
||||||
//
|
//
|
||||||
@ -681,16 +707,6 @@ namespace bzit.bomg
|
|||||||
this.treeView1.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView2_NodeMouseDoubleClick);
|
this.treeView1.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView2_NodeMouseDoubleClick);
|
||||||
this.treeView1.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.treeView1_PreviewKeyDown);
|
this.treeView1.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.treeView1_PreviewKeyDown);
|
||||||
//
|
//
|
||||||
// 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);
|
|
||||||
//
|
|
||||||
// MainForm
|
// MainForm
|
||||||
//
|
//
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
@ -706,15 +722,15 @@ namespace bzit.bomg
|
|||||||
this.Name = "MainForm";
|
this.Name = "MainForm";
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
|
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
|
||||||
this.Text = "Bookmark Manager";
|
this.Text = "Bookmark Manager";
|
||||||
this.treeMenuItem.ResumeLayout(false);
|
this.pageTreeNodeMenu.ResumeLayout(false);
|
||||||
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).EndInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).EndInit();
|
||||||
this.toolStrip1.ResumeLayout(false);
|
this.toolStrip1.ResumeLayout(false);
|
||||||
this.toolStrip1.PerformLayout();
|
this.toolStrip1.PerformLayout();
|
||||||
this.treeMenuFolder.ResumeLayout(false);
|
this.folderTreeNodeMenu.ResumeLayout(false);
|
||||||
this.toolStrip2.ResumeLayout(false);
|
this.toolStrip2.ResumeLayout(false);
|
||||||
this.toolStrip2.PerformLayout();
|
this.toolStrip2.PerformLayout();
|
||||||
this.treeMenuRoot.ResumeLayout(false);
|
this.rootTreeNodeMenu.ResumeLayout(false);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
@ -725,7 +741,7 @@ namespace bzit.bomg
|
|||||||
private System.Windows.Forms.StatusBar statusBar1;
|
private System.Windows.Forms.StatusBar statusBar1;
|
||||||
private System.Windows.Forms.StatusBarPanel statusBarPanel1;
|
private System.Windows.Forms.StatusBarPanel statusBarPanel1;
|
||||||
private System.Windows.Forms.StatusBarPanel statusBarPanel2;
|
private System.Windows.Forms.StatusBarPanel statusBarPanel2;
|
||||||
private System.Windows.Forms.ContextMenuStrip treeMenuItem;
|
private System.Windows.Forms.ContextMenuStrip pageTreeNodeMenu;
|
||||||
private System.Windows.Forms.ToolStripMenuItem listViewMenuItem1;
|
private System.Windows.Forms.ToolStripMenuItem listViewMenuItem1;
|
||||||
private System.Windows.Forms.ToolStripMenuItem moveFileToToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem moveFileToToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolTip oToolTip1;
|
private System.Windows.Forms.ToolTip oToolTip1;
|
||||||
@ -758,7 +774,7 @@ namespace bzit.bomg
|
|||||||
public BookmarkTreeView treeView1;
|
public BookmarkTreeView treeView1;
|
||||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem4;
|
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem4;
|
||||||
private System.Windows.Forms.OpenFileDialog openFileDialog;
|
private System.Windows.Forms.OpenFileDialog openFileDialog;
|
||||||
private System.Windows.Forms.ContextMenuStrip treeMenuFolder;
|
private System.Windows.Forms.ContextMenuStrip folderTreeNodeMenu;
|
||||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem9;
|
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem9;
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
|
||||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem11;
|
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem11;
|
||||||
@ -778,7 +794,7 @@ namespace bzit.bomg
|
|||||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem15;
|
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem15;
|
||||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem16;
|
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem16;
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator11;
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator11;
|
||||||
private System.Windows.Forms.ContextMenuStrip treeMenuRoot;
|
private System.Windows.Forms.ContextMenuStrip rootTreeNodeMenu;
|
||||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem17;
|
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem17;
|
||||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem18;
|
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem18;
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator10;
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator10;
|
||||||
@ -791,6 +807,7 @@ namespace bzit.bomg
|
|||||||
private System.Windows.Forms.ToolStripMenuItem updateIconsToolMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem updateIconsToolMenuItem;
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator14;
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator14;
|
||||||
private System.Windows.Forms.ToolStripButton toolStripButton1;
|
private System.Windows.Forms.ToolStripButton toolStripButton1;
|
||||||
|
private System.Windows.Forms.ToolStripButton toolStripButton2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
378
MainForm.cs
378
MainForm.cs
@ -28,13 +28,6 @@ namespace bzit.bomg
|
|||||||
{
|
{
|
||||||
base.OnLoad(e);
|
base.OnLoad(e);
|
||||||
|
|
||||||
this.IconDatabase = new IconDatabase();
|
|
||||||
|
|
||||||
// toolbar
|
|
||||||
viewHelpHelpMenuItem.Enabled = File.Exists(Path.ChangeExtension(Application.ExecutablePath, ".chm"));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool rv = false;
|
bool rv = false;
|
||||||
string iconDBFilename = Path.ChangeExtension(Application.ExecutablePath, ".db");
|
string iconDBFilename = Path.ChangeExtension(Application.ExecutablePath, ".db");
|
||||||
|
|
||||||
@ -42,10 +35,32 @@ namespace bzit.bomg
|
|||||||
rv = treeView1.InitialiseIconDatabase(out errorMessage, iconDBFilename);
|
rv = treeView1.InitialiseIconDatabase(out errorMessage, iconDBFilename);
|
||||||
if (!rv)
|
if (!rv)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Can not find icon database. [" + this.IconDatabase.LastError + "]");
|
MessageBox.Show("Can not find icon database. [" + errorMessage + "]");
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//this.IconDatabase = new IconDatabase();
|
||||||
|
|
||||||
|
// 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);
|
sessionFileFormat = new SessionFileFormat(this);
|
||||||
this.ApplicationMode = AppMode.Clear;
|
this.ApplicationMode = AppMode.Clear;
|
||||||
|
|
||||||
@ -117,7 +132,7 @@ namespace bzit.bomg
|
|||||||
|
|
||||||
protected override void OnFormClosing(FormClosingEventArgs e)
|
protected override void OnFormClosing(FormClosingEventArgs e)
|
||||||
{
|
{
|
||||||
this.IconDatabase?.Close();
|
//this.IconDatabase?.Close();
|
||||||
|
|
||||||
if (this.ApplicationMode == AppMode.Clear)
|
if (this.ApplicationMode == AppMode.Clear)
|
||||||
{
|
{
|
||||||
@ -196,7 +211,7 @@ namespace bzit.bomg
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#region public properties
|
//#region public properties
|
||||||
|
|
||||||
public AppMode ApplicationMode
|
public AppMode ApplicationMode
|
||||||
{
|
{
|
||||||
@ -243,26 +258,23 @@ namespace bzit.bomg
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[DefaultValue(null)]
|
//[DefaultValue(null)]
|
||||||
public IconDatabase IconDatabase { get; set; }
|
//public IconDatabase IconDatabase { get; set; }
|
||||||
|
|
||||||
#endregion
|
//#endregion
|
||||||
|
|
||||||
#region Toolbar #1
|
#region Toolbar #1
|
||||||
|
|
||||||
/**
|
private void newMenuItem_Click(object sender, EventArgs e)
|
||||||
* File -> New
|
|
||||||
*/
|
|
||||||
private void newSessionToolStripMenuItem_Click(object sender, EventArgs e)
|
|
||||||
{
|
{
|
||||||
NewSessionForm oNewSession = new NewSessionForm(this);
|
NewSessionForm newSessionForm = new NewSessionForm(this);
|
||||||
oNewSession.ShowDialog();
|
newSessionForm.ShowDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* File -> Open
|
* File -> Open
|
||||||
*/
|
*/
|
||||||
private void toolStripMenuItem2_Click(object sender, EventArgs e)
|
private void openMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
@ -275,7 +287,7 @@ namespace bzit.bomg
|
|||||||
/**
|
/**
|
||||||
* File -> Close
|
* File -> Close
|
||||||
*/
|
*/
|
||||||
private void toolStripMenuItem3_Click(object sender, EventArgs e)
|
private void closeMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (ApplicationMode == AppMode.Clear)
|
if (ApplicationMode == AppMode.Clear)
|
||||||
{
|
{
|
||||||
@ -363,7 +375,7 @@ namespace bzit.bomg
|
|||||||
/**
|
/**
|
||||||
* File -> Exit
|
* File -> Exit
|
||||||
*/
|
*/
|
||||||
private void exitToolStripMenuItem1_Click(object sender, EventArgs e) { this.Close(); }
|
private void exitMenuItem_Click(object sender, EventArgs e) { this.Close(); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find
|
* Find
|
||||||
@ -476,39 +488,39 @@ namespace bzit.bomg
|
|||||||
/**
|
/**
|
||||||
* Node -> Open
|
* Node -> Open
|
||||||
*/
|
*/
|
||||||
private void toolStripMenuItem4_Click(object sender, EventArgs e)
|
//private void toolStripMenuItem4_Click(object sender, EventArgs e)
|
||||||
{
|
//{
|
||||||
openBookmark(treeView1.SelectedNode);
|
// openBookmark(treeView1.SelectedNode);
|
||||||
}
|
//}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Node -> Edit
|
* Node -> Edit
|
||||||
*/
|
*/
|
||||||
private void toolStripMenuItem8_Click(object sender, EventArgs e)
|
//private void toolStripMenuItem8_Click(object sender, EventArgs e)
|
||||||
{
|
//{
|
||||||
if (treeView1.SelectedNode == null)
|
// if (treeView1.SelectedNode == null)
|
||||||
{
|
// {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
treeView1.HasChanged = true;
|
// treeView1.HasChanged = true;
|
||||||
|
|
||||||
TreeNode tn = treeView1.SelectedNode;
|
// TreeNode tn = treeView1.SelectedNode;
|
||||||
BookmarkEditForm oBookmarkEdit = new BookmarkEditForm(ref tn);
|
// //##BookmarkEditForm oBookmarkEdit = new BookmarkEditForm(ref tn);
|
||||||
oBookmarkEdit.ShowDialog();
|
// //##oBookmarkEdit.ShowDialog();
|
||||||
}
|
//}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Node -> Delete
|
* Node -> Delete
|
||||||
*/
|
*/
|
||||||
private void toolStripMenuItem6_Click(object sender, EventArgs e) => treeView1.SNode.Delete();
|
//private void toolStripMenuItem6_Click(object sender, EventArgs e) => treeView1.SNode.Delete();
|
||||||
//{
|
//{
|
||||||
// treeView1.DeleteNode();
|
// treeView1.DeleteNode();
|
||||||
//}
|
//}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region TreeView Menu - folder
|
//#region TreeView Menu - folder
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add Page
|
* Add Page
|
||||||
@ -523,49 +535,36 @@ namespace bzit.bomg
|
|||||||
/**
|
/**
|
||||||
* Open All
|
* Open All
|
||||||
*/
|
*/
|
||||||
private void toolStripMenuItem14_Click(object sender, EventArgs e)
|
//private void toolStripMenuItem14_Click(object sender, EventArgs e)
|
||||||
{
|
//{
|
||||||
if (treeView1.SelectedNode == null)
|
// if (treeView1.SelectedNode == null)
|
||||||
{
|
// {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
foreach (TreeNode tn in treeView1.SelectedNode.Nodes)
|
// foreach (TreeNode tn in treeView1.SelectedNode.Nodes)
|
||||||
{
|
// {
|
||||||
if (tn.Tag == null)
|
// if (tn.Tag == null)
|
||||||
{
|
// {
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
|
|
||||||
openBookmark(tn);
|
// openBookmark(tn);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Edit
|
* Edit
|
||||||
*/
|
*/
|
||||||
private void toolStripMenuItem9_Click(object sender, EventArgs e)
|
//private void toolStripMenuItem9_Click(object sender, EventArgs e)
|
||||||
{
|
//{
|
||||||
treeView1.HasChanged = true;
|
// treeView1.HasChanged = true;
|
||||||
treeView1.EditNode();
|
// //##treeView1.EditNode();
|
||||||
}
|
//}
|
||||||
|
|
||||||
/**
|
|
||||||
* Move Up
|
|
||||||
*/
|
|
||||||
private void toolStripMenuItem12_Click(object sender, EventArgs e) => treeView1.SNode.MoveUp();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Move Down
|
|
||||||
*/
|
|
||||||
private void toolStripMenuItem13_Click(object sender, EventArgs e) => treeView1.SNode.MoveDown();
|
|
||||||
|
|
||||||
/**
|
//#endregion
|
||||||
* Sort
|
|
||||||
*/
|
|
||||||
private void sortToolStripMenuItem_Click(object sender, EventArgs e) => treeView1.SNode.Sort();
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
protected void OpenBookmarkFile(string filename)
|
protected void OpenBookmarkFile(string filename)
|
||||||
{
|
{
|
||||||
@ -636,7 +635,33 @@ namespace bzit.bomg
|
|||||||
|
|
||||||
private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
|
private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.Node == null)
|
if (e.Button != MouseButtons.Right)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (treeView1.SNode.GetNodeType())
|
||||||
|
{
|
||||||
|
case RyzStudio.Windows.Forms.BookmarkTreeView.NodeType.Root:
|
||||||
|
rootTreeNodeMenu.Show(Cursor.Position);
|
||||||
|
break;
|
||||||
|
case RyzStudio.Windows.Forms.BookmarkTreeView.NodeType.Folder:
|
||||||
|
folderTreeNodeMenu.Show(Cursor.Position);
|
||||||
|
break;
|
||||||
|
case RyzStudio.Windows.Forms.BookmarkTreeView.NodeType.Page:
|
||||||
|
pageTreeNodeMenu.Show(Cursor.Position);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//BookmarkEditForm editForm = new BookmarkEditForm(treeView1);
|
||||||
|
//editForm.ShowDialog();
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
if (e.Node == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -665,11 +690,11 @@ namespace bzit.bomg
|
|||||||
{
|
{
|
||||||
if (e.Node.Equals(e.Node.TreeView.Nodes[0]))
|
if (e.Node.Equals(e.Node.TreeView.Nodes[0]))
|
||||||
{
|
{
|
||||||
treeMenuRoot.Show(Cursor.Position);
|
rootTreeNodeMenu.Show(Cursor.Position);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
treeMenuFolder.Show(Cursor.Position);
|
folderTreeNodeMenu.Show(Cursor.Position);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -680,7 +705,7 @@ namespace bzit.bomg
|
|||||||
}
|
}
|
||||||
|
|
||||||
BookmarkItem bi = (BookmarkItem)e.Node.Tag;
|
BookmarkItem bi = (BookmarkItem)e.Node.Tag;
|
||||||
treeMenuItem.Show(Cursor.Position);
|
pageTreeNodeMenu.Show(Cursor.Position);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -700,20 +725,20 @@ namespace bzit.bomg
|
|||||||
case Keys.Apps:
|
case Keys.Apps:
|
||||||
treeView1_NodeMouseClick(sender, new TreeNodeMouseClickEventArgs(tn, MouseButtons.Right, 1, tn.Bounds.X, tn.Bounds.Y));
|
treeView1_NodeMouseClick(sender, new TreeNodeMouseClickEventArgs(tn, MouseButtons.Right, 1, tn.Bounds.X, tn.Bounds.Y));
|
||||||
return;
|
return;
|
||||||
case Keys.F2:
|
//case Keys.F2:
|
||||||
if (tn.Tag == null)
|
//if (tn.Tag == null)
|
||||||
{
|
//{
|
||||||
return;
|
// return;
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (!(tn.Tag is BookmarkItem))
|
//if (!(tn.Tag is BookmarkItem))
|
||||||
{
|
//{
|
||||||
return;
|
// return;
|
||||||
}
|
//}
|
||||||
|
|
||||||
toolStripMenuItem8_Click(sender, null);
|
//toolStripMenuItem8_Click(sender, null);
|
||||||
|
|
||||||
break;
|
//break;
|
||||||
case Keys.F3:
|
case Keys.F3:
|
||||||
if (tn.Tag == null)
|
if (tn.Tag == null)
|
||||||
{
|
{
|
||||||
@ -755,88 +780,157 @@ namespace bzit.bomg
|
|||||||
|
|
||||||
protected void openBookmark(TreeNode node)
|
protected void openBookmark(TreeNode node)
|
||||||
{
|
{
|
||||||
if (node == null)
|
if (treeView1.GetNodeType(node) != RyzStudio.Windows.Forms.BookmarkTreeView.NodeType.Page)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (node.Tag == null)
|
BookmarkItemViewModel viewModel = (BookmarkItemViewModel)node.Tag;
|
||||||
|
if (viewModel == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(node.Tag is BookmarkItem))
|
if (string.IsNullOrWhiteSpace(viewModel.SiteAddress))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
BookmarkItem item = (BookmarkItem)node.Tag;
|
try
|
||||||
if (item == null)
|
|
||||||
{
|
{
|
||||||
return;
|
System.Diagnostics.Process.Start(viewModel.SiteAddress);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(item.SiteAddress))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int bookmarkAction;
|
|
||||||
if (!int.TryParse(this.IconDatabase.GetConfig("core.bookmark.action", string.Empty), out bookmarkAction))
|
|
||||||
{
|
|
||||||
bookmarkAction = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
string bookmarkCustom1 = this.IconDatabase.GetConfig("core.bookmark.customcommand1", string.Empty).Trim();
|
|
||||||
string bookmarkCustom2 = this.IconDatabase.GetConfig("core.bookmark.customcommand2", string.Empty).Trim();
|
|
||||||
|
|
||||||
switch (bookmarkAction)
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
if (string.IsNullOrEmpty(bookmarkCustom1))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
bookmarkCustom1 = bookmarkCustom1.Replace("%1", item.SiteAddress);
|
|
||||||
bookmarkCustom2 = bookmarkCustom2.Replace("%1", item.SiteAddress);
|
|
||||||
|
|
||||||
try
|
//if (node == null)
|
||||||
{
|
//{
|
||||||
System.Diagnostics.Process.Start(bookmarkCustom1, bookmarkCustom2);
|
// return;
|
||||||
}
|
//}
|
||||||
catch
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
//if (node.Tag == null)
|
||||||
default:
|
//{
|
||||||
try
|
// return;
|
||||||
{
|
//}
|
||||||
System.Diagnostics.Process.Start(item.SiteAddress);
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
//if (!(node.Tag is BookmarkItem))
|
||||||
}
|
//{
|
||||||
|
// return;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//BookmarkItem item = (BookmarkItem)node.Tag;
|
||||||
|
//if (item == null)
|
||||||
|
//{
|
||||||
|
// return;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//if (string.IsNullOrEmpty(item.SiteAddress))
|
||||||
|
//{
|
||||||
|
// return;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//int bookmarkAction;
|
||||||
|
//if (!int.TryParse(this.IconDatabase.GetConfig("core.bookmark.action", string.Empty), out bookmarkAction))
|
||||||
|
//{
|
||||||
|
// bookmarkAction = 0;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//string bookmarkCustom1 = this.IconDatabase.GetConfig("core.bookmark.customcommand1", string.Empty).Trim();
|
||||||
|
//string bookmarkCustom2 = this.IconDatabase.GetConfig("core.bookmark.customcommand2", string.Empty).Trim();
|
||||||
|
|
||||||
|
//switch (bookmarkAction)
|
||||||
|
//{
|
||||||
|
// case 1:
|
||||||
|
// if (string.IsNullOrEmpty(bookmarkCustom1))
|
||||||
|
// {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// bookmarkCustom1 = bookmarkCustom1.Replace("%1", item.SiteAddress);
|
||||||
|
// bookmarkCustom2 = bookmarkCustom2.Replace("%1", item.SiteAddress);
|
||||||
|
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// System.Diagnostics.Process.Start(bookmarkCustom1, bookmarkCustom2);
|
||||||
|
// }
|
||||||
|
// catch
|
||||||
|
// {
|
||||||
|
// // do nothing
|
||||||
|
// }
|
||||||
|
|
||||||
|
// break;
|
||||||
|
// default:
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// System.Diagnostics.Process.Start(item.SiteAddress);
|
||||||
|
// }
|
||||||
|
// catch
|
||||||
|
// {
|
||||||
|
// // do nothing
|
||||||
|
// }
|
||||||
|
|
||||||
|
// break;
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void toolStripButton1_Click(object sender, EventArgs e)
|
|
||||||
|
#region root context menu
|
||||||
|
|
||||||
|
private void addPageContextMenu_Click(object sender, EventArgs e) => (new BookmarkEditForm(treeView1)).ShowDialog();
|
||||||
|
private void addFolderContextMenu_Click(object sender, EventArgs e) => treeView1.SelectedNode = treeView1.SNode.AddFolder();
|
||||||
|
private void editContextMenu_Click(object sender, EventArgs e) => treeView1.SNode.Edit();
|
||||||
|
private void sortContextMenu_Click(object sender, EventArgs e) => treeView1.SNode.Sort();
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region folder context menu
|
||||||
|
|
||||||
|
private void addPageContextMenu2_Click(object sender, EventArgs e) => (new BookmarkEditForm(treeView1)).ShowDialog();
|
||||||
|
private void addFolderContextMenu2_Click(object sender, EventArgs e) => treeView1.SelectedNode = treeView1.SNode.AddFolder();
|
||||||
|
|
||||||
|
private void openAllContextMenu_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
BookmarkItemModel model = new BookmarkItemModel()
|
if (treeView1.SelectedNode == null)
|
||||||
{
|
{
|
||||||
SiteAddress = "http://www.hiimray.co.uk",
|
return;
|
||||||
TreeviewPath = @"\hello\momo\"
|
}
|
||||||
};
|
|
||||||
model.Update();
|
|
||||||
|
|
||||||
treeView1.AddItem_OnSelectedNode(model.ToViewModel());
|
if (treeView1.SelectedNode.Nodes.Count <= 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//MessageBox.Show(treeView1.Nodes.Count.ToString());
|
foreach (TreeNode item in treeView1.SelectedNode.Nodes)
|
||||||
|
{
|
||||||
|
openBookmark(item);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void editContextMenu2_Click(object sender, EventArgs e) => treeView1.SNode.Edit();
|
||||||
|
private void deleteContextMenu_Click(object sender, EventArgs e) => treeView1.SNode.Delete();
|
||||||
|
private void sortContextMenu2_Click(object sender, EventArgs e) => treeView1.SNode.Sort();
|
||||||
|
private void moveUpContextMenu_Click(object sender, EventArgs e) => treeView1.SNode.MoveUp();
|
||||||
|
private void moveDownContextMenu_Click(object sender, EventArgs e) => treeView1.SNode.MoveDown();
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region page context menu
|
||||||
|
|
||||||
|
private void openContextMenu_Click(object sender, EventArgs e) => openBookmark(treeView1.SelectedNode);
|
||||||
|
private void editContextMenu3_Click(object sender, EventArgs e) => (new BookmarkEditForm(treeView1)).ShowDialog();
|
||||||
|
private void deleteContextMenu2_Click(object sender, EventArgs e) => treeView1.SNode.Delete();
|
||||||
|
private void moveUpContextMenu2_Click(object sender, EventArgs e) => treeView1.SNode.MoveUp();
|
||||||
|
private void moveDownContextMenu2_Click(object sender, EventArgs e) => treeView1.SNode.MoveDown();
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -117,21 +117,21 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<metadata name="treeMenuItem.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="pageTreeNodeMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>412, 17</value>
|
<value>1034, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="oToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="oToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>307, 17</value>
|
<value>333, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
<data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
<value>
|
<value>
|
||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADU
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADU
|
||||||
FwAAAk1TRnQBSQFMAgEBBwEAAWwBAgFsAQIBEAEAARABAAT/AREBAAj/AUIBTQE2BwABNgMAASgDAAFA
|
FwAAAk1TRnQBSQFMAgEBBwEAAcwBAgHMAQIBEAEAARABAAT/AREBAAj/AUIBTQE2BwABNgMAASgDAAFA
|
||||||
AwABIAMAAQEBAAEQBgABEBQAAZkBSgEYAS4BtwEdAbcBGQG3ARkBtwEZAbcBGQG3ARkBtwEZAbcBGQG3
|
AwABIAMAAQEBAAEQBgABEBQAAZkBSgEYAS4BtwEdAbcBGQG3ARkBtwEZAbcBGQG3ARkBtwEZAbcBGQG3
|
||||||
ARkBtwEdARcBLgGZAUoEAAGZAUoBGAEuAbcBHQG3ARkBtwEZAbcBGQG3ARkBtwEZAbcBGQG3ARkBtwEZ
|
ARkBtwEdARcBLgGZAUoEAAGZAUoBGAEuAbcBHQG3ARkBtwEZAbcBGQG3ARkBtwEZAbcBGQG3ARkBtwEZ
|
||||||
AbcBHQEXAS4BmQFKBAABmQFKARgBLgG3AR0BtwEZAbcBGQG3ARkBtwEZAbcBGQG3ARkBtwEZAbcBGQG3
|
AbcBHQEXAS4BmQFKBAABmQFKARgBLgG3AR0BtwEZAbcBGQG3ARkBtwEZAbcBGQG3ARkBtwEZAbcBGQG3
|
||||||
@ -236,7 +236,7 @@
|
|||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>109, 17</value>
|
<value>123, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
<data name="newFileMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="newFileMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
@ -254,29 +254,29 @@
|
|||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>779, 20</value>
|
<value>443, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="treeMenuFolder.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="folderTreeNodeMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>534, 17</value>
|
<value>865, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="saveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="saveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>903, 20</value>
|
<value>576, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>208, 17</value>
|
<value>228, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<data name="newMenuBarItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="newMenuBarItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHZSURBVDhPjZM9SxxRFIaNqfIfIlgJQpDgypZBEAshFkpS
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHaSURBVDhPjZNNSxtRFIatXfU/KHQlFEqRJmRZhNJFoS6U
|
||||||
SECIhYJdolikjFiZJizLYiPpAikC6W1EQiQhM4tK/AAlWOy6X+7szse9d2b09ZxLZpxxNyQHHraY8z77
|
uiiC0C4UuquWLlxWurIbCSF0I90VXAju3ZhBLC01QUv9gEpxkZgvM8l83HtnRt+ec3HGGRPRAw9ZzHmf
|
||||||
3ruzPYl5SGSI7D/oJ3qJjsl4nmcZhnEVhiG6IaVELpd7T7tdJVkOO44D13VjWq0Wms0mKpWKlpTLZeTz
|
vPdm0hebASJFZG7gPtFPdE3KdV2zUCicBUGAXkgpkc1ml2i3pyTDYdu24ThORLvdRqvVQrVa1ZJKpYJc
|
||||||
+Q7JPSLLC0IIKKX0J2PbNizLQrVa1QJqCf6SQqEQSfRoQdAqQl7+0IJIwoF2u41arZY6DsMZnabRAnH8
|
LtcluUNkeEEIAaWU/mQsy4JpmqjValpALcFfks/nQ4keLfDbJcjTn1oQSjjQ6XRQr9cTx2E4o9M0WiAO
|
||||||
GuLXQrwQBIE+d3SUer2um5RKpVvB9fmrB/b+i1Hj89imPJyH3JuBPFuH3/iK0HdSEm7C99FoNG4F8mhu
|
ZiH+zEQLvu/rc4dHaTQaukm5XL4UnB+/u2ftTo5srz5dlnvTkDuvII8W4TU3EXh2QsJN+D6azealQO6/
|
||||||
Qx0tQp4swf+9DnX6FsKYgrMzDLG/kmrCx+E7YVEsAJ7f9/amv8iTZRK8I8EqvOIzeOZLhIHSi4zv+/pe
|
+aL230IezsH7twj19yPE9hhs4zHE7odEEz4O3wmLIgEwcdfdGV+Th+9J8JkEC3BLL+EWXyPwlV5kPM/T
|
||||||
WMLEAp7Ln5NDovgU6mwV6vgNnO1H8K2DOMxwi+hyuU1K4HwfnxDmJNxvj2HvDFL9DNTFlg5FcAOGw52C
|
98ISJhLwnP4afSRKL6COFqAO5mFvPIRn/o7CDLcIL5fbJAT2j2fPRXEUztYwLOMB1U9BnazrUAg3YDjc
|
||||||
3Sez5seBD6GsIyDE4Rrk+aeOcJKUgCZ+ke6SbJGEn3FGp2m0wDTN67uCv0G7V5zR6T8zQj+Pyw+6BZLw
|
Lfj+ZKr4behrIBvwCbH3CfJ4pSscJyGgiV6kq8RbxOFnnNFpGi0wDOP8quA6aPeMMzp9MWn6eRx+0CsQ
|
||||||
Dr3ONmX43xtPHzFCsPV/oHBP3w1tip0dw+Y0hQAAAABJRU5ErkJggg==
|
h3fodbYow//eaAaJNMHW20DhvsH/Ib+cRcWEtS4AAAAASUVORK5CYII=
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
@ -294,8 +294,23 @@
|
|||||||
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<metadata name="treeMenuRoot.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<data name="toolStripButton2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>658, 20</value>
|
<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>
|
||||||
|
<metadata name="rootTreeNodeMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>705, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>108</value>
|
<value>108</value>
|
||||||
|
@ -3,82 +3,122 @@ using System.Drawing.Drawing2D;
|
|||||||
|
|
||||||
namespace RyzStudio.Drawing
|
namespace RyzStudio.Drawing
|
||||||
{
|
{
|
||||||
public struct Rectangoid
|
public struct Rectangoid
|
||||||
{
|
{
|
||||||
int X;
|
private int X;
|
||||||
int Y;
|
private int Y;
|
||||||
int Width;
|
private int Width;
|
||||||
int Height;
|
private int Height;
|
||||||
int Radius;
|
private int Radius;
|
||||||
|
|
||||||
public Rectangoid(int x, int y, int width, int height, int radius)
|
public Rectangoid(Rectangle rect, int radius)
|
||||||
{
|
{
|
||||||
X = x;
|
X = rect.X;
|
||||||
Y = y;
|
Y = rect.Y;
|
||||||
Width = width;
|
Width = rect.Width;
|
||||||
Height = height;
|
Height = rect.Height;
|
||||||
Radius = radius;
|
Radius = radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Rectangoid(int x, int y, int width, int height)
|
public Rectangoid(Rectangle rect, int radius, int borderWidth)
|
||||||
{
|
{
|
||||||
X = x;
|
rect.Inflate((-1 * borderWidth), (-1 * borderWidth));
|
||||||
Y = y;
|
|
||||||
Width = width;
|
|
||||||
Height = height;
|
|
||||||
Radius = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Rectangoid(int width, int height, int radius)
|
X = rect.X;
|
||||||
{
|
Y = rect.Y;
|
||||||
X = 0;
|
Width = rect.Width;
|
||||||
Y = 0;
|
Height = rect.Height;
|
||||||
Width = width;
|
Radius = radius;
|
||||||
Height = height;
|
}
|
||||||
Radius = radius;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Rectangoid(int width, int height)
|
public Rectangoid(int x, int y, int width, int height, int radius)
|
||||||
{
|
{
|
||||||
X = 0;
|
X = x;
|
||||||
Y = 0;
|
Y = y;
|
||||||
Width = width;
|
Width = width;
|
||||||
Height = height;
|
Height = height;
|
||||||
Radius = 0;
|
Radius = radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Rectangoid(int width)
|
public Rectangoid(int x, int y, int width, int height)
|
||||||
{
|
{
|
||||||
X = 0;
|
X = x;
|
||||||
Y = 0;
|
Y = y;
|
||||||
Width = width;
|
Width = width;
|
||||||
Height = width;
|
Height = height;
|
||||||
Radius = 0;
|
Radius = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GraphicsPath ToGraphicsPath()
|
public Rectangoid(int width, int height, int radius)
|
||||||
{
|
{
|
||||||
GraphicsPath rv = new GraphicsPath();
|
X = 0;
|
||||||
rv.AddLine(X + Radius, Y, X + Width - (Radius * 2), Y);
|
Y = 0;
|
||||||
rv.AddArc(X + Width - (Radius * 2), Y, Radius * 2, Radius * 2, 270, 90);
|
Width = width;
|
||||||
rv.AddLine(X + Width, Y + Radius, X + Width, Y + Height - (Radius * 2));
|
Height = height;
|
||||||
rv.AddArc(X + Width - (Radius * 2), Y + Height - (Radius * 2), Radius * 2, Radius * 2, 0, 90);
|
Radius = radius;
|
||||||
rv.AddLine(X + Width - (Radius * 2), Y + Height, X + Radius, Y + Height);
|
}
|
||||||
rv.AddArc(X, Y + Height - (Radius * 2), Radius * 2, Radius * 2, 90, 90);
|
|
||||||
rv.AddLine(X, Y + Height - (Radius * 2), X, Y + Radius);
|
|
||||||
rv.AddArc(X, Y, Radius * 2, Radius * 2, 180, 90);
|
|
||||||
rv.CloseFigure();
|
|
||||||
|
|
||||||
return rv;
|
public Rectangoid(int width, int height)
|
||||||
}
|
{
|
||||||
|
X = 0;
|
||||||
|
Y = 0;
|
||||||
|
Width = width;
|
||||||
|
Height = height;
|
||||||
|
Radius = 0;
|
||||||
|
}
|
||||||
|
|
||||||
public PointF GetOrigin()
|
public Rectangoid(int width)
|
||||||
{
|
{
|
||||||
PointF retval = new PointF();
|
X = 0;
|
||||||
retval.X = ((float)Width / 2) + X;
|
Y = 0;
|
||||||
retval.Y = ((float)Height / 2) + Y;
|
Width = width;
|
||||||
|
Height = width;
|
||||||
|
Radius = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return retval;
|
public GraphicsPath ToGraphicsPath()
|
||||||
}
|
{
|
||||||
}
|
GraphicsPath rv = new GraphicsPath();
|
||||||
|
rv.AddLine(X + this.Radius, Y, X + Width - (this.Radius * 2), Y);
|
||||||
|
|
||||||
|
if (this.Radius > 0)
|
||||||
|
{
|
||||||
|
rv.AddArc(X + Width - (this.Radius * 2), Y, this.Radius * 2, this.Radius * 2, 270, 90);
|
||||||
|
}
|
||||||
|
|
||||||
|
rv.AddLine(X + Width, Y + this.Radius, X + Width, Y + Height - (this.Radius * 2));
|
||||||
|
|
||||||
|
if (this.Radius > 0)
|
||||||
|
{
|
||||||
|
rv.AddArc(X + Width - (this.Radius * 2), Y + Height - (this.Radius * 2), this.Radius * 2, this.Radius * 2, 0, 90);
|
||||||
|
}
|
||||||
|
|
||||||
|
rv.AddLine(X + Width - (this.Radius * 2), Y + Height, X + this.Radius, Y + Height);
|
||||||
|
|
||||||
|
if (this.Radius > 0)
|
||||||
|
{
|
||||||
|
rv.AddArc(X, Y + Height - (this.Radius * 2), this.Radius * 2, this.Radius * 2, 90, 90);
|
||||||
|
}
|
||||||
|
|
||||||
|
rv.AddLine(X, Y + Height - (this.Radius * 2), X, Y + this.Radius);
|
||||||
|
|
||||||
|
if (this.Radius > 0)
|
||||||
|
{
|
||||||
|
rv.AddArc(X, Y, this.Radius * 2, this.Radius * 2, 180, 90);
|
||||||
|
}
|
||||||
|
|
||||||
|
rv.CloseFigure();
|
||||||
|
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PointF GetOrigin()
|
||||||
|
{
|
||||||
|
PointF rv = new PointF();
|
||||||
|
rv.X = ((float)Width / 2) + X;
|
||||||
|
rv.Y = ((float)Height / 2) + Y;
|
||||||
|
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
37
RyzStudio/Windows/Forms/HorizontalSeparator.Designer.cs
generated
Normal file
37
RyzStudio/Windows/Forms/HorizontalSeparator.Designer.cs
generated
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
namespace RyzStudio.Windows.Forms
|
||||||
|
{
|
||||||
|
partial class HorizontalSeparator
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Component Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
25
RyzStudio/Windows/Forms/HorizontalSeparator.cs
Normal file
25
RyzStudio/Windows/Forms/HorizontalSeparator.cs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace RyzStudio.Windows.Forms
|
||||||
|
{
|
||||||
|
public partial class HorizontalSeparator : UserControl
|
||||||
|
{
|
||||||
|
public HorizontalSeparator() : base()
|
||||||
|
{
|
||||||
|
//InitializeComponent();
|
||||||
|
|
||||||
|
this.MaximumSize = new Size(SystemInformation.VirtualScreen.Width, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected override void OnPaintBackground(PaintEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnPaintBackground(e);
|
||||||
|
|
||||||
|
Graphics g = e.Graphics;
|
||||||
|
g.FillRectangle(new SolidBrush(Color.FromArgb(213, 223, 229)), new Rectangle(this.DisplayRectangle.Left, 0, this.DisplayRectangle.Width, 1));
|
||||||
|
g.FillRectangle(new SolidBrush(Color.FromArgb(249, 251, 253)), new Rectangle(this.DisplayRectangle.Left, 1, this.DisplayRectangle.Width, 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
104
RyzStudio/Windows/ThemedForms/Button.cs
Normal file
104
RyzStudio/Windows/ThemedForms/Button.cs
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
namespace RyzStudio.Windows.ThemedForms
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
|
||||||
|
public partial class Button : RyzStudio.Windows.ThemedForms.UserControl
|
||||||
|
{
|
||||||
|
protected ButtonState buttonState = ButtonState.Normal;
|
||||||
|
|
||||||
|
public Button() : base()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
label1.ImageAlign = ContentAlignment.MiddleCenter;
|
||||||
|
|
||||||
|
label1.Click += delegate { this.OnClick(null); };
|
||||||
|
label1.MouseEnter += delegate { this.VisualState = ButtonState.Hover; };
|
||||||
|
label1.MouseLeave += delegate { this.VisualState = ButtonState.Normal; };
|
||||||
|
label1.MouseDown += delegate { this.VisualState = ButtonState.Down; };
|
||||||
|
label1.MouseUp += delegate { this.VisualState = ButtonState.Normal; };
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnLoad(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnLoad(e);
|
||||||
|
|
||||||
|
this.StyleOver.ForeImage = this.OverImage;
|
||||||
|
this.StyleDown.ForeImage = this.DownImage;
|
||||||
|
this.StyleDefault.ForeImage = this.DefaultImage;
|
||||||
|
|
||||||
|
this.VisualState = ButtonState.Normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected ButtonState VisualState
|
||||||
|
{
|
||||||
|
get { return buttonState; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
switch (value)
|
||||||
|
{
|
||||||
|
case ButtonState.Normal:
|
||||||
|
if (this.VisualState == ButtonState.Down)
|
||||||
|
{
|
||||||
|
updateButton(StyleOver);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
updateButton(StyleDefault);
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case ButtonState.Hover:
|
||||||
|
updateButton(StyleOver);
|
||||||
|
break;
|
||||||
|
case ButtonState.Down:
|
||||||
|
updateButton(StyleDown);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
updateButton(StyleDefault);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
buttonState = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void updateButton(ButtonStyle style)
|
||||||
|
{
|
||||||
|
label1.ForeColor = style.PenColour;
|
||||||
|
label1.BackColor = style.BackColour;
|
||||||
|
label1.Image = style.ForeImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("Appearance")]
|
||||||
|
public string LabelText
|
||||||
|
{
|
||||||
|
get => label1.Text;
|
||||||
|
set => label1.Text = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("Appearance")]
|
||||||
|
public Image OverImage { get; set; } = null;
|
||||||
|
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("Appearance")]
|
||||||
|
public Image DownImage { get; set; } = null;
|
||||||
|
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("Appearance")]
|
||||||
|
public Image DefaultImage { get; set; } = null;
|
||||||
|
|
||||||
|
[Browsable(false)]
|
||||||
|
public ButtonStyle StyleOver { get; set; } = new ButtonStyle(Color.Black, Color.White);
|
||||||
|
|
||||||
|
[Browsable(false)]
|
||||||
|
public ButtonStyle StyleDown { get; set; } = new ButtonStyle(Color.LightGray, Color.Black);
|
||||||
|
|
||||||
|
[Browsable(false)]
|
||||||
|
public ButtonStyle StyleDefault { get; set; } = new ButtonStyle(Color.White, Color.Black);
|
||||||
|
}
|
||||||
|
}
|
61
RyzStudio/Windows/ThemedForms/Button.designer.cs
generated
Normal file
61
RyzStudio/Windows/ThemedForms/Button.designer.cs
generated
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
namespace RyzStudio.Windows.ThemedForms
|
||||||
|
{
|
||||||
|
partial class Button
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Component Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.label1.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.label1.Margin = new System.Windows.Forms.Padding(0);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(123, 27);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "label1";
|
||||||
|
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
//
|
||||||
|
// Button
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Name = "Button";
|
||||||
|
this.Padding = new System.Windows.Forms.Padding(3, 3, 2, 2);
|
||||||
|
this.Size = new System.Drawing.Size(128, 32);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
}
|
||||||
|
}
|
120
RyzStudio/Windows/ThemedForms/Button.resx
Normal file
120
RyzStudio/Windows/ThemedForms/Button.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
9
RyzStudio/Windows/ThemedForms/ButtonState.cs
Normal file
9
RyzStudio/Windows/ThemedForms/ButtonState.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
namespace RyzStudio.Windows.ThemedForms
|
||||||
|
{
|
||||||
|
public enum ButtonState
|
||||||
|
{
|
||||||
|
Normal = 0,
|
||||||
|
Hover,
|
||||||
|
Down
|
||||||
|
}
|
||||||
|
}
|
25
RyzStudio/Windows/ThemedForms/ButtonStyle.cs
Normal file
25
RyzStudio/Windows/ThemedForms/ButtonStyle.cs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
namespace RyzStudio.Windows.ThemedForms
|
||||||
|
{
|
||||||
|
using System.Drawing;
|
||||||
|
|
||||||
|
public class ButtonStyle
|
||||||
|
{
|
||||||
|
public Color BackColour { get; set; }
|
||||||
|
public Color PenColour { get; set; }
|
||||||
|
public Image ForeImage { get; set; } = null;
|
||||||
|
|
||||||
|
public ButtonStyle(Color backColour, Color penColour)
|
||||||
|
{
|
||||||
|
this.BackColour = backColour;
|
||||||
|
this.PenColour = penColour;
|
||||||
|
this.ForeImage = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ButtonStyle(Color backColour, Color penColour, Image foreImage)
|
||||||
|
{
|
||||||
|
this.BackColour = backColour;
|
||||||
|
this.PenColour = penColour;
|
||||||
|
this.ForeImage = foreImage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
52
RyzStudio/Windows/ThemedForms/Form.Designer.cs
generated
Normal file
52
RyzStudio/Windows/ThemedForms/Form.Designer.cs
generated
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
namespace RyzStudio.Windows.ThemedForms
|
||||||
|
{
|
||||||
|
partial class Form
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// Form
|
||||||
|
//
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
|
this.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
||||||
|
this.ClientSize = new System.Drawing.Size(584, 381);
|
||||||
|
this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.ForeColor = System.Drawing.Color.Black;
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimumSize = new System.Drawing.Size(600, 420);
|
||||||
|
this.Name = "Form";
|
||||||
|
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
186
RyzStudio/Windows/ThemedForms/Form.cs
Normal file
186
RyzStudio/Windows/ThemedForms/Form.cs
Normal file
@ -0,0 +1,186 @@
|
|||||||
|
namespace RyzStudio.Windows.ThemedForms
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Theme customised form
|
||||||
|
/// </summary>
|
||||||
|
public partial class Form : System.Windows.Forms.Form
|
||||||
|
{
|
||||||
|
protected Image topImage = null;
|
||||||
|
protected Color topFillColour = Color.FromArgb(15, 15, 15);
|
||||||
|
protected int topFillHeight = 52;
|
||||||
|
|
||||||
|
protected Image bottomImage = null;
|
||||||
|
protected Color bottomFillColour = Color.FromArgb(15, 15, 15);
|
||||||
|
protected int bottomFillMargin = 19;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the Form class
|
||||||
|
/// </summary>
|
||||||
|
public Form()
|
||||||
|
{
|
||||||
|
this.InitializeComponent();
|
||||||
|
|
||||||
|
this.BackColor = Color.FromArgb(246, 246, 246);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Onresize event
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">Event argument</param>
|
||||||
|
protected override void OnResize(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnResize(e);
|
||||||
|
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OnPaint event
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">Event argument</param>
|
||||||
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnPaint(e);
|
||||||
|
|
||||||
|
Graphics g = e.Graphics;
|
||||||
|
|
||||||
|
Rectangle areaTop = new Rectangle(this.DisplayRectangle.Left, 0, this.DisplayRectangle.Width, topFillHeight);
|
||||||
|
Rectangle areaBottom = new Rectangle(this.DisplayRectangle.Left, (this.DisplayRectangle.Height - bottomFillMargin), this.DisplayRectangle.Width, bottomFillMargin);
|
||||||
|
|
||||||
|
// draw header
|
||||||
|
if (topFillHeight > 0)
|
||||||
|
{
|
||||||
|
g.FillRectangle(new SolidBrush(topFillColour), areaTop);
|
||||||
|
}
|
||||||
|
|
||||||
|
// draw footer
|
||||||
|
if (bottomFillMargin > 0)
|
||||||
|
{
|
||||||
|
g.FillRectangle(new SolidBrush(bottomFillColour), areaBottom);
|
||||||
|
}
|
||||||
|
|
||||||
|
// draw logo
|
||||||
|
if (topImage != null)
|
||||||
|
{
|
||||||
|
g.DrawImageUnscaled(topImage, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bottomImage != null)
|
||||||
|
{
|
||||||
|
g.DrawImageUnscaled(bottomImage, 0, (this.DisplayRectangle.Height - bottomImage.Height - bottomFillMargin), this.DisplayRectangle.Width, bottomImage.Height);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#region public properties
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public properties (encapsulation)
|
||||||
|
|
||||||
|
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
public new Color BackColor { get { return base.BackColor; } set { base.BackColor = value; } }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public void SetValue(Label sender, string value)
|
||||||
|
{
|
||||||
|
if (sender.InvokeRequired)
|
||||||
|
{
|
||||||
|
sender.Invoke(new MethodInvoker(() => { sender.Text = value; }));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sender.Text = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetValue(GroupBox sender, string value)
|
||||||
|
{
|
||||||
|
if (sender.InvokeRequired)
|
||||||
|
{
|
||||||
|
sender.Invoke(new MethodInvoker(() => { sender.Text = value; }));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sender.Text = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddValue(ListBox sender, string value)
|
||||||
|
{
|
||||||
|
if (sender.InvokeRequired)
|
||||||
|
{
|
||||||
|
sender.Invoke(new MethodInvoker(() => { sender.Items.Add(value); }));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sender.Items.Add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ClearValues(ListBox sender)
|
||||||
|
{
|
||||||
|
if (sender.InvokeRequired)
|
||||||
|
{
|
||||||
|
sender.Invoke(new MethodInvoker(() => { sender.Items.Clear(); }));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sender.Items.Clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetValue(ListBox sender)
|
||||||
|
{
|
||||||
|
string rv = string.Empty;
|
||||||
|
|
||||||
|
if (sender.InvokeRequired)
|
||||||
|
{
|
||||||
|
sender.Invoke(new MethodInvoker(() => { rv = (sender.SelectedItem == null) ? string.Empty : sender.SelectedItem.ToString(); }));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rv = (sender.SelectedItem == null) ? string.Empty : sender.SelectedItem.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetValue(TextBox sender)
|
||||||
|
{
|
||||||
|
string rv = string.Empty;
|
||||||
|
|
||||||
|
if (sender.InvokeRequired)
|
||||||
|
{
|
||||||
|
sender.Invoke(new MethodInvoker(() => { rv = sender.Text.Trim(); }));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rv = sender.Text.Trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int GetValue(NumericUpDown sender)
|
||||||
|
{
|
||||||
|
int rv = 0;
|
||||||
|
|
||||||
|
if (sender.InvokeRequired)
|
||||||
|
{
|
||||||
|
sender.Invoke(new MethodInvoker(() => { rv = (int)sender.Value; }));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rv = (int)sender.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
120
RyzStudio/Windows/ThemedForms/Form.resx
Normal file
120
RyzStudio/Windows/ThemedForms/Form.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
58
RyzStudio/Windows/ThemedForms/MemoBox.cs
Normal file
58
RyzStudio/Windows/ThemedForms/MemoBox.cs
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
namespace RyzStudio.Windows.ThemedForms
|
||||||
|
{
|
||||||
|
using RyzStudio.Drawing;
|
||||||
|
using System;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
public partial class MemoBox : RyzStudio.Windows.ThemedForms.UserControl
|
||||||
|
{
|
||||||
|
protected readonly Padding textboxPadding = new Padding(6, 6, 0, 6);
|
||||||
|
|
||||||
|
public MemoBox() : base()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.Margin = new Padding(10, 6, 10, 6);
|
||||||
|
}
|
||||||
|
|
||||||
|
//protected override void OnResize(EventArgs e)
|
||||||
|
//{
|
||||||
|
// base.OnResize(e);
|
||||||
|
|
||||||
|
// int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding;
|
||||||
|
|
||||||
|
// this.Height = textBox1.Height + (b + textboxPadding.Top) + ((b - 1) + textboxPadding.Bottom);
|
||||||
|
//}
|
||||||
|
|
||||||
|
protected override void OnGotFocus(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnGotFocus(e);
|
||||||
|
|
||||||
|
textBox1.Focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||||
|
[Category("Appearance")]
|
||||||
|
public System.Windows.Forms.TextBox InnerTextBox { get => textBox1; set => textBox1 = value; }
|
||||||
|
|
||||||
|
[Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||||
|
[Category("Appearance")]
|
||||||
|
public new string Text { get => textBox1.Text; set => textBox1.Text = value; }
|
||||||
|
|
||||||
|
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
public new Padding Margin { get { return base.Margin; } set { base.Margin = value; } }
|
||||||
|
|
||||||
|
protected override void updateBackground(Graphics g, ThemeStyle style)
|
||||||
|
{
|
||||||
|
int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding;
|
||||||
|
|
||||||
|
this.Padding = new Padding((b + textboxPadding.Left), (b + textboxPadding.Top), ((b - 1) + textboxPadding.Right), ((b - 1) + textboxPadding.Bottom));
|
||||||
|
|
||||||
|
Rectangoid area = new Rectangoid(this.ClientRectangle, style.BorderRadius, style.BorderWidth);
|
||||||
|
g.FillPath(new SolidBrush(style.BackColour), area.ToGraphicsPath());
|
||||||
|
g.DrawPath(new Pen(new SolidBrush(style.BorderColour), style.BorderWidth), area.ToGraphicsPath());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
63
RyzStudio/Windows/ThemedForms/MemoBox.designer.cs
generated
Normal file
63
RyzStudio/Windows/ThemedForms/MemoBox.designer.cs
generated
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
namespace RyzStudio.Windows.ThemedForms
|
||||||
|
{
|
||||||
|
partial class MemoBox
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Component Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// textBox1
|
||||||
|
//
|
||||||
|
this.textBox1.AcceptsReturn = true;
|
||||||
|
this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||||
|
this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.textBox1.HideSelection = false;
|
||||||
|
this.textBox1.Location = new System.Drawing.Point(4, 4);
|
||||||
|
this.textBox1.Multiline = true;
|
||||||
|
this.textBox1.Name = "textBox1";
|
||||||
|
this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||||
|
this.textBox1.Size = new System.Drawing.Size(121, 25);
|
||||||
|
this.textBox1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// MemoBox
|
||||||
|
//
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
|
this.Controls.Add(this.textBox1);
|
||||||
|
this.Name = "MemoBox";
|
||||||
|
this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
|
||||||
|
this.Size = new System.Drawing.Size(128, 32);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TextBox textBox1;
|
||||||
|
}
|
||||||
|
}
|
120
RyzStudio/Windows/ThemedForms/MemoBox.resx
Normal file
120
RyzStudio/Windows/ThemedForms/MemoBox.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
72
RyzStudio/Windows/ThemedForms/ProgressBar.Designer.cs
generated
Normal file
72
RyzStudio/Windows/ThemedForms/ProgressBar.Designer.cs
generated
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
namespace RyzStudio.Windows.ThemedForms
|
||||||
|
{
|
||||||
|
partial class ProgressBar
|
||||||
|
{
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Component Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
|
this.userControl1 = new RyzStudio.Windows.ThemedForms.ProgressBarInner();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.label3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.label3.Font = new System.Drawing.Font("Segoe UI", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.label3.Location = new System.Drawing.Point(4, 4);
|
||||||
|
this.label3.Margin = new System.Windows.Forms.Padding(0);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(803, 47);
|
||||||
|
this.label3.TabIndex = 144;
|
||||||
|
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
|
//
|
||||||
|
// userControl1
|
||||||
|
//
|
||||||
|
this.userControl1.BarColour = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(225)))), ((int)(((byte)(249)))));
|
||||||
|
this.userControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.userControl1.Location = new System.Drawing.Point(4, 4);
|
||||||
|
this.userControl1.Margin = new System.Windows.Forms.Padding(0);
|
||||||
|
this.userControl1.Maximum = 100;
|
||||||
|
this.userControl1.Minimum = 0;
|
||||||
|
this.userControl1.Name = "userControl1";
|
||||||
|
this.userControl1.Size = new System.Drawing.Size(803, 47);
|
||||||
|
this.userControl1.TabIndex = 145;
|
||||||
|
this.userControl1.Value = 50;
|
||||||
|
//
|
||||||
|
// ProgressBar
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.Controls.Add(this.userControl1);
|
||||||
|
this.Controls.Add(this.label3);
|
||||||
|
this.Margin = new System.Windows.Forms.Padding(0);
|
||||||
|
this.Name = "ProgressBar";
|
||||||
|
this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
|
||||||
|
this.Size = new System.Drawing.Size(810, 54);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
|
private ProgressBarInner userControl1;
|
||||||
|
}
|
||||||
|
}
|
29
RyzStudio/Windows/ThemedForms/ProgressBar.cs
Normal file
29
RyzStudio/Windows/ThemedForms/ProgressBar.cs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
|
|
||||||
|
namespace RyzStudio.Windows.ThemedForms
|
||||||
|
{
|
||||||
|
public partial class ProgressBar : RyzStudio.Windows.ThemedForms.UserControl
|
||||||
|
{
|
||||||
|
public ProgressBar() : base()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
styleActive = new ThemeStyle(1, 3, 2, Color.FromArgb(112, 112, 112), Color.White);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Minimum { get => userControl1.Minimum; set => userControl1.Minimum = value; }
|
||||||
|
public int Maximum { get => userControl1.Maximum; set => userControl1.Maximum = value; }
|
||||||
|
public int Value { get => userControl1.Value; set => userControl1.Value = value; }
|
||||||
|
|
||||||
|
public Color BarColour { get => userControl1.BarColour; set => userControl1.BarColour = value; }
|
||||||
|
public Color BarTextColour { get => userControl1.BarTextColour; set => userControl1.BarTextColour = value; }
|
||||||
|
|
||||||
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnSizeChanged(e);
|
||||||
|
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
120
RyzStudio/Windows/ThemedForms/ProgressBar.resx
Normal file
120
RyzStudio/Windows/ThemedForms/ProgressBar.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
63
RyzStudio/Windows/ThemedForms/ProgressBarInner.Designer.cs
generated
Normal file
63
RyzStudio/Windows/ThemedForms/ProgressBarInner.Designer.cs
generated
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
namespace RyzStudio.Windows.ThemedForms
|
||||||
|
{
|
||||||
|
partial class ProgressBarInner
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Component Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.label3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.label3.Font = new System.Drawing.Font("Segoe UI", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.label3.Location = new System.Drawing.Point(4, 4);
|
||||||
|
this.label3.Margin = new System.Windows.Forms.Padding(0);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(803, 47);
|
||||||
|
this.label3.TabIndex = 144;
|
||||||
|
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
|
//
|
||||||
|
// ProgressBarInner
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.Controls.Add(this.label3);
|
||||||
|
this.Margin = new System.Windows.Forms.Padding(0);
|
||||||
|
this.Name = "ProgressBarInner";
|
||||||
|
this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
|
||||||
|
this.Size = new System.Drawing.Size(810, 54);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
|
}
|
||||||
|
}
|
197
RyzStudio/Windows/ThemedForms/ProgressBarInner.cs
Normal file
197
RyzStudio/Windows/ThemedForms/ProgressBarInner.cs
Normal file
@ -0,0 +1,197 @@
|
|||||||
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace RyzStudio.Windows.ThemedForms
|
||||||
|
{
|
||||||
|
public partial class ProgressBarInner : System.Windows.Forms.UserControl
|
||||||
|
{
|
||||||
|
protected int minimum = 0;
|
||||||
|
protected int maximum = 100;
|
||||||
|
protected int value = 0;
|
||||||
|
|
||||||
|
public ProgressBarInner() : base()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.Padding = new Padding(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Minimum
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return minimum;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (this.InvokeRequired)
|
||||||
|
{
|
||||||
|
this.Invoke(new MethodInvoker(() => {
|
||||||
|
setMinimum(value);
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setMinimum(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Maximum
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return maximum;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (this.InvokeRequired)
|
||||||
|
{
|
||||||
|
this.Invoke(new MethodInvoker(() => {
|
||||||
|
setMaximum(value);
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setMaximum(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Value
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (this.InvokeRequired)
|
||||||
|
{
|
||||||
|
this.Invoke(new MethodInvoker(() => {
|
||||||
|
setValue(value);
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setValue(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Color BarColour { get; set; } = Color.FromArgb(158, 225, 249);
|
||||||
|
|
||||||
|
public Color BarTextColour
|
||||||
|
{
|
||||||
|
get => label3.ForeColor;
|
||||||
|
set => label3.ForeColor = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnPaint(e);
|
||||||
|
|
||||||
|
Rectangle canvas = this.DisplayRectangle;
|
||||||
|
Graphics g = e.Graphics;
|
||||||
|
|
||||||
|
if (this.Value > 0)
|
||||||
|
{
|
||||||
|
decimal result = decimal.Divide(canvas.Width, this.Maximum) * this.Value;
|
||||||
|
|
||||||
|
canvas.Width = (int)Math.Round(result);
|
||||||
|
|
||||||
|
g.FillRectangle(new SolidBrush(this.BarColour), canvas);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void updateText()
|
||||||
|
{
|
||||||
|
if (label3.InvokeRequired)
|
||||||
|
{
|
||||||
|
label3.Invoke(new MethodInvoker(() =>
|
||||||
|
{
|
||||||
|
label3.Text = string.Format("{0}/{1}", this.Value.ToString(), this.Maximum.ToString());
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
label3.Text = string.Format("{0}/{1}", this.Value.ToString(), this.Maximum.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setMinimum(int value)
|
||||||
|
{
|
||||||
|
int m = value;
|
||||||
|
if (m < 0)
|
||||||
|
{
|
||||||
|
m = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m > this.Maximum)
|
||||||
|
{
|
||||||
|
m = this.Maximum;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.Value < m)
|
||||||
|
{
|
||||||
|
this.Value = m;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.value > this.Maximum)
|
||||||
|
{
|
||||||
|
this.value = this.Maximum;
|
||||||
|
}
|
||||||
|
|
||||||
|
minimum = m;
|
||||||
|
updateText();
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setMaximum(int value)
|
||||||
|
{
|
||||||
|
int m = value;
|
||||||
|
if (m < 0)
|
||||||
|
{
|
||||||
|
m = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m < this.Minimum)
|
||||||
|
{
|
||||||
|
m = this.Minimum;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.Value > m)
|
||||||
|
{
|
||||||
|
this.Value = m;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.value < this.Minimum)
|
||||||
|
{
|
||||||
|
this.value = this.Minimum;
|
||||||
|
}
|
||||||
|
|
||||||
|
maximum = m;
|
||||||
|
updateText();
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setValue(int value)
|
||||||
|
{
|
||||||
|
int m = value;
|
||||||
|
if (m < this.Minimum)
|
||||||
|
{
|
||||||
|
m = this.Minimum;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m > this.Maximum)
|
||||||
|
{
|
||||||
|
m = this.Maximum;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.value = m;
|
||||||
|
updateText();
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
120
RyzStudio/Windows/ThemedForms/ProgressBarInner.resx
Normal file
120
RyzStudio/Windows/ThemedForms/ProgressBarInner.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
58
RyzStudio/Windows/ThemedForms/TextBox.cs
Normal file
58
RyzStudio/Windows/ThemedForms/TextBox.cs
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
namespace RyzStudio.Windows.ThemedForms
|
||||||
|
{
|
||||||
|
using RyzStudio.Drawing;
|
||||||
|
using System;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
public partial class TextBox : RyzStudio.Windows.ThemedForms.UserControl
|
||||||
|
{
|
||||||
|
protected readonly Padding textboxPadding = new Padding(6, 6, 6, 6);
|
||||||
|
|
||||||
|
public TextBox() : base()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.Margin = new Padding(10, 6, 10, 6);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnResize(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnResize(e);
|
||||||
|
|
||||||
|
int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding;
|
||||||
|
|
||||||
|
this.Height = textBox1.Height + (b + textboxPadding.Top) + ((b - 1) + textboxPadding.Bottom);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnGotFocus(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnGotFocus(e);
|
||||||
|
|
||||||
|
textBox1.Focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||||
|
[Category("Appearance")]
|
||||||
|
public System.Windows.Forms.TextBox InnerTextBox { get => textBox1; set => textBox1 = value; }
|
||||||
|
|
||||||
|
[Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||||
|
[Category("Appearance")]
|
||||||
|
public new string Text { get => textBox1.Text; set => textBox1.Text = value; }
|
||||||
|
|
||||||
|
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
public new Padding Margin { get { return base.Margin; } set { base.Margin = value; } }
|
||||||
|
|
||||||
|
protected override void updateBackground(Graphics g, ThemeStyle style)
|
||||||
|
{
|
||||||
|
int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding;
|
||||||
|
|
||||||
|
this.Padding = new Padding((b + textboxPadding.Left), (b + textboxPadding.Top), ((b - 1) + textboxPadding.Right), ((b - 1) + textboxPadding.Bottom));
|
||||||
|
|
||||||
|
Rectangoid area = new Rectangoid(this.ClientRectangle, style.BorderRadius, style.BorderWidth);
|
||||||
|
g.FillPath(new SolidBrush(style.BackColour), area.ToGraphicsPath());
|
||||||
|
g.DrawPath(new Pen(new SolidBrush(style.BorderColour), style.BorderWidth), area.ToGraphicsPath());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
60
RyzStudio/Windows/ThemedForms/TextBox.designer.cs
generated
Normal file
60
RyzStudio/Windows/ThemedForms/TextBox.designer.cs
generated
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
namespace RyzStudio.Windows.ThemedForms
|
||||||
|
{
|
||||||
|
partial class TextBox
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Component Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// textBox1
|
||||||
|
//
|
||||||
|
this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||||
|
this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.textBox1.HideSelection = false;
|
||||||
|
this.textBox1.Location = new System.Drawing.Point(4, 4);
|
||||||
|
this.textBox1.Name = "textBox1";
|
||||||
|
this.textBox1.Size = new System.Drawing.Size(121, 13);
|
||||||
|
this.textBox1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// TextBox
|
||||||
|
//
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
|
this.Controls.Add(this.textBox1);
|
||||||
|
this.Name = "TextBox";
|
||||||
|
this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
|
||||||
|
this.Size = new System.Drawing.Size(128, 32);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TextBox textBox1;
|
||||||
|
}
|
||||||
|
}
|
120
RyzStudio/Windows/ThemedForms/TextBox.resx
Normal file
120
RyzStudio/Windows/ThemedForms/TextBox.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
34
RyzStudio/Windows/ThemedForms/ThemeStyle.cs
Normal file
34
RyzStudio/Windows/ThemedForms/ThemeStyle.cs
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
namespace RyzStudio.Windows.ThemedForms
|
||||||
|
{
|
||||||
|
using System.Drawing;
|
||||||
|
|
||||||
|
public struct ThemeStyle
|
||||||
|
{
|
||||||
|
public int BorderWidth;
|
||||||
|
public int BorderRadius;
|
||||||
|
public int BorderPadding;
|
||||||
|
public Color BorderColour;
|
||||||
|
public Color BackColour;
|
||||||
|
public Color ForeColour;
|
||||||
|
|
||||||
|
public ThemeStyle(int borderWidth, int borderRadius, int borderPadding, Color borderColour, Color backColour)
|
||||||
|
{
|
||||||
|
this.BorderWidth = borderWidth;
|
||||||
|
this.BorderRadius = borderRadius;
|
||||||
|
this.BorderPadding = borderPadding;
|
||||||
|
this.BorderColour = borderColour;
|
||||||
|
this.BackColour = backColour;
|
||||||
|
this.ForeColour = Color.Black;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ThemeStyle(int borderWidth, int borderRadius, int borderPadding, Color borderColour, Color backColour, Color foreColour)
|
||||||
|
{
|
||||||
|
this.BorderWidth = borderWidth;
|
||||||
|
this.BorderRadius = borderRadius;
|
||||||
|
this.BorderPadding = borderPadding;
|
||||||
|
this.BorderColour = borderColour;
|
||||||
|
this.BackColour = backColour;
|
||||||
|
this.ForeColour = foreColour;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
51
RyzStudio/Windows/ThemedForms/ThreadHelper.cs
Normal file
51
RyzStudio/Windows/ThemedForms/ThreadHelper.cs
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace RyzStudio.Windows.ThemedForms
|
||||||
|
{
|
||||||
|
public class ThreadHelper
|
||||||
|
{
|
||||||
|
public static void SetText(TextBox sender, string text)
|
||||||
|
{
|
||||||
|
if (sender.InvokeRequired)
|
||||||
|
{
|
||||||
|
sender.Invoke(new MethodInvoker(() => {
|
||||||
|
sender.Text = text;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sender.Text = text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SetText(MemoBox sender, string text)
|
||||||
|
{
|
||||||
|
if (sender.InvokeRequired)
|
||||||
|
{
|
||||||
|
sender.Invoke(new MethodInvoker(() => {
|
||||||
|
sender.Text = text;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sender.Text = text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SetImage(PictureBox sender, Image image)
|
||||||
|
{
|
||||||
|
if (sender.InvokeRequired)
|
||||||
|
{
|
||||||
|
sender.Invoke(new MethodInvoker(() => {
|
||||||
|
sender.Image = image;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sender.Image = image;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
53
RyzStudio/Windows/ThemedForms/UserControl.cs
Normal file
53
RyzStudio/Windows/ThemedForms/UserControl.cs
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
namespace RyzStudio.Windows.ThemedForms
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using RyzStudio.Drawing;
|
||||||
|
using System.ComponentModel;
|
||||||
|
|
||||||
|
public partial class UserControl : System.Windows.Forms.UserControl
|
||||||
|
{
|
||||||
|
protected ThemeStyle styleActive = new ThemeStyle(1, 3, 2, Color.FromArgb(112, 112, 112), Color.White);
|
||||||
|
|
||||||
|
public UserControl()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnLoad(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnLoad(e);
|
||||||
|
|
||||||
|
this.BackColor = Color.Transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected override void OnPaintBackground(PaintEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnPaintBackground(e);
|
||||||
|
|
||||||
|
Graphics g = e.Graphics;
|
||||||
|
//// g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
|
||||||
|
//// g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
|
||||||
|
//// g.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
|
||||||
|
//// g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
|
||||||
|
|
||||||
|
updateBackground(g, styleActive);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
public new Padding Padding { get { return base.Padding; } set { base.Padding = value; } }
|
||||||
|
|
||||||
|
protected virtual void updateBackground(Graphics g, ThemeStyle style)
|
||||||
|
{
|
||||||
|
int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding;
|
||||||
|
|
||||||
|
this.Padding = new Padding(b, b, (b - 1), (b - 1));
|
||||||
|
|
||||||
|
Rectangoid area = new Rectangoid(this.ClientRectangle, style.BorderRadius, style.BorderWidth);
|
||||||
|
g.FillPath(new SolidBrush(style.BackColour), area.ToGraphicsPath());
|
||||||
|
g.DrawPath(new Pen(new SolidBrush(style.BorderColour), style.BorderWidth), area.ToGraphicsPath());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
37
RyzStudio/Windows/ThemedForms/UserControl.designer.cs
generated
Normal file
37
RyzStudio/Windows/ThemedForms/UserControl.designer.cs
generated
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
namespace RyzStudio.Windows.ThemedForms
|
||||||
|
{
|
||||||
|
partial class UserControl
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Component Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -1,11 +1,15 @@
|
|||||||
using System;
|
using bzit.bomg;
|
||||||
|
using bzit.bomg.Models;
|
||||||
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.IO;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using Resources = bzit.bomg.Properties.Resources;
|
||||||
|
|
||||||
namespace RyzStudio.Windows.Forms
|
namespace RyzStudio.Windows.Forms
|
||||||
{
|
{
|
||||||
public class MovableTreeView : System.Windows.Forms.TreeView
|
public class BookmarkTreeView : System.Windows.Forms.TreeView
|
||||||
{
|
{
|
||||||
public enum IconSet
|
public enum IconSet
|
||||||
{
|
{
|
||||||
@ -15,7 +19,18 @@ namespace RyzStudio.Windows.Forms
|
|||||||
Default
|
Default
|
||||||
}
|
}
|
||||||
|
|
||||||
public MovableTreeViewSelectedNode SNode { get; set; }
|
public enum NodeType
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
Root,
|
||||||
|
Folder,
|
||||||
|
Page
|
||||||
|
}
|
||||||
|
|
||||||
|
public BookmarkTreeViewSNode SNode { get; set; }
|
||||||
|
|
||||||
|
protected IconDatabase iconDatabase = null;
|
||||||
|
|
||||||
|
|
||||||
public delegate void NodeCountUpdated(ulong v);
|
public delegate void NodeCountUpdated(ulong v);
|
||||||
|
|
||||||
@ -23,28 +38,34 @@ namespace RyzStudio.Windows.Forms
|
|||||||
public NodeCountUpdated OnNodeCountUpdate = null;
|
public NodeCountUpdated OnNodeCountUpdate = null;
|
||||||
|
|
||||||
protected const char pathSeparator = '|';
|
protected const char pathSeparator = '|';
|
||||||
//protected const int folderImageIndex = 1;
|
|
||||||
//protected const int folderSelectedImageIndex = 2;
|
|
||||||
|
|
||||||
protected TreeNode draggingNode = null;
|
protected TreeNode draggingNode = null;
|
||||||
protected bool allowBeginEdit = false;
|
//protected bool allowBeginEdit = false;
|
||||||
//// public int[] folderImageIndex = { 1, 2 };
|
|
||||||
protected ulong nodeCount = 0;
|
protected ulong nodeCount = 0;
|
||||||
protected bool hasChanged = false;
|
protected bool hasChanged = false;
|
||||||
|
|
||||||
public MovableTreeView()
|
public BookmarkTreeView() : base()
|
||||||
{
|
{
|
||||||
this.SNode = new MovableTreeViewSelectedNode(this);
|
this.SNode = new BookmarkTreeViewSNode(this);
|
||||||
|
|
||||||
|
if (this.ImageList == null)
|
||||||
|
{
|
||||||
|
this.ImageList = new ImageList();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.ImageList.ColorDepth = ColorDepth.Depth16Bit;
|
||||||
|
this.ImageList.ImageSize = new Size(16, 16);
|
||||||
|
this.ImageList.TransparentColor = Color.Transparent;
|
||||||
|
|
||||||
|
this.ImageList.Images.Clear();
|
||||||
|
this.ImageList.Images.Add(Resources.transmit_blue);
|
||||||
|
this.ImageList.Images.Add(Resources.folder);
|
||||||
|
this.ImageList.Images.Add(Resources.folder_explore);
|
||||||
|
this.ImageList.Images.Add(Resources.page_white_world_bw);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region public properties
|
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||||
|
public new ImageList ImageList { get => base.ImageList; set => base.ImageList = value; }
|
||||||
/* [Category("Data")]
|
|
||||||
public char CustomPathSeparator
|
|
||||||
{
|
|
||||||
get { return customPathSeparator; }
|
|
||||||
set { customPathSeparator = value; }
|
|
||||||
}*/
|
|
||||||
|
|
||||||
[Browsable(false)]
|
[Browsable(false)]
|
||||||
public TreeNode[] NodeList
|
public TreeNode[] NodeList
|
||||||
@ -66,26 +87,6 @@ namespace RyzStudio.Windows.Forms
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//[Browsable(false)]
|
|
||||||
//public string[] NodeNameList
|
|
||||||
//{
|
|
||||||
// get
|
|
||||||
// {
|
|
||||||
// string[] rv = new string[0];
|
|
||||||
// if (this.Nodes.Count <= 0)
|
|
||||||
// {
|
|
||||||
// return rv;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// foreach (TreeNode tn in this.Nodes)
|
|
||||||
// {
|
|
||||||
// traverseNodeNameList(ref rv, tn);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// return rv;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
[Browsable(false)]
|
[Browsable(false)]
|
||||||
public ulong NodeCount
|
public ulong NodeCount
|
||||||
{
|
{
|
||||||
@ -127,237 +128,122 @@ namespace RyzStudio.Windows.Forms
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public methods
|
#region public methods
|
||||||
|
|
||||||
//public TreeNode AddFolder()
|
public bool InitialiseIconDatabase(out string message, string filename)
|
||||||
//{
|
|
||||||
// return this.AddFolder("New Folder " + (new Random()).Next(10001, 99999).ToString());
|
|
||||||
//}
|
|
||||||
|
|
||||||
//public TreeNode AddFolder(string name)
|
|
||||||
//{
|
|
||||||
// if (this.SelectedNode == null)
|
|
||||||
// {
|
|
||||||
// return null;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (this.SelectedNode.Tag != null)
|
|
||||||
// {
|
|
||||||
// return null;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// this.HasChanged = true;
|
|
||||||
|
|
||||||
// TreeNode tn = this.SelectedNode.Nodes.Add(PathEncode(name), name, folderImageIndex, folderSelectedImageIndex);
|
|
||||||
// this.SelectedNode = tn;
|
|
||||||
|
|
||||||
// OnAddFolderNode(tn);
|
|
||||||
|
|
||||||
// return tn;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//public TreeNode AddBookmarkPage()
|
|
||||||
//{
|
|
||||||
// return this.AddBookmarkPage("New Page " + (new Random()).Next(10001, 99999).ToString());
|
|
||||||
//}
|
|
||||||
|
|
||||||
//public TreeNode AddBookmarkPage(string name, int icon = 3)
|
|
||||||
//{
|
|
||||||
// if (this.SelectedNode == null)
|
|
||||||
// {
|
|
||||||
// return null;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (this.SelectedNode.Tag != null)
|
|
||||||
// {
|
|
||||||
// return null;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// this.HasChanged = true;
|
|
||||||
|
|
||||||
// TreeNode tn = this.SelectedNode.Nodes.Add(PathEncode(name), name, icon, icon);
|
|
||||||
// tn.Tag = new object();
|
|
||||||
// tn.ToolTipText = name;
|
|
||||||
|
|
||||||
// nodeCount++;
|
|
||||||
// NodeCountUpdate(nodeCount);
|
|
||||||
|
|
||||||
// this.SelectedNode = tn;
|
|
||||||
|
|
||||||
// OnAddItemNode(tn);
|
|
||||||
// return tn;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//public TreeNode AddBookmarkPageFullPath(string name, int icon = 3)
|
|
||||||
//{
|
|
||||||
// if (this.Nodes.Count <= 0)
|
|
||||||
// {
|
|
||||||
// return null;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// this.HasChanged = true;
|
|
||||||
|
|
||||||
// TreeNode tn2;
|
|
||||||
// if (!name.Contains(pathSeparator.ToString()))
|
|
||||||
// {
|
|
||||||
// tn2 = this.Nodes[0].Nodes.Add(name, PathDecode(name), icon, icon);
|
|
||||||
// tn2.ToolTipText = name;
|
|
||||||
// nodeCount++;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// tn2 = this.Nodes[0];
|
|
||||||
// string[] folders = name.Split(pathSeparator);
|
|
||||||
// for (int x = 0; x < (folders.Length - 1); x++)
|
|
||||||
// {
|
|
||||||
// string dr = folders[x].Trim();
|
|
||||||
// if (tn2.Nodes.ContainsKey(dr))
|
|
||||||
// {
|
|
||||||
// tn2 = tn2.Nodes[dr];
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// tn2 = tn2.Nodes.Add(dr, PathDecode(dr), folderImageIndex, folderSelectedImageIndex);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// string tm = folders[(folders.Length - 1)].Trim();
|
|
||||||
// tn2 = tn2.Nodes.Add(tm, PathDecode(tm), icon, icon);
|
|
||||||
// tn2.Tag = new object();
|
|
||||||
// tn2.ToolTipText = tm;
|
|
||||||
|
|
||||||
// nodeCount++;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// NodeCountUpdate(nodeCount);
|
|
||||||
|
|
||||||
// return tn2;
|
|
||||||
//}
|
|
||||||
|
|
||||||
public void EditNode()
|
|
||||||
{
|
{
|
||||||
this.HasChanged = true;
|
message = string.Empty;
|
||||||
|
|
||||||
if (this.SelectedNode == null)
|
if (string.IsNullOrWhiteSpace(filename))
|
||||||
{
|
{
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.SelectedNode.IsEditing)
|
if (iconDatabase == null)
|
||||||
{
|
{
|
||||||
allowBeginEdit = true;
|
iconDatabase = new IconDatabase();
|
||||||
this.SelectedNode.BeginEdit();
|
}
|
||||||
|
|
||||||
|
bool rv = false;
|
||||||
|
if (File.Exists(filename))
|
||||||
|
{
|
||||||
|
rv = iconDatabase.LoadFile(filename);
|
||||||
|
if (!rv)
|
||||||
|
{
|
||||||
|
rv = iconDatabase.Create(filename, true, null, true);
|
||||||
|
if (!rv)
|
||||||
|
{
|
||||||
|
message = iconDatabase.LastError;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rv = iconDatabase.Create(filename, true, null, true);
|
||||||
|
if (!rv)
|
||||||
|
{
|
||||||
|
message = iconDatabase.LastError;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddItem(BookmarkItemViewModel viewModel)
|
||||||
|
{
|
||||||
|
int iconIndex = addIcon(viewModel);
|
||||||
|
|
||||||
|
TreeNode tn = new TreeNode(viewModel.SiteName, iconIndex, iconIndex);
|
||||||
|
tn.Tag = viewModel;
|
||||||
|
tn.ToolTipText = viewModel.ToString();
|
||||||
|
|
||||||
|
TreeNode tn2 = addFolderPath(viewModel.TreeviewPath);
|
||||||
|
|
||||||
|
tn2.Nodes.Add(tn);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddOrUpdateItem_OnSelectedNode(BookmarkItemViewModel viewModel)
|
||||||
|
{
|
||||||
|
switch (this.SNode.GetNodeType())
|
||||||
|
{
|
||||||
|
case NodeType.Root:
|
||||||
|
case NodeType.Folder:
|
||||||
|
addItem_OnSelectedNode(viewModel);
|
||||||
|
break;
|
||||||
|
case NodeType.Page:
|
||||||
|
updateItem_OnSelectedNode(viewModel);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//public void DeleteNode()
|
public NodeType GetNodeType(TreeNode node)
|
||||||
|
{
|
||||||
|
if (node.Tag == null)
|
||||||
|
{
|
||||||
|
if (node.Equals(this.Nodes[0]))
|
||||||
|
{
|
||||||
|
return NodeType.Root;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return NodeType.Folder;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (node.Tag is BookmarkItemViewModel)
|
||||||
|
{
|
||||||
|
return NodeType.Page;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return NodeType.None;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//public void EditNode()
|
||||||
//{
|
//{
|
||||||
// if (this.SelectedNode == null)
|
// this.SNode.
|
||||||
// {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (this.Nodes.Count <= 0)
|
// //this.HasChanged = true;
|
||||||
// {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (this.SelectedNode.Equals(this.Nodes[0]))
|
// //if (this.SelectedNode == null)
|
||||||
// {
|
// //{
|
||||||
// return;
|
// // return;
|
||||||
// }
|
// //}
|
||||||
|
|
||||||
// this.HasChanged = true;
|
// //if (!this.SelectedNode.IsEditing)
|
||||||
|
// //{
|
||||||
// this.SelectedNode.Remove();
|
// // allowBeginEdit = true;
|
||||||
|
// // this.SelectedNode.BeginEdit();
|
||||||
// if (this.SelectedNode.Tag == null)
|
// //}
|
||||||
// {
|
|
||||||
// nodeCount = this.NodeCountCalc;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// nodeCount--;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// NodeCountUpdate(nodeCount);
|
|
||||||
//}
|
|
||||||
|
|
||||||
//public void SortNode()
|
|
||||||
//{
|
|
||||||
// TreeNode tn = this.SelectedNode;
|
|
||||||
// string[] tnv = new string[0];
|
|
||||||
// TreeNode[] tna = new TreeNode[0];
|
|
||||||
|
|
||||||
// this.HasChanged = true;
|
|
||||||
|
|
||||||
// foreach (TreeNode tn2 in tn.Nodes)
|
|
||||||
// {
|
|
||||||
// Array.Resize(ref tna, (tna.Length + 1));
|
|
||||||
// tna[(tna.Length - 1)] = tn2;
|
|
||||||
|
|
||||||
// Array.Resize(ref tnv, (tnv.Length + 1));
|
|
||||||
// tnv[(tnv.Length - 1)] = tn2.Text;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Array.Sort(tnv, tna);
|
|
||||||
|
|
||||||
// tn.Nodes.Clear();
|
|
||||||
// foreach (TreeNode tn2 in tna)
|
|
||||||
// {
|
|
||||||
// tn.Nodes.Add(tn2);
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
//public void MoveNodeUp()
|
|
||||||
//{
|
|
||||||
// TreeNode tn = this.SelectedNode;
|
|
||||||
// if (tn.Parent == null)
|
|
||||||
// {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (tn.Index == 0)
|
|
||||||
// {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// this.HasChanged = true;
|
|
||||||
|
|
||||||
// int n = tn.Index - 1;
|
|
||||||
|
|
||||||
// TreeNode tn1 = tn.Parent;
|
|
||||||
// tn1.Nodes.Remove(tn);
|
|
||||||
// tn1.Nodes.Insert(n, tn);
|
|
||||||
|
|
||||||
// this.SelectedNode = tn;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//public void MoveNodeDown()
|
|
||||||
//{
|
|
||||||
// TreeNode tn = this.SelectedNode;
|
|
||||||
// if (tn.Parent == null)
|
|
||||||
// {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// TreeNode tn1 = tn.Parent;
|
|
||||||
|
|
||||||
// this.HasChanged = true;
|
|
||||||
|
|
||||||
// if (tn.Index >= (tn1.Nodes.Count - 1))
|
|
||||||
// {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// int n = tn.Index + 1;
|
|
||||||
|
|
||||||
// tn1.Nodes.Remove(tn);
|
|
||||||
// tn1.Nodes.Insert(n, tn);
|
|
||||||
|
|
||||||
// this.SelectedNode = tn;
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
public string GetNodeFullPath(TreeNode node)
|
public string GetNodeFullPath(TreeNode node)
|
||||||
@ -534,57 +420,57 @@ namespace RyzStudio.Windows.Forms
|
|||||||
|
|
||||||
protected override void OnBeforeLabelEdit(NodeLabelEditEventArgs e)
|
protected override void OnBeforeLabelEdit(NodeLabelEditEventArgs e)
|
||||||
{
|
{
|
||||||
if (!allowBeginEdit)
|
//if (!allowBeginEdit)
|
||||||
{
|
//{
|
||||||
e.CancelEdit = true;
|
// e.CancelEdit = true;
|
||||||
return;
|
// return;
|
||||||
}
|
//}
|
||||||
|
|
||||||
this.HasChanged = true;
|
//this.HasChanged = true;
|
||||||
|
|
||||||
base.OnBeforeLabelEdit(e);
|
//base.OnBeforeLabelEdit(e);
|
||||||
|
|
||||||
if (e.Node == null)
|
//if (e.Node == null)
|
||||||
{
|
//{
|
||||||
e.CancelEdit = true;
|
// e.CancelEdit = true;
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
//{
|
||||||
if (e.Node.Tag == null)
|
// if (e.Node.Tag == null)
|
||||||
{
|
// {
|
||||||
// do it
|
// // do it
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
e.CancelEdit = true;
|
// e.CancelEdit = true;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnAfterLabelEdit(NodeLabelEditEventArgs e)
|
protected override void OnAfterLabelEdit(NodeLabelEditEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnAfterLabelEdit(e);
|
base.OnAfterLabelEdit(e);
|
||||||
|
|
||||||
if (e.Node.Tag == null)
|
//if (e.Node.Tag == null)
|
||||||
{
|
//{
|
||||||
if (e.Label == null)
|
// if (e.Label == null)
|
||||||
{
|
// {
|
||||||
e.CancelEdit = true;
|
// e.CancelEdit = true;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
if (e.Label.Trim().Length <= 0)
|
// if (e.Label.Trim().Length <= 0)
|
||||||
{
|
// {
|
||||||
e.CancelEdit = true;
|
// e.CancelEdit = true;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
//{
|
||||||
e.CancelEdit = true;
|
// e.CancelEdit = true;
|
||||||
}
|
//}
|
||||||
|
|
||||||
allowBeginEdit = false;
|
//allowBeginEdit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnPreviewKeyDown(PreviewKeyDownEventArgs e)
|
protected override void OnPreviewKeyDown(PreviewKeyDownEventArgs e)
|
||||||
@ -616,11 +502,7 @@ namespace RyzStudio.Windows.Forms
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case Keys.F2:
|
case Keys.F2:
|
||||||
if (tn.Tag == null)
|
this.SNode.Edit();
|
||||||
{
|
|
||||||
this.EditNode();
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case Keys.Up:
|
case Keys.Up:
|
||||||
if (e.Modifiers == Keys.Control)
|
if (e.Modifiers == Keys.Control)
|
||||||
@ -639,7 +521,7 @@ namespace RyzStudio.Windows.Forms
|
|||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
base.OnPreviewKeyDown(e);
|
//base.OnPreviewKeyDown(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void NodeCountUpdate(ulong v)
|
protected virtual void NodeCountUpdate(ulong v)
|
||||||
@ -649,6 +531,117 @@ namespace RyzStudio.Windows.Forms
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
protected int addIcon(BookmarkItemViewModel viewModel) => addIcon(viewModel.ToModel());
|
||||||
|
|
||||||
|
protected int addIcon(BookmarkItemModel model)
|
||||||
|
{
|
||||||
|
if (this.ImageList.Images.ContainsKey(model.SiteAddress))
|
||||||
|
{
|
||||||
|
return this.ImageList.Images.IndexOfKey(model.SiteAddress);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (iconDatabase.HasIcon(model.SiteAddress))
|
||||||
|
{
|
||||||
|
Image rs = iconDatabase.GetIcon(model.SiteAddress);
|
||||||
|
if (rs == null)
|
||||||
|
{
|
||||||
|
return (int)IconSet.Default;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.ImageList.Images.Add(model.SiteAddress, rs);
|
||||||
|
|
||||||
|
return this.ImageList.Images.IndexOfKey(model.SiteAddress);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Bitmap bmp = model.RetrieveFavicon();
|
||||||
|
if (bmp == null)
|
||||||
|
{
|
||||||
|
return (int)IconSet.Default;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.ImageList.Images.Add(model.SiteAddress, bmp);
|
||||||
|
|
||||||
|
return this.ImageList.Images.IndexOfKey(model.SiteAddress);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected TreeNode addFolderPath(string path)
|
||||||
|
{
|
||||||
|
TreeNode tn = this.Nodes[0];
|
||||||
|
if (tn == null)
|
||||||
|
{
|
||||||
|
return tn;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(path))
|
||||||
|
{
|
||||||
|
return tn;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(path.Trim('\\')))
|
||||||
|
{
|
||||||
|
return tn;
|
||||||
|
}
|
||||||
|
|
||||||
|
string[] folderList = path.Trim('\\').Split('\\');
|
||||||
|
if (folderList.Length <= 0)
|
||||||
|
{
|
||||||
|
return tn;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (string item in folderList)
|
||||||
|
{
|
||||||
|
if (tn.Nodes.ContainsKey(item))
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tn.Nodes.Add(item, item, (int)IconSet.Folder1, (int)IconSet.Folder2);
|
||||||
|
}
|
||||||
|
|
||||||
|
tn = tn.Nodes[item];
|
||||||
|
}
|
||||||
|
|
||||||
|
return tn;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addItem_OnSelectedNode(BookmarkItemViewModel viewModel)
|
||||||
|
{
|
||||||
|
if (this.SelectedNode == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int iconIndex = addIcon(viewModel);
|
||||||
|
|
||||||
|
TreeNode tn = new TreeNode(viewModel.SiteName, iconIndex, iconIndex);
|
||||||
|
tn.Tag = viewModel;
|
||||||
|
tn.ToolTipText = viewModel.ToString();
|
||||||
|
|
||||||
|
int n = this.SelectedNode.Nodes.Add(tn);
|
||||||
|
|
||||||
|
this.SelectedNode = this.SelectedNode.Nodes[n];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void updateItem_OnSelectedNode(BookmarkItemViewModel viewModel)
|
||||||
|
{
|
||||||
|
if (this.SelectedNode == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int iconIndex = addIcon(viewModel);
|
||||||
|
|
||||||
|
this.SelectedNode.Text = viewModel.SiteName;
|
||||||
|
this.SelectedNode.ImageIndex = iconIndex;
|
||||||
|
this.SelectedNode.SelectedImageIndex = iconIndex;
|
||||||
|
this.SelectedNode.Tag = viewModel;
|
||||||
|
this.SelectedNode.ToolTipText = viewModel.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
protected bool isNodeChild(TreeNode drag_node, TreeNode drop_node)
|
protected bool isNodeChild(TreeNode drag_node, TreeNode drop_node)
|
||||||
{
|
{
|
||||||
TreeNode tn = drop_node;
|
TreeNode tn = drop_node;
|
||||||
@ -686,22 +679,6 @@ namespace RyzStudio.Windows.Forms
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//protected void traverseNodeNameList(ref string[] results, TreeNode node)
|
|
||||||
//{
|
|
||||||
// foreach (TreeNode tn in node.Nodes)
|
|
||||||
// {
|
|
||||||
// if (tn.Tag == null)
|
|
||||||
// {
|
|
||||||
// traverseNodeNameList(ref results, tn);
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// Array.Resize(ref results, (results.Length + 1));
|
|
||||||
// results[(results.Length - 1)] = this.GetNodeFullPath(tn);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
protected void traverseNodeCount(ref ulong results, TreeNode node)
|
protected void traverseNodeCount(ref ulong results, TreeNode node)
|
||||||
{
|
{
|
||||||
foreach (TreeNode tn in node.Nodes)
|
foreach (TreeNode tn in node.Nodes)
|
||||||
@ -717,6 +694,12 @@ 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) { }
|
||||||
@ -726,5 +709,10 @@ namespace RyzStudio.Windows.Forms
|
|||||||
//protected string PathDecode(string text) { return RyzStudio.String.DecodeFrom64(text); }
|
//protected string PathDecode(string text) { return RyzStudio.String.DecodeFrom64(text); }
|
||||||
protected string PathEncode(string text) { return System.Web.HttpUtility.UrlEncode(text); }
|
protected string PathEncode(string text) { return System.Web.HttpUtility.UrlEncode(text); }
|
||||||
protected string PathDecode(string text) { return System.Web.HttpUtility.UrlDecode(text); }
|
protected string PathDecode(string text) { return System.Web.HttpUtility.UrlDecode(text); }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,18 +1,23 @@
|
|||||||
using System;
|
using bzit.bomg.Models;
|
||||||
|
using System;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace RyzStudio.Windows.Forms
|
namespace RyzStudio.Windows.Forms
|
||||||
{
|
{
|
||||||
public class MovableTreeViewSelectedNode
|
public class BookmarkTreeViewSNode
|
||||||
{
|
{
|
||||||
protected MovableTreeView Treeview = null;
|
protected BookmarkTreeView Treeview = null;
|
||||||
|
|
||||||
public MovableTreeViewSelectedNode(MovableTreeView treeview)
|
public BookmarkTreeViewSNode(BookmarkTreeView treeview)
|
||||||
{
|
{
|
||||||
Treeview = treeview;
|
Treeview = treeview;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected TreeNode SelectedNode { get => this.Treeview.SelectedNode; set => this.Treeview.SelectedNode = value; }
|
protected TreeNode SelectedNode
|
||||||
|
{
|
||||||
|
get => this.Treeview.SelectedNode;
|
||||||
|
set => this.Treeview.SelectedNode = value;
|
||||||
|
}
|
||||||
|
|
||||||
protected string encodeName(string name) => Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(name));
|
protected string encodeName(string name) => Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(name));
|
||||||
|
|
||||||
@ -34,7 +39,7 @@ namespace RyzStudio.Windows.Forms
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.SelectedNode.Nodes.Add(encodeName(name), name, (int)MovableTreeView.IconSet.Folder1, (int)MovableTreeView.IconSet.Folder2);
|
return this.SelectedNode.Nodes.Add(encodeName(name), name, (int)BookmarkTreeView.IconSet.Folder1, (int)BookmarkTreeView.IconSet.Folder2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TreeNode AddItem(string name, object tag)
|
public TreeNode AddItem(string name, object tag)
|
||||||
@ -49,7 +54,7 @@ namespace RyzStudio.Windows.Forms
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
TreeNode tn = new TreeNode(name, (int)MovableTreeView.IconSet.Default, (int)MovableTreeView.IconSet.Default);
|
TreeNode tn = new TreeNode(name, (int)BookmarkTreeView.IconSet.Default, (int)BookmarkTreeView.IconSet.Default);
|
||||||
tn.Tag = tag;
|
tn.Tag = tag;
|
||||||
|
|
||||||
this.SelectedNode.Nodes.Add(tn);
|
this.SelectedNode.Nodes.Add(tn);
|
||||||
@ -57,35 +62,6 @@ namespace RyzStudio.Windows.Forms
|
|||||||
return tn;
|
return tn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//public TreeNode AddPage() => this.AddPage("New Page (" + DateTime.Now.ToString("yyyy-MM-dd-HHmmss") + ")");
|
|
||||||
|
|
||||||
//public TreeNode AddPage(string name)
|
|
||||||
//{
|
|
||||||
// if (this.SelectedNode == null)
|
|
||||||
// {
|
|
||||||
// return null;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (this.SelectedNode.Tag != null)
|
|
||||||
// {
|
|
||||||
// return null;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// TreeNode tn = this.SelectedNode.Nodes.Add(encodeName(name), name, (int)MovableTreeView.IconSet.Default, (int)MovableTreeView.IconSet.Default);
|
|
||||||
// tn.Tag = new object();
|
|
||||||
// tn.ToolTipText = name;
|
|
||||||
|
|
||||||
// nodeCount++;
|
|
||||||
// NodeCountUpdate(nodeCount);
|
|
||||||
|
|
||||||
// this.SelectedNode = tn;
|
|
||||||
|
|
||||||
// OnAddItemNode(tn);
|
|
||||||
// return tn;
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
public void Delete()
|
public void Delete()
|
||||||
{
|
{
|
||||||
if (this.SelectedNode == null)
|
if (this.SelectedNode == null)
|
||||||
@ -106,6 +82,48 @@ namespace RyzStudio.Windows.Forms
|
|||||||
this.SelectedNode.Remove();
|
this.SelectedNode.Remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Edit()
|
||||||
|
{
|
||||||
|
if (this.SelectedNode == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.SelectedNode.IsEditing)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (this.GetNodeType())
|
||||||
|
{
|
||||||
|
case BookmarkTreeView.NodeType.Root:
|
||||||
|
case BookmarkTreeView.NodeType.Folder:
|
||||||
|
this.SelectedNode.BeginEdit();
|
||||||
|
break;
|
||||||
|
case BookmarkTreeView.NodeType.Page:
|
||||||
|
this.SelectedNode.BeginEdit();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//this.HasChanged = true;
|
||||||
|
|
||||||
|
//if (this.SelectedNode == null)
|
||||||
|
//{
|
||||||
|
// return;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//if (!this.SelectedNode.IsEditing)
|
||||||
|
//{
|
||||||
|
// allowBeginEdit = true;
|
||||||
|
// this.SelectedNode.BeginEdit();
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
public BookmarkTreeView.NodeType GetNodeType() => this.Treeview.GetNodeType(this.SelectedNode);
|
||||||
|
|
||||||
public void MoveDown()
|
public void MoveDown()
|
||||||
{
|
{
|
||||||
if (this.SelectedNode == null)
|
if (this.SelectedNode == null)
|
80
bomg.csproj
80
bomg.csproj
@ -97,7 +97,59 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Models\BookmarkItemModel.cs" />
|
<Compile Include="Models\BookmarkItemModel.cs" />
|
||||||
<Compile Include="RyzStudio\Windows\Forms\MovableTreeViewSelectedNode.cs" />
|
<Compile Include="Windows\Forms\BookmarkTreeViewSNode.cs" />
|
||||||
|
<Compile Include="RyzStudio\Windows\Forms\HorizontalSeparator.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="RyzStudio\Windows\Forms\HorizontalSeparator.Designer.cs">
|
||||||
|
<DependentUpon>HorizontalSeparator.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="RyzStudio\Windows\ThemedForms\ThreadHelper.cs" />
|
||||||
|
<Compile Include="RyzStudio\Windows\ThemedForms\MemoBox.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="RyzStudio\Windows\ThemedForms\MemoBox.designer.cs">
|
||||||
|
<DependentUpon>MemoBox.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="RyzStudio\Windows\ThemedForms\TextBox.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="RyzStudio\Windows\ThemedForms\TextBox.designer.cs">
|
||||||
|
<DependentUpon>TextBox.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="RyzStudio\Windows\ThemedForms\Button.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="RyzStudio\Windows\ThemedForms\Button.designer.cs">
|
||||||
|
<DependentUpon>Button.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="RyzStudio\Windows\ThemedForms\ButtonState.cs" />
|
||||||
|
<Compile Include="RyzStudio\Windows\ThemedForms\ButtonStyle.cs" />
|
||||||
|
<Compile Include="RyzStudio\Windows\ThemedForms\Form.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="RyzStudio\Windows\ThemedForms\Form.Designer.cs">
|
||||||
|
<DependentUpon>Form.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="RyzStudio\Windows\ThemedForms\ProgressBar.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="RyzStudio\Windows\ThemedForms\ProgressBar.Designer.cs">
|
||||||
|
<DependentUpon>ProgressBar.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="RyzStudio\Windows\ThemedForms\ProgressBarInner.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="RyzStudio\Windows\ThemedForms\ProgressBarInner.Designer.cs">
|
||||||
|
<DependentUpon>ProgressBarInner.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="RyzStudio\Windows\ThemedForms\ThemeStyle.cs" />
|
||||||
|
<Compile Include="RyzStudio\Windows\ThemedForms\UserControl.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="RyzStudio\Windows\ThemedForms\UserControl.designer.cs">
|
||||||
|
<DependentUpon>UserControl.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="ViewModels\BookmarkItemViewModel.cs" />
|
<Compile Include="ViewModels\BookmarkItemViewModel.cs" />
|
||||||
<Compile Include="RyzStudio\Data\SQLite\SQLiteDatabase2.cs" />
|
<Compile Include="RyzStudio\Data\SQLite\SQLiteDatabase2.cs" />
|
||||||
<Compile Include="UpdateIconForm.cs">
|
<Compile Include="UpdateIconForm.cs">
|
||||||
@ -157,15 +209,27 @@
|
|||||||
<Compile Include="RyzStudio\Windows\Forms\BigUserControl.Designer.cs">
|
<Compile Include="RyzStudio\Windows\Forms\BigUserControl.Designer.cs">
|
||||||
<DependentUpon>BigUserControl.cs</DependentUpon>
|
<DependentUpon>BigUserControl.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="RyzStudio\Windows\Forms\MovableTreeView.cs">
|
<Compile Include="Windows\Forms\BookmarkTreeView.cs">
|
||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="BookmarkTreeView.cs">
|
<EmbeddedResource Include="RyzStudio\Windows\ThemedForms\MemoBox.resx">
|
||||||
<SubType>Component</SubType>
|
<DependentUpon>MemoBox.cs</DependentUpon>
|
||||||
</Compile>
|
</EmbeddedResource>
|
||||||
<Compile Include="BookmarkTreeView.Designer.cs">
|
<EmbeddedResource Include="RyzStudio\Windows\ThemedForms\TextBox.resx">
|
||||||
<DependentUpon>BookmarkTreeView.cs</DependentUpon>
|
<DependentUpon>TextBox.cs</DependentUpon>
|
||||||
</Compile>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="RyzStudio\Windows\ThemedForms\Button.resx">
|
||||||
|
<DependentUpon>Button.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="RyzStudio\Windows\ThemedForms\Form.resx">
|
||||||
|
<DependentUpon>Form.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="RyzStudio\Windows\ThemedForms\ProgressBar.resx">
|
||||||
|
<DependentUpon>ProgressBar.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="RyzStudio\Windows\ThemedForms\ProgressBarInner.resx">
|
||||||
|
<DependentUpon>ProgressBarInner.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="UpdateIconForm.resx">
|
<EmbeddedResource Include="UpdateIconForm.resx">
|
||||||
<DependentUpon>UpdateIconForm.cs</DependentUpon>
|
<DependentUpon>UpdateIconForm.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
Reference in New Issue
Block a user