mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-06 05:05:42 +13:00
Added CreateCursor method
This commit is contained in:
parent
3bdd94b870
commit
37c4749cd0
6 changed files with 13 additions and 24 deletions
|
@ -156,10 +156,7 @@ private void EventMouseEnter(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (this is ColorBox)
|
if (this is ColorBox)
|
||||||
{
|
{
|
||||||
using (MemoryStream cursorStream = new MemoryStream(Resources.Crosshair))
|
Cursor = Helpers.CreateCursor(Resources.Crosshair);
|
||||||
{
|
|
||||||
Cursor = new Cursor(cursorStream);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1120,5 +1120,13 @@ public static string GetWindowsProductName()
|
||||||
|
|
||||||
return Environment.OSVersion.VersionString;
|
return Environment.OSVersion.VersionString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Cursor CreateCursor(byte[] data)
|
||||||
|
{
|
||||||
|
using (MemoryStream ms = new MemoryStream(data))
|
||||||
|
{
|
||||||
|
return new Cursor(ms);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -66,11 +66,7 @@ public BaseRegionForm()
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Icon = ShareXResources.Icon;
|
Icon = ShareXResources.Icon;
|
||||||
|
Cursor = Helpers.CreateCursor(Resources.Crosshair);
|
||||||
using (MemoryStream cursorStream = new MemoryStream(Resources.Crosshair))
|
|
||||||
{
|
|
||||||
Cursor = new Cursor(cursorStream);
|
|
||||||
}
|
|
||||||
|
|
||||||
drawableObjects = new List<DrawableObject>();
|
drawableObjects = new List<DrawableObject>();
|
||||||
Config = new RegionCaptureOptions();
|
Config = new RegionCaptureOptions();
|
||||||
|
|
|
@ -89,11 +89,7 @@ public RectangleRegionAnnotateForm(RectangleAnnotateOptions options)
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Icon = ShareXResources.Icon;
|
Icon = ShareXResources.Icon;
|
||||||
|
Cursor = Helpers.CreateCursor(Resources.Crosshair);
|
||||||
using (MemoryStream cursorStream = new MemoryStream(Resources.Crosshair))
|
|
||||||
{
|
|
||||||
Cursor = new Cursor(cursorStream);
|
|
||||||
}
|
|
||||||
|
|
||||||
timer = new Timer { Interval = 10 };
|
timer = new Timer { Interval = 10 };
|
||||||
timer.Tick += timer_Tick;
|
timer.Tick += timer_Tick;
|
||||||
|
|
|
@ -69,11 +69,7 @@ public RectangleRegionLightForm()
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Icon = ShareXResources.Icon;
|
Icon = ShareXResources.Icon;
|
||||||
|
Cursor = Helpers.CreateCursor(Resources.Crosshair);
|
||||||
using (MemoryStream cursorStream = new MemoryStream(Resources.Crosshair))
|
|
||||||
{
|
|
||||||
Cursor = new Cursor(cursorStream);
|
|
||||||
}
|
|
||||||
|
|
||||||
timer = new Timer { Interval = 10 };
|
timer = new Timer { Interval = 10 };
|
||||||
timer.Tick += timer_Tick;
|
timer.Tick += timer_Tick;
|
||||||
|
|
|
@ -82,17 +82,13 @@ public RectangleRegionTransparentForm()
|
||||||
StartPosition = FormStartPosition.Manual;
|
StartPosition = FormStartPosition.Manual;
|
||||||
Bounds = ScreenRectangle;
|
Bounds = ScreenRectangle;
|
||||||
Text = "ShareX - " + Resources.RectangleTransparent_RectangleTransparent_Rectangle_capture_transparent;
|
Text = "ShareX - " + Resources.RectangleTransparent_RectangleTransparent_Rectangle_capture_transparent;
|
||||||
|
Cursor = Helpers.CreateCursor(Resources.Crosshair);
|
||||||
|
|
||||||
Shown += RectangleTransparent_Shown;
|
Shown += RectangleTransparent_Shown;
|
||||||
KeyUp += RectangleTransparent_KeyUp;
|
KeyUp += RectangleTransparent_KeyUp;
|
||||||
MouseDown += RectangleTransparent_MouseDown;
|
MouseDown += RectangleTransparent_MouseDown;
|
||||||
MouseUp += RectangleTransparent_MouseUp;
|
MouseUp += RectangleTransparent_MouseUp;
|
||||||
|
|
||||||
using (MemoryStream cursorStream = new MemoryStream(Resources.Crosshair))
|
|
||||||
{
|
|
||||||
Cursor = new Cursor(cursorStream);
|
|
||||||
}
|
|
||||||
|
|
||||||
timer = new Timer { Interval = 10 };
|
timer = new Timer { Interval = 10 };
|
||||||
timer.Tick += timer_Tick;
|
timer.Tick += timer_Tick;
|
||||||
timer.Start();
|
timer.Start();
|
||||||
|
|
Loading…
Reference in a new issue