diff --git a/ShareX.HelpersLib/Controls/MyListView.cs b/ShareX.HelpersLib/Controls/MyListView.cs
index d8388da7b..803e1e6f9 100644
--- a/ShareX.HelpersLib/Controls/MyListView.cs
+++ b/ShareX.HelpersLib/Controls/MyListView.cs
@@ -267,7 +267,7 @@ protected override void OnDragDrop(DragEventArgs drgevent)
}
lineIndex = lastLineIndex = -1;
- Update();
+ Invalidate();
}
protected void OnItemMoved(int oldIndex, int newIndex)
diff --git a/ShareX/CompanionCube.cs b/ShareX/CompanionCube.cs
deleted file mode 100644
index 97f73b8f5..000000000
--- a/ShareX/CompanionCube.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-#region License Information (GPL v3)
-
-/*
- ShareX - A program that allows you to take screenshots and share any file type
- Copyright (c) 2007-2016 ShareX Team
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- Optionally you can also view the license at .
-*/
-
-#endregion License Information (GPL v3)
-
-using System.Drawing;
-
-namespace ShareX
-{
- public class CompanionCube
- {
- public bool IsActive { get; set; }
- public Point Location { get; set; }
- public Size Size { get; set; }
- public Rectangle Rectangle => new Rectangle(Location, Size);
- public Point Center => new Point(Location.X + (Size.Width / 2), Location.Y + (Size.Height / 2));
- public int Speed { get; set; }
-
- public CompanionCube(int size, int speed)
- {
- Size = new Size(size, size);
- Speed = speed;
- IsActive = true;
- }
- }
-}
\ No newline at end of file
diff --git a/ShareX/CompanionCubeManager.cs b/ShareX/CompanionCubeManager.cs
deleted file mode 100644
index 080413593..000000000
--- a/ShareX/CompanionCubeManager.cs
+++ /dev/null
@@ -1,189 +0,0 @@
-#region License Information (GPL v3)
-
-/*
- ShareX - A program that allows you to take screenshots and share any file type
- Copyright (c) 2007-2016 ShareX Team
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- Optionally you can also view the license at .
-*/
-
-#endregion License Information (GPL v3)
-
-using ShareX.HelpersLib;
-using ShareX.Properties;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Drawing;
-using System.Linq;
-using System.Windows.Forms;
-
-namespace ShareX
-{
- public static class CompanionCubeManager
- {
- public static bool IsActive { get; set; }
- public static int CubeCount { get; } = 50;
- public static List Cubes { get; private set; }
-
- private static CompanionCubesForm cubesForm;
- private static Timer timer;
- private static Stopwatch startTime;
- private static TimeSpan previousElapsed;
- private static Rectangle area;
- private static Bitmap companionCube;
-
- public static void Toggle()
- {
- if (!IsActive)
- {
- Start();
- }
- else
- {
- Stop();
- }
- }
-
- public static void Start()
- {
- if (!IsActive)
- {
- IsActive = true;
-
- companionCube = Resources.CompanionCube;
-
- if (cubesForm != null) cubesForm.Close();
- cubesForm = new CompanionCubesForm();
- cubesForm.MouseClick += CubesForm_MouseClick;
- cubesForm.Show();
-
- area = new Rectangle(0, 0, cubesForm.Width, cubesForm.Height);
-
- Cubes = new List(CubeCount);
-
- for (int i = 0; i < CubeCount; i++)
- {
- CompanionCube cube = new CompanionCube(MathHelpers.Random(50, 100), MathHelpers.Random(250, 500));
- cube.Location = new Point(MathHelpers.Random(area.X, area.X + area.Width - cube.Size.Width),
- MathHelpers.Random(area.Y - cube.Size.Height - 500, area.Y - cube.Size.Height));
- Cubes.Add(cube);
- }
-
- previousElapsed = TimeSpan.Zero;
- startTime = Stopwatch.StartNew();
-
- timer = new Timer();
- timer.Interval = 20;
- timer.Tick += Timer_Tick;
- timer.Start();
- }
- }
-
- private static void CubesForm_MouseClick(object sender, MouseEventArgs e)
- {
- foreach (CompanionCube cube in Cubes.Where(x => x.Rectangle.Contains(e.Location)))
- {
- cube.IsActive = false;
- }
- }
-
- public static void Stop()
- {
- if (IsActive)
- {
- if (timer != null)
- {
- timer.Dispose();
- timer = null;
- }
-
- if (cubesForm != null)
- {
- cubesForm.Close();
- cubesForm = null;
- }
-
- if (companionCube != null)
- {
- companionCube.Dispose();
- companionCube = null;
- }
-
- if (Cubes != null)
- {
- Cubes.Clear();
- Cubes = null;
- }
-
- IsActive = false;
- }
- }
-
- private static void Timer_Tick(object sender, EventArgs e)
- {
- TimeSpan elapsed = startTime.Elapsed - previousElapsed;
- previousElapsed = startTime.Elapsed;
-
- IEnumerable cubes = Cubes.Where(x => x.IsActive).OrderBy(x => x.Rectangle.Bottom);
-
- foreach (CompanionCube cube in cubes)
- {
- int velocityY = (int)(cube.Speed * elapsed.TotalSeconds);
- Point newLocation = new Point(cube.Location.X, cube.Location.Y + velocityY);
- Rectangle newRectangle = new Rectangle(newLocation, cube.Size);
- bool intersect = false;
-
- foreach (CompanionCube cube2 in cubes)
- {
- if (cube != cube2 && (newRectangle.IntersectsWith(cube2.Rectangle) || cube.Rectangle.IntersectsWith(cube2.Rectangle)))
- {
- intersect = true;
- newLocation = new Point(cube.Location.X, cube2.Location.Y - cube.Size.Height);
- break;
- }
- }
-
- if (!intersect && newLocation.Y + cube.Size.Height > area.Y + area.Height)
- {
- newLocation = new Point(cube.Location.X, area.Height - cube.Size.Height);
- }
-
- cube.Location = newLocation;
- }
-
- DrawCubes();
- }
-
- private static void DrawCubes()
- {
- using (Bitmap surface = new Bitmap(area.Width, area.Height))
- using (Graphics g = Graphics.FromImage(surface))
- {
- foreach (CompanionCube cube in Cubes)
- {
- if (cube.IsActive && area.IntersectsWith(cube.Rectangle))
- {
- g.DrawImage(companionCube, new Rectangle(cube.Location, cube.Size));
- }
- }
-
- cubesForm.SelectBitmap(surface);
- }
- }
- }
-}
\ No newline at end of file
diff --git a/ShareX/Forms/AboutForm.Designer.cs b/ShareX/Forms/AboutForm.Designer.cs
index e7e2fdd28..ccf02deef 100644
--- a/ShareX/Forms/AboutForm.Designer.cs
+++ b/ShareX/Forms/AboutForm.Designer.cs
@@ -193,7 +193,6 @@ private void InitializeComponent()
this.Controls.Add(this.cLogo);
this.MaximizeBox = false;
this.Name = "AboutForm";
- this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.AboutForm_FormClosed);
this.Shown += new System.EventHandler(this.AboutForm_Shown);
((System.ComponentModel.ISupportInitialize)(this.pbMikeURL)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbAU)).EndInit();
diff --git a/ShareX/Forms/AboutForm.cs b/ShareX/Forms/AboutForm.cs
index a3263b137..81d6381da 100644
--- a/ShareX/Forms/AboutForm.cs
+++ b/ShareX/Forms/AboutForm.cs
@@ -158,11 +158,6 @@ private void rtb_LinkClicked(object sender, LinkClickedEventArgs e)
URLHelpers.OpenURL(e.LinkText);
}
- private void AboutForm_FormClosed(object sender, FormClosedEventArgs e)
- {
- CompanionCubeManager.Stop();
- }
-
#region Animation
private const int w = 200;
@@ -245,20 +240,6 @@ private void cLogo_Draw(Graphics g)
private void cLogo_MouseDown(object sender, MouseEventArgs e)
{
-#if STEAM
- if (e.Button == MouseButtons.Middle)
- {
- cLogo.Stop();
- CompanionCubeManager.Toggle();
- return;
- }
-
- if (CompanionCubeManager.IsActive)
- {
- CompanionCubeManager.Stop();
- }
-#endif
-
if (!isEasterEggStarted)
{
isPaused = !isPaused;
diff --git a/ShareX/Forms/AboutForm.resx b/ShareX/Forms/AboutForm.resx
index 41c24db66..36076925b 100644
--- a/ShareX/Forms/AboutForm.resx
+++ b/ShareX/Forms/AboutForm.resx
@@ -212,7 +212,7 @@
- @Invariant
+
False
@@ -239,7 +239,7 @@
- @Invariant
+
rtbShareXInfo
diff --git a/ShareX/Forms/CompanionCubesForm.cs b/ShareX/Forms/CompanionCubesForm.cs
deleted file mode 100644
index 8db49ec05..000000000
--- a/ShareX/Forms/CompanionCubesForm.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-#region License Information (GPL v3)
-
-/*
- ShareX - A program that allows you to take screenshots and share any file type
- Copyright (c) 2007-2016 ShareX Team
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- Optionally you can also view the license at .
-*/
-
-#endregion License Information (GPL v3)
-
-using ShareX.HelpersLib;
-using System;
-using System.Windows.Forms;
-
-namespace ShareX
-{
- public class CompanionCubesForm : LayeredForm
- {
- public CompanionCubesForm()
- {
- StartPosition = FormStartPosition.Manual;
- Bounds = CaptureHelpers.GetScreenWorkingArea();
- Shown += CompanionCubesForm_Shown;
- }
-
- private void CompanionCubesForm_Shown(object sender, EventArgs e)
- {
- this.ShowActivate();
- }
- }
-}
\ No newline at end of file
diff --git a/ShareX/Forms/QuickTaskMenuEditorForm.Designer.cs b/ShareX/Forms/QuickTaskMenuEditorForm.Designer.cs
index 74189d88a..9b7b17fa4 100644
--- a/ShareX/Forms/QuickTaskMenuEditorForm.Designer.cs
+++ b/ShareX/Forms/QuickTaskMenuEditorForm.Designer.cs
@@ -35,6 +35,7 @@ private void InitializeComponent()
this.btnRemove = new System.Windows.Forms.Button();
this.btnReset = new System.Windows.Forms.Button();
this.btnClose = new System.Windows.Forms.Button();
+ this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lvPresets
@@ -53,7 +54,7 @@ private void InitializeComponent()
this.lvPresets.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.lvPresets.Location = new System.Drawing.Point(8, 8);
this.lvPresets.Name = "lvPresets";
- this.lvPresets.Size = new System.Drawing.Size(448, 352);
+ this.lvPresets.Size = new System.Drawing.Size(448, 328);
this.lvPresets.TabIndex = 0;
this.lvPresets.UseCompatibleStateImageBehavior = false;
this.lvPresets.View = System.Windows.Forms.View.Details;
@@ -98,6 +99,7 @@ private void InitializeComponent()
//
// btnReset
//
+ this.btnReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnReset.Location = new System.Drawing.Point(272, 400);
this.btnReset.Name = "btnReset";
this.btnReset.Size = new System.Drawing.Size(184, 23);
@@ -108,6 +110,7 @@ private void InitializeComponent()
//
// btnClose
//
+ this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnClose.Location = new System.Drawing.Point(8, 400);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(256, 23);
@@ -116,21 +119,32 @@ private void InitializeComponent()
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
- // QuickTaskPresetsEditorForm
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(8, 344);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(341, 13);
+ this.label1.TabIndex = 6;
+ this.label1.Text = "Tip: If you add empty task it will be converted to separator line in menu.";
+ //
+ // QuickTaskMenuEditorForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(464, 432);
+ this.Controls.Add(this.label1);
this.Controls.Add(this.btnClose);
this.Controls.Add(this.btnReset);
this.Controls.Add(this.btnRemove);
this.Controls.Add(this.btnEdit);
this.Controls.Add(this.btnAdd);
this.Controls.Add(this.lvPresets);
- this.Name = "QuickTaskPresetsEditorForm";
+ this.Name = "QuickTaskMenuEditorForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "ShareX - Quick task menu editor";
this.ResumeLayout(false);
+ this.PerformLayout();
}
@@ -143,5 +157,6 @@ private void InitializeComponent()
private System.Windows.Forms.Button btnRemove;
private System.Windows.Forms.Button btnReset;
private System.Windows.Forms.Button btnClose;
+ private System.Windows.Forms.Label label1;
}
}
\ No newline at end of file
diff --git a/ShareX/Properties/Resources.Designer.cs b/ShareX/Properties/Resources.Designer.cs
index cd2536f96..23d037034 100644
--- a/ShareX/Properties/Resources.Designer.cs
+++ b/ShareX/Properties/Resources.Designer.cs
@@ -551,16 +551,6 @@ public static System.Drawing.Bitmap color {
}
}
- ///
- /// Looks up a localized resource of type System.Drawing.Bitmap.
- ///
- public static System.Drawing.Bitmap CompanionCube {
- get {
- object obj = ResourceManager.GetObject("CompanionCube", resourceCulture);
- return ((System.Drawing.Bitmap)(obj));
- }
- }
-
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
@@ -916,16 +906,6 @@ public static System.Drawing.Bitmap globe_share {
}
}
- ///
- /// Looks up a localized resource of type System.Drawing.Bitmap.
- ///
- public static System.Drawing.Bitmap google_plus {
- get {
- object obj = ResourceManager.GetObject("google_plus", resourceCulture);
- return ((System.Drawing.Bitmap)(obj));
- }
- }
-
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
diff --git a/ShareX/Properties/Resources.resx b/ShareX/Properties/Resources.resx
index 07e9dd8f3..44b0a6b6f 100644
--- a/ShareX/Properties/Resources.resx
+++ b/ShareX/Properties/Resources.resx
@@ -160,9 +160,6 @@ Press 'No' to cancel the current upload and disable screenshot auto uploading.
..\Resources\bin.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
- ..\Resources\google_plus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
..\Resources\toolbox.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
@@ -696,9 +693,6 @@ Would you like to restart ShareX?
..\Resources\es.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
- ..\Resources\CompanionCube.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
..\Resources\layer-shape-polygon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
diff --git a/ShareX/QuickTaskInfo.cs b/ShareX/QuickTaskInfo.cs
index 72b4d3cd2..be3f9caea 100644
--- a/ShareX/QuickTaskInfo.cs
+++ b/ShareX/QuickTaskInfo.cs
@@ -45,14 +45,17 @@ public bool IsValid
}
}
- public static List DefaultPresets = new List()
+ public static List DefaultPresets { get; } = new List()
{
- new QuickTaskInfo("Save, upload & copy URL", AfterCaptureTasks.SaveImageToFile | AfterCaptureTasks.UploadImageToHost, AfterUploadTasks.CopyURLToClipboard),
- new QuickTaskInfo("Save & copy image", AfterCaptureTasks.SaveImageToFile | AfterCaptureTasks.CopyImageToClipboard),
- new QuickTaskInfo("Annotate, save, upload & copy URL", AfterCaptureTasks.AnnotateImage | AfterCaptureTasks.SaveImageToFile | AfterCaptureTasks.UploadImageToHost, AfterUploadTasks.CopyURLToClipboard),
+ new QuickTaskInfo("Save, Upload, Copy URL", AfterCaptureTasks.SaveImageToFile | AfterCaptureTasks.UploadImageToHost, AfterUploadTasks.CopyURLToClipboard),
+ new QuickTaskInfo("Save, Copy image", AfterCaptureTasks.SaveImageToFile | AfterCaptureTasks.CopyImageToClipboard),
+ new QuickTaskInfo("Save, Copy image file", AfterCaptureTasks.SaveImageToFile | AfterCaptureTasks.CopyFileToClipboard),
+ new QuickTaskInfo("Annotate, Save, Upload, Copy URL", AfterCaptureTasks.AnnotateImage | AfterCaptureTasks.SaveImageToFile | AfterCaptureTasks.UploadImageToHost, AfterUploadTasks.CopyURLToClipboard),
+ new QuickTaskInfo(),
+ new QuickTaskInfo("Upload, Copy URL", AfterCaptureTasks.UploadImageToHost, AfterUploadTasks.CopyURLToClipboard),
new QuickTaskInfo("Save", AfterCaptureTasks.SaveImageToFile),
new QuickTaskInfo("Copy image", AfterCaptureTasks.CopyImageToClipboard),
- new QuickTaskInfo("Upload & copy URL", AfterCaptureTasks.UploadImageToHost, AfterUploadTasks.CopyURLToClipboard)
+ new QuickTaskInfo("Annotate", AfterCaptureTasks.AnnotateImage)
};
public QuickTaskInfo()
diff --git a/ShareX/Resources/CompanionCube.png b/ShareX/Resources/CompanionCube.png
deleted file mode 100644
index d2d27341a..000000000
Binary files a/ShareX/Resources/CompanionCube.png and /dev/null differ
diff --git a/ShareX/Resources/google_plus.png b/ShareX/Resources/google_plus.png
deleted file mode 100644
index 3c1eda0ba..000000000
Binary files a/ShareX/Resources/google_plus.png and /dev/null differ
diff --git a/ShareX/ShareX.csproj b/ShareX/ShareX.csproj
index 39acefb0d..2bd9321aa 100644
--- a/ShareX/ShareX.csproj
+++ b/ShareX/ShareX.csproj
@@ -97,8 +97,6 @@
-
-
UserControl
@@ -123,9 +121,6 @@
ClipboardFormatForm.cs
-
- Form
-
Form
@@ -1227,7 +1222,6 @@
-
@@ -1263,7 +1257,6 @@
-