mirror of
https://github.com/ShareX/ShareX.git
synced 2025-12-28 07:54:19 +00:00
parent
fd9618bec0
commit
184e749202
@ -161,12 +161,6 @@ namespace ShareX.HelpersLib
|
||||
Suffix
|
||||
}
|
||||
|
||||
public enum ScreenTearingTestMode
|
||||
{
|
||||
VerticalLines,
|
||||
HorizontalLines
|
||||
}
|
||||
|
||||
public enum HotkeyStatus
|
||||
{
|
||||
Registered,
|
||||
|
||||
@ -474,5 +474,15 @@ namespace ShareX.HelpersLib
|
||||
tabControl.SelectedTab = tabPage;
|
||||
tabControl.Enabled = true;
|
||||
}
|
||||
|
||||
public static DialogResult ShowDialogTopMost(this Form form, Form owner)
|
||||
{
|
||||
if (owner != null && owner.TopMost)
|
||||
{
|
||||
form.TopMost = true;
|
||||
}
|
||||
|
||||
return form.ShowDialog(owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -110,17 +110,12 @@ namespace ShareX.HelpersLib
|
||||
{
|
||||
using (ColorPickerForm dialog = new ColorPickerForm(currentColor, options: options))
|
||||
{
|
||||
if (owner != null && owner.TopMost)
|
||||
{
|
||||
dialog.TopMost = true;
|
||||
}
|
||||
|
||||
if (openScreenColorPicker != null)
|
||||
{
|
||||
dialog.EnableScreenColorPickerButton(openScreenColorPicker);
|
||||
}
|
||||
|
||||
if (dialog.ShowDialog(owner) == DialogResult.OK)
|
||||
if (dialog.ShowDialogTopMost(owner) == DialogResult.OK)
|
||||
{
|
||||
newColor = dialog.NewColor;
|
||||
return true;
|
||||
|
||||
@ -201,6 +201,9 @@ namespace ShareX.ScreenCaptureLib
|
||||
FormBorderStyle = FormBorderStyle.None;
|
||||
Bounds = ScreenBounds;
|
||||
ShowInTaskbar = false;
|
||||
#if !DEBUG
|
||||
TopMost = true;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -84,7 +84,7 @@ namespace ShareX.ScreenCaptureLib
|
||||
{
|
||||
using (StickerForm stickerForm = new StickerForm(AnnotationOptions.StickerPacks, AnnotationOptions.SelectedStickerPack, AnnotationOptions.StickerSize))
|
||||
{
|
||||
if (stickerForm.ShowDialog(Manager.Form) == DialogResult.OK)
|
||||
if (stickerForm.ShowDialogTopMost(Manager.Form) == DialogResult.OK)
|
||||
{
|
||||
AnnotationOptions.SelectedStickerPack = stickerForm.SelectedStickerPack;
|
||||
AnnotationOptions.StickerSize = stickerForm.StickerSize;
|
||||
|
||||
@ -142,7 +142,7 @@ namespace ShareX.ScreenCaptureLib
|
||||
|
||||
using (TextDrawingInputBox inputBox = new TextDrawingInputBox(Text, TextOptions, SupportGradient, Manager.Options.ColorPickerOptions))
|
||||
{
|
||||
result = inputBox.ShowDialog(Manager.Form) == DialogResult.OK;
|
||||
result = inputBox.ShowDialogTopMost(Manager.Form) == DialogResult.OK;
|
||||
Text = inputBox.InputText;
|
||||
OnConfigSave();
|
||||
}
|
||||
|
||||
@ -393,6 +393,12 @@ namespace ShareX
|
||||
Default, Light, Transparent
|
||||
}
|
||||
|
||||
public enum ScreenTearingTestMode
|
||||
{
|
||||
VerticalLines,
|
||||
HorizontalLines
|
||||
}
|
||||
|
||||
#if !MicrosoftStore
|
||||
public enum StartupState
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace ShareX.HelpersLib
|
||||
namespace ShareX
|
||||
{
|
||||
partial class MonitorTestForm
|
||||
{
|
||||
@ -31,8 +31,8 @@
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MonitorTestForm));
|
||||
pSettings = new System.Windows.Forms.Panel();
|
||||
btnScreenTearingTest = new System.Windows.Forms.Button();
|
||||
btnGradientColor2 = new ColorButton();
|
||||
btnGradientColor1 = new ColorButton();
|
||||
btnGradientColor2 = new HelpersLib.ColorButton();
|
||||
btnGradientColor1 = new HelpersLib.ColorButton();
|
||||
lblTip = new System.Windows.Forms.Label();
|
||||
cbGradient = new System.Windows.Forms.ComboBox();
|
||||
rbGradient = new System.Windows.Forms.RadioButton();
|
||||
@ -322,8 +322,8 @@
|
||||
private System.Windows.Forms.ComboBox cbGradient;
|
||||
private System.Windows.Forms.RadioButton rbGradient;
|
||||
private System.Windows.Forms.Label lblTip;
|
||||
private ColorButton btnGradientColor2;
|
||||
private ColorButton btnGradientColor1;
|
||||
private HelpersLib.ColorButton btnGradientColor2;
|
||||
private HelpersLib.ColorButton btnGradientColor1;
|
||||
private System.Windows.Forms.Button btnScreenTearingTest;
|
||||
}
|
||||
}
|
||||
@ -23,12 +23,13 @@
|
||||
|
||||
#endregion License Information (GPL v3)
|
||||
|
||||
using ShareX.HelpersLib;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ShareX.HelpersLib
|
||||
namespace ShareX
|
||||
{
|
||||
public partial class MonitorTestForm : Form
|
||||
{
|
||||
@ -336,12 +336,7 @@ namespace ShareX
|
||||
|
||||
using (PinToScreenOptionsForm pinToScreenOptionsForm = new PinToScreenOptionsForm(Options))
|
||||
{
|
||||
if (TopMost)
|
||||
{
|
||||
pinToScreenOptionsForm.TopMost = true;
|
||||
}
|
||||
|
||||
if (pinToScreenOptionsForm.ShowDialog(this) == DialogResult.OK)
|
||||
if (pinToScreenOptionsForm.ShowDialogTopMost(this) == DialogResult.OK)
|
||||
{
|
||||
if (TopMost != Options.TopMost)
|
||||
{
|
||||
|
||||
@ -23,13 +23,14 @@
|
||||
|
||||
#endregion License Information (GPL v3)
|
||||
|
||||
using ShareX.HelpersLib;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ShareX.HelpersLib
|
||||
namespace ShareX
|
||||
{
|
||||
public class ScreenTearingTestForm : Form
|
||||
{
|
||||
Loading…
Reference in New Issue
Block a user