diff --git a/ShareX.ImageEffectsLib/ImageEffectsForm.Designer.cs b/ShareX.ImageEffectsLib/ImageEffectsForm.Designer.cs index fb85b7172..d517687e4 100644 --- a/ShareX.ImageEffectsLib/ImageEffectsForm.Designer.cs +++ b/ShareX.ImageEffectsLib/ImageEffectsForm.Designer.cs @@ -38,8 +38,6 @@ private void InitializeComponent() this.btnOK = new System.Windows.Forms.Button(); this.btnCancel = new System.Windows.Forms.Button(); this.btnClear = new System.Windows.Forms.Button(); - this.btnMoveUp = new System.Windows.Forms.Button(); - this.btnMoveDown = new System.Windows.Forms.Button(); this.btnDuplicate = new System.Windows.Forms.Button(); this.btnRefresh = new System.Windows.Forms.Button(); this.btnLoadImage = new System.Windows.Forms.Button(); @@ -66,6 +64,8 @@ private void InitializeComponent() // // lvEffects // + this.lvEffects.AllowDrop = true; + this.lvEffects.AllowItemDrag = true; resources.ApplyResources(this.lvEffects, "lvEffects"); this.lvEffects.AutoFillColumn = true; this.lvEffects.CheckBoxes = true; @@ -78,6 +78,7 @@ private void InitializeComponent() this.lvEffects.Name = "lvEffects"; this.lvEffects.UseCompatibleStateImageBehavior = false; this.lvEffects.View = System.Windows.Forms.View.Details; + this.lvEffects.ItemMoved += new ShareX.HelpersLib.MyListView.ListViewItemMovedEventHandler(this.lvEffects_ItemMoved); this.lvEffects.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.lvEffects_ItemChecked); this.lvEffects.SelectedIndexChanged += new System.EventHandler(this.lvEffects_SelectedIndexChanged); this.lvEffects.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lvEffects_KeyDown); @@ -114,20 +115,6 @@ private void InitializeComponent() this.btnClear.UseVisualStyleBackColor = true; this.btnClear.Click += new System.EventHandler(this.btnClear_Click); // - // btnMoveUp - // - resources.ApplyResources(this.btnMoveUp, "btnMoveUp"); - this.btnMoveUp.Name = "btnMoveUp"; - this.btnMoveUp.UseVisualStyleBackColor = true; - this.btnMoveUp.Click += new System.EventHandler(this.btnMoveUp_Click); - // - // btnMoveDown - // - resources.ApplyResources(this.btnMoveDown, "btnMoveDown"); - this.btnMoveDown.Name = "btnMoveDown"; - this.btnMoveDown.UseVisualStyleBackColor = true; - this.btnMoveDown.Click += new System.EventHandler(this.btnMoveDown_Click); - // // btnDuplicate // resources.ApplyResources(this.btnDuplicate, "btnDuplicate"); @@ -191,8 +178,6 @@ private void InitializeComponent() this.Controls.Add(this.btnLoadImage); this.Controls.Add(this.btnRefresh); this.Controls.Add(this.btnDuplicate); - this.Controls.Add(this.btnMoveDown); - this.Controls.Add(this.btnMoveUp); this.Controls.Add(this.btnClear); this.Controls.Add(this.pbResult); this.Controls.Add(this.btnCancel); @@ -219,8 +204,6 @@ private void InitializeComponent() private System.Windows.Forms.Button btnOK; private System.Windows.Forms.Button btnCancel; private System.Windows.Forms.Button btnClear; - private System.Windows.Forms.Button btnMoveUp; - private System.Windows.Forms.Button btnMoveDown; private System.Windows.Forms.Button btnDuplicate; private System.Windows.Forms.Button btnRefresh; private System.Windows.Forms.Button btnLoadImage; diff --git a/ShareX.ImageEffectsLib/ImageEffectsForm.cs b/ShareX.ImageEffectsLib/ImageEffectsForm.cs index 0e056ad38..c1dde1f83 100644 --- a/ShareX.ImageEffectsLib/ImageEffectsForm.cs +++ b/ShareX.ImageEffectsLib/ImageEffectsForm.cs @@ -251,22 +251,9 @@ private void btnDuplicate_Click(object sender, EventArgs e) } } - private void btnMoveUp_Click(object sender, EventArgs e) + private void lvEffects_ItemMoved(object sender, int oldIndex, int newIndex) { - if (lvEffects.SelectedItems.Count > 0) - { - lvEffects.SelectedItems[0].MoveUp(); - UpdatePreview(); - } - } - - private void btnMoveDown_Click(object sender, EventArgs e) - { - if (lvEffects.SelectedItems.Count > 0) - { - lvEffects.SelectedItems[0].MoveDown(); - UpdatePreview(); - } + UpdatePreview(); } private void btnRefresh_Click(object sender, EventArgs e) diff --git a/ShareX.ImageEffectsLib/ImageEffectsForm.resx b/ShareX.ImageEffectsLib/ImageEffectsForm.resx index 76e2210be..38c9947ef 100644 --- a/ShareX.ImageEffectsLib/ImageEffectsForm.resx +++ b/ShareX.ImageEffectsLib/ImageEffectsForm.resx @@ -142,7 +142,7 @@ $this - 14 + 12 8, 8 @@ -166,7 +166,7 @@ $this - 13 + 11 Top, Bottom, Left @@ -187,13 +187,13 @@ lvEffects - HelpersLib.MyListView, HelpersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + ShareX.HelpersLib.MyListView, ShareX.HelpersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null $this - 15 + 13 96, 8 @@ -217,7 +217,7 @@ $this - 12 + 10 Bottom, Right @@ -244,7 +244,7 @@ $this - 11 + 9 Bottom, Right @@ -271,7 +271,7 @@ $this - 10 + 8 184, 8 @@ -295,60 +295,6 @@ $this - 8 - - - Microsoft Sans Serif, 8.25pt - - - 360, 8 - - - 96, 24 - - - 4 - - - Move up - - - btnMoveUp - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 7 - - - Microsoft Sans Serif, 8.25pt - - - 464, 8 - - - 96, 24 - - - 5 - - - Move down - - - btnMoveDown - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - 6 @@ -376,7 +322,7 @@ 5 - 568, 8 + 360, 8 80, 24 @@ -481,7 +427,7 @@ eiImageEffects - HelpersLib.ExportImportControl, HelpersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + ShareX.HelpersLib.ExportImportControl, ShareX.HelpersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null $this @@ -505,13 +451,13 @@ pbResult - HelpersLib.MyPictureBox, HelpersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + ShareX.HelpersLib.MyPictureBox, ShareX.HelpersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null $this - 9 + 7 17, 17 diff --git a/ShareX.ImageEffectsLib/ImageEffectsForm.tr.resx b/ShareX.ImageEffectsLib/ImageEffectsForm.tr.resx index 8a7ce82d8..310a2eda5 100644 --- a/ShareX.ImageEffectsLib/ImageEffectsForm.tr.resx +++ b/ShareX.ImageEffectsLib/ImageEffectsForm.tr.resx @@ -1,4 +1,3 @@ -