WIP: clean-up + icons

This commit is contained in:
Ray 2021-09-14 20:36:04 +01:00
parent c770265283
commit c00d42a7d8
20 changed files with 1223 additions and 642 deletions

View File

@ -128,16 +128,6 @@ namespace BookmarkManager {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap search {
get {
object obj = ResourceManager.GetObject("search", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to https://www.hiimray.co.uk/software-bookmark-manager. /// Looks up a localized string similar to https://www.hiimray.co.uk/software-bookmark-manager.
/// </summary> /// </summary>

View File

@ -139,9 +139,6 @@
<data name="hexagon" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="hexagon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\hexagon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>Resources\hexagon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="search" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\search.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="url_help" xml:space="preserve"> <data name="url_help" xml:space="preserve">
<value>https://www.hiimray.co.uk/software-bookmark-manager</value> <value>https://www.hiimray.co.uk/software-bookmark-manager</value>
</data> </data>

304
BookmarkForm.cs Normal file
View File

@ -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)
{
}
}
}

63
BookmarkForm.resx Normal file
View File

@ -0,0 +1,63 @@
<root>
<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>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -62,6 +62,8 @@
<Compile Remove="RyzStudio\Windows\ThemedForms\BorderlessForm.Designer.cs" /> <Compile Remove="RyzStudio\Windows\ThemedForms\BorderlessForm.Designer.cs" />
<Compile Remove="RyzStudio\Windows\ThemedForms\BorderlessToolForm.cs" /> <Compile Remove="RyzStudio\Windows\ThemedForms\BorderlessToolForm.cs" />
<Compile Remove="RyzStudio\Windows\ThemedForms\BorderlessToolForm.Designer.cs" /> <Compile Remove="RyzStudio\Windows\ThemedForms\BorderlessToolForm.Designer.cs" />
<Compile Remove="RyzStudio\Windows\ThemedForms\TNumericBox.cs" />
<Compile Remove="RyzStudio\Windows\ThemedForms\TNumericBox.designer.cs" />
<Compile Remove="Windows\Forms\BookmarkTreeViewSNode.cs" /> <Compile Remove="Windows\Forms\BookmarkTreeViewSNode.cs" />
<Compile Remove="Windows\Forms\EditGroupForm.cs" /> <Compile Remove="Windows\Forms\EditGroupForm.cs" />
<Compile Remove="Windows\Forms\EditTileFolderForm.cs" /> <Compile Remove="Windows\Forms\EditTileFolderForm.cs" />
@ -79,6 +81,7 @@
<EmbeddedResource Remove="RyzStudio\Windows\Forms\TForm.resx" /> <EmbeddedResource Remove="RyzStudio\Windows\Forms\TForm.resx" />
<EmbeddedResource Remove="RyzStudio\Windows\ThemedForms\BorderlessForm.resx" /> <EmbeddedResource Remove="RyzStudio\Windows\ThemedForms\BorderlessForm.resx" />
<EmbeddedResource Remove="RyzStudio\Windows\ThemedForms\BorderlessToolForm.resx" /> <EmbeddedResource Remove="RyzStudio\Windows\ThemedForms\BorderlessToolForm.resx" />
<EmbeddedResource Remove="RyzStudio\Windows\ThemedForms\TNumericBox.resx" />
<EmbeddedResource Remove="Windows\Forms\EditGroupForm.resx" /> <EmbeddedResource Remove="Windows\Forms\EditGroupForm.resx" />
<EmbeddedResource Remove="Windows\Forms\EditTileFolderForm.resx" /> <EmbeddedResource Remove="Windows\Forms\EditTileFolderForm.resx" />
<EmbeddedResource Remove="Windows\Forms\EditTileForm.resx" /> <EmbeddedResource Remove="Windows\Forms\EditTileForm.resx" />
@ -108,6 +111,9 @@
<Compile Update="FindForm.cs"> <Compile Update="FindForm.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Update="BookmarkForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Update="PasswordForm.cs"> <Compile Update="PasswordForm.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>

View File

@ -19,13 +19,12 @@ namespace FizzyLauncher
private bool findNextNew = false; private bool findNextNew = false;
public FindForm(MainForm parent, BookmarkTreeView treeView) public FindForm(BookmarkTreeView treeView)
{ {
InitializeComponent(); InitializeComponent();
treeView1 = treeView; treeView1 = treeView;
this.ParentForm = parent;
this.StartPosition = FormStartPosition.WindowsDefaultLocation; this.StartPosition = FormStartPosition.WindowsDefaultLocation;
textBox1.InnerTextBox.PreviewKeyDown += textBox1_PreviewKeyDown; textBox1.InnerTextBox.PreviewKeyDown += textBox1_PreviewKeyDown;
@ -100,7 +99,7 @@ namespace FizzyLauncher
this.textBox1.Size = new System.Drawing.Size(328, 35); this.textBox1.Size = new System.Drawing.Size(328, 35);
this.textBox1.SubmitButton = null; this.textBox1.SubmitButton = null;
this.textBox1.TabIndex = 191; this.textBox1.TabIndex = 191;
this.textBox1.UseSystemPasswordChar = true; this.textBox1.UseSystemPasswordChar = false;
// //
// button1 // button1
// //
@ -155,9 +154,6 @@ namespace FizzyLauncher
} }
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public new MainForm ParentForm { get; protected set; } = null;
[Browsable(false)] [Browsable(false)]
public string Password => textBox1.Text; public string Password => textBox1.Text;

54
MainForm.Designer.cs generated
View File

@ -130,7 +130,7 @@
this.newToolStripMenuItem.Image = global::BookmarkManager.UIResource.file2; this.newToolStripMenuItem.Image = global::BookmarkManager.UIResource.file2;
this.newToolStripMenuItem.Name = "newToolStripMenuItem"; this.newToolStripMenuItem.Name = "newToolStripMenuItem";
this.newToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N))); 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.Text = "&New";
this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click); this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click);
// //
@ -139,52 +139,52 @@
this.openToolStripMenuItem.Image = global::BookmarkManager.UIResource.folder2; this.openToolStripMenuItem.Image = global::BookmarkManager.UIResource.folder2;
this.openToolStripMenuItem.Name = "openToolStripMenuItem"; this.openToolStripMenuItem.Name = "openToolStripMenuItem";
this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); 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.Text = "&Open";
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click); this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
// //
// toolStripMenuItem13 // toolStripMenuItem13
// //
this.toolStripMenuItem13.Name = "toolStripMenuItem13"; this.toolStripMenuItem13.Name = "toolStripMenuItem13";
this.toolStripMenuItem13.Size = new System.Drawing.Size(143, 6); this.toolStripMenuItem13.Size = new System.Drawing.Size(177, 6);
// //
// closeToolStripMenuItem // closeToolStripMenuItem
// //
this.closeToolStripMenuItem.Name = "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.Text = "&Close";
this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click); this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);
// //
// toolStripMenuItem14 // toolStripMenuItem14
// //
this.toolStripMenuItem14.Name = "toolStripMenuItem14"; this.toolStripMenuItem14.Name = "toolStripMenuItem14";
this.toolStripMenuItem14.Size = new System.Drawing.Size(143, 6); this.toolStripMenuItem14.Size = new System.Drawing.Size(177, 6);
// //
// saveToolStripMenuItem // saveToolStripMenuItem
// //
this.saveToolStripMenuItem.Image = global::BookmarkManager.UIResource.disk2; this.saveToolStripMenuItem.Image = global::BookmarkManager.UIResource.disk2;
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem"; this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
this.saveToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S))); 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.Text = "&Save";
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click); this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
// //
// saveAsToolStripMenuItem // saveAsToolStripMenuItem
// //
this.saveAsToolStripMenuItem.Name = "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.Text = "Save &As...";
this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.saveAsToolStripMenuItem_Click); this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.saveAsToolStripMenuItem_Click);
// //
// toolStripMenuItem15 // toolStripMenuItem15
// //
this.toolStripMenuItem15.Name = "toolStripMenuItem15"; this.toolStripMenuItem15.Name = "toolStripMenuItem15";
this.toolStripMenuItem15.Size = new System.Drawing.Size(143, 6); this.toolStripMenuItem15.Size = new System.Drawing.Size(177, 6);
// //
// exitToolStripMenuItem2 // exitToolStripMenuItem2
// //
this.exitToolStripMenuItem2.Name = "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.Text = "E&xit";
this.exitToolStripMenuItem2.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); this.exitToolStripMenuItem2.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
// //
@ -198,10 +198,10 @@
// //
// findToolStripMenuItem // findToolStripMenuItem
// //
this.findToolStripMenuItem.Image = global::BookmarkManager.AppResource.search; this.findToolStripMenuItem.Image = global::BookmarkManager.UIResource.search2;
this.findToolStripMenuItem.Name = "findToolStripMenuItem"; this.findToolStripMenuItem.Name = "findToolStripMenuItem";
this.findToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F))); 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.Text = "&Find";
this.findToolStripMenuItem.Click += new System.EventHandler(this.findToolStripMenuItem_Click); this.findToolStripMenuItem.Click += new System.EventHandler(this.findToolStripMenuItem_Click);
// //
@ -375,34 +375,34 @@
// addPageToolStripMenuItem1 // addPageToolStripMenuItem1
// //
this.addPageToolStripMenuItem1.Name = "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.Text = "Add &Page";
this.addPageToolStripMenuItem1.Click += new System.EventHandler(this.addPageToolStripMenuItem1_Click); this.addPageToolStripMenuItem1.Click += new System.EventHandler(this.addPageToolStripMenuItem1_Click);
// //
// addFolderToolStripMenuItem1 // addFolderToolStripMenuItem1
// //
this.addFolderToolStripMenuItem1.Name = "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.Text = "Add &Folder";
this.addFolderToolStripMenuItem1.Click += new System.EventHandler(this.addFolderToolStripMenuItem1_Click); this.addFolderToolStripMenuItem1.Click += new System.EventHandler(this.addFolderToolStripMenuItem1_Click);
// //
// toolStripMenuItem4 // toolStripMenuItem4
// //
this.toolStripMenuItem4.Name = "toolStripMenuItem4"; this.toolStripMenuItem4.Name = "toolStripMenuItem4";
this.toolStripMenuItem4.Size = new System.Drawing.Size(177, 6); this.toolStripMenuItem4.Size = new System.Drawing.Size(135, 6);
// //
// openAllToolStripMenuItem // openAllToolStripMenuItem
// //
this.openAllToolStripMenuItem.Image = global::BookmarkManager.AppResource.bookmark; this.openAllToolStripMenuItem.Image = global::BookmarkManager.AppResource.bookmark;
this.openAllToolStripMenuItem.Name = "openAllToolStripMenuItem"; 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.Text = "&Open All";
this.openAllToolStripMenuItem.Click += new System.EventHandler(this.openAllToolStripMenuItem_Click); this.openAllToolStripMenuItem.Click += new System.EventHandler(this.openAllToolStripMenuItem_Click);
// //
// editToolStripMenuItem1 // editToolStripMenuItem1
// //
this.editToolStripMenuItem1.Name = "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.Text = "&Edit";
this.editToolStripMenuItem1.Click += new System.EventHandler(this.editToolStripMenuItem1_Click); this.editToolStripMenuItem1.Click += new System.EventHandler(this.editToolStripMenuItem1_Click);
// //
@ -410,32 +410,32 @@
// //
this.deleteToolStripMenuItem.Image = global::BookmarkManager.UIResource.trash2; this.deleteToolStripMenuItem.Image = global::BookmarkManager.UIResource.trash2;
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem"; 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.Text = "&Delete";
this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click); this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click);
// //
// toolStripMenuItem5 // toolStripMenuItem5
// //
this.toolStripMenuItem5.Name = "toolStripMenuItem5"; this.toolStripMenuItem5.Name = "toolStripMenuItem5";
this.toolStripMenuItem5.Size = new System.Drawing.Size(177, 6); this.toolStripMenuItem5.Size = new System.Drawing.Size(135, 6);
// //
// sortToolStripMenuItem1 // sortToolStripMenuItem1
// //
this.sortToolStripMenuItem1.Name = "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.Text = "&Sort";
this.sortToolStripMenuItem1.Click += new System.EventHandler(this.sortToolStripMenuItem1_Click); this.sortToolStripMenuItem1.Click += new System.EventHandler(this.sortToolStripMenuItem1_Click);
// //
// toolStripMenuItem6 // toolStripMenuItem6
// //
this.toolStripMenuItem6.Name = "toolStripMenuItem6"; this.toolStripMenuItem6.Name = "toolStripMenuItem6";
this.toolStripMenuItem6.Size = new System.Drawing.Size(177, 6); this.toolStripMenuItem6.Size = new System.Drawing.Size(135, 6);
// //
// moveUpToolStripMenuItem // moveUpToolStripMenuItem
// //
this.moveUpToolStripMenuItem.Image = global::BookmarkManager.UIResource.arrow_up2; this.moveUpToolStripMenuItem.Image = global::BookmarkManager.UIResource.arrow_up2;
this.moveUpToolStripMenuItem.Name = "moveUpToolStripMenuItem"; 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.Text = "Move &Up";
this.moveUpToolStripMenuItem.Click += new System.EventHandler(this.moveUpToolStripMenuItem_Click); this.moveUpToolStripMenuItem.Click += new System.EventHandler(this.moveUpToolStripMenuItem_Click);
// //
@ -443,7 +443,7 @@
// //
this.moveDownToolStripMenuItem.Image = global::BookmarkManager.UIResource.arrow_down2; this.moveDownToolStripMenuItem.Image = global::BookmarkManager.UIResource.arrow_down2;
this.moveDownToolStripMenuItem.Name = "moveDownToolStripMenuItem"; 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.Text = "Move &Down";
this.moveDownToolStripMenuItem.Click += new System.EventHandler(this.moveDownToolStripMenuItem_Click); this.moveDownToolStripMenuItem.Click += new System.EventHandler(this.moveDownToolStripMenuItem_Click);
// //
@ -458,13 +458,13 @@
this.moveUpToolStripMenuItem1, this.moveUpToolStripMenuItem1,
this.moveDownToolStripMenuItem1}); this.moveDownToolStripMenuItem1});
this.pageContextMenu.Name = "pageContextMenu"; this.pageContextMenu.Name = "pageContextMenu";
this.pageContextMenu.Size = new System.Drawing.Size(181, 148); this.pageContextMenu.Size = new System.Drawing.Size(139, 126);
// //
// openToolStripMenuItem1 // openToolStripMenuItem1
// //
this.openToolStripMenuItem1.Image = global::BookmarkManager.AppResource.bookmark; this.openToolStripMenuItem1.Image = global::BookmarkManager.AppResource.bookmark;
this.openToolStripMenuItem1.Name = "openToolStripMenuItem1"; 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.Text = "&Open";
this.openToolStripMenuItem1.Click += new System.EventHandler(this.openToolStripMenuItem1_Click); this.openToolStripMenuItem1.Click += new System.EventHandler(this.openToolStripMenuItem1_Click);
// //
@ -484,7 +484,7 @@
// //
this.deleteToolStripMenuItem1.Image = global::BookmarkManager.UIResource.trash2; this.deleteToolStripMenuItem1.Image = global::BookmarkManager.UIResource.trash2;
this.deleteToolStripMenuItem1.Name = "deleteToolStripMenuItem1"; 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.Text = "&Delete";
this.deleteToolStripMenuItem1.Click += new System.EventHandler(this.deleteToolStripMenuItem1_Click); this.deleteToolStripMenuItem1.Click += new System.EventHandler(this.deleteToolStripMenuItem1_Click);
// //
@ -497,7 +497,7 @@
// //
this.moveUpToolStripMenuItem1.Image = global::BookmarkManager.UIResource.arrow_up2; this.moveUpToolStripMenuItem1.Image = global::BookmarkManager.UIResource.arrow_up2;
this.moveUpToolStripMenuItem1.Name = "moveUpToolStripMenuItem1"; 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.Text = "Move &Up";
this.moveUpToolStripMenuItem1.Click += new System.EventHandler(this.moveUpToolStripMenuItem1_Click); this.moveUpToolStripMenuItem1.Click += new System.EventHandler(this.moveUpToolStripMenuItem1_Click);
// //
@ -505,7 +505,7 @@
// //
this.moveDownToolStripMenuItem1.Image = global::BookmarkManager.UIResource.arrow_down2; this.moveDownToolStripMenuItem1.Image = global::BookmarkManager.UIResource.arrow_down2;
this.moveDownToolStripMenuItem1.Name = "moveDownToolStripMenuItem1"; 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.Text = "Move &Down";
this.moveDownToolStripMenuItem1.Click += new System.EventHandler(this.moveDownToolStripMenuItem1_Click); this.moveDownToolStripMenuItem1.Click += new System.EventHandler(this.moveDownToolStripMenuItem1_Click);
// //

View File

@ -392,7 +392,7 @@ namespace FizzyLauncher
return; return;
} }
if (findForm == null) findForm = new FindForm(this, treeView1); if (findForm == null) findForm = new FindForm(treeView1);
findForm.Show(); findForm.Show();
} }
@ -680,7 +680,11 @@ namespace FizzyLauncher
case Keys.F2: case Keys.F2:
if (nodeType == BookmarkTreeView.NodeType.Page) 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; break;
@ -689,13 +693,29 @@ namespace FizzyLauncher
{ {
if ((nodeType == BookmarkTreeView.NodeType.Root) || (nodeType == BookmarkTreeView.NodeType.Folder)) if ((nodeType == BookmarkTreeView.NodeType.Root) || (nodeType == BookmarkTreeView.NodeType.Folder))
{ {
//(new BookmarkEditForm(treeView1)).ShowDialog(); // do nothing
} }
else if (nodeType == BookmarkTreeView.NodeType.Page) else if (nodeType == BookmarkTreeView.NodeType.Page)
{ {
treeView1.SelectedNode = tn.Parent; 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)) if (fileHandler.IsEncrypted(sessionFilename))
{ {
PasswordForm passwordForm = new PasswordForm(this); PasswordForm passwordForm = new PasswordForm();
if (passwordForm.ShowDialog() == DialogResult.OK) if (passwordForm.ShowDialog() == DialogResult.OK)
{ {
sessionPassword = passwordForm.Password; sessionPassword = passwordForm.Password;
@ -1020,7 +1040,7 @@ namespace FizzyLauncher
if (fileHandler.IsEncryptionSupported) if (fileHandler.IsEncryptionSupported)
{ {
PasswordForm passwordForm = new PasswordForm(this); PasswordForm passwordForm = new PasswordForm();
if (passwordForm.ShowDialog() == DialogResult.OK) if (passwordForm.ShowDialog() == DialogResult.OK)
{ {
if (!string.IsNullOrWhiteSpace(passwordForm.Password)) if (!string.IsNullOrWhiteSpace(passwordForm.Password))

View File

@ -15,6 +15,8 @@ namespace bzit.bomg.Models
public string TreeviewPath { get; set; } public string TreeviewPath { get; set; }
public string Notes { get; set; }
//public BookmarkItemModel ToModel() //public BookmarkItemModel ToModel()
//{ //{
// return new BookmarkItemModel() // return new BookmarkItemModel()
@ -30,19 +32,33 @@ namespace bzit.bomg.Models
public new string ToString() public new string ToString()
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.AppendLine("Name = ");
sb.AppendLine(this.SiteName ?? string.Empty);
sb.AppendLine(string.Empty);
sb.AppendLine("Address = "); if (!string.IsNullOrWhiteSpace(this.SiteName))
sb.AppendLine(this.SiteAddress ?? string.Empty); {
sb.AppendLine(string.Empty); sb.AppendLine("Name");
sb.AppendLine(this.SiteName + Environment.NewLine);
}
sb.AppendLine("Description = "); if (!string.IsNullOrWhiteSpace(this.SiteAddress))
sb.AppendLine(this.SiteDescription ?? string.Empty); {
sb.AppendLine(string.Empty); 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(); return sb.ToString();
} }
} }
} }

View File

@ -13,11 +13,10 @@ namespace FizzyLauncher
private TTextBox textBox1; private TTextBox textBox1;
public PasswordForm(MainForm parent) public PasswordForm()
{ {
InitializeComponent(); InitializeComponent();
this.ParentForm = parent;
this.StartPosition = FormStartPosition.WindowsDefaultLocation; this.StartPosition = FormStartPosition.WindowsDefaultLocation;
textBox1.InnerTextBox.MaxLength = 255; 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)] [Browsable(false)]
public string Password => textBox1.Text; public string Password => textBox1.Text;

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 19 KiB

BIN
Resources/UI/search.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 584 B

BIN
Resources/UI/search2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 378 B

View File

@ -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());
}
}
}

View File

@ -0,0 +1,63 @@
namespace RyzStudio.Windows.ThemedForms
{
partial class TMemoBox
{
/// <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;
}
}

View File

@ -112,6 +112,12 @@
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public new Padding Margin { get => base.Margin; set => base.Margin = value; } 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) protected override void updateBackground(Graphics g, ThemeStyle style)
{ {
int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding; int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding;

20
UIResource.Designer.cs generated
View File

@ -280,6 +280,26 @@ namespace BookmarkManager {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap search {
get {
object obj = ResourceManager.GetObject("search", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap search2 {
get {
object obj = ResourceManager.GetObject("search2", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>

View File

@ -184,6 +184,12 @@
<data name="plus2" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="plus2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\UI\plus2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>Resources\UI\plus2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="search" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\UI\search.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="search2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\UI\search2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="trash" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="trash" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\UI\trash.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>Resources\UI\trash.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>

View File

@ -627,11 +627,11 @@ namespace RyzStudio.Windows.Forms
this.HasChanged = true; this.HasChanged = true;
} }
public void AddItem(TreeNode treeNode, BookmarkItemViewModel viewModel) public TreeNode AddItem(TreeNode treeNode, BookmarkItemViewModel viewModel)
{ {
if (treeNode == null) if (treeNode == null)
{ {
return; return null;
} }
int iconIndex = addIcon(viewModel); int iconIndex = addIcon(viewModel);
@ -643,6 +643,8 @@ namespace RyzStudio.Windows.Forms
treeNode.Nodes.Add(tn); treeNode.Nodes.Add(tn);
this.HasChanged = true; this.HasChanged = true;
return tn;
} }
//public void AddOrUpdateItem(TreeNode treeNode, BookmarkItemViewModel viewModel) //public void AddOrUpdateItem(TreeNode treeNode, BookmarkItemViewModel viewModel)
@ -854,24 +856,23 @@ namespace RyzStudio.Windows.Forms
public new void Sort() => Sort(this.SelectedNode); public new void Sort() => Sort(this.SelectedNode);
//public void UpdateItem(TreeNode treeNode, BookmarkItemViewModel viewModel) public void UpdateItem(TreeNode treeNode, BookmarkItemViewModel model, Image image)
//{ {
// if (treeNode == null) if (treeNode == null)
// { {
// return; return;
// } }
// int iconIndex = addIcon(viewModel); int iconIndex = addIcon(model);
// treeNode.Text = viewModel.SiteName; treeNode.Text = model.SiteName;
// treeNode.ImageIndex = iconIndex; treeNode.ImageIndex = iconIndex;
// treeNode.SelectedImageIndex = iconIndex; treeNode.SelectedImageIndex = iconIndex;
// treeNode.Tag = viewModel; treeNode.Tag = model;
// treeNode.ToolTipText = viewModel.ToString(); treeNode.ToolTipText = model.ToString();
// this.HasChanged = true;
//}
this.HasChanged = true;
}
protected int addIcon(BookmarkItemViewModel viewModel) protected int addIcon(BookmarkItemViewModel viewModel)
@ -1015,43 +1016,43 @@ namespace RyzStudio.Windows.Forms
} }
} }
protected void TraverseBookmarkList(List<TreeNode> rs, TreeNode node) //protected void TraverseBookmarkList(List<TreeNode> rs, TreeNode node)
{ //{
foreach (TreeNode tn in node.Nodes) // foreach (TreeNode tn in node.Nodes)
{ // {
NodeType nodeType = GetNodeType(tn); // NodeType nodeType = GetNodeType(tn);
if (nodeType == NodeType.Folder) // if (nodeType == NodeType.Folder)
{ // {
TraverseBookmarkList(rs, tn); // TraverseBookmarkList(rs, tn);
} // }
else if (nodeType == NodeType.Page) // else if (nodeType == NodeType.Page)
{ // {
BookmarkItemViewModel nodeTag = GetNodeModel(tn); // BookmarkItemViewModel nodeTag = GetNodeModel(tn);
nodeTag.TreeviewPath = GetNodePath(tn); // nodeTag.TreeviewPath = GetNodePath(tn);
if (nodeTag != null) // if (nodeTag != null)
{ // {
rs.Add(tn); // rs.Add(tn);
} // }
} // }
} // }
} //}
protected void TraverseBookmarkList(ref int itemCount, TreeNode node) //protected void TraverseBookmarkList(ref int itemCount, TreeNode node)
{ //{
foreach (TreeNode tn in node.Nodes) // foreach (TreeNode tn in node.Nodes)
{ // {
NodeType nodeType = GetNodeType(tn); // NodeType nodeType = GetNodeType(tn);
if (nodeType == NodeType.Folder) // if (nodeType == NodeType.Folder)
{ // {
TraverseBookmarkList(ref itemCount, tn); // TraverseBookmarkList(ref itemCount, tn);
} // }
else if (nodeType == NodeType.Page) // else if (nodeType == NodeType.Page)
{ // {
itemCount++; // itemCount++;
} // }
} // }
} //}