public ImageEffectsForm(Bitmap bmp, List <ImageEffectPreset> presets, int selectedPresetIndex) { InitializeComponent(); ShareXResources.ApplyTheme(this); PreviewImage = bmp; if (PreviewImage == null) { AutoGeneratePreviewImage = true; } Presets = presets; if (Presets.Count == 0) { Presets.Add(new ImageEffectPreset()); } SelectedPresetIndex = selectedPresetIndex; eiImageEffects.ObjectType = typeof(ImageEffectPreset); AddAllEffectsToContextMenu(); }
public VideoConverterForm(string ffmpegFilePath, VideoConverterOptions options) { FFmpegFilePath = ffmpegFilePath; Options = options; InitializeComponent(); ShareXResources.ApplyTheme(this); UpdateOptions(); txtInputFilePath.Text = Options.InputFilePath; txtOutputFolder.Text = Options.OutputFolderPath; txtOutputFileName.Text = Options.OutputFileName; cbVideoCodec.Items.AddRange(Helpers.GetEnumDescriptions <ConverterVideoCodecs>()); cbVideoCodec.SelectedIndex = (int)Options.VideoCodec; tbVideoQuality.SetValue(tbVideoQuality.Minimum + tbVideoQuality.Maximum - Options.VideoQuality); cbAutoOpenFolder.Checked = Options.AutoOpenFolder; formReady = true; }
private AfterCaptureForm(TaskSettings taskSettings) { TaskSettings = taskSettings; InitializeComponent(); ShareXResources.ApplyTheme(this); ImageList imageList = new ImageList { ColorDepth = ColorDepth.Depth32Bit }; imageList.Images.Add(Resources.checkbox_uncheck); imageList.Images.Add(Resources.checkbox_check); lvAfterCaptureTasks.SmallImageList = imageList; lvAfterUploadTasks.SmallImageList = imageList; ucBeforeUpload.InitCapture(TaskSettings); AddAfterCaptureItems(TaskSettings.AfterCaptureJob); AddAfterUploadItems(TaskSettings.AfterUploadJob); }
private void UpdateButtonImages() { if (ShareXResources.UseCustomTheme) { ShareXResources.ApplyCustomThemeToContextMenuStrip(cmsGradient); ShareXResources.ApplyCustomThemeToContextMenuStrip(cmsAlignmentHorizontal); ShareXResources.ApplyCustomThemeToContextMenuStrip(cmsAlignmentVertical); } cbBold.Image = ShareXResources.IsDarkTheme ? Resources.edit_bold_white : Resources.edit_bold; cbItalic.Image = ShareXResources.IsDarkTheme ? Resources.edit_italic_white : Resources.edit_italic; cbUnderline.Image = ShareXResources.IsDarkTheme ? Resources.edit_underline_white : Resources.edit_underline; UpdateHorizontalAlignmentImage(); UpdateVerticalAlignmentImage(); tsmiAlignmentLeft.Image = ShareXResources.IsDarkTheme ? Resources.edit_alignment_white : Resources.edit_alignment; tsmiAlignmentCenter.Image = ShareXResources.IsDarkTheme ? Resources.edit_alignment_center_white : Resources.edit_alignment_center; tsmiAlignmentRight.Image = ShareXResources.IsDarkTheme ? Resources.edit_alignment_right_white : Resources.edit_alignment_right; tsmiAlignmentTop.Image = ShareXResources.IsDarkTheme ? Resources.edit_vertical_alignment_top_white : Resources.edit_vertical_alignment_top; tsmiAlignmentMiddle.Image = ShareXResources.IsDarkTheme ? Resources.edit_vertical_alignment_middle_white : Resources.edit_vertical_alignment_middle; tsmiAlignmentBottom.Image = ShareXResources.IsDarkTheme ? Resources.edit_vertical_alignment_white : Resources.edit_vertical_alignment; }
public HistoryForm(string historyPath, HistorySettings settings, Action <string> uploadFile = null, Action <string> editImage = null) { HistoryPath = historyPath; Settings = settings; InitializeComponent(); defaultTitle = Text; UpdateTitle(); // Mark the Date column as having a date; used for sorting chDateTime.Tag = new DateTime(); ImageList il = new ImageList(); il.ColorDepth = ColorDepth.Depth32Bit; il.Images.Add(Resources.image); il.Images.Add(Resources.notebook); il.Images.Add(Resources.application_block); il.Images.Add(Resources.globe); lvHistory.SmallImageList = il; him = new HistoryItemManager(uploadFile, editImage); him.GetHistoryItems += him_GetHistoryItems; lvHistory.ContextMenuStrip = him.cmsHistory; pbThumbnail.Reset(); lvHistory.FillLastColumn(); if (Settings.SplitterDistance > 0) { scMain.SplitterDistance = Settings.SplitterDistance; } nudMaxItemCount.SetValue(Settings.MaxItemCount); ShareXResources.ApplyTheme(this); Settings.WindowState.AutoHandleFormState(this); }
public ImageSizeForm(Size size, ImageInterpolationMode interpolationMode) { InitializeComponent(); ShareXResources.ApplyTheme(this); ImageSize = size; InterpolationMode = interpolationMode; widthRatio = (double)size.Width / size.Height; heightRatio = (double)size.Height / size.Width; nudWidth.SetValue(size.Width); nudHeight.SetValue(size.Height); VerifySize(); nudWidth.TextChanged += NudWidth_TextChanged; nudHeight.TextChanged += NudHeight_TextChanged; cbResampling.Items.AddRange(Helpers.GetLocalizedEnumDescriptions <ImageInterpolationMode>()); cbResampling.SelectedIndex = (int)InterpolationMode; ignoreValueChanged = false; }
private AutoCaptureForm() { InitializeComponent(); ShareXResources.ApplyTheme(this); niTray.Icon = Resources.clock.ToIcon(); screenshotTimer = new System.Timers.Timer(); screenshotTimer.SynchronizingObject = this; screenshotTimer.Elapsed += screenshotTimer_Elapsed; statusTimer = new Timer { Interval = 250 }; statusTimer.Tick += (sender, e) => UpdateStatus(); customRegion = Program.Settings.AutoCaptureRegion; UpdateRegion(); nudRepeatTime.SetValue(Program.Settings.AutoCaptureRepeatTime); cbAutoMinimize.Checked = Program.Settings.AutoCaptureMinimizeToTray; cbWaitUploads.Checked = Program.Settings.AutoCaptureWaitUpload; isLoaded = true; }
public ImageHistoryForm(string historyPath, ImageHistorySettings settings, Action <string> uploadFile = null, Action <string> editImage = null) { InitializeComponent(); ShareXResources.ApplyThemeToForm(this); HistoryPath = historyPath; Settings = settings; tsMain.Renderer = new ToolStripRoundedEdgeRenderer(); ilvImages.View = (View)Settings.ViewMode; ilvImages.ThumbnailSize = Settings.ThumbnailSize; him = new HistoryItemManager(uploadFile, editImage); him.GetHistoryItems += him_GetHistoryItems; defaultTitle = Text; if (Settings.RememberSearchText) { tstbSearch.Text = Settings.SearchText; } Settings.WindowState.AutoHandleFormState(this); }
public ImageHistoryForm(string historyPath, ImageHistorySettings settings, Action <string> uploadFile = null, Action <string> editImage = null) { InitializeComponent(); tsMain.Renderer = new ToolStripRoundedEdgeRenderer(); HistoryPath = historyPath; Settings = settings; ilvImages.SetRenderer(new HistoryImageListViewRenderer()); ilvImages.ThumbnailSize = Settings.ThumbnailSize; if (ShareXResources.UseCustomTheme) { ilvImages.BorderStyle = BorderStyle.None; } him = new HistoryItemManager(uploadFile, editImage); him.GetHistoryItems += him_GetHistoryItems; ilvImages.ContextMenuStrip = him.cmsHistory; defaultTitle = Text; tstbSearch.TextBox.HandleCreated += (sender, e) => tstbSearch.TextBox.SetWatermark(Resources.HistoryForm_Search_Watermark, true); if (Settings.RememberSearchText) { tstbSearch.Text = Settings.SearchText; } ShareXResources.ApplyTheme(this); if (Settings.RememberWindowState) { Settings.WindowState.ApplyFormState(this); } }
public ImageHistoryForm(string historyPath, ImageHistorySettings settings, Action <string> uploadFile = null, Action <string> editImage = null) { InitializeComponent(); tsMain.Renderer = new ToolStripRoundedEdgeRenderer(); HistoryPath = historyPath; Settings = settings; ilvImages.View = (View)Settings.ViewMode; ilvImages.ThumbnailSize = Settings.ThumbnailSize; if (ShareXResources.UseCustomTheme) { ilvImages.BorderStyle = BorderStyle.None; ilvImages.Colors.BackColor = ShareXResources.Theme.DarkBackgroundColor; ilvImages.Colors.BorderColor = ShareXResources.Theme.DarkBackgroundColor; ilvImages.Colors.ForeColor = ShareXResources.Theme.TextColor; ilvImages.Colors.SelectedForeColor = ShareXResources.Theme.TextColor; ilvImages.Colors.UnFocusedForeColor = ShareXResources.Theme.TextColor; } him = new HistoryItemManager(uploadFile, editImage); him.GetHistoryItems += him_GetHistoryItems; ilvImages.ContextMenuStrip = him.cmsHistory; defaultTitle = Text; if (Settings.RememberSearchText) { tstbSearch.Text = Settings.SearchText; } ShareXResources.ApplyTheme(this); Settings.WindowState.AutoHandleFormState(this); }
public AboutForm() { InitializeComponent(); lblProductName.Text = Program.Title; pbLogo.Image = ShareXResources.Logo; rtbShareXInfo.AddContextMenu(); rtbCredits.AddContextMenu(); ShareXResources.ApplyTheme(this); #if STEAM uclUpdate.Visible = false; lblBuild.Text = "Steam build"; lblBuild.Visible = true; #elif WindowsStore uclUpdate.Visible = false; lblBuild.Text = "Microsoft Store build"; lblBuild.Visible = true; #else if (!Program.PortableApps) { uclUpdate.UpdateLoadingImage(); UpdateChecker updateChecker = Program.UpdateManager.CreateUpdateChecker(); uclUpdate.CheckUpdate(updateChecker); } else { uclUpdate.Visible = false; } #endif lblTeam.Text = "ShareX Team:"; lblBerk.Text = "Jaex (Berk)"; lblMike.Text = "McoreD (Michael Delpach)"; rtbShareXInfo.Text = $@"{Resources.AboutForm_AboutForm_Website}: {Links.URL_WEBSITE} {Resources.AboutForm_AboutForm_Project_page}: {Links.URL_GITHUB} {Resources.AboutForm_AboutForm_Changelog}: {Links.URL_CHANGELOG}"; rtbCredits.Text = $@"{Resources.AboutForm_AboutForm_Contributors}: https://github.com/ShareX/ShareX/graphs/contributors {Resources.AboutForm_AboutForm_Translators}: {Resources.AboutForm_AboutForm_Language_tr}: https://github.com/Jaex & https://github.com/muratmoon {Resources.AboutForm_AboutForm_Language_de}: https://github.com/Starbug2 & https://github.com/Kaeltis {Resources.AboutForm_AboutForm_Language_fr}: https://github.com/nwies & https://github.com/Shadorc {Resources.AboutForm_AboutForm_Language_zh_CH}: https://github.com/jiajiechan {Resources.AboutForm_AboutForm_Language_hu}: https://github.com/devBluestar {Resources.AboutForm_AboutForm_Language_ko_KR}: https://github.com/123jimin {Resources.AboutForm_AboutForm_Language_es}: https://github.com/ovnisoftware {Resources.AboutForm_AboutForm_Language_nl_NL}: https://github.com/canihavesomecoffee {Resources.AboutForm_AboutForm_Language_pt_BR}: https://github.com/RockyTV & https://github.com/athosbr99 {Resources.AboutForm_AboutForm_Language_vi_VN}: https://github.com/thanhpd {Resources.AboutForm_AboutForm_Language_ru}: https://github.com/L1Q {Resources.AboutForm_AboutForm_Language_zh_TW}: https://github.com/alantsai {Resources.AboutForm_AboutForm_Language_it_IT}: https://github.com/pjammo {Resources.AboutForm_AboutForm_Language_uk}: https://github.com/6c6c6 {Resources.AboutForm_AboutForm_Language_id_ID}: https://github.com/Nicedward {Resources.AboutForm_AboutForm_Language_es_MX}: https://github.com/absay {Resources.AboutForm_AboutForm_Language_fa_IR}: https://github.com/pourmand1376 {Resources.AboutForm_AboutForm_Language_pt_PT}: https://github.com/FarewellAngelina {Resources.AboutForm_AboutForm_External_libraries}: Json.NET: https://github.com/JamesNK/Newtonsoft.Json SSH.NET: https://github.com/sshnet/SSH.NET Icons: http://p.yusukekamiyamane.com ImageListView: https://github.com/oozcitak/imagelistview FFmpeg: https://www.ffmpeg.org DirectShow video and audio device: https://github.com/rdp/screen-capture-recorder-to-video-windows-free FluentFTP: https://github.com/robinrodricks/FluentFTP Steamworks.NET: https://github.com/rlabrecque/Steamworks.NET OCR Space: https://ocr.space ZXing.Net: https://github.com/micjahn/ZXing.Net MegaApiClient: https://github.com/gpailler/MegaApiClient Blob Emoji: http://blobs.gg Copyright (c) 2007-2020 ShareX Team"; easterEgg = new EasterEggAboutAnimation(cLogo, this); }
public ImageInsertForm() { InitializeComponent(); ShareXResources.ApplyTheme(this); }
public ImageSplitterForm() { InitializeComponent(); ShareXResources.ApplyTheme(this); UpdateButtonStates(); }
public ApplicationSettingsForm() { InitializeControls(); ShareXResources.ApplyThemeToForm(this); }
public ImageThumbnailerForm() { InitializeComponent(); ShareXResources.ApplyTheme(this); }
private ActionsToolbarForm() { InitializeComponent(); ShareXResources.ApplyTheme(this); }
private void ApplySelectedTheme() { Program.MainForm.UpdateTheme(); ShareXResources.ApplyTheme(this); }
public AboutForm() { InitializeComponent(); lblProductName.Text = Program.Title; pbLogo.Image = ShareXResources.Logo; ShareXResources.ApplyTheme(this); #if STEAM uclUpdate.Visible = false; lblBuild.Text = "Steam build"; lblBuild.Visible = true; #elif WindowsStore uclUpdate.Visible = false; lblBuild.Text = "Microsoft Store build"; lblBuild.Visible = true; #else if (!SystemOptions.DisableUpdateCheck) { uclUpdate.UpdateLoadingImage(); checkUpdate = true; } else { uclUpdate.Visible = false; } #endif rtbInfo.AppendLine(Resources.AboutForm_AboutForm_Links, FontStyle.Bold, 13); rtbInfo.AppendLine($@"{Resources.AboutForm_AboutForm_Website}: {Links.URL_WEBSITE} {Resources.AboutForm_AboutForm_Project_page}: {Links.URL_GITHUB} {Resources.AboutForm_AboutForm_Changelog}: {Links.URL_CHANGELOG} {Resources.AboutForm_AboutForm_Privacy_policy}: {Links.URL_PRIVACY_POLICY} ", FontStyle.Regular); rtbInfo.AppendLine(Resources.AboutForm_AboutForm_Team, FontStyle.Bold, 13); rtbInfo.AppendLine($@"Jaex: {Links.URL_JAEX} McoreD (Michael Delpach): {Links.URL_MCORED} ", FontStyle.Regular); rtbInfo.AppendLine(Resources.AboutForm_AboutForm_Translators, FontStyle.Bold, 13); rtbInfo.AppendLine($@"{Resources.AboutForm_AboutForm_Language_tr}: https://github.com/Jaex {Resources.AboutForm_AboutForm_Language_de}: https://github.com/Starbug2 & https://github.com/Kaeltis {Resources.AboutForm_AboutForm_Language_fr}: https://github.com/nwies & https://github.com/Shadorc {Resources.AboutForm_AboutForm_Language_zh_CH}: https://github.com/jiajiechan {Resources.AboutForm_AboutForm_Language_hu}: https://github.com/devBluestar {Resources.AboutForm_AboutForm_Language_ko_KR}: https://github.com/123jimin {Resources.AboutForm_AboutForm_Language_es}: https://github.com/ovnisoftware {Resources.AboutForm_AboutForm_Language_nl_NL}: https://github.com/canihavesomecoffee {Resources.AboutForm_AboutForm_Language_pt_BR}: https://github.com/RockyTV & https://github.com/athosbr99 {Resources.AboutForm_AboutForm_Language_vi_VN}: https://github.com/thanhpd {Resources.AboutForm_AboutForm_Language_ru}: https://github.com/L1Q {Resources.AboutForm_AboutForm_Language_zh_TW}: https://github.com/alantsai {Resources.AboutForm_AboutForm_Language_it_IT}: https://github.com/pjammo {Resources.AboutForm_AboutForm_Language_uk}: https://github.com/6c6c6 {Resources.AboutForm_AboutForm_Language_id_ID}: https://github.com/Nicedward {Resources.AboutForm_AboutForm_Language_es_MX}: https://github.com/absay {Resources.AboutForm_AboutForm_Language_fa_IR}: https://github.com/pourmand1376 {Resources.AboutForm_AboutForm_Language_pt_PT}: https://github.com/FarewellAngelina {Resources.AboutForm_AboutForm_Language_ja_JP}: https://github.com/kanaxx ", FontStyle.Regular); rtbInfo.AppendLine(Resources.AboutForm_AboutForm_Credits, FontStyle.Bold, 13); rtbInfo.AppendLine(@"Json.NET: https://github.com/JamesNK/Newtonsoft.Json SSH.NET: https://github.com/sshnet/SSH.NET Icons: http://p.yusukekamiyamane.com ImageListView: https://github.com/oozcitak/imagelistview FFmpeg: https://www.ffmpeg.org Recorder devices: https://github.com/rdp/screen-capture-recorder-to-video-windows-free FluentFTP: https://github.com/robinrodricks/FluentFTP Steamworks.NET: https://github.com/rlabrecque/Steamworks.NET OCR Space: https://ocr.space ZXing.Net: https://github.com/micjahn/ZXing.Net MegaApiClient: https://github.com/gpailler/MegaApiClient Inno Setup Dependency Installer: https://github.com/DomGries/InnoDependencyInstaller Blob Emoji: http://blobs.gg ", FontStyle.Regular); rtbInfo.AppendText("Copyright (c) 2007-2022 ShareX Team", FontStyle.Bold, 13); easterEgg = new EasterEggAboutAnimation(cLogo, this); }
public JiraUpload() { InitializeComponent(); ShareXResources.ApplyThemeToForm(this); }
public void ShowMenu() { ContextMenuStrip cms = new ContextMenuStrip() { Font = new Font("Arial", 10f), AutoClose = false }; cms.KeyUp += (sender, e) => { if (e.KeyCode == Keys.Escape) { cms.Close(); } }; ToolStripMenuItem tsmiContinue = new ToolStripMenuItem(Resources.QuickTaskMenu_ShowMenu_Continue); tsmiContinue.Image = Resources.control; tsmiContinue.Click += (sender, e) => { cms.Close(); OnTaskInfoSelected(null); }; cms.Items.Add(tsmiContinue); cms.Items.Add(new ToolStripSeparator()); if (Program.Settings != null && Program.Settings.QuickTaskPresets != null && Program.Settings.QuickTaskPresets.Count > 0) { foreach (QuickTaskInfo taskInfo in Program.Settings.QuickTaskPresets) { if (taskInfo.IsValid) { ToolStripMenuItem tsmi = new ToolStripMenuItem { Text = taskInfo.ToString().Replace("&", "&&"), Tag = taskInfo }; tsmi.Image = FindSuitableIcon(taskInfo); tsmi.Click += (sender, e) => { QuickTaskInfo selectedTaskInfo = ((ToolStripMenuItem)sender).Tag as QuickTaskInfo; cms.Close(); OnTaskInfoSelected(selectedTaskInfo); }; cms.Items.Add(tsmi); } else { cms.Items.Add(new ToolStripSeparator()); } } cms.Items[0].Select(); cms.Items.Add(new ToolStripSeparator()); } ToolStripMenuItem tsmiEdit = new ToolStripMenuItem(Resources.QuickTaskMenu_ShowMenu_Edit_this_menu___); tsmiEdit.Image = Resources.pencil; tsmiEdit.Click += (sender, e) => { cms.Close(); new QuickTaskMenuEditorForm().ShowDialog(); }; cms.Items.Add(tsmiEdit); cms.Items.Add(new ToolStripSeparator()); ToolStripMenuItem tsmiCancel = new ToolStripMenuItem(Resources.QuickTaskMenu_ShowMenu_Cancel); tsmiCancel.Image = Resources.cross; tsmiCancel.Click += (sender, e) => cms.Close(); cms.Items.Add(tsmiCancel); if (ShareXResources.UseCustomTheme) { ShareXResources.ApplyCustomThemeToContextMenuStrip(cms); } Point cursorPosition = CaptureHelpers.GetCursorPosition(); cursorPosition.Offset(-10, -10); cms.Show(cursorPosition); cms.Focus(); }
public HistoryItemInfoForm(HistoryItem hi) { InitializeComponent(); ShareXResources.ApplyTheme(this); pgHistoryItem.SelectedObject = hi; }
public EmailForm() { InitializeComponent(); ShareXResources.ApplyTheme(this); }
public OCRForm(Bitmap bmp, OCROptions options) { bmpSource = (Bitmap)bmp.Clone(); Options = options; InitializeComponent(); ShareXResources.ApplyTheme(this); OCRLanguage[] languages = OCRHelper.AvailableLanguages.OrderBy(x => x.DisplayName).ToArray(); if (languages.Length > 0) { cbLanguages.Items.AddRange(languages); if (Options.Language == null) { cbLanguages.SelectedIndex = 0; Options.Language = languages[0].LanguageTag; } else { int index = Array.FindIndex(languages, x => x.LanguageTag.Equals(Options.Language, StringComparison.OrdinalIgnoreCase)); if (index >= 0) { cbLanguages.SelectedIndex = index; } else { cbLanguages.SelectedIndex = 0; Options.Language = languages[0].LanguageTag; } } } else { cbLanguages.Enabled = false; } nudScaleFactor.SetValue((decimal)Options.ScaleFactor); cbSingleLine.Checked = Options.SingleLine; if (Options.ServiceLinks == null || Options.IsDefaultServiceLinks()) { Options.ServiceLinks = OCROptions.DefaultServiceLinks; } if (Options.ServiceLinks.Count > 0) { cbServices.Items.AddRange(Options.ServiceLinks.ToArray()); cbServices.SelectedIndex = Options.SelectedServiceLink; } else { cbServices.Enabled = false; } txtResult.SupportSelectAll(); UpdateControls(); loaded = true; }
public TextDrawingInputBox(string text, TextDrawingOptions options, bool supportGradient) { InitializeComponent(); ShareXResources.ApplyTheme(this); InputText = text; Options = options; if (InputText != null) { txtInput.Text = InputText; } UpdateInputBox(); cbFonts.Items.AddRange(FontFamily.Families.Select(x => x.Name).ToArray()); if (cbFonts.Items.Contains(Options.Font)) { cbFonts.SelectedItem = Options.Font; } else { cbFonts.SelectedItem = AnnotationOptions.DefaultFont; } nudTextSize.SetValue(Options.Size); btnTextColor.Color = Options.Color; btnGradient.Visible = supportGradient; if (supportGradient) { tsmiEnableGradient.Checked = Options.Gradient; tsmiSecondColor.Image = ImageHelpers.CreateColorPickerIcon(Options.Color2, new Rectangle(0, 0, 16, 16)); switch (Options.GradientMode) { case LinearGradientMode.Horizontal: tsrbmiGradientHorizontal.Checked = true; break; case LinearGradientMode.Vertical: tsrbmiGradientVertical.Checked = true; break; case LinearGradientMode.ForwardDiagonal: tsrbmiGradientForwardDiagonal.Checked = true; break; case LinearGradientMode.BackwardDiagonal: tsrbmiGradientBackwardDiagonal.Checked = true; break; } } cbBold.Checked = Options.Bold; cbItalic.Checked = Options.Italic; cbUnderline.Checked = Options.Underline; UpdateButtonImages(); UpdateEnterTip(); txtInput.SupportSelectAll(); }
public CanvasSizeForm() { InitializeComponent(); ShareXResources.ApplyTheme(this); }