mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-02 21:20:28 +12:00
Added CreateCursor method
This commit is contained in:
parent
3bdd94b870
commit
37c4749cd0
|
@ -156,10 +156,7 @@ private void EventMouseEnter(object sender, EventArgs e)
|
|||
{
|
||||
if (this is ColorBox)
|
||||
{
|
||||
using (MemoryStream cursorStream = new MemoryStream(Resources.Crosshair))
|
||||
{
|
||||
Cursor = new Cursor(cursorStream);
|
||||
}
|
||||
Cursor = Helpers.CreateCursor(Resources.Crosshair);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1120,5 +1120,13 @@ public static string GetWindowsProductName()
|
|||
|
||||
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();
|
||||
Icon = ShareXResources.Icon;
|
||||
|
||||
using (MemoryStream cursorStream = new MemoryStream(Resources.Crosshair))
|
||||
{
|
||||
Cursor = new Cursor(cursorStream);
|
||||
}
|
||||
Cursor = Helpers.CreateCursor(Resources.Crosshair);
|
||||
|
||||
drawableObjects = new List<DrawableObject>();
|
||||
Config = new RegionCaptureOptions();
|
||||
|
|
|
@ -89,11 +89,7 @@ public RectangleRegionAnnotateForm(RectangleAnnotateOptions options)
|
|||
|
||||
InitializeComponent();
|
||||
Icon = ShareXResources.Icon;
|
||||
|
||||
using (MemoryStream cursorStream = new MemoryStream(Resources.Crosshair))
|
||||
{
|
||||
Cursor = new Cursor(cursorStream);
|
||||
}
|
||||
Cursor = Helpers.CreateCursor(Resources.Crosshair);
|
||||
|
||||
timer = new Timer { Interval = 10 };
|
||||
timer.Tick += timer_Tick;
|
||||
|
|
|
@ -69,11 +69,7 @@ public RectangleRegionLightForm()
|
|||
|
||||
InitializeComponent();
|
||||
Icon = ShareXResources.Icon;
|
||||
|
||||
using (MemoryStream cursorStream = new MemoryStream(Resources.Crosshair))
|
||||
{
|
||||
Cursor = new Cursor(cursorStream);
|
||||
}
|
||||
Cursor = Helpers.CreateCursor(Resources.Crosshair);
|
||||
|
||||
timer = new Timer { Interval = 10 };
|
||||
timer.Tick += timer_Tick;
|
||||
|
|
|
@ -82,17 +82,13 @@ public RectangleRegionTransparentForm()
|
|||
StartPosition = FormStartPosition.Manual;
|
||||
Bounds = ScreenRectangle;
|
||||
Text = "ShareX - " + Resources.RectangleTransparent_RectangleTransparent_Rectangle_capture_transparent;
|
||||
Cursor = Helpers.CreateCursor(Resources.Crosshair);
|
||||
|
||||
Shown += RectangleTransparent_Shown;
|
||||
KeyUp += RectangleTransparent_KeyUp;
|
||||
MouseDown += RectangleTransparent_MouseDown;
|
||||
MouseUp += RectangleTransparent_MouseUp;
|
||||
|
||||
using (MemoryStream cursorStream = new MemoryStream(Resources.Crosshair))
|
||||
{
|
||||
Cursor = new Cursor(cursorStream);
|
||||
}
|
||||
|
||||
timer = new Timer { Interval = 10 };
|
||||
timer.Tick += timer_Tick;
|
||||
timer.Start();
|
||||
|
|
Loading…
Reference in a new issue