diff --git a/Resources/UI/icons.svg b/Resources/UI/icons.svg index 998bbb6..bfe370d 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" + width="36.465881" + height="56.465881" + viewBox="0 0 36.465881 56.465881" fill="none" - viewBox="0 0 24 24" - height="24" - width="24"> + 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)"> @@ -35,134 +35,476 @@ + 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="90.016116" + inkscape:cy="49.411899" + inkscape:window-x="1072" + inkscape:window-y="845" + inkscape:window-maximized="1" + inkscape:current-layer="svg8" /> + inkscape:export-ydpi="96"> - - - - - - - - - + inkscape:export-ydpi="96"> + cx="12" + style="stroke:#d4d4d4;stroke-opacity:1" /> + id="path882" + d="m 19.4,15 a 1.65,1.65 0 0 0 0.33,1.82 l 0.06,0.06 a 2,2 0 0 1 0,2.83 2,2 0 0 1 -2.83,0 L 16.9,19.65 a 1.65,1.65 0 0 0 -1.82,-0.33 1.65,1.65 0 0 0 -1,1.51 V 21 a 2,2 0 0 1 -2,2 2,2 0 0 1 -2,-2 V 20.91 A 1.65,1.65 0 0 0 9,19.4 1.65,1.65 0 0 0 7.18,19.73 l -0.06,0.06 a 2,2 0 0 1 -2.83,0 2,2 0 0 1 0,-2.83 L 4.35,16.9 a 1.65,1.65 0 0 0 0.33,-1.82 1.65,1.65 0 0 0 -1.51,-1 H 3 a 2,2 0 0 1 -2,-2 2,2 0 0 1 2,-2 H 3.09 A 1.65,1.65 0 0 0 4.6,9 1.65,1.65 0 0 0 4.27,7.18 L 4.21,7.12 a 2,2 0 0 1 0,-2.83 2,2 0 0 1 2.83,0 L 7.1,4.35 A 1.65,1.65 0 0 0 8.92,4.68 H 9 A 1.65,1.65 0 0 0 10,3.17 V 3 a 2,2 0 0 1 2,-2 2,2 0 0 1 2,2 v 0.09 a 1.65,1.65 0 0 0 1,1.51 1.65,1.65 0 0 0 1.82,-0.33 l 0.06,-0.06 a 2,2 0 0 1 2.83,0 2,2 0 0 1 0,2.83 L 19.65,7.1 A 1.65,1.65 0 0 0 19.32,8.92 V 9 a 1.65,1.65 0 0 0 1.51,1 H 21 a 2,2 0 0 1 2,2 2,2 0 0 1 -2,2 h -0.09 a 1.65,1.65 0 0 0 -1.51,1 z" + style="stroke:#d4d4d4;stroke-opacity:1" /> + inkscape:export-ydpi="96"> + + + + + + + + + + + + + + + id="circle941-9" /> + id="path943-1" /> + id="line945-3" /> + + + + + + + + + + + + - + id="g1560-8" + transform="matrix(0.81929378,0,0,0.81929378,58.361382,18.491799)"> + id="path1546-2" + d="m 12,20 h 9" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Resources/UI/menu.png b/Resources/UI/menu.png new file mode 100644 index 0000000..9c63469 Binary files /dev/null and b/Resources/UI/menu.png differ diff --git a/Resources/UI/menu2.png b/Resources/UI/menu2.png new file mode 100644 index 0000000..2530762 Binary files /dev/null and b/Resources/UI/menu2.png differ diff --git a/Resources/UI/pencil_line.png b/Resources/UI/pencil_line.png new file mode 100644 index 0000000..a359edd Binary files /dev/null and b/Resources/UI/pencil_line.png differ diff --git a/Resources/UI/pencil_line2.png b/Resources/UI/pencil_line2.png new file mode 100644 index 0000000..9c30d39 Binary files /dev/null and b/Resources/UI/pencil_line2.png differ diff --git a/Resources/UI/square_minus.png b/Resources/UI/square_minus.png new file mode 100644 index 0000000..e4de014 Binary files /dev/null and b/Resources/UI/square_minus.png differ diff --git a/Resources/UI/square_minus2.png b/Resources/UI/square_minus2.png new file mode 100644 index 0000000..cdd6639 Binary files /dev/null and b/Resources/UI/square_minus2.png differ diff --git a/Resources/UI/square_plus.png b/Resources/UI/square_plus.png new file mode 100644 index 0000000..440e565 Binary files /dev/null and b/Resources/UI/square_plus.png differ diff --git a/Resources/UI/square_plus2.png b/Resources/UI/square_plus2.png new file mode 100644 index 0000000..5c8b8ca Binary files /dev/null and b/Resources/UI/square_plus2.png differ diff --git a/Resources/UI/triangle_down.png b/Resources/UI/triangle_down.png new file mode 100644 index 0000000..af04833 Binary files /dev/null and b/Resources/UI/triangle_down.png differ diff --git a/Resources/UI/triangle_down2.png b/Resources/UI/triangle_down2.png new file mode 100644 index 0000000..5ef234f Binary files /dev/null and b/Resources/UI/triangle_down2.png differ diff --git a/Resources/UI/triangle_down_stop.png b/Resources/UI/triangle_down_stop.png new file mode 100644 index 0000000..8e92aad Binary files /dev/null and b/Resources/UI/triangle_down_stop.png differ diff --git a/Resources/UI/triangle_down_stop2.png b/Resources/UI/triangle_down_stop2.png new file mode 100644 index 0000000..b31ee36 Binary files /dev/null and b/Resources/UI/triangle_down_stop2.png differ diff --git a/Resources/UI/triangle_up.png b/Resources/UI/triangle_up.png new file mode 100644 index 0000000..b7f6307 Binary files /dev/null and b/Resources/UI/triangle_up.png differ diff --git a/Resources/UI/triangle_up2.png b/Resources/UI/triangle_up2.png new file mode 100644 index 0000000..431a6b6 Binary files /dev/null and b/Resources/UI/triangle_up2.png differ diff --git a/Resources/UI/triangle_up_stop.png b/Resources/UI/triangle_up_stop.png new file mode 100644 index 0000000..9556375 Binary files /dev/null and b/Resources/UI/triangle_up_stop.png differ diff --git a/Resources/UI/triangle_up_stop2.png b/Resources/UI/triangle_up_stop2.png new file mode 100644 index 0000000..74de75a Binary files /dev/null and b/Resources/UI/triangle_up_stop2.png differ diff --git a/RyzStudio/Windows/ThemedForms/TListBox.cs b/RyzStudio/Windows/ThemedForms/TListBox.cs index 2ddc41b..8c3008e 100644 --- a/RyzStudio/Windows/ThemedForms/TListBox.cs +++ b/RyzStudio/Windows/ThemedForms/TListBox.cs @@ -22,14 +22,14 @@ namespace RyzStudio.Windows.ThemedForms listBox1.BorderStyle = BorderStyle.None; } - protected override void OnResize(EventArgs e) - { - base.OnResize(e); + //protected override void OnResize(EventArgs e) + //{ + // base.OnResize(e); - //int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding; + // //int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding; - //this.Height = comboBox1.Height + (b + textboxPadding.Top) + ((b - 1) + textboxPadding.Bottom); - } + // //this.Height = comboBox1.Height + (b + textboxPadding.Top) + ((b - 1) + textboxPadding.Bottom); + //} protected override void OnGotFocus(EventArgs e) { @@ -49,12 +49,10 @@ namespace RyzStudio.Windows.ThemedForms [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] public new Padding Margin { get => base.Margin; set => base.Margin = value; } - [Category("Action")] - [Browsable(true)] + [Browsable(false)] public event EventHandler OnAdd; - [Category("Action")] - [Browsable(true)] + [Browsable(false)] public event EventHandler OnEdit; protected override void updateBackground(Graphics g, ThemeStyle style) @@ -95,36 +93,7 @@ namespace RyzStudio.Windows.ThemedForms return; } - this.OnEdit?.Invoke(sender, e); - } - - /// - /// Remove - /// - /// - /// - private void imageBox2_MouseClick(object sender, MouseEventArgs e) - { - if (e.Button != MouseButtons.Left) - { - return; - } - - if (listBox1.SelectedIndex < 0) - { - return; - } - - int pos = listBox1.SelectedIndex; - - listBox1.Items.RemoveAt(pos); - - if (pos > (listBox1.Items.Count - 1)) - { - pos = (listBox1.Items.Count - 1); - } - - listBox1.SelectedIndex = pos; + contextMenuStrip1.Show(Cursor.Position); } /// @@ -142,23 +111,7 @@ namespace RyzStudio.Windows.ThemedForms } } - if (listBox1.SelectedIndex <= 0) - { - return; - } - - if (listBox1.SelectedItem == null) - { - return; - } - - object item = listBox1.SelectedItem; - int pos = listBox1.SelectedIndex; - - listBox1.Items.RemoveAt(pos); - listBox1.Items.Insert((pos - 1), item); - - listBox1.SelectedIndex = (pos - 1); + moveUpToolStripMenuItem_Click(sender, e); } /// @@ -176,26 +129,13 @@ namespace RyzStudio.Windows.ThemedForms } } - if (listBox1.SelectedIndex >= (listBox1.Items.Count - 1)) - { - return; - } - - if (listBox1.SelectedItem == null) - { - return; - } - - object item = listBox1.SelectedItem; - int pos = listBox1.SelectedIndex; - - listBox1.Items.RemoveAt(pos); - listBox1.Items.Insert((pos + 1), item); - - listBox1.SelectedIndex = (pos + 1); + moveDownToolStripMenuItem_Click(sender, e); } - private void listBox1_MouseDoubleClick(object sender, MouseEventArgs e) => imageBox5_MouseClick(sender, e); + private void listBox1_MouseDoubleClick(object sender, MouseEventArgs e) + { + editToolStripMenuItem_Click(sender, e); + } private void listBox1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) { @@ -229,5 +169,202 @@ namespace RyzStudio.Windows.ThemedForms } } + #region context menu + + /// + /// Add + /// + /// + /// + private void addItemToolStripMenuItem_Click(object sender, EventArgs e) + { + this.OnAdd?.Invoke(sender, e); + } + + /// + /// Copy + /// + /// + /// + private void toolStripMenuItem2_Click(object sender, EventArgs e) + { + if (listBox1.SelectedIndex <= 0) + { + return; + } + + if (listBox1.SelectedItem == null) + { + return; + } + + object item = listBox1.SelectedItem; + + listBox1.Items.Add(item); + listBox1.SelectedIndex = (listBox1.Items.Count- 1); + } + + /// + /// Edit + /// + /// + /// + private void editToolStripMenuItem_Click(object sender, EventArgs e) + { + if (listBox1.SelectedIndex < 0) + { + return; + } + + if (listBox1.SelectedItem == null) + { + return; + } + + this.OnEdit?.Invoke(sender, e); + } + + /// + /// Remove + /// + /// + /// + private void removeToolStripMenuItem_Click(object sender, EventArgs e) + { + if (listBox1.SelectedIndex < 0) + { + return; + } + + int pos = listBox1.SelectedIndex; + + listBox1.Items.RemoveAt(pos); + + if (pos > (listBox1.Items.Count - 1)) + { + pos = (listBox1.Items.Count - 1); + } + + listBox1.SelectedIndex = pos; + } + + /// + /// Remove all + /// + /// + /// + private void toolStripMenuItem1_Click(object sender, EventArgs e) + { + listBox1.Items.Clear(); + } + + /// + /// Move to top + /// + /// + /// + private void moveToTopToolStripMenuItem_Click(object sender, EventArgs e) + { + if (listBox1.SelectedIndex <= 0) + { + return; + } + + if (listBox1.SelectedItem == null) + { + return; + } + + object item = listBox1.SelectedItem; + int pos = listBox1.SelectedIndex; + + listBox1.Items.RemoveAt(pos); + listBox1.Items.Insert(0, item); + + listBox1.SelectedIndex = 0; + } + + /// + /// Move up + /// + /// + /// + private void moveUpToolStripMenuItem_Click(object sender, EventArgs e) + { + if (listBox1.SelectedIndex <= 0) + { + return; + } + + if (listBox1.SelectedItem == null) + { + return; + } + + object item = listBox1.SelectedItem; + int pos = listBox1.SelectedIndex; + + listBox1.Items.RemoveAt(pos); + listBox1.Items.Insert((pos - 1), item); + + listBox1.SelectedIndex = (pos - 1); + } + + /// + /// Move down + /// + /// + /// + private void moveDownToolStripMenuItem_Click(object sender, EventArgs e) + { + if (listBox1.SelectedIndex >= (listBox1.Items.Count - 1)) + { + return; + } + + if (listBox1.SelectedItem == null) + { + return; + } + + object item = listBox1.SelectedItem; + int pos = listBox1.SelectedIndex; + + listBox1.Items.RemoveAt(pos); + listBox1.Items.Insert((pos + 1), item); + + listBox1.SelectedIndex = (pos + 1); + } + + /// + /// Move to bottom + /// + /// + /// + private void moveToBottomToolStripMenuItem_Click(object sender, EventArgs e) + { + int n = (listBox1.Items.Count - 1); + + if (listBox1.SelectedIndex >= (listBox1.Items.Count - 1)) + { + return; + } + + if (listBox1.SelectedItem == null) + { + return; + } + + object item = listBox1.SelectedItem; + int pos = listBox1.SelectedIndex; + + listBox1.Items.RemoveAt(pos); + listBox1.Items.Insert(n, item); + + listBox1.SelectedIndex = n; + } + + #endregion + } } \ No newline at end of file diff --git a/RyzStudio/Windows/ThemedForms/TListBox.designer.cs b/RyzStudio/Windows/ThemedForms/TListBox.designer.cs index a81e57f..2c3e3f4 100644 --- a/RyzStudio/Windows/ThemedForms/TListBox.designer.cs +++ b/RyzStudio/Windows/ThemedForms/TListBox.designer.cs @@ -35,14 +35,26 @@ namespace RyzStudio.Windows.ThemedForms this.imageBox5 = new RyzStudio.Windows.Forms.TImageBox(); this.imageBox4 = new RyzStudio.Windows.Forms.TImageBox(); this.imageBox3 = new RyzStudio.Windows.Forms.TImageBox(); - this.imageBox2 = new RyzStudio.Windows.Forms.TImageBox(); this.imageBox1 = new RyzStudio.Windows.Forms.TImageBox(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.addItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.removeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.moveToTopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.moveUpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.moveDownToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.moveToBottomToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); ((System.ComponentModel.ISupportInitialize)(this.imageBox5)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.imageBox4)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.imageBox3)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.imageBox2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.imageBox1)).BeginInit(); + this.contextMenuStrip1.SuspendLayout(); this.SuspendLayout(); // // listBox1 @@ -50,12 +62,12 @@ namespace RyzStudio.Windows.ThemedForms this.listBox1.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.listBox1.BackColor = System.Drawing.Color.FromKnownColor(KnownColor.Window); + this.listBox1.BackColor = System.Drawing.SystemColors.Window; this.listBox1.FormattingEnabled = true; this.listBox1.ItemHeight = 15; this.listBox1.Location = new System.Drawing.Point(4, 4); this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(98, 109); + this.listBox1.Size = new System.Drawing.Size(98, 214); this.listBox1.TabIndex = 0; this.listBox1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listBox1_MouseDoubleClick); this.listBox1.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.listBox1_PreviewKeyDown); @@ -69,16 +81,16 @@ namespace RyzStudio.Windows.ThemedForms this.imageBox5.BackColorSelected = System.Drawing.Color.Transparent; this.imageBox5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.imageBox5.ErrorImage = null; - this.imageBox5.HoverImage = global::FizzyLauncher.UIResource.edit2; - this.imageBox5.Image = global::FizzyLauncher.UIResource.edit; - this.imageBox5.ImageHover = global::FizzyLauncher.UIResource.edit2; - this.imageBox5.ImageNormal = global::FizzyLauncher.UIResource.edit; + this.imageBox5.HoverImage = global::FizzyLauncher.UIResource.menu2; + this.imageBox5.Image = global::FizzyLauncher.UIResource.menu; + this.imageBox5.ImageHover = global::FizzyLauncher.UIResource.menu2; + this.imageBox5.ImageNormal = global::FizzyLauncher.UIResource.menu; this.imageBox5.ImageSelected = null; this.imageBox5.InitialImage = null; this.imageBox5.IsSelected = false; this.imageBox5.Location = new System.Drawing.Point(106, 24); this.imageBox5.Name = "imageBox5"; - this.imageBox5.NormalImage = global::FizzyLauncher.UIResource.edit; + this.imageBox5.NormalImage = global::FizzyLauncher.UIResource.menu; this.imageBox5.SelectedImage = null; this.imageBox5.Size = new System.Drawing.Size(18, 18); this.imageBox5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; @@ -97,22 +109,22 @@ namespace RyzStudio.Windows.ThemedForms this.imageBox4.BackColorSelected = System.Drawing.Color.Transparent; this.imageBox4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.imageBox4.ErrorImage = null; - this.imageBox4.HoverImage = global::FizzyLauncher.UIResource.arrow_down2; - this.imageBox4.Image = global::FizzyLauncher.UIResource.arrow_down; - this.imageBox4.ImageHover = global::FizzyLauncher.UIResource.arrow_down2; - this.imageBox4.ImageNormal = global::FizzyLauncher.UIResource.arrow_down; + this.imageBox4.HoverImage = global::FizzyLauncher.UIResource.triangle_down2; + this.imageBox4.Image = global::FizzyLauncher.UIResource.triangle_down; + this.imageBox4.ImageHover = global::FizzyLauncher.UIResource.triangle_down2; + this.imageBox4.ImageNormal = global::FizzyLauncher.UIResource.triangle_down; this.imageBox4.ImageSelected = null; this.imageBox4.InitialImage = null; this.imageBox4.IsSelected = false; - this.imageBox4.Location = new System.Drawing.Point(106, 92); + this.imageBox4.Location = new System.Drawing.Point(106, 68); this.imageBox4.Name = "imageBox4"; - this.imageBox4.NormalImage = global::FizzyLauncher.UIResource.arrow_down; + this.imageBox4.NormalImage = global::FizzyLauncher.UIResource.triangle_down; this.imageBox4.SelectedImage = null; this.imageBox4.Size = new System.Drawing.Size(18, 18); this.imageBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; this.imageBox4.TabIndex = 5; this.imageBox4.TabStop = false; - this.toolTip1.SetToolTip(this.imageBox4, "Move Bottom"); + this.toolTip1.SetToolTip(this.imageBox4, "Move Down"); this.imageBox4.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox4_MouseClick); this.imageBox4.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox4_MouseClick); // @@ -125,16 +137,16 @@ namespace RyzStudio.Windows.ThemedForms this.imageBox3.BackColorSelected = System.Drawing.Color.Transparent; this.imageBox3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.imageBox3.ErrorImage = null; - this.imageBox3.HoverImage = global::FizzyLauncher.UIResource.arrow_up2; - this.imageBox3.Image = global::FizzyLauncher.UIResource.arrow_up; - this.imageBox3.ImageHover = global::FizzyLauncher.UIResource.arrow_up2; - this.imageBox3.ImageNormal = global::FizzyLauncher.UIResource.arrow_up; + this.imageBox3.HoverImage = global::FizzyLauncher.UIResource.triangle_up2; + this.imageBox3.Image = global::FizzyLauncher.UIResource.triangle_up; + this.imageBox3.ImageHover = global::FizzyLauncher.UIResource.triangle_up2; + this.imageBox3.ImageNormal = global::FizzyLauncher.UIResource.triangle_up; this.imageBox3.ImageSelected = null; this.imageBox3.InitialImage = null; this.imageBox3.IsSelected = false; - this.imageBox3.Location = new System.Drawing.Point(106, 72); + this.imageBox3.Location = new System.Drawing.Point(106, 48); this.imageBox3.Name = "imageBox3"; - this.imageBox3.NormalImage = global::FizzyLauncher.UIResource.arrow_up; + this.imageBox3.NormalImage = global::FizzyLauncher.UIResource.triangle_up; this.imageBox3.SelectedImage = null; this.imageBox3.Size = new System.Drawing.Size(18, 18); this.imageBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; @@ -144,34 +156,6 @@ namespace RyzStudio.Windows.ThemedForms this.imageBox3.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox3_MouseClick); this.imageBox3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox3_MouseClick); // - // imageBox2 - // - this.imageBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.imageBox2.BackColor = System.Drawing.Color.Transparent; - this.imageBox2.BackColorHover = System.Drawing.Color.Transparent; - this.imageBox2.BackColorNormal = System.Drawing.Color.Transparent; - this.imageBox2.BackColorSelected = System.Drawing.Color.Transparent; - this.imageBox2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; - this.imageBox2.ErrorImage = null; - this.imageBox2.HoverImage = global::FizzyLauncher.UIResource.minus2; - this.imageBox2.Image = global::FizzyLauncher.UIResource.minus; - this.imageBox2.ImageHover = global::FizzyLauncher.UIResource.minus2; - this.imageBox2.ImageNormal = global::FizzyLauncher.UIResource.minus; - this.imageBox2.ImageSelected = null; - this.imageBox2.InitialImage = null; - this.imageBox2.IsSelected = false; - this.imageBox2.Location = new System.Drawing.Point(106, 48); - this.imageBox2.Name = "imageBox2"; - this.imageBox2.NormalImage = global::FizzyLauncher.UIResource.minus; - this.imageBox2.SelectedImage = null; - this.imageBox2.Size = new System.Drawing.Size(18, 18); - this.imageBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; - this.imageBox2.TabIndex = 3; - this.imageBox2.TabStop = false; - this.toolTip1.SetToolTip(this.imageBox2, "Remove Item"); - this.imageBox2.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox2_MouseClick); - this.imageBox2.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox2_MouseClick); - // // imageBox1 // this.imageBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -181,16 +165,16 @@ namespace RyzStudio.Windows.ThemedForms this.imageBox1.BackColorSelected = System.Drawing.Color.Transparent; this.imageBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.imageBox1.ErrorImage = null; - this.imageBox1.HoverImage = global::FizzyLauncher.UIResource.plus2; - this.imageBox1.Image = global::FizzyLauncher.UIResource.plus; - this.imageBox1.ImageHover = global::FizzyLauncher.UIResource.plus2; - this.imageBox1.ImageNormal = global::FizzyLauncher.UIResource.plus; + this.imageBox1.HoverImage = global::FizzyLauncher.UIResource.square_plus2; + this.imageBox1.Image = global::FizzyLauncher.UIResource.square_plus; + this.imageBox1.ImageHover = global::FizzyLauncher.UIResource.square_plus2; + this.imageBox1.ImageNormal = global::FizzyLauncher.UIResource.square_plus; this.imageBox1.ImageSelected = null; this.imageBox1.InitialImage = null; this.imageBox1.IsSelected = false; this.imageBox1.Location = new System.Drawing.Point(106, 4); this.imageBox1.Name = "imageBox1"; - this.imageBox1.NormalImage = global::FizzyLauncher.UIResource.plus; + this.imageBox1.NormalImage = global::FizzyLauncher.UIResource.square_plus; this.imageBox1.SelectedImage = null; this.imageBox1.Size = new System.Drawing.Size(18, 18); this.imageBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; @@ -200,23 +184,118 @@ namespace RyzStudio.Windows.ThemedForms this.imageBox1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox1_MouseClick); this.imageBox1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox1_MouseClick); // + // contextMenuStrip1 + // + this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.addItemToolStripMenuItem, + this.toolStripMenuItem2, + this.toolStripSeparator3, + this.editToolStripMenuItem, + this.toolStripSeparator2, + this.removeToolStripMenuItem, + this.toolStripMenuItem1, + this.toolStripSeparator1, + this.moveToTopToolStripMenuItem, + this.moveUpToolStripMenuItem, + this.moveDownToolStripMenuItem, + this.moveToBottomToolStripMenuItem}); + this.contextMenuStrip1.Name = "contextMenuStrip1"; + this.contextMenuStrip1.Size = new System.Drawing.Size(181, 242); + // + // addItemToolStripMenuItem + // + this.addItemToolStripMenuItem.Name = "addItemToolStripMenuItem"; + this.addItemToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.addItemToolStripMenuItem.Text = "&Add"; + this.addItemToolStripMenuItem.Click += new System.EventHandler(this.addItemToolStripMenuItem_Click); + // + // editToolStripMenuItem + // + this.editToolStripMenuItem.Name = "editToolStripMenuItem"; + this.editToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.editToolStripMenuItem.Text = "&Edit"; + this.editToolStripMenuItem.Click += new System.EventHandler(this.editToolStripMenuItem_Click); + // + // removeToolStripMenuItem + // + this.removeToolStripMenuItem.Name = "removeToolStripMenuItem"; + this.removeToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.removeToolStripMenuItem.Text = "&Remove"; + this.removeToolStripMenuItem.Click += new System.EventHandler(this.removeToolStripMenuItem_Click); + // + // moveToTopToolStripMenuItem + // + this.moveToTopToolStripMenuItem.Name = "moveToTopToolStripMenuItem"; + this.moveToTopToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.moveToTopToolStripMenuItem.Text = "Move To &Top"; + this.moveToTopToolStripMenuItem.Click += new System.EventHandler(this.moveToTopToolStripMenuItem_Click); + // + // moveUpToolStripMenuItem + // + this.moveUpToolStripMenuItem.Name = "moveUpToolStripMenuItem"; + this.moveUpToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.moveUpToolStripMenuItem.Text = "Move &Up"; + this.moveUpToolStripMenuItem.Click += new System.EventHandler(this.moveUpToolStripMenuItem_Click); + // + // moveDownToolStripMenuItem + // + this.moveDownToolStripMenuItem.Name = "moveDownToolStripMenuItem"; + this.moveDownToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.moveDownToolStripMenuItem.Text = "Move &Down"; + this.moveDownToolStripMenuItem.Click += new System.EventHandler(this.moveDownToolStripMenuItem_Click); + // + // moveToBottomToolStripMenuItem + // + this.moveToBottomToolStripMenuItem.Name = "moveToBottomToolStripMenuItem"; + this.moveToBottomToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.moveToBottomToolStripMenuItem.Text = "Move To &Bottom"; + this.moveToBottomToolStripMenuItem.Click += new System.EventHandler(this.moveToBottomToolStripMenuItem_Click); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(177, 6); + // + // toolStripMenuItem1 + // + this.toolStripMenuItem1.Name = "toolStripMenuItem1"; + this.toolStripMenuItem1.Size = new System.Drawing.Size(180, 22); + this.toolStripMenuItem1.Text = "Remove A&ll"; + this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click); + // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(177, 6); + // + // toolStripMenuItem2 + // + this.toolStripMenuItem2.Name = "toolStripMenuItem2"; + this.toolStripMenuItem2.Size = new System.Drawing.Size(180, 22); + this.toolStripMenuItem2.Text = "&Copy"; + this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click); + // + // toolStripSeparator3 + // + this.toolStripSeparator3.Name = "toolStripSeparator3"; + this.toolStripSeparator3.Size = new System.Drawing.Size(177, 6); + // // TListBox // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.Controls.Add(this.imageBox5); this.Controls.Add(this.imageBox4); this.Controls.Add(this.imageBox3); - this.Controls.Add(this.imageBox2); this.Controls.Add(this.imageBox1); this.Controls.Add(this.listBox1); this.Name = "TListBox"; this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3); - this.Size = new System.Drawing.Size(128, 120); + this.Size = new System.Drawing.Size(128, 225); ((System.ComponentModel.ISupportInitialize)(this.imageBox5)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.imageBox4)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.imageBox3)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.imageBox2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.imageBox1)).EndInit(); + this.contextMenuStrip1.ResumeLayout(false); this.ResumeLayout(false); } @@ -225,10 +304,22 @@ namespace RyzStudio.Windows.ThemedForms private System.Windows.Forms.ListBox listBox1; private Forms.TImageBox imageBox1; - private Forms.TImageBox imageBox2; private Forms.TImageBox imageBox3; private Forms.TImageBox imageBox4; private Forms.TImageBox imageBox5; private System.Windows.Forms.ToolTip toolTip1; + private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; + private System.Windows.Forms.ToolStripMenuItem addItemToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem removeToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripMenuItem moveToTopToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem moveUpToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem moveDownToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem moveToBottomToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; } } diff --git a/RyzStudio/Windows/ThemedForms/TListBox.resx b/RyzStudio/Windows/ThemedForms/TListBox.resx index 57523cc..34628c2 100644 --- a/RyzStudio/Windows/ThemedForms/TListBox.resx +++ b/RyzStudio/Windows/ThemedForms/TListBox.resx @@ -60,4 +60,10 @@ 17, 17 + + 17, 17 + + + 114, 17 + \ No newline at end of file diff --git a/UIResource.Designer.cs b/UIResource.Designer.cs index 90f6194..c79c10f 100644 --- a/UIResource.Designer.cs +++ b/UIResource.Designer.cs @@ -60,46 +60,6 @@ namespace FizzyLauncher { } } - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap arrow_down { - get { - object obj = ResourceManager.GetObject("arrow_down", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap arrow_down2 { - get { - object obj = ResourceManager.GetObject("arrow_down2", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap arrow_up { - get { - object obj = ResourceManager.GetObject("arrow_up", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap arrow_up2 { - get { - object obj = ResourceManager.GetObject("arrow_up2", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -160,26 +120,6 @@ namespace FizzyLauncher { } } - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap edit { - get { - object obj = ResourceManager.GetObject("edit", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap edit2 { - get { - object obj = ResourceManager.GetObject("edit2", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -243,9 +183,9 @@ namespace FizzyLauncher { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap minus { + internal static System.Drawing.Bitmap menu { get { - object obj = ResourceManager.GetObject("minus", resourceCulture); + object obj = ResourceManager.GetObject("menu", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -253,9 +193,9 @@ namespace FizzyLauncher { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap minus2 { + internal static System.Drawing.Bitmap menu2 { get { - object obj = ResourceManager.GetObject("minus2", resourceCulture); + object obj = ResourceManager.GetObject("menu2", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -263,9 +203,9 @@ namespace FizzyLauncher { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap plus { + internal static System.Drawing.Bitmap square_plus { get { - object obj = ResourceManager.GetObject("plus", resourceCulture); + object obj = ResourceManager.GetObject("square_plus", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -273,9 +213,9 @@ namespace FizzyLauncher { /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap plus2 { + internal static System.Drawing.Bitmap square_plus2 { get { - object obj = ResourceManager.GetObject("plus2", resourceCulture); + object obj = ResourceManager.GetObject("square_plus2", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -299,5 +239,45 @@ namespace FizzyLauncher { return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap triangle_down { + get { + object obj = ResourceManager.GetObject("triangle_down", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap triangle_down2 { + get { + object obj = ResourceManager.GetObject("triangle_down2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap triangle_up { + get { + object obj = ResourceManager.GetObject("triangle_up", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap triangle_up2 { + get { + object obj = ResourceManager.GetObject("triangle_up2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/UIResource.resx b/UIResource.resx index 03adecf..2104efd 100644 --- a/UIResource.resx +++ b/UIResource.resx @@ -118,18 +118,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Resources\UI\arrow_down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - Resources\UI\arrow_down2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - Resources\UI\arrow_up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - Resources\UI\arrow_up2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - Resources\UI\close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -148,12 +136,6 @@ Resources\UI\disk2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - Resources\UI\edit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - Resources\UI\edit2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - Resources\UI\file.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -172,17 +154,17 @@ Resources\UI\help2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - Resources\UI\minus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + Resources\UI\menu.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - Resources\UI\minus2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + Resources\UI\menu2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - Resources\UI\plus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + Resources\UI\square_plus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - Resources\UI\plus2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + Resources\UI\square_plus2.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 @@ -190,4 +172,16 @@ Resources\UI\trash2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + Resources\UI\triangle_down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\UI\triangle_down2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\UI\triangle_up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\UI\triangle_up2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/Windows/Forms/EditTileFolderForm.cs b/Windows/Forms/EditTileFolderForm.cs index 3fdf26a..459b35f 100644 --- a/Windows/Forms/EditTileFolderForm.cs +++ b/Windows/Forms/EditTileFolderForm.cs @@ -317,6 +317,11 @@ namespace FizzyLauncher.Windows.Forms return; } + if (listBox1.ListBox.SelectedItem == null) + { + return; + } + EditTileForm.ShowEditDialog(listBox1); }