mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
Rename function name
This commit is contained in:
parent
c4d36a85d6
commit
17b6c009fe
63 changed files with 95 additions and 94 deletions
|
@ -41,7 +41,7 @@ public partial class ClipboardContentViewer : Form
|
|||
public ClipboardContentViewer(bool showCheckBox = false)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
if (ShareXResources.UseDarkTheme)
|
||||
{
|
||||
|
|
|
@ -44,7 +44,7 @@ public partial class ColorPickerForm : Form
|
|||
public ColorPickerForm(Color currentColor, bool isScreenColorPickerMode = false)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
IsScreenColorPickerMode = isScreenColorPickerMode;
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ public partial class DNSChangerForm : Form
|
|||
public DNSChangerForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
AddDNS(Resources.DNSChangerForm_DNSChangerForm_Manual);
|
||||
AddDNS("Google Public DNS", "8.8.8.8", "8.8.4.4"); // https://developers.google.com/speed/public-dns/
|
||||
|
|
|
@ -47,7 +47,7 @@ private DebugForm(Logger logger)
|
|||
Logger = logger;
|
||||
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
rtbDebug.Text = Logger.ToString();
|
||||
rtbDebug.SelectionStart = rtbDebug.TextLength;
|
||||
|
|
|
@ -42,7 +42,7 @@ public ErrorForm(Exception error, string logPath, string bugReportPath) : this(e
|
|||
public ErrorForm(string errorTitle, string errorMessage, string logPath, string bugReportPath, bool unhandledException = true)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
IsUnhandledException = unhandledException;
|
||||
LogPath = logPath;
|
||||
|
|
|
@ -41,7 +41,7 @@ public GradientPickerForm(GradientInfo gradient)
|
|||
Gradient = gradient;
|
||||
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
cbGradientType.Items.AddRange(Helpers.GetEnumNamesProper<LinearGradientMode>());
|
||||
cbGradientType.SelectedIndex = (int)Gradient.Type;
|
||||
|
|
|
@ -38,7 +38,7 @@ public partial class HashCheckForm : Form
|
|||
public HashCheckForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
cbHashType.Items.AddRange(Helpers.GetEnumDescriptions<HashType>());
|
||||
cbHashType.SelectedIndex = (int)HashType.SHA1;
|
||||
|
|
|
@ -36,7 +36,7 @@ public class InputBox : Form
|
|||
public InputBox(string title = null, string inputText = null, string okText = null, string cancelText = null)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
InputText = inputText;
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ public partial class MonitorTestForm : Form
|
|||
public MonitorTestForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
Rectangle screenBounds = CaptureHelpers.GetScreenBounds();
|
||||
Location = screenBounds.Location;
|
||||
|
|
|
@ -147,7 +147,7 @@ public MyMessageBox(string text, string caption, MessageBoxButtons buttons = Mes
|
|||
panel.Size = new Size(labelPanel.Width + (LabelHorizontalPadding * 2), button1.Height + (ButtonPadding * 2));
|
||||
ClientSize = new Size(panel.Width, labelPanel.Height + (LabelVerticalPadding * 2) + panel.Height);
|
||||
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
if (ShareXResources.UseDarkTheme)
|
||||
{
|
||||
|
|
|
@ -33,7 +33,7 @@ public partial class OutputBox : Form
|
|||
public OutputBox(string text, string title)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
Text = "ShareX - " + title;
|
||||
txtText.Text = text;
|
||||
|
|
|
@ -38,7 +38,7 @@ public partial class PrintForm : Form
|
|||
public PrintForm(Image img, PrintSettings settings, bool previewOnly = false)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
printHelper = new PrintHelper(img);
|
||||
printHelper.Settings = printSettings = settings;
|
||||
|
|
|
@ -38,7 +38,7 @@ public partial class PrintTextForm : Form
|
|||
public PrintTextForm(string text, PrintSettings settings)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
printHelper = new PrintHelper(text);
|
||||
printHelper.Settings = printSettings = settings;
|
||||
|
|
|
@ -43,7 +43,7 @@ public static string UserAgent
|
|||
|
||||
public static bool UseDarkTheme { get; set; }
|
||||
public static bool UseWhiteIcon { get; set; }
|
||||
public static bool ApplyTheme { get; set; } = true;
|
||||
public static bool ExperimentalDarkTheme { get; set; } = true;
|
||||
|
||||
public static Icon Icon => UseWhiteIcon ? Resources.ShareX_Icon_White : Resources.ShareX_Icon;
|
||||
|
||||
|
@ -61,32 +61,33 @@ public static string UserAgent
|
|||
public static Color DarkBorderColor { get; } = Color.FromArgb(28, 32, 38);
|
||||
public static Color DarkCheckerColor1 { get; } = Color.FromArgb(60, 60, 60);
|
||||
public static Color DarkCheckerColor2 { get; } = Color.FromArgb(50, 50, 50);
|
||||
public static Color DarkLinkColor { get; } = Color.FromArgb(166, 212, 255);
|
||||
|
||||
public static int CheckerSize { get; } = 15;
|
||||
|
||||
public static void ApplyThemeToForm(Form form, bool setIcon = true)
|
||||
public static void ApplyTheme(Form form, bool setIcon = true)
|
||||
{
|
||||
if (setIcon)
|
||||
{
|
||||
form.Icon = Icon;
|
||||
}
|
||||
|
||||
if (ApplyTheme)
|
||||
if (ExperimentalDarkTheme)
|
||||
{
|
||||
ApplyThemeToControl(form);
|
||||
ApplyDarkThemeToControl(form);
|
||||
|
||||
if (form.IsHandleCreated)
|
||||
{
|
||||
NativeMethods.UseImmersiveDarkMode(form.Handle, UseDarkTheme);
|
||||
NativeMethods.UseImmersiveDarkMode(form.Handle, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
form.HandleCreated += (s, e) => NativeMethods.UseImmersiveDarkMode(form.Handle, UseDarkTheme);
|
||||
form.HandleCreated += (s, e) => NativeMethods.UseImmersiveDarkMode(form.Handle, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void ApplyThemeToControl(Control control)
|
||||
private static void ApplyDarkThemeToControl(Control control)
|
||||
{
|
||||
switch (control)
|
||||
{
|
||||
|
@ -96,58 +97,58 @@ private static void ApplyThemeToControl(Control control)
|
|||
control.ForeColor = SystemColors.ControlText;
|
||||
return;
|
||||
case SplitContainer sc:
|
||||
sc.Panel1.BackColor = BackgroundColor;
|
||||
sc.Panel2.BackColor = BackgroundColor;
|
||||
sc.Panel1.BackColor = DarkBackgroundColor;
|
||||
sc.Panel2.BackColor = DarkBackgroundColor;
|
||||
break;
|
||||
case PropertyGrid pg:
|
||||
pg.CategoryForeColor = TextColor;
|
||||
pg.CategorySplitterColor = BorderColor;
|
||||
pg.LineColor = BorderColor;
|
||||
pg.SelectedItemWithFocusForeColor = BorderColor;
|
||||
pg.SelectedItemWithFocusBackColor = TextColor;
|
||||
pg.CategoryForeColor = DarkTextColor;
|
||||
pg.CategorySplitterColor = DarkBorderColor;
|
||||
pg.LineColor = DarkBorderColor;
|
||||
pg.SelectedItemWithFocusForeColor = DarkBorderColor;
|
||||
pg.SelectedItemWithFocusBackColor = DarkTextColor;
|
||||
break;
|
||||
case DataGridView dgv:
|
||||
dgv.BackgroundColor = BackgroundColor;
|
||||
dgv.GridColor = BorderColor;
|
||||
dgv.DefaultCellStyle.BackColor = BackgroundColor;
|
||||
dgv.DefaultCellStyle.SelectionBackColor = BackgroundColor;
|
||||
dgv.DefaultCellStyle.ForeColor = TextColor;
|
||||
dgv.DefaultCellStyle.SelectionForeColor = TextColor;
|
||||
dgv.ColumnHeadersDefaultCellStyle.BackColor = BorderColor;
|
||||
dgv.ColumnHeadersDefaultCellStyle.SelectionBackColor = BorderColor;
|
||||
dgv.ColumnHeadersDefaultCellStyle.ForeColor = TextColor;
|
||||
dgv.ColumnHeadersDefaultCellStyle.SelectionForeColor = TextColor;
|
||||
dgv.BackgroundColor = DarkBackgroundColor;
|
||||
dgv.GridColor = DarkBorderColor;
|
||||
dgv.DefaultCellStyle.BackColor = DarkBackgroundColor;
|
||||
dgv.DefaultCellStyle.SelectionBackColor = DarkBackgroundColor;
|
||||
dgv.DefaultCellStyle.ForeColor = DarkTextColor;
|
||||
dgv.DefaultCellStyle.SelectionForeColor = DarkTextColor;
|
||||
dgv.ColumnHeadersDefaultCellStyle.BackColor = DarkBorderColor;
|
||||
dgv.ColumnHeadersDefaultCellStyle.SelectionBackColor = DarkBorderColor;
|
||||
dgv.ColumnHeadersDefaultCellStyle.ForeColor = DarkTextColor;
|
||||
dgv.ColumnHeadersDefaultCellStyle.SelectionForeColor = DarkTextColor;
|
||||
dgv.EnableHeadersVisualStyles = false;
|
||||
break;
|
||||
case ToolStrip ts:
|
||||
ts.Renderer = new ToolStripDarkRenderer();
|
||||
ApplyThemeToToolStripItemCollection(ts.Items);
|
||||
ApplyDarkThemeToToolStripItemCollection(ts.Items);
|
||||
return;
|
||||
case LinkLabel ll:
|
||||
ll.LinkColor = Color.FromArgb(166, 212, 255);
|
||||
ll.LinkColor = DarkLinkColor;
|
||||
break;
|
||||
}
|
||||
|
||||
control.ForeColor = TextColor;
|
||||
control.BackColor = BackgroundColor;
|
||||
control.ForeColor = DarkTextColor;
|
||||
control.BackColor = DarkBackgroundColor;
|
||||
|
||||
foreach (Control child in control.Controls)
|
||||
{
|
||||
ApplyThemeToControl(child);
|
||||
ApplyDarkThemeToControl(child);
|
||||
}
|
||||
}
|
||||
|
||||
private static void ApplyThemeToToolStripItemCollection(ToolStripItemCollection collection)
|
||||
private static void ApplyDarkThemeToToolStripItemCollection(ToolStripItemCollection collection)
|
||||
{
|
||||
foreach (ToolStripItem tsi in collection)
|
||||
{
|
||||
switch (tsi)
|
||||
{
|
||||
case ToolStripControlHost tsch:
|
||||
ApplyThemeToControl(tsch.Control);
|
||||
ApplyDarkThemeToControl(tsch.Control);
|
||||
break;
|
||||
case ToolStripDropDownItem tsddi:
|
||||
ApplyThemeToToolStripItemCollection(tsddi.DropDownItems);
|
||||
ApplyDarkThemeToToolStripItemCollection(tsddi.DropDownItems);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ public HistoryForm(string historyPath, HistorySettings settings, Action<string>
|
|||
Settings = settings;
|
||||
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
defaultTitle = Text;
|
||||
UpdateTitle();
|
||||
|
|
|
@ -33,7 +33,7 @@ public partial class HistoryItemInfoForm : Form
|
|||
public HistoryItemInfoForm(object hi)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
olvMain.SelectObject(hi);
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public ImageHistoryForm(string historyPath, ImageHistorySettings settings, Actio
|
|||
{
|
||||
InitializeComponent();
|
||||
tsMain.Renderer = new ToolStripRoundedEdgeRenderer();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
HistoryPath = historyPath;
|
||||
Settings = settings;
|
||||
|
|
|
@ -37,7 +37,7 @@ public partial class ImageHistorySettingsForm : Form
|
|||
public ImageHistorySettingsForm(ImageHistorySettings settings)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
Settings = settings;
|
||||
cbViewMode.Items.AddRange(Enum.GetNames(typeof(Manina.Windows.Forms.View)));
|
||||
|
|
|
@ -48,7 +48,7 @@ public partial class ImageEffectsForm : Form
|
|||
public ImageEffectsForm(Image img, List<ImageEffectPreset> presets, int selectedPresetIndex)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
DefaultImage = img;
|
||||
Presets = presets;
|
||||
|
|
|
@ -42,7 +42,7 @@ public WatermarkForm(WatermarkConfig watermarkConfig)
|
|||
config = watermarkConfig;
|
||||
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
CodeMenu.Create<CodeMenuEntryFilename>(txtWatermarkText, CodeMenuEntryFilename.t, CodeMenuEntryFilename.pn);
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ public partial class DirectoryIndexerForm : Form
|
|||
public DirectoryIndexerForm(IndexerSettings settings)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
Settings = settings;
|
||||
pgSettings.SelectedObject = Settings;
|
||||
|
|
|
@ -43,7 +43,7 @@ public ImageCombinerForm(ImageCombinerOptions options)
|
|||
Options = options;
|
||||
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
cbOrientation.Items.AddRange(Enum.GetNames(typeof(Orientation)));
|
||||
cbOrientation.SelectedIndex = (int)Options.Orientation;
|
||||
|
|
|
@ -37,7 +37,7 @@ public partial class ImageThumbnailerForm : Form
|
|||
public ImageThumbnailerForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
}
|
||||
|
||||
private void UpdateEnabled()
|
||||
|
|
|
@ -46,7 +46,7 @@ public VideoThumbnailerForm(string ffmpegPath, VideoThumbnailOptions options)
|
|||
Options = options;
|
||||
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
txtMediaPath.Text = Options.LastVideoPath ?? "";
|
||||
pgOptions.SelectedObject = Options;
|
||||
|
|
|
@ -36,7 +36,7 @@ public partial class CanvasSizeForm : Form
|
|||
public CanvasSizeForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
}
|
||||
|
||||
public CanvasSizeForm(Padding canvas) : this()
|
||||
|
|
|
@ -43,7 +43,7 @@ public EditorStartupForm(RegionCaptureOptions options)
|
|||
Options = options;
|
||||
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
}
|
||||
|
||||
private void LoadImageFile(string imageFilePath)
|
||||
|
|
|
@ -48,7 +48,7 @@ public FFmpegOptionsForm(ScreencastOptions options)
|
|||
Options = options;
|
||||
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
eiFFmpeg.ObjectType = typeof(FFmpegOptions);
|
||||
cboVideoCodec.Items.AddRange(Helpers.GetEnumDescriptions<FFmpegVideoCodec>());
|
||||
|
|
|
@ -36,7 +36,7 @@ public partial class ImageInsertForm : Form
|
|||
public ImageInsertForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
}
|
||||
|
||||
private void Close(ImageInsertMethod insertMethod)
|
||||
|
|
|
@ -41,7 +41,7 @@ public partial class ImageSizeForm : Form
|
|||
public ImageSizeForm(Size size, ImageEditorInterpolationMode interpolationMode)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
ImageSize = size;
|
||||
InterpolationMode = interpolationMode;
|
||||
|
|
|
@ -37,7 +37,7 @@ public partial class NewImageForm : Form
|
|||
public NewImageForm(RegionCaptureOptions options)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
Options = options;
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ public ScrollingCaptureForm(ScrollingCaptureOptions options, RegionCaptureOption
|
|||
RegionCaptureOptions = regionCaptureOptions;
|
||||
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
cbScrollMethod.Items.AddRange(Helpers.GetLocalizedEnumDescriptions<ScrollingCaptureScrollMethod>());
|
||||
cbScrollMethod.SelectedIndex = (int)Options.ScrollMethod;
|
||||
|
|
|
@ -50,7 +50,7 @@ public StickerForm(List<StickerPackInfo> stickerPacks, int selectedStickerPack,
|
|||
|
||||
InitializeComponent();
|
||||
tsMain.Renderer = new ToolStripRoundedEdgeRenderer();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
tsnudSize.NumericUpDownControl.Minimum = 16;
|
||||
tsnudSize.NumericUpDownControl.Maximum = 256;
|
||||
|
|
|
@ -39,7 +39,7 @@ public StickerPackForm(List<StickerPackInfo> stickers)
|
|||
Stickers = stickers;
|
||||
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
foreach (StickerPackInfo stickerPackInfo in Stickers)
|
||||
{
|
||||
|
|
|
@ -43,7 +43,7 @@ internal partial class TextDrawingInputBox : Form
|
|||
public TextDrawingInputBox(string text, TextDrawingOptions options, bool supportGradient)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
InputText = text;
|
||||
Options = options;
|
||||
|
|
|
@ -1050,7 +1050,7 @@ internal void CreateToolbar()
|
|||
tsMain.PerformLayout();
|
||||
menuForm.ResumeLayout(false);
|
||||
|
||||
ShareXResources.ApplyThemeToForm(menuForm, false);
|
||||
ShareXResources.ApplyTheme(menuForm, false);
|
||||
|
||||
menuForm.Show(Form);
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ public CustomUploaderSettingsForm(UploadersConfig config)
|
|||
Config = config;
|
||||
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
/*
|
||||
CodeMenuItem[] inputCodeMenuItems = new CodeMenuItem[]
|
||||
|
|
|
@ -38,7 +38,7 @@ public partial class EmailForm : Form
|
|||
public EmailForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
}
|
||||
|
||||
public EmailForm(string toEmail, string subject, string body) : this()
|
||||
|
|
|
@ -49,7 +49,7 @@ public string IssueId
|
|||
public JiraUpload()
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
}
|
||||
|
||||
public JiraUpload(string issuePrefix, GetSummaryHandler getSummary) : this()
|
||||
|
|
|
@ -44,7 +44,7 @@ public partial class OCRSpaceForm : Form
|
|||
public OCRSpaceForm(OCROptions ocrOptions)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
this.ocrOptions = ocrOptions;
|
||||
cbLanguages.Items.AddRange(Helpers.GetEnumDescriptions<OCRSpaceLanguages>());
|
||||
|
|
|
@ -82,7 +82,7 @@ public ParserSelectForm(string[] texts)
|
|||
|
||||
ResumeLayout();
|
||||
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
}
|
||||
|
||||
private void ParserSelectForm_Shown(object sender, EventArgs e)
|
||||
|
|
|
@ -38,7 +38,7 @@ public partial class ResponseForm : Form
|
|||
public ResponseForm(string response)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
Response = response;
|
||||
txtSource.Text = Response;
|
||||
|
|
|
@ -97,7 +97,7 @@ public bool MediaMode
|
|||
public TwitterTweetForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
MediaMode = false;
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ private UploadersConfigForm(UploadersConfig config)
|
|||
Config = config;
|
||||
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
InitializeControls();
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ public partial class UserPassBox : Form
|
|||
public UserPassBox(string title, string userName, string password)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
Text = title;
|
||||
txtUserName.Text = userName;
|
||||
|
|
|
@ -37,7 +37,7 @@ public partial class AboutForm : Form
|
|||
public AboutForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
lblProductName.Text = Program.Title;
|
||||
pbLogo.Image = ShareXResources.Logo;
|
||||
|
|
|
@ -41,7 +41,7 @@ public ActionsForm() : this(new ExternalProgram())
|
|||
public ActionsForm(ExternalProgram fileAction)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
FileAction = fileAction;
|
||||
txtName.Text = fileAction.Name ?? "";
|
||||
|
|
|
@ -40,7 +40,7 @@ public partial class ActionsToolbarEditForm : Form
|
|||
public ActionsToolbarEditForm(List<HotkeyType> actions)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
Actions = actions;
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ public static ActionsToolbarForm Instance
|
|||
private ActionsToolbarForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
|
|
|
@ -42,7 +42,7 @@ private AfterCaptureForm(TaskSettings taskSettings)
|
|||
TaskSettings = taskSettings;
|
||||
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
ImageList imageList = new ImageList { ColorDepth = ColorDepth.Depth32Bit };
|
||||
imageList.Images.Add(Resources.checkbox_uncheck);
|
||||
|
|
|
@ -46,7 +46,7 @@ public partial class AfterUploadForm : Form
|
|||
public AfterUploadForm(TaskInfo info)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
Info = info;
|
||||
if (Info.TaskSettings.AdvancedSettings.AutoCloseAfterUploadForm) tmrClose.Start();
|
||||
|
|
|
@ -42,7 +42,7 @@ public partial class ApplicationSettingsForm : Form
|
|||
public ApplicationSettingsForm()
|
||||
{
|
||||
InitializeControls();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
}
|
||||
|
||||
private void SettingsForm_Shown(object sender, EventArgs e)
|
||||
|
|
|
@ -64,7 +64,7 @@ public static AutoCaptureForm Instance
|
|||
private AutoCaptureForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
niTray.Icon = Resources.clock.ToIcon();
|
||||
|
||||
screenshotTimer = new System.Timers.Timer();
|
||||
|
|
|
@ -35,7 +35,7 @@ public partial class BeforeUploadForm : Form
|
|||
public BeforeUploadForm(TaskInfo info)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
DialogResult = DialogResult.OK;
|
||||
|
||||
ucBeforeUpload.InitCompleted += currentDestination =>
|
||||
|
|
|
@ -41,7 +41,7 @@ public ClipboardFormatForm() : this(new ClipboardFormat())
|
|||
public ClipboardFormatForm(ClipboardFormat cbf)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
ClipboardFormat = cbf;
|
||||
txtDescription.Text = cbf.Description ?? "";
|
||||
|
|
|
@ -41,7 +41,7 @@ public partial class FileExistForm : Form
|
|||
public FileExistForm(string filepath)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
Filepath = filepath;
|
||||
filename = Path.GetFileNameWithoutExtension(Filepath);
|
||||
|
|
|
@ -42,7 +42,7 @@ public partial class HotkeySettingsForm : Form
|
|||
public HotkeySettingsForm(HotkeyManager hotkeyManager)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
PrepareHotkeys(hotkeyManager);
|
||||
}
|
||||
|
|
|
@ -838,7 +838,7 @@ private void AfterApplicationSettingsJobs()
|
|||
|
||||
TaskManager.RecentManager.MaxCount = Program.Settings.RecentTasksMaxCount;
|
||||
|
||||
ShareXResources.ApplyTheme = Program.Settings.ExperimentalDarkTheme;
|
||||
ShareXResources.ExperimentalDarkTheme = Program.Settings.ExperimentalDarkTheme;
|
||||
|
||||
if (ShareXResources.UseDarkTheme != Program.Settings.UseDarkTheme)
|
||||
{
|
||||
|
|
|
@ -46,7 +46,7 @@ public partial class QRCodeForm : Form
|
|||
public QRCodeForm(string text = null)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
if (!string.IsNullOrEmpty(text))
|
||||
{
|
||||
|
|
|
@ -39,7 +39,7 @@ public QuickTaskInfoEditForm(QuickTaskInfo taskInfo)
|
|||
TaskInfo = taskInfo;
|
||||
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
txtName.Text = TaskInfo.Name;
|
||||
AddMultiEnumItemsContextMenu<AfterCaptureTasks>(x => TaskInfo.AfterCaptureTasks = TaskInfo.AfterCaptureTasks.Swap(x), cmsAfterCapture);
|
||||
|
|
|
@ -37,7 +37,7 @@ public partial class QuickTaskMenuEditorForm : Form
|
|||
public QuickTaskMenuEditorForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
if (Program.Settings.QuickTaskPresets == null)
|
||||
{
|
||||
|
|
|
@ -48,7 +48,7 @@ public partial class TaskSettingsForm : Form
|
|||
public TaskSettingsForm(TaskSettings hotkeySetting, bool isDefault = false)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
TaskSettings = hotkeySetting;
|
||||
IsDefault = isDefault;
|
||||
|
|
|
@ -36,7 +36,7 @@ public partial class TextUploadForm : Form
|
|||
public TextUploadForm(string content = null)
|
||||
{
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
if (string.IsNullOrEmpty(content) && Clipboard.ContainsText())
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@ public WatchFolderForm(WatchFolderSettings watchFolder)
|
|||
WatchFolder = watchFolder;
|
||||
|
||||
InitializeComponent();
|
||||
ShareXResources.ApplyThemeToForm(this);
|
||||
ShareXResources.ApplyTheme(this);
|
||||
|
||||
txtFolderPath.Text = watchFolder.FolderPath ?? "";
|
||||
txtFilter.Text = watchFolder.Filter ?? "";
|
||||
|
|
Loading…
Reference in a new issue