diff --git a/AppResource.Designer.cs b/AppResource.Designer.cs
index 617a376..502b3a3 100644
--- a/AppResource.Designer.cs
+++ b/AppResource.Designer.cs
@@ -128,16 +128,6 @@ namespace BookmarkManager {
}
}
- ///
- /// Looks up a localized resource of type System.Drawing.Bitmap.
- ///
- internal static System.Drawing.Bitmap search {
- get {
- object obj = ResourceManager.GetObject("search", resourceCulture);
- return ((System.Drawing.Bitmap)(obj));
- }
- }
-
///
/// Looks up a localized string similar to https://www.hiimray.co.uk/software-bookmark-manager.
///
diff --git a/AppResource.resx b/AppResource.resx
index bea1eb2..97991b2 100644
--- a/AppResource.resx
+++ b/AppResource.resx
@@ -139,9 +139,6 @@
Resources\hexagon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
- Resources\search.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
https://www.hiimray.co.uk/software-bookmark-manager
diff --git a/BookmarkForm.cs b/BookmarkForm.cs
new file mode 100644
index 0000000..e3a4618
--- /dev/null
+++ b/BookmarkForm.cs
@@ -0,0 +1,304 @@
+using FizzyLauncher.Models;
+using System.Windows.Forms;
+using RyzStudio.Windows.ThemedForms;
+using System;
+using RyzStudio.Windows.Forms;
+using bzit.bomg.Models;
+using System.Drawing;
+
+namespace FizzyLauncher
+{
+ public class BookmarkForm : TDialogForm
+ {
+ private System.Windows.Forms.Label label1;
+ private TButton button1;
+ private RyzStudio.Windows.Forms.THorizontalSeparator tHorizontalSeparator1;
+ private TTextBox textBox1;
+ private RyzStudio.Windows.Forms.THorizontalSeparator tHorizontalSeparator2;
+ private Label label2;
+ private Label label3;
+ private TMemoBox memoBox1;
+
+
+ private TMemoBox memoBox2;
+ private Label label4;
+ private TButtonTextBox textBox2;
+ private PictureBox pictureBox1;
+
+
+ protected TreeNode treeNode = null;
+ private ToolTip toolTip1;
+ private System.ComponentModel.IContainer components;
+ protected string faviconAddress = null;
+
+
+ public BookmarkForm(BookmarkItemViewModel model) : base()
+ {
+ InitializeComponent();
+
+ textBox1.Text = model.SiteName?.Trim() ?? string.Empty;
+ textBox2.Text = model.SiteAddress?.Trim() ?? string.Empty;
+ memoBox1.Text = model.SiteDescription?.Trim() ?? string.Empty;
+ memoBox2.Text = model.Notes?.Trim() ?? string.Empty;
+ faviconAddress = model.FaviconAddress;
+
+ textBox2.SetTooltipText(toolTip1, "Retrieve web page information");
+ }
+
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.label1 = new System.Windows.Forms.Label();
+ this.button1 = new RyzStudio.Windows.ThemedForms.TButton();
+ this.tHorizontalSeparator1 = new RyzStudio.Windows.Forms.THorizontalSeparator();
+ this.tHorizontalSeparator2 = new RyzStudio.Windows.Forms.THorizontalSeparator();
+ this.textBox1 = new RyzStudio.Windows.ThemedForms.TTextBox();
+ this.label2 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.memoBox1 = new RyzStudio.Windows.ThemedForms.TMemoBox();
+ this.memoBox2 = new RyzStudio.Windows.ThemedForms.TMemoBox();
+ this.label4 = new System.Windows.Forms.Label();
+ this.textBox2 = new RyzStudio.Windows.ThemedForms.TButtonTextBox();
+ this.pictureBox1 = new System.Windows.Forms.PictureBox();
+ this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+ this.SuspendLayout();
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.BackColor = System.Drawing.Color.Transparent;
+ this.label1.ForeColor = System.Drawing.SystemColors.ControlText;
+ this.label1.Location = new System.Drawing.Point(10, 21);
+ this.label1.Margin = new System.Windows.Forms.Padding(0);
+ this.label1.Name = "label1";
+ this.label1.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10);
+ this.label1.Size = new System.Drawing.Size(29, 34);
+ this.label1.TabIndex = 153;
+ this.label1.Text = "Title";
+ this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // button1
+ //
+ this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.button1.BackColor = System.Drawing.Color.Transparent;
+ this.button1.DefaultImage = null;
+ this.button1.DownImage = null;
+ this.button1.IsSelected = false;
+ this.button1.LabelText = "&Save";
+ this.button1.Location = new System.Drawing.Point(241, 469);
+ this.button1.Margin = new System.Windows.Forms.Padding(10);
+ 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(128, 32);
+ this.button1.TabIndex = 173;
+ this.button1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.button1_MouseClick);
+ //
+ // tHorizontalSeparator1
+ //
+ this.tHorizontalSeparator1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.tHorizontalSeparator1.AutoScrollMargin = new System.Drawing.Size(0, 0);
+ this.tHorizontalSeparator1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
+ this.tHorizontalSeparator1.BackColor = System.Drawing.Color.Transparent;
+ this.tHorizontalSeparator1.Location = new System.Drawing.Point(10, 437);
+ this.tHorizontalSeparator1.Margin = new System.Windows.Forms.Padding(10, 0, 10, 0);
+ this.tHorizontalSeparator1.MaximumSize = new System.Drawing.Size(4920, 2);
+ this.tHorizontalSeparator1.MinimumSize = new System.Drawing.Size(0, 22);
+ this.tHorizontalSeparator1.Name = "tHorizontalSeparator1";
+ this.tHorizontalSeparator1.Padding = new System.Windows.Forms.Padding(0, 10, 0, 10);
+ this.tHorizontalSeparator1.Size = new System.Drawing.Size(364, 22);
+ this.tHorizontalSeparator1.TabIndex = 188;
+ //
+ // tHorizontalSeparator2
+ //
+ this.tHorizontalSeparator2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.tHorizontalSeparator2.AutoScrollMargin = new System.Drawing.Size(0, 0);
+ this.tHorizontalSeparator2.AutoScrollMinSize = new System.Drawing.Size(0, 0);
+ this.tHorizontalSeparator2.BackColor = System.Drawing.Color.Transparent;
+ this.tHorizontalSeparator2.Location = new System.Drawing.Point(10, 223);
+ this.tHorizontalSeparator2.Margin = new System.Windows.Forms.Padding(10, 0, 10, 0);
+ this.tHorizontalSeparator2.MaximumSize = new System.Drawing.Size(4920, 2);
+ this.tHorizontalSeparator2.MinimumSize = new System.Drawing.Size(0, 22);
+ this.tHorizontalSeparator2.Name = "tHorizontalSeparator2";
+ this.tHorizontalSeparator2.Padding = new System.Windows.Forms.Padding(0, 10, 0, 10);
+ this.tHorizontalSeparator2.Size = new System.Drawing.Size(364, 22);
+ this.tHorizontalSeparator2.TabIndex = 190;
+ //
+ // textBox1
+ //
+ this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.textBox1.BackColor = System.Drawing.Color.Transparent;
+ this.textBox1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
+ this.textBox1.Location = new System.Drawing.Point(110, 20);
+ this.textBox1.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
+ this.textBox1.Size = new System.Drawing.Size(222, 35);
+ this.textBox1.SubmitButton = null;
+ this.textBox1.TabIndex = 192;
+ this.textBox1.UseSystemPasswordChar = false;
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.BackColor = System.Drawing.Color.Transparent;
+ this.label2.ForeColor = System.Drawing.SystemColors.ControlText;
+ this.label2.Location = new System.Drawing.Point(10, 67);
+ this.label2.Margin = new System.Windows.Forms.Padding(0);
+ this.label2.Name = "label2";
+ this.label2.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10);
+ this.label2.Size = new System.Drawing.Size(49, 34);
+ this.label2.TabIndex = 193;
+ this.label2.Text = "Address";
+ this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.BackColor = System.Drawing.Color.Transparent;
+ this.label3.ForeColor = System.Drawing.SystemColors.ControlText;
+ this.label3.Location = new System.Drawing.Point(10, 113);
+ this.label3.Margin = new System.Windows.Forms.Padding(0);
+ this.label3.Name = "label3";
+ this.label3.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10);
+ this.label3.Size = new System.Drawing.Size(67, 34);
+ this.label3.TabIndex = 195;
+ this.label3.Text = "Description";
+ this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // memoBox1
+ //
+ this.memoBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.memoBox1.BackColor = System.Drawing.Color.Transparent;
+ this.memoBox1.Location = new System.Drawing.Point(110, 112);
+ this.memoBox1.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
+ this.memoBox1.Name = "memoBox1";
+ this.memoBox1.Padding = new System.Windows.Forms.Padding(10, 10, 3, 9);
+ this.memoBox1.Size = new System.Drawing.Size(259, 105);
+ this.memoBox1.TabIndex = 197;
+ //
+ // memoBox2
+ //
+ this.memoBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.memoBox2.BackColor = System.Drawing.Color.Transparent;
+ this.memoBox2.Location = new System.Drawing.Point(110, 251);
+ this.memoBox2.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
+ this.memoBox2.Name = "memoBox2";
+ this.memoBox2.Padding = new System.Windows.Forms.Padding(10, 10, 3, 9);
+ this.memoBox2.Size = new System.Drawing.Size(259, 180);
+ this.memoBox2.TabIndex = 199;
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.BackColor = System.Drawing.Color.Transparent;
+ this.label4.ForeColor = System.Drawing.SystemColors.ControlText;
+ this.label4.Location = new System.Drawing.Point(10, 252);
+ this.label4.Margin = new System.Windows.Forms.Padding(0);
+ this.label4.Name = "label4";
+ this.label4.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10);
+ this.label4.Size = new System.Drawing.Size(38, 34);
+ this.label4.TabIndex = 198;
+ this.label4.Text = "Notes";
+ this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // textBox2
+ //
+ this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.textBox2.BackColor = System.Drawing.Color.Transparent;
+ this.textBox2.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
+ this.textBox2.HighlightImage = global::BookmarkManager.UIResource.search2;
+ this.textBox2.Location = new System.Drawing.Point(110, 66);
+ this.textBox2.Margin = new System.Windows.Forms.Padding(10, 3, 3, 3);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.NormalImage = global::BookmarkManager.UIResource.search;
+ this.textBox2.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
+ this.textBox2.Size = new System.Drawing.Size(259, 35);
+ this.textBox2.SubmitButton = null;
+ this.textBox2.TabIndex = 200;
+ this.textBox2.UseSystemPasswordChar = false;
+ this.textBox2.OnButtonClick += new System.EventHandler(this.textBox2_OnButtonClick);
+ //
+ // pictureBox1
+ //
+ this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
+ this.pictureBox1.ErrorImage = null;
+ this.pictureBox1.InitialImage = null;
+ this.pictureBox1.Location = new System.Drawing.Point(337, 20);
+ this.pictureBox1.Name = "pictureBox1";
+ this.pictureBox1.Size = new System.Drawing.Size(32, 35);
+ this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
+ this.pictureBox1.TabIndex = 201;
+ this.pictureBox1.TabStop = false;
+ //
+ // BookmarkForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(384, 521);
+ this.Controls.Add(this.pictureBox1);
+ this.Controls.Add(this.textBox2);
+ this.Controls.Add(this.memoBox2);
+ this.Controls.Add(this.label4);
+ this.Controls.Add(this.memoBox1);
+ this.Controls.Add(this.label3);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.textBox1);
+ this.Controls.Add(this.tHorizontalSeparator2);
+ this.Controls.Add(this.tHorizontalSeparator1);
+ this.Controls.Add(this.button1);
+ this.Controls.Add(this.label1);
+ this.MinimumSize = new System.Drawing.Size(400, 560);
+ this.Name = "BookmarkForm";
+ this.Text = "Edit Bookmark";
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ protected override void OnShown(EventArgs e)
+ {
+ base.OnShown(e);
+
+ this.DialogResult = System.Windows.Forms.DialogResult.None;
+ }
+
+
+ public BookmarkItemViewModel Model
+ {
+ get => new BookmarkItemViewModel()
+ {
+ SiteName = textBox1.Text?.Trim() ?? string.Empty,
+ SiteAddress = textBox2.Text?.Trim() ?? string.Empty,
+ SiteDescription = memoBox1.Text?.Trim() ?? string.Empty,
+ Notes = memoBox2.Text?.Trim() ?? string.Empty,
+ FaviconAddress = faviconAddress
+ };
+ }
+
+ public Image Favicon { get => pictureBox1.Image; }
+
+
+ private void button1_MouseClick(object sender, MouseEventArgs e)
+ {
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+
+ private void textBox2_OnButtonClick(object sender, EventArgs e)
+ {
+
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/BookmarkForm.resx b/BookmarkForm.resx
new file mode 100644
index 0000000..57523cc
--- /dev/null
+++ b/BookmarkForm.resx
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/BookmarkManager.csproj b/BookmarkManager.csproj
index 732dcc4..694f0a8 100644
--- a/BookmarkManager.csproj
+++ b/BookmarkManager.csproj
@@ -62,6 +62,8 @@
+
+
@@ -79,6 +81,7 @@
+
@@ -108,6 +111,9 @@
Form
+
+ Form
+
Form
diff --git a/FindForm.cs b/FindForm.cs
index efeafd5..57f5c1e 100644
--- a/FindForm.cs
+++ b/FindForm.cs
@@ -19,13 +19,12 @@ namespace FizzyLauncher
private bool findNextNew = false;
- public FindForm(MainForm parent, BookmarkTreeView treeView)
+ public FindForm(BookmarkTreeView treeView)
{
InitializeComponent();
treeView1 = treeView;
- this.ParentForm = parent;
this.StartPosition = FormStartPosition.WindowsDefaultLocation;
textBox1.InnerTextBox.PreviewKeyDown += textBox1_PreviewKeyDown;
@@ -100,7 +99,7 @@ namespace FizzyLauncher
this.textBox1.Size = new System.Drawing.Size(328, 35);
this.textBox1.SubmitButton = null;
this.textBox1.TabIndex = 191;
- this.textBox1.UseSystemPasswordChar = true;
+ this.textBox1.UseSystemPasswordChar = false;
//
// button1
//
@@ -155,9 +154,6 @@ namespace FizzyLauncher
}
- [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- public new MainForm ParentForm { get; protected set; } = null;
-
[Browsable(false)]
public string Password => textBox1.Text;
diff --git a/MainForm.Designer.cs b/MainForm.Designer.cs
index f5aead8..4c306e2 100644
--- a/MainForm.Designer.cs
+++ b/MainForm.Designer.cs
@@ -130,7 +130,7 @@
this.newToolStripMenuItem.Image = global::BookmarkManager.UIResource.file2;
this.newToolStripMenuItem.Name = "newToolStripMenuItem";
this.newToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
- this.newToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
+ this.newToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.newToolStripMenuItem.Text = "&New";
this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click);
//
@@ -139,52 +139,52 @@
this.openToolStripMenuItem.Image = global::BookmarkManager.UIResource.folder2;
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
- this.openToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
+ this.openToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.openToolStripMenuItem.Text = "&Open";
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
//
// toolStripMenuItem13
//
this.toolStripMenuItem13.Name = "toolStripMenuItem13";
- this.toolStripMenuItem13.Size = new System.Drawing.Size(143, 6);
+ this.toolStripMenuItem13.Size = new System.Drawing.Size(177, 6);
//
// closeToolStripMenuItem
//
this.closeToolStripMenuItem.Name = "closeToolStripMenuItem";
- this.closeToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
+ this.closeToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.closeToolStripMenuItem.Text = "&Close";
this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);
//
// toolStripMenuItem14
//
this.toolStripMenuItem14.Name = "toolStripMenuItem14";
- this.toolStripMenuItem14.Size = new System.Drawing.Size(143, 6);
+ this.toolStripMenuItem14.Size = new System.Drawing.Size(177, 6);
//
// saveToolStripMenuItem
//
this.saveToolStripMenuItem.Image = global::BookmarkManager.UIResource.disk2;
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
this.saveToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
- this.saveToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
+ this.saveToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.saveToolStripMenuItem.Text = "&Save";
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
//
// saveAsToolStripMenuItem
//
this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
- this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
+ this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.saveAsToolStripMenuItem.Text = "Save &As...";
this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.saveAsToolStripMenuItem_Click);
//
// toolStripMenuItem15
//
this.toolStripMenuItem15.Name = "toolStripMenuItem15";
- this.toolStripMenuItem15.Size = new System.Drawing.Size(143, 6);
+ this.toolStripMenuItem15.Size = new System.Drawing.Size(177, 6);
//
// exitToolStripMenuItem2
//
this.exitToolStripMenuItem2.Name = "exitToolStripMenuItem2";
- this.exitToolStripMenuItem2.Size = new System.Drawing.Size(146, 22);
+ this.exitToolStripMenuItem2.Size = new System.Drawing.Size(180, 22);
this.exitToolStripMenuItem2.Text = "E&xit";
this.exitToolStripMenuItem2.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
@@ -198,10 +198,10 @@
//
// findToolStripMenuItem
//
- this.findToolStripMenuItem.Image = global::BookmarkManager.AppResource.search;
+ this.findToolStripMenuItem.Image = global::BookmarkManager.UIResource.search2;
this.findToolStripMenuItem.Name = "findToolStripMenuItem";
this.findToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F)));
- this.findToolStripMenuItem.Size = new System.Drawing.Size(137, 22);
+ this.findToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.findToolStripMenuItem.Text = "&Find";
this.findToolStripMenuItem.Click += new System.EventHandler(this.findToolStripMenuItem_Click);
//
@@ -375,34 +375,34 @@
// addPageToolStripMenuItem1
//
this.addPageToolStripMenuItem1.Name = "addPageToolStripMenuItem1";
- this.addPageToolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
+ this.addPageToolStripMenuItem1.Size = new System.Drawing.Size(138, 22);
this.addPageToolStripMenuItem1.Text = "Add &Page";
this.addPageToolStripMenuItem1.Click += new System.EventHandler(this.addPageToolStripMenuItem1_Click);
//
// addFolderToolStripMenuItem1
//
this.addFolderToolStripMenuItem1.Name = "addFolderToolStripMenuItem1";
- this.addFolderToolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
+ this.addFolderToolStripMenuItem1.Size = new System.Drawing.Size(138, 22);
this.addFolderToolStripMenuItem1.Text = "Add &Folder";
this.addFolderToolStripMenuItem1.Click += new System.EventHandler(this.addFolderToolStripMenuItem1_Click);
//
// toolStripMenuItem4
//
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
- this.toolStripMenuItem4.Size = new System.Drawing.Size(177, 6);
+ this.toolStripMenuItem4.Size = new System.Drawing.Size(135, 6);
//
// openAllToolStripMenuItem
//
this.openAllToolStripMenuItem.Image = global::BookmarkManager.AppResource.bookmark;
this.openAllToolStripMenuItem.Name = "openAllToolStripMenuItem";
- this.openAllToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
+ this.openAllToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.openAllToolStripMenuItem.Text = "&Open All";
this.openAllToolStripMenuItem.Click += new System.EventHandler(this.openAllToolStripMenuItem_Click);
//
// editToolStripMenuItem1
//
this.editToolStripMenuItem1.Name = "editToolStripMenuItem1";
- this.editToolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
+ this.editToolStripMenuItem1.Size = new System.Drawing.Size(138, 22);
this.editToolStripMenuItem1.Text = "&Edit";
this.editToolStripMenuItem1.Click += new System.EventHandler(this.editToolStripMenuItem1_Click);
//
@@ -410,32 +410,32 @@
//
this.deleteToolStripMenuItem.Image = global::BookmarkManager.UIResource.trash2;
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
- this.deleteToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
+ this.deleteToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.deleteToolStripMenuItem.Text = "&Delete";
this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click);
//
// toolStripMenuItem5
//
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
- this.toolStripMenuItem5.Size = new System.Drawing.Size(177, 6);
+ this.toolStripMenuItem5.Size = new System.Drawing.Size(135, 6);
//
// sortToolStripMenuItem1
//
this.sortToolStripMenuItem1.Name = "sortToolStripMenuItem1";
- this.sortToolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
+ this.sortToolStripMenuItem1.Size = new System.Drawing.Size(138, 22);
this.sortToolStripMenuItem1.Text = "&Sort";
this.sortToolStripMenuItem1.Click += new System.EventHandler(this.sortToolStripMenuItem1_Click);
//
// toolStripMenuItem6
//
this.toolStripMenuItem6.Name = "toolStripMenuItem6";
- this.toolStripMenuItem6.Size = new System.Drawing.Size(177, 6);
+ this.toolStripMenuItem6.Size = new System.Drawing.Size(135, 6);
//
// moveUpToolStripMenuItem
//
this.moveUpToolStripMenuItem.Image = global::BookmarkManager.UIResource.arrow_up2;
this.moveUpToolStripMenuItem.Name = "moveUpToolStripMenuItem";
- this.moveUpToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
+ this.moveUpToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.moveUpToolStripMenuItem.Text = "Move &Up";
this.moveUpToolStripMenuItem.Click += new System.EventHandler(this.moveUpToolStripMenuItem_Click);
//
@@ -443,7 +443,7 @@
//
this.moveDownToolStripMenuItem.Image = global::BookmarkManager.UIResource.arrow_down2;
this.moveDownToolStripMenuItem.Name = "moveDownToolStripMenuItem";
- this.moveDownToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
+ this.moveDownToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.moveDownToolStripMenuItem.Text = "Move &Down";
this.moveDownToolStripMenuItem.Click += new System.EventHandler(this.moveDownToolStripMenuItem_Click);
//
@@ -458,13 +458,13 @@
this.moveUpToolStripMenuItem1,
this.moveDownToolStripMenuItem1});
this.pageContextMenu.Name = "pageContextMenu";
- this.pageContextMenu.Size = new System.Drawing.Size(181, 148);
+ this.pageContextMenu.Size = new System.Drawing.Size(139, 126);
//
// openToolStripMenuItem1
//
this.openToolStripMenuItem1.Image = global::BookmarkManager.AppResource.bookmark;
this.openToolStripMenuItem1.Name = "openToolStripMenuItem1";
- this.openToolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
+ this.openToolStripMenuItem1.Size = new System.Drawing.Size(138, 22);
this.openToolStripMenuItem1.Text = "&Open";
this.openToolStripMenuItem1.Click += new System.EventHandler(this.openToolStripMenuItem1_Click);
//
@@ -484,7 +484,7 @@
//
this.deleteToolStripMenuItem1.Image = global::BookmarkManager.UIResource.trash2;
this.deleteToolStripMenuItem1.Name = "deleteToolStripMenuItem1";
- this.deleteToolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
+ this.deleteToolStripMenuItem1.Size = new System.Drawing.Size(138, 22);
this.deleteToolStripMenuItem1.Text = "&Delete";
this.deleteToolStripMenuItem1.Click += new System.EventHandler(this.deleteToolStripMenuItem1_Click);
//
@@ -497,7 +497,7 @@
//
this.moveUpToolStripMenuItem1.Image = global::BookmarkManager.UIResource.arrow_up2;
this.moveUpToolStripMenuItem1.Name = "moveUpToolStripMenuItem1";
- this.moveUpToolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
+ this.moveUpToolStripMenuItem1.Size = new System.Drawing.Size(138, 22);
this.moveUpToolStripMenuItem1.Text = "Move &Up";
this.moveUpToolStripMenuItem1.Click += new System.EventHandler(this.moveUpToolStripMenuItem1_Click);
//
@@ -505,7 +505,7 @@
//
this.moveDownToolStripMenuItem1.Image = global::BookmarkManager.UIResource.arrow_down2;
this.moveDownToolStripMenuItem1.Name = "moveDownToolStripMenuItem1";
- this.moveDownToolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
+ this.moveDownToolStripMenuItem1.Size = new System.Drawing.Size(138, 22);
this.moveDownToolStripMenuItem1.Text = "Move &Down";
this.moveDownToolStripMenuItem1.Click += new System.EventHandler(this.moveDownToolStripMenuItem1_Click);
//
diff --git a/MainForm.cs b/MainForm.cs
index c025d26..3ee41c9 100644
--- a/MainForm.cs
+++ b/MainForm.cs
@@ -392,7 +392,7 @@ namespace FizzyLauncher
return;
}
- if (findForm == null) findForm = new FindForm(this, treeView1);
+ if (findForm == null) findForm = new FindForm(treeView1);
findForm.Show();
}
@@ -680,7 +680,11 @@ namespace FizzyLauncher
case Keys.F2:
if (nodeType == BookmarkTreeView.NodeType.Page)
{
- //(new BookmarkEditForm(treeView1)).ShowDialog();
+ BookmarkForm bookmarkForm = new BookmarkForm(treeView1.GetNodeModel());
+ if (bookmarkForm.ShowDialog() == DialogResult.OK)
+ {
+ treeView1.UpdateItem(treeView1.SelectedNode, bookmarkForm.Model, bookmarkForm.Favicon);
+ }
}
break;
@@ -689,13 +693,29 @@ namespace FizzyLauncher
{
if ((nodeType == BookmarkTreeView.NodeType.Root) || (nodeType == BookmarkTreeView.NodeType.Folder))
{
- //(new BookmarkEditForm(treeView1)).ShowDialog();
+ // do nothing
}
else if (nodeType == BookmarkTreeView.NodeType.Page)
{
treeView1.SelectedNode = tn.Parent;
+ }
- //(new BookmarkEditForm(treeView1)).ShowDialog();
+ // add placeholder
+ TreeNode node = treeView1.AddItem(treeView1.SelectedNode, new BookmarkItemViewModel()
+ {
+ SiteName = "New Bookmark"
+ });
+ node.EnsureVisible();
+ treeView1.SelectedNode = node;
+
+ BookmarkForm bookmarkForm = new BookmarkForm(treeView1.GetNodeModel());
+ if (bookmarkForm.ShowDialog() == DialogResult.OK)
+ {
+ treeView1.UpdateItem(treeView1.SelectedNode, bookmarkForm.Model, bookmarkForm.Favicon);
+ }
+ else
+ {
+ node.Remove();
}
}
@@ -886,7 +906,7 @@ namespace FizzyLauncher
if (fileHandler.IsEncrypted(sessionFilename))
{
- PasswordForm passwordForm = new PasswordForm(this);
+ PasswordForm passwordForm = new PasswordForm();
if (passwordForm.ShowDialog() == DialogResult.OK)
{
sessionPassword = passwordForm.Password;
@@ -1020,7 +1040,7 @@ namespace FizzyLauncher
if (fileHandler.IsEncryptionSupported)
{
- PasswordForm passwordForm = new PasswordForm(this);
+ PasswordForm passwordForm = new PasswordForm();
if (passwordForm.ShowDialog() == DialogResult.OK)
{
if (!string.IsNullOrWhiteSpace(passwordForm.Password))
diff --git a/Models/BookmarkItemViewModel.cs b/Models/BookmarkItemViewModel.cs
index 7db5f07..7bf7436 100644
--- a/Models/BookmarkItemViewModel.cs
+++ b/Models/BookmarkItemViewModel.cs
@@ -15,6 +15,8 @@ namespace bzit.bomg.Models
public string TreeviewPath { get; set; }
+ public string Notes { get; set; }
+
//public BookmarkItemModel ToModel()
//{
// return new BookmarkItemModel()
@@ -30,19 +32,33 @@ namespace bzit.bomg.Models
public new string ToString()
{
StringBuilder sb = new StringBuilder();
- sb.AppendLine("Name = ");
- sb.AppendLine(this.SiteName ?? string.Empty);
- sb.AppendLine(string.Empty);
- sb.AppendLine("Address = ");
- sb.AppendLine(this.SiteAddress ?? string.Empty);
- sb.AppendLine(string.Empty);
+ if (!string.IsNullOrWhiteSpace(this.SiteName))
+ {
+ sb.AppendLine("Name");
+ sb.AppendLine(this.SiteName + Environment.NewLine);
+ }
- sb.AppendLine("Description = ");
- sb.AppendLine(this.SiteDescription ?? string.Empty);
- sb.AppendLine(string.Empty);
+ if (!string.IsNullOrWhiteSpace(this.SiteAddress))
+ {
+ sb.AppendLine("Address");
+ sb.AppendLine(this.SiteAddress + Environment.NewLine);
+ }
+
+ if (!string.IsNullOrWhiteSpace(this.SiteDescription))
+ {
+ sb.AppendLine("Description");
+ sb.AppendLine(this.SiteDescription + Environment.NewLine);
+ }
+
+ if (!string.IsNullOrWhiteSpace(this.Notes))
+ {
+ sb.AppendLine("Notes");
+ sb.AppendLine(this.Notes + Environment.NewLine);
+ }
return sb.ToString();
}
+
}
}
\ No newline at end of file
diff --git a/PasswordForm.cs b/PasswordForm.cs
index 70c01a2..e660d1f 100644
--- a/PasswordForm.cs
+++ b/PasswordForm.cs
@@ -13,11 +13,10 @@ namespace FizzyLauncher
private TTextBox textBox1;
- public PasswordForm(MainForm parent)
+ public PasswordForm()
{
InitializeComponent();
- this.ParentForm = parent;
this.StartPosition = FormStartPosition.WindowsDefaultLocation;
textBox1.InnerTextBox.MaxLength = 255;
@@ -120,9 +119,6 @@ namespace FizzyLauncher
}
- [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- public new MainForm ParentForm { get; protected set; } = null;
-
[Browsable(false)]
public string Password => textBox1.Text;
diff --git a/Resources/UI/icons.svg b/Resources/UI/icons.svg
index fc6bf20..d50c7a4 100644
--- a/Resources/UI/icons.svg
+++ b/Resources/UI/icons.svg
@@ -7,19 +7,19 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
- sodipodi:docname="icons.svg"
- id="svg8"
- version="1.1"
- class="feather feather-save"
- stroke-linejoin="round"
- stroke-linecap="round"
- stroke-width="2"
- stroke="currentColor"
- fill="none"
- viewBox="0 0 169.84447 96.385719"
+ width="169.84447"
height="96.385719"
- width="169.84447">
+ viewBox="0 0 169.84447 96.385719"
+ fill="none"
+ stroke="currentColor"
+ stroke-width="2"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ class="feather feather-save"
+ version="1.1"
+ id="svg8"
+ sodipodi:docname="icons.svg"
+ inkscape:version="1.0 (4035a4fb49, 2020-05-01)">
@@ -28,576 +28,614 @@
image/svg+xml
-
+
+ fit-margin-left="0"
+ fit-margin-top="0"
+ inkscape:document-rotation="0"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1017"
+ id="namedview10"
+ showgrid="false"
+ inkscape:zoom="6.2608413"
+ inkscape:cx="114.18197"
+ inkscape:cy="50.603105"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg8" />
-
-
-
-
-
-
+ inkscape:export-ydpi="96">
-
-
-
+ inkscape:export-ydpi="96">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id="line1846-4-8-9" />
+ id="line1848-6-9-2" />
+ id="line1850-4-1-6" />
+ transform="matrix(0.81631862,0,0,0.81631862,125.0902,8.8119001)"
+ id="g1794"
+ style="fill:none;stroke:#d4d4d4;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1">
-
-
-
-
-
+ style="stroke:#d4d4d4;stroke-opacity:1"
+ cx="11"
+ cy="11"
+ r="8"
+ id="circle1780" />
+
+
+
+
+
diff --git a/Resources/UI/search.png b/Resources/UI/search.png
new file mode 100644
index 0000000..12a0b2a
Binary files /dev/null and b/Resources/UI/search.png differ
diff --git a/Resources/UI/search2.png b/Resources/UI/search2.png
new file mode 100644
index 0000000..177cbb0
Binary files /dev/null and b/Resources/UI/search2.png differ
diff --git a/Resources/search.png b/Resources/search.png
deleted file mode 100644
index b1feec0..0000000
Binary files a/Resources/search.png and /dev/null differ
diff --git a/RyzStudio/Windows/ThemedForms/TMemoBox.cs b/RyzStudio/Windows/ThemedForms/TMemoBox.cs
new file mode 100644
index 0000000..cc2b320
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/TMemoBox.cs
@@ -0,0 +1,59 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ using RyzStudio.Drawing;
+ using System;
+ using System.ComponentModel;
+ using System.Drawing;
+ using System.Windows.Forms;
+
+ public partial class TMemoBox : RyzStudio.Windows.ThemedForms.TUserControl
+ {
+ protected readonly Padding textboxPadding = new Padding(6, 6, 0, 6);
+
+ public TMemoBox() : 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());
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/TMemoBox.designer.cs b/RyzStudio/Windows/ThemedForms/TMemoBox.designer.cs
new file mode 100644
index 0000000..52800af
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/TMemoBox.designer.cs
@@ -0,0 +1,63 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ partial class TMemoBox
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ 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;
+ }
+}
diff --git a/RyzStudio/Windows/ThemedForms/TextBox/TButtonTextBox.cs b/RyzStudio/Windows/ThemedForms/TextBox/TButtonTextBox.cs
index dbe7d77..63231d7 100644
--- a/RyzStudio/Windows/ThemedForms/TextBox/TButtonTextBox.cs
+++ b/RyzStudio/Windows/ThemedForms/TextBox/TButtonTextBox.cs
@@ -112,6 +112,12 @@
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public new Padding Margin { get => base.Margin; set => base.Margin = value; }
+
+ public void SetTooltipText(ToolTip toolTip, string text)
+ {
+ toolTip.SetToolTip(imageBox1, text);
+ }
+
protected override void updateBackground(Graphics g, ThemeStyle style)
{
int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding;
diff --git a/UIResource.Designer.cs b/UIResource.Designer.cs
index 01da551..a7410f8 100644
--- a/UIResource.Designer.cs
+++ b/UIResource.Designer.cs
@@ -280,6 +280,26 @@ namespace BookmarkManager {
}
}
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap search {
+ get {
+ object obj = ResourceManager.GetObject("search", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap search2 {
+ get {
+ object obj = ResourceManager.GetObject("search2", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
diff --git a/UIResource.resx b/UIResource.resx
index 20df970..ba6986d 100644
--- a/UIResource.resx
+++ b/UIResource.resx
@@ -184,6 +184,12 @@
Resources\UI\plus2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ Resources\UI\search.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ Resources\UI\search2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
Resources\UI\trash.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
diff --git a/Windows/Forms/BookmarkTreeView.cs b/Windows/Forms/BookmarkTreeView.cs
index 5a6e873..d3617aa 100644
--- a/Windows/Forms/BookmarkTreeView.cs
+++ b/Windows/Forms/BookmarkTreeView.cs
@@ -627,11 +627,11 @@ namespace RyzStudio.Windows.Forms
this.HasChanged = true;
}
- public void AddItem(TreeNode treeNode, BookmarkItemViewModel viewModel)
+ public TreeNode AddItem(TreeNode treeNode, BookmarkItemViewModel viewModel)
{
if (treeNode == null)
{
- return;
+ return null;
}
int iconIndex = addIcon(viewModel);
@@ -643,6 +643,8 @@ namespace RyzStudio.Windows.Forms
treeNode.Nodes.Add(tn);
this.HasChanged = true;
+
+ return tn;
}
//public void AddOrUpdateItem(TreeNode treeNode, BookmarkItemViewModel viewModel)
@@ -854,24 +856,23 @@ namespace RyzStudio.Windows.Forms
public new void Sort() => Sort(this.SelectedNode);
- //public void UpdateItem(TreeNode treeNode, BookmarkItemViewModel viewModel)
- //{
- // if (treeNode == null)
- // {
- // return;
- // }
+ public void UpdateItem(TreeNode treeNode, BookmarkItemViewModel model, Image image)
+ {
+ if (treeNode == null)
+ {
+ return;
+ }
- // int iconIndex = addIcon(viewModel);
+ int iconIndex = addIcon(model);
- // treeNode.Text = viewModel.SiteName;
- // treeNode.ImageIndex = iconIndex;
- // treeNode.SelectedImageIndex = iconIndex;
- // treeNode.Tag = viewModel;
- // treeNode.ToolTipText = viewModel.ToString();
-
- // this.HasChanged = true;
- //}
+ treeNode.Text = model.SiteName;
+ treeNode.ImageIndex = iconIndex;
+ treeNode.SelectedImageIndex = iconIndex;
+ treeNode.Tag = model;
+ treeNode.ToolTipText = model.ToString();
+ this.HasChanged = true;
+ }
protected int addIcon(BookmarkItemViewModel viewModel)
@@ -1015,43 +1016,43 @@ namespace RyzStudio.Windows.Forms
}
}
- protected void TraverseBookmarkList(List rs, TreeNode node)
- {
- foreach (TreeNode tn in node.Nodes)
- {
- NodeType nodeType = GetNodeType(tn);
- if (nodeType == NodeType.Folder)
- {
- TraverseBookmarkList(rs, tn);
- }
- else if (nodeType == NodeType.Page)
- {
- BookmarkItemViewModel nodeTag = GetNodeModel(tn);
- nodeTag.TreeviewPath = GetNodePath(tn);
+ //protected void TraverseBookmarkList(List rs, TreeNode node)
+ //{
+ // foreach (TreeNode tn in node.Nodes)
+ // {
+ // NodeType nodeType = GetNodeType(tn);
+ // if (nodeType == NodeType.Folder)
+ // {
+ // TraverseBookmarkList(rs, tn);
+ // }
+ // else if (nodeType == NodeType.Page)
+ // {
+ // BookmarkItemViewModel nodeTag = GetNodeModel(tn);
+ // nodeTag.TreeviewPath = GetNodePath(tn);
- if (nodeTag != null)
- {
- rs.Add(tn);
- }
- }
- }
- }
+ // if (nodeTag != null)
+ // {
+ // rs.Add(tn);
+ // }
+ // }
+ // }
+ //}
- protected void TraverseBookmarkList(ref int itemCount, TreeNode node)
- {
- foreach (TreeNode tn in node.Nodes)
- {
- NodeType nodeType = GetNodeType(tn);
- if (nodeType == NodeType.Folder)
- {
- TraverseBookmarkList(ref itemCount, tn);
- }
- else if (nodeType == NodeType.Page)
- {
- itemCount++;
- }
- }
- }
+ //protected void TraverseBookmarkList(ref int itemCount, TreeNode node)
+ //{
+ // foreach (TreeNode tn in node.Nodes)
+ // {
+ // NodeType nodeType = GetNodeType(tn);
+ // if (nodeType == NodeType.Folder)
+ // {
+ // TraverseBookmarkList(ref itemCount, tn);
+ // }
+ // else if (nodeType == NodeType.Page)
+ // {
+ // itemCount++;
+ // }
+ // }
+ //}