Removed BaseForm.cs because it was causing bug with vs designer resx

This commit is contained in:
Jaex 2016-02-25 22:55:54 +02:00
parent 2bd7572a1e
commit fa3c84d68c
68 changed files with 149 additions and 119 deletions

View file

@ -34,7 +34,7 @@
namespace ShareX.HelpersLib
{
public partial class AutomateForm : BaseForm
public partial class AutomateForm : Form
{
private static AutomateForm instance;
@ -49,6 +49,8 @@ public partial class AutomateForm : BaseForm
private AutomateForm(List<ScriptInfo> scripts)
{
InitializeComponent();
Icon = ShareXResources.Icon;
rtbInput.AddContextMenu();
tokenizer.Keywords = FunctionManager.Functions.Select(x => x.Key).ToArray();
cbFunctions.Items.AddRange(tokenizer.Keywords);

View file

@ -29,7 +29,7 @@
namespace ShareX.HelpersLib
{
public partial class ColorPickerForm : BaseForm
public partial class ColorPickerForm : Form
{
public MyColor NewColor { get; protected set; }
public MyColor OldColor { get; private set; }
@ -45,6 +45,8 @@ public ColorPickerForm()
public ColorPickerForm(Color currentColor)
{
InitializeComponent();
Icon = ShareXResources.Icon;
SetCurrentColor(currentColor, false);
}

View file

@ -30,7 +30,7 @@
namespace ShareX.HelpersLib
{
public partial class GradientPickerForm : BaseForm
public partial class GradientPickerForm : Form
{
public GradientInfo Gradient { get; set; }
@ -40,6 +40,7 @@ public GradientPickerForm(GradientInfo gradient)
{
Gradient = gradient;
InitializeComponent();
Icon = ShareXResources.Icon;
cbGradientType.Items.AddRange(Helpers.GetEnumNamesProper<LinearGradientMode>());
cbGradientType.SelectedIndex = (int)Gradient.Type;
foreach (GradientStop gradientStop in Gradient.Colors)

View file

@ -29,8 +29,13 @@
namespace ShareX.HelpersLib
{
public class BlackStyleForm : BaseForm
public class BlackStyleForm : Form
{
public BlackStyleForm()
{
Icon = ShareXResources.Icon;
}
protected override void OnPaint(PaintEventArgs e)
{
Graphics g = e.Graphics;

View file

@ -29,11 +29,12 @@
namespace ShareX.HelpersLib
{
public partial class DNSChangerForm : BaseForm
public partial class DNSChangerForm : Form
{
public DNSChangerForm()
{
InitializeComponent();
Icon = ShareXResources.Icon;
AddDNS(Resources.DNSChangerForm_DNSChangerForm_Manual);
AddDNS("Google Public DNS", "8.8.8.8", "8.8.4.4"); // https://developers.google.com/speed/public-dns/

View file

@ -1,38 +0,0 @@
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
Copyright (c) 2007-2016 ShareX Team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Optionally you can also view the license at <http://www.gnu.org/licenses/>.
*/
#endregion License Information (GPL v3)
using System.Windows.Forms;
namespace ShareX.HelpersLib
{
public class BaseForm : Form
{
protected BaseForm()
{
Icon = ShareXResources.Icon;
Text = "ShareX";
}
}
}

View file

@ -31,7 +31,7 @@
namespace ShareX.HelpersLib
{
public partial class ClipboardContentViewer : BaseForm
public partial class ClipboardContentViewer : Form
{
public bool IsClipboardContentValid { get; private set; }
public bool DontShowThisWindow { get; private set; }
@ -39,6 +39,8 @@ public partial class ClipboardContentViewer : BaseForm
public ClipboardContentViewer(bool showCheckBox = false)
{
InitializeComponent();
Icon = ShareXResources.Icon;
cbDontShowThisWindow.Visible = showCheckBox;
}

View file

@ -31,13 +31,14 @@
namespace ShareX.HelpersLib
{
public partial class DebugForm : BaseForm
public partial class DebugForm : Form
{
public Logger Logger { get; private set; }
public DebugForm(Logger logger)
{
InitializeComponent();
Icon = ShareXResources.Icon;
Logger = logger;
rtbDebug.Text = Logger.ToString();

View file

@ -29,7 +29,7 @@
namespace ShareX.HelpersLib
{
public partial class ErrorForm : BaseForm
public partial class ErrorForm : Form
{
public bool IsUnhandledException { get; private set; }
public string LogPath { get; private set; }
@ -43,6 +43,8 @@ public ErrorForm(Exception error, string logPath, string bugReportPath)
public ErrorForm(string errorTitle, string errorMessage, string logPath, string bugReportPath, bool unhandledException = true)
{
InitializeComponent();
Icon = ShareXResources.Icon;
IsUnhandledException = unhandledException;
LogPath = logPath;
BugReportPath = bugReportPath;

View file

@ -30,7 +30,7 @@
namespace ShareX.HelpersLib
{
public partial class HashCheckForm : BaseForm
public partial class HashCheckForm : Form
{
private HashCheck hashCheck;
private Translator translator;
@ -38,6 +38,7 @@ public partial class HashCheckForm : BaseForm
public HashCheckForm()
{
InitializeComponent();
Icon = ShareXResources.Icon;
cbHashType.Items.AddRange(Helpers.GetEnumDescriptions<HashType>());
cbHashType.SelectedIndex = (int)HashType.SHA1;

View file

@ -30,7 +30,7 @@
namespace ShareX.HelpersLib
{
public class ImageViewer : BaseForm
public class ImageViewer : Form
{
private Image screenshot;
@ -38,6 +38,7 @@ private ImageViewer(Image image)
{
screenshot = image;
InitializeComponent();
Icon = ShareXResources.Icon;
}
public static void ShowImage(Image img)

View file

@ -28,7 +28,7 @@
namespace ShareX.HelpersLib
{
public class InputBox : BaseForm
public class InputBox : Form
{
public string Title { get; set; }
public string InputText { get; set; }
@ -36,6 +36,7 @@ public class InputBox : BaseForm
public InputBox(string title = null, string inputText = null)
{
InitializeComponent();
Icon = ShareXResources.Icon;
Title = title;
InputText = inputText;

View file

@ -30,11 +30,12 @@
namespace ShareX.HelpersLib
{
public partial class MonitorTestForm : BaseForm
public partial class MonitorTestForm : Form
{
public MonitorTestForm()
{
InitializeComponent();
Icon = ShareXResources.Icon;
Rectangle screenBounds = CaptureHelpers.GetScreenBounds();
Location = screenBounds.Location;

View file

@ -29,7 +29,7 @@
namespace ShareX.HelpersLib
{
public class MyMessageBox : BaseForm
public class MyMessageBox : Form
{
private const int LabelHorizontalPadding = 15;
private const int LabelVerticalPadding = 20;
@ -42,6 +42,8 @@ public class MyMessageBox : BaseForm
public MyMessageBox(string text, string caption, MessageBoxButtons buttons = MessageBoxButtons.OK, string checkBoxText = null, bool isChecked = false)
{
Icon = ShareXResources.Icon;
BackColor = Color.White;
Width = 180;
Height = 100;

View file

@ -28,11 +28,12 @@
namespace ShareX.HelpersLib
{
public partial class OutputBox : BaseForm
public partial class OutputBox : Form
{
public OutputBox(string text, string title)
{
InitializeComponent();
Icon = ShareXResources.Icon;
Text = "ShareX - " + title;
txtText.Text = text;
}

View file

@ -33,13 +33,14 @@
namespace ShareX.HelpersLib
{
public partial class QRCodeForm : BaseForm
public partial class QRCodeForm : Form
{
public bool EditMode { get; set; }
public QRCodeForm(string text = null)
{
InitializeComponent();
Icon = ShareXResources.Icon;
ClientSize = new Size(400, 400);
if (!string.IsNullOrEmpty(text))

View file

@ -28,7 +28,7 @@
namespace ShareX.HelpersLib
{
public class TrayForm : BaseForm
public class TrayForm : Form
{
protected NotifyIcon TrayIcon = null;
@ -37,6 +37,7 @@ public class TrayForm : BaseForm
public TrayForm()
{
components = new Container();
Icon = ShareXResources.Icon;
TrayIcon = new NotifyIcon(components);
TrayIcon.Text = "ShareX";
}

View file

@ -30,7 +30,7 @@
namespace ShareX.HelpersLib
{
public class LayeredForm : BaseForm
public class LayeredForm : Form
{
public LayeredForm()
{
@ -39,6 +39,7 @@ public LayeredForm()
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(300, 300);
FormBorderStyle = FormBorderStyle.None;
Icon = ShareXResources.Icon;
Name = "LayeredForm";
ShowInTaskbar = false;
Text = "LayeredForm";

View file

@ -30,7 +30,7 @@
namespace ShareX.HelpersLib
{
public partial class PrintForm : BaseForm
public partial class PrintForm : Form
{
private PrintHelper printHelper;
private PrintSettings printSettings;
@ -38,6 +38,7 @@ public partial class PrintForm : BaseForm
public PrintForm(Image img, PrintSettings settings, bool previewOnly = false)
{
InitializeComponent();
Icon = ShareXResources.Icon;
printHelper = new PrintHelper(img);
printHelper.Settings = printSettings = settings;
btnPrint.Enabled = !previewOnly;

View file

@ -30,7 +30,7 @@
namespace ShareX.HelpersLib
{
public partial class PrintTextForm : BaseForm
public partial class PrintTextForm : Form
{
private PrintHelper printHelper;
private PrintSettings printSettings;
@ -38,6 +38,7 @@ public partial class PrintTextForm : BaseForm
public PrintTextForm(string text, PrintSettings settings)
{
InitializeComponent();
Icon = ShareXResources.Icon;
printHelper = new PrintHelper(text);
printHelper.Settings = printSettings = settings;
LoadSettings();

View file

@ -143,9 +143,6 @@
<Compile Include="Extensions\NumberExtensions.cs" />
<Compile Include="FFmpegDownloader.cs" />
<Compile Include="FontSafe.cs" />
<Compile Include="Forms\BaseForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\OutputBox.cs">
<SubType>Form</SubType>
</Compile>

View file

@ -34,7 +34,7 @@
namespace ShareX.HistoryLib
{
public partial class HistoryForm : BaseForm
public partial class HistoryForm : Form
{
public string HistoryPath { get; private set; }
public int MaxItemCount { get; set; }
@ -46,6 +46,7 @@ public partial class HistoryForm : BaseForm
public HistoryForm(string historyPath, int maxItemCount = -1)
{
InitializeComponent();
Icon = ShareXResources.Icon;
Text = "ShareX - " + string.Format(Resources.HistoryForm_HistoryForm_History_, historyPath);
HistoryPath = historyPath;

View file

@ -24,14 +24,16 @@
#endregion License Information (GPL v3)
using ShareX.HelpersLib;
using System.Windows.Forms;
namespace ShareX.HistoryLib
{
public partial class HistoryItemInfoForm : BaseForm
public partial class HistoryItemInfoForm : Form
{
public HistoryItemInfoForm(object hi)
{
InitializeComponent();
Icon = ShareXResources.Icon;
olvMain.SelectObject(hi);
}
}

View file

@ -35,7 +35,7 @@
namespace ShareX.HistoryLib
{
public partial class ImageHistoryForm : BaseForm
public partial class ImageHistoryForm : Form
{
public string HistoryPath { get; private set; }
public int MaxItemCount { get; set; }
@ -74,6 +74,7 @@ public Size ThumbnailSize
public ImageHistoryForm(string historyPath, int viewMode, Size thumbnailSize, int maxItemCount = -1)
{
InitializeComponent();
Icon = ShareXResources.Icon;
Text = "ShareX - " + string.Format("Image history: {0}", historyPath);
HistoryPath = historyPath;

View file

@ -34,7 +34,7 @@
namespace ShareX.ImageEffectsLib
{
public partial class ImageEffectsForm : BaseForm
public partial class ImageEffectsForm : Form
{
public Image DefaultImage { get; private set; }
@ -43,6 +43,7 @@ public partial class ImageEffectsForm : BaseForm
public ImageEffectsForm(Image img, List<ImageEffect> effects = null)
{
InitializeComponent();
Icon = ShareXResources.Icon;
DefaultImage = img;
eiImageEffects.ObjectType = typeof(List<ImageEffect>);
AddAllEffectsToContextMenu();

View file

@ -32,7 +32,7 @@
namespace ShareX.ImageEffectsLib
{
public partial class WatermarkForm : BaseForm
public partial class WatermarkForm : Form
{
private WatermarkConfig config;
private bool IsGuiReady;
@ -40,6 +40,7 @@ public partial class WatermarkForm : BaseForm
public WatermarkForm(WatermarkConfig watermarkConfig)
{
InitializeComponent();
Icon = ShareXResources.Icon;
config = watermarkConfig;
CodeMenu.Create<ReplCodeMenuEntry>(txtWatermarkText, ReplCodeMenuEntry.t, ReplCodeMenuEntry.pn);
}

View file

@ -26,10 +26,11 @@
using ShareX.HelpersLib;
using System;
using System.IO;
using System.Windows.Forms;
namespace ShareX.IndexerLib
{
public partial class DirectoryIndexerForm : BaseForm
public partial class DirectoryIndexerForm : Form
{
public delegate void UploadRequestedEventHandler(string source);
public event UploadRequestedEventHandler UploadRequested;
@ -40,6 +41,7 @@ public partial class DirectoryIndexerForm : BaseForm
public DirectoryIndexerForm(IndexerSettings settings)
{
InitializeComponent();
Icon = ShareXResources.Icon;
Settings = settings;
pgSettings.SelectedObject = Settings;
BrowseFolder();

View file

@ -33,7 +33,7 @@
namespace ShareX.MediaLib
{
public partial class VideoThumbnailerForm : BaseForm
public partial class VideoThumbnailerForm : Form
{
public event Action<List<VideoThumbnailInfo>> ThumbnailsTaken;
@ -45,6 +45,7 @@ public VideoThumbnailerForm(string ffmpegPath, VideoThumbnailOptions options)
FFmpegPath = ffmpegPath;
Options = options;
InitializeComponent();
Icon = ShareXResources.Icon;
txtMediaPath.Text = Options.LastVideoPath ?? string.Empty;
pgOptions.SelectedObject = Options;
}

View file

@ -36,7 +36,7 @@
namespace ShareX.ScreenCaptureLib
{
public class RectangleAnnotate : BaseForm
public class RectangleAnnotate : Form
{
public static Rectangle LastSelectionRectangle0Based { get; private set; }
@ -111,6 +111,7 @@ public RectangleAnnotate(RectangleAnnotateOptions options)
ScreenRectangle = CaptureHelpers.GetScreenBounds();
InitializeComponent();
Icon = ShareXResources.Icon;
using (MemoryStream cursorStream = new MemoryStream(Resources.Crosshair))
{

View file

@ -34,7 +34,7 @@
namespace ShareX.ScreenCaptureLib
{
public class RectangleLight : BaseForm
public class RectangleLight : Form
{
public static Rectangle LastSelectionRectangle0Based { get; private set; }
@ -77,6 +77,7 @@ public RectangleLight()
ScreenRectangle = CaptureHelpers.GetScreenBounds();
InitializeComponent();
Icon = ShareXResources.Icon;
using (MemoryStream cursorStream = new MemoryStream(Resources.Crosshair))
{

View file

@ -35,7 +35,7 @@
namespace ShareX.ScreenCaptureLib
{
public partial class ScrollingCaptureForm : BaseForm
public partial class ScrollingCaptureForm : Form
{
public event Action<Image> ProcessRequested;
@ -54,6 +54,7 @@ public ScrollingCaptureForm(ScrollingCaptureOptions options, bool forceSelection
Options = options;
InitializeComponent();
Icon = ShareXResources.Icon;
cbScrollMethod.Items.AddRange(Helpers.GetEnumDescriptions<ScrollingCaptureScrollMethod>());
cbScrollMethod.SelectedIndex = (int)Options.ScrollMethod;

View file

@ -37,7 +37,7 @@
namespace ShareX.ScreenCaptureLib
{
public class Surface : BaseForm
public class Surface : Form
{
public Image SurfaceImage { get; set; }
public SurfaceOptions Config { get; set; }
@ -66,6 +66,7 @@ public Surface()
ScreenRectangle0Based = CaptureHelpers.ScreenToClient(ScreenRectangle);
InitializeComponent();
Icon = ShareXResources.Icon;
using (MemoryStream cursorStream = new MemoryStream(Resources.Crosshair))
{

View file

@ -33,7 +33,7 @@
namespace ShareX.ScreenCaptureLib
{
public partial class FFmpegOptionsForm : BaseForm
public partial class FFmpegOptionsForm : Form
{
public ScreencastOptions Options { get; private set; }
public string DefaultToolsPath { get; set; }
@ -43,6 +43,7 @@ public partial class FFmpegOptionsForm : BaseForm
public FFmpegOptionsForm(ScreencastOptions options)
{
InitializeComponent();
Icon = ShareXResources.Icon;
Options = options;
eiFFmpeg.ObjectType = typeof(FFmpegOptions);

View file

@ -36,7 +36,7 @@
namespace ShareX.UploadersLib
{
public partial class FTPClientForm : BaseForm
public partial class FTPClientForm : Form
{
private const string Root = "/";
@ -49,6 +49,7 @@ public partial class FTPClientForm : BaseForm
public FTPClientForm(FTPAccount account)
{
InitializeComponent();
Icon = ShareXResources.Icon;
lblStatus.Text = string.Empty;
lvFTPList.SubItemEndEditing += lvFTPList_SubItemEndEditing;

View file

@ -27,7 +27,6 @@
using Newtonsoft.Json;
using ShareX.HelpersLib;
using ShareX.UploadersLib.GUI;
using ShareX.UploadersLib.HelperClasses;
using System;
using System.Collections.Generic;

View file

@ -35,7 +35,7 @@
namespace ShareX.UploadersLib.Forms
{
public partial class DropboxFilesForm : BaseForm
public partial class DropboxFilesForm : Form
{
public string CurrentFolderPath { get; private set; }
@ -47,7 +47,7 @@ public partial class DropboxFilesForm : BaseForm
public DropboxFilesForm(OAuth2Info oauth, string path, DropboxAccountInfo accountInfo)
{
InitializeComponent();
Icon = Resources.Dropbox;
Icon = ShareXResources.Icon;
dropbox = new Dropbox(oauth);
dropboxAccountInfo = accountInfo;

View file

@ -1,4 +1,4 @@
namespace ShareX.UploadersLib.GUI
namespace ShareX.UploadersLib
{
partial class EmailForm
{

View file

@ -27,9 +27,9 @@
using System;
using System.Windows.Forms;
namespace ShareX.UploadersLib.GUI
namespace ShareX.UploadersLib
{
public partial class EmailForm : BaseForm
public partial class EmailForm : Form
{
public string ToEmail { get; private set; }
public string Subject { get; private set; }
@ -38,6 +38,7 @@ public partial class EmailForm : BaseForm
public EmailForm()
{
InitializeComponent();
Icon = ShareXResources.Icon;
}
public EmailForm(string toEmail, string subject, string body)

View file

@ -1,4 +1,4 @@
namespace ShareX.UploadersLib.GUI
namespace ShareX.UploadersLib
{
partial class JiraUpload
{

View file

@ -25,27 +25,21 @@
// gpailler
using ShareX.HelpersLib;
using ShareX.UploadersLib.Properties;
using System;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ShareX.UploadersLib.GUI
namespace ShareX.UploadersLib
{
using ShareX.HelpersLib;
using System.Threading.Tasks;
public partial class JiraUpload : BaseForm
public partial class JiraUpload : Form
{
public delegate string GetSummaryHandler(string issueId);
private readonly string _issuePrefix;
private readonly GetSummaryHandler _getSummary;
public JiraUpload()
{
InitializeComponent();
}
public string IssueId
{
get
@ -54,6 +48,12 @@ public string IssueId
}
}
public JiraUpload()
{
InitializeComponent();
Icon = ShareXResources.Icon;
}
public JiraUpload(string issuePrefix, GetSummaryHandler getSummary)
: this()
{

View file

@ -1,4 +1,4 @@
namespace ShareX.UploadersLib.GUI
namespace ShareX.UploadersLib
{
partial class OAuthWebForm
{

View file

@ -29,9 +29,9 @@
using System.Web;
using System.Windows.Forms;
namespace ShareX.UploadersLib.GUI
namespace ShareX.UploadersLib
{
public partial class OAuthWebForm : BaseForm
public partial class OAuthWebForm : Form
{
public string AuthorizeURL { get; set; }
public string CallbackURL { get; set; }
@ -40,6 +40,7 @@ public partial class OAuthWebForm : BaseForm
public OAuthWebForm(string authorizeURL, string callbackURL)
{
InitializeComponent();
Icon = ShareXResources.Icon;
AuthorizeURL = authorizeURL;
CallbackURL = callbackURL;
tstbURL.Text = authorizeURL;

View file

@ -29,7 +29,7 @@
namespace ShareX.UploadersLib
{
public partial class ResponseForm : BaseForm
public partial class ResponseForm : Form
{
public string Response { get; private set; }
@ -38,6 +38,7 @@ public partial class ResponseForm : BaseForm
public ResponseForm(string response)
{
InitializeComponent();
Icon = ShareXResources.Icon;
Response = response;
txtSource.Text = Response;
}

View file

@ -32,7 +32,7 @@
namespace ShareX.UploadersLib
{
public partial class TwitterTweetForm : BaseForm
public partial class TwitterTweetForm : Form
{
public string Message
{
@ -99,7 +99,7 @@ public bool MediaMode
public TwitterTweetForm()
{
InitializeComponent();
Icon = Resources.Twitter;
Icon = ShareXResources.Icon;
MediaMode = false;
}

View file

@ -29,7 +29,7 @@
namespace ShareX.UploadersLib
{
public partial class UserPassBox : BaseForm
public partial class UserPassBox : Form
{
public string FullName { get; private set; }
public string UserName { get; private set; }
@ -40,6 +40,7 @@ public partial class UserPassBox : BaseForm
public UserPassBox(string title, string userName, string password)
{
InitializeComponent();
Icon = ShareXResources.Icon;
Text = title;
txtUserName.Text = userName;
txtPassword.Text = password;

View file

@ -32,11 +32,12 @@
namespace ShareX
{
public partial class AboutForm : BaseForm
public partial class AboutForm : Form
{
public AboutForm()
{
InitializeComponent();
Icon = ShareXResources.Icon;
lblProductName.Text = Program.Title;
pbLogo.Image = ShareXResources.Logo;

View file

@ -30,7 +30,7 @@
namespace ShareX
{
public partial class ActionsForm : BaseForm
public partial class ActionsForm : Form
{
public ExternalProgram FileAction { get; private set; }
@ -42,6 +42,8 @@ public ActionsForm()
public ActionsForm(ExternalProgram fileAction)
{
InitializeComponent();
Icon = ShareXResources.Icon;
FileAction = fileAction;
txtName.Text = fileAction.Name ?? "";
txtPath.Text = fileAction.Path ?? "";

View file

@ -31,7 +31,7 @@
namespace ShareX
{
public partial class AfterUploadForm : BaseForm
public partial class AfterUploadForm : Form
{
public TaskInfo Info { get; private set; }
@ -46,6 +46,8 @@ public partial class AfterUploadForm : BaseForm
public AfterUploadForm(TaskInfo info)
{
InitializeComponent();
Icon = ShareXResources.Icon;
Info = info;
if (Info.TaskSettings.AdvancedSettings.AutoCloseAfterUploadForm) tmrClose.Start();

View file

@ -34,7 +34,7 @@
namespace ShareX
{
public partial class ApplicationSettingsForm : BaseForm
public partial class ApplicationSettingsForm : Form
{
private const int MaxBufferSizePower = 14;
@ -43,6 +43,7 @@ public partial class ApplicationSettingsForm : BaseForm
public ApplicationSettingsForm()
{
InitializeControls();
Icon = ShareXResources.Icon;
}
private void SettingsForm_Shown(object sender, EventArgs e)

View file

@ -33,7 +33,7 @@
namespace ShareX
{
public partial class AutoCaptureForm : BaseForm
public partial class AutoCaptureForm : Form
{
private static AutoCaptureForm instance;
@ -63,6 +63,7 @@ public static AutoCaptureForm Instance
private AutoCaptureForm()
{
InitializeComponent();
Icon = ShareXResources.Icon;
niTray.Icon = Resources.clock.ToIcon();
screenshotTimer = new System.Timers.Timer();

View file

@ -30,11 +30,12 @@
namespace ShareX
{
public partial class BeforeUploadForm : BaseForm
public partial class BeforeUploadForm : Form
{
public BeforeUploadForm(TaskInfo info)
{
InitializeComponent();
Icon = ShareXResources.Icon;
DialogResult = DialogResult.OK;
ucBeforeUpload.InitCompleted += currentDestination =>

View file

@ -33,11 +33,12 @@
namespace ShareX
{
public partial class ChromeForm : BaseForm
public partial class ChromeForm : Form
{
public ChromeForm()
{
InitializeComponent();
Icon = ShareXResources.Icon;
}
private void CreateChromeHostManifest(string filepath)

View file

@ -30,7 +30,7 @@
namespace ShareX
{
public partial class ClipboardFormatForm : BaseForm
public partial class ClipboardFormatForm : Form
{
public ClipboardFormat ClipboardFormat { get; private set; }
@ -42,6 +42,8 @@ public ClipboardFormatForm()
public ClipboardFormatForm(ClipboardFormat cbf)
{
InitializeComponent();
Icon = ShareXResources.Icon;
ClipboardFormat = cbf;
txtDescription.Text = cbf.Description ?? "";
txtFormat.Text = cbf.Format ?? "";

View file

@ -30,7 +30,7 @@
namespace ShareX
{
public partial class EncoderProgramForm : BaseForm
public partial class EncoderProgramForm : Form
{
public VideoEncoder encoder { get; private set; }
@ -43,6 +43,7 @@ public EncoderProgramForm(VideoEncoder encoder)
{
this.encoder = encoder;
InitializeComponent();
Icon = ShareXResources.Icon;
txtName.Text = encoder.Name ?? "";
txtPath.Text = encoder.Path ?? "";
txtArguments.Text = encoder.Args ?? "";

View file

@ -27,10 +27,11 @@
using ShareX.Properties;
using System;
using System.IO;
using System.Windows.Forms;
namespace ShareX
{
public partial class FileExistForm : BaseForm
public partial class FileExistForm : Form
{
public string Filepath { get; private set; }
@ -40,6 +41,7 @@ public partial class FileExistForm : BaseForm
public FileExistForm(string filepath)
{
InitializeComponent();
Icon = ShareXResources.Icon;
Filepath = filepath;
filename = Path.GetFileNameWithoutExtension(Filepath);

View file

@ -29,7 +29,7 @@
namespace ShareX
{
public class HotkeyForm : BaseForm
public class HotkeyForm : Form
{
public int HotkeyRepeatLimit { get; set; }

View file

@ -32,7 +32,7 @@
namespace ShareX
{
public partial class HotkeySettingsForm : BaseForm
public partial class HotkeySettingsForm : Form
{
public HotkeySelectionControl Selected { get; private set; }
@ -41,6 +41,7 @@ public partial class HotkeySettingsForm : BaseForm
public HotkeySettingsForm(HotkeyManager hotkeyManager)
{
InitializeComponent();
Icon = ShareXResources.Icon;
PrepareHotkeys(hotkeyManager);
}

View file

@ -33,7 +33,7 @@
namespace ShareX
{
public partial class ImageCombinerForm : BaseForm
public partial class ImageCombinerForm : Form
{
public event Action<Image> ProcessRequested;
@ -43,6 +43,7 @@ public ImageCombinerForm(ImageCombinerOptions options)
{
Options = options;
InitializeComponent();
Icon = ShareXResources.Icon;
cbOrientation.Items.AddRange(Enum.GetNames(typeof(Orientation)));
cbOrientation.SelectedIndex = (int)Options.Orientation;
nudSpace.Value = Options.Space;

View file

@ -67,6 +67,7 @@ private void InitializeControls()
{
InitializeComponent();
Icon = ShareXResources.Icon;
niTray.Icon = ShareXResources.Icon;
Text = Program.Title;

View file

@ -31,7 +31,7 @@
namespace ShareX
{
public class NotificationForm : BaseForm
public class NotificationForm : Form
{
public NotificationFormConfig ToastConfig { get; private set; }
@ -49,6 +49,7 @@ public class NotificationForm : BaseForm
public NotificationForm(int duration, ContentAlignment placement, Size size, NotificationFormConfig config)
{
InitializeComponent();
Icon = ShareXResources.Icon;
SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true);
ToastConfig = config;

View file

@ -30,13 +30,14 @@
namespace ShareX
{
public partial class QuickTaskInfoEditForm : BaseForm
public partial class QuickTaskInfoEditForm : Form
{
public QuickTaskInfo TaskInfo { get; private set; }
public QuickTaskInfoEditForm(QuickTaskInfo taskInfo)
{
InitializeComponent();
Icon = ShareXResources.Icon;
TaskInfo = taskInfo;
txtName.Text = TaskInfo.Name;
AddMultiEnumItemsContextMenu<AfterCaptureTasks>(x => TaskInfo.AfterCaptureTasks = TaskInfo.AfterCaptureTasks.Swap(x), cmsAfterCapture);

View file

@ -31,11 +31,12 @@
namespace ShareX
{
public partial class QuickTaskMenuEditorForm : BaseForm
public partial class QuickTaskMenuEditorForm : Form
{
public QuickTaskMenuEditorForm()
{
InitializeComponent();
Icon = ShareXResources.Icon;
if (Program.Settings.QuickTaskPresets == null)
{

View file

@ -33,7 +33,7 @@
namespace ShareX
{
public partial class ScreenRecordForm : BaseForm
public partial class ScreenRecordForm : Form
{
public event Action StopRequested;
@ -53,6 +53,7 @@ public partial class ScreenRecordForm : BaseForm
public ScreenRecordForm(Rectangle regionRectangle, bool activateWindow = true, float duration = 0)
{
InitializeComponent();
Icon = ShareXResources.Icon;
niTray.Icon = ShareXResources.Icon;
this.activateWindow = activateWindow;

View file

@ -36,7 +36,7 @@
namespace ShareX
{
public partial class TaskSettingsForm : BaseForm
public partial class TaskSettingsForm : Form
{
public TaskSettings TaskSettings { get; private set; }
public bool IsDefault { get; private set; }
@ -47,6 +47,7 @@ public partial class TaskSettingsForm : BaseForm
public TaskSettingsForm(TaskSettings hotkeySetting, bool isDefault = false)
{
InitializeComponent();
Icon = ShareXResources.Icon;
TaskSettings = hotkeySetting;
IsDefault = isDefault;

View file

@ -30,11 +30,13 @@
namespace ShareX
{
public partial class VideoEncodersForm : BaseForm
public partial class VideoEncodersForm : Form
{
public VideoEncodersForm()
{
InitializeComponent();
Icon = ShareXResources.Icon;
Program.Settings.VideoEncoders.ForEach(x => AddVideoEncoder(x));
}

View file

@ -30,7 +30,7 @@
namespace ShareX
{
public partial class WatchFolderForm : BaseForm
public partial class WatchFolderForm : Form
{
public WatchFolderSettings WatchFolder { get; private set; }
@ -43,6 +43,7 @@ public WatchFolderForm(WatchFolderSettings watchFolder)
{
WatchFolder = watchFolder;
InitializeComponent();
Icon = ShareXResources.Icon;
txtFolderPath.Text = watchFolder.FolderPath ?? "";
txtFilter.Text = watchFolder.Filter ?? "";
cbIncludeSubdirectories.Checked = watchFolder.IncludeSubdirectories;

View file

@ -32,7 +32,7 @@
namespace ShareX
{
public partial class WebpageCaptureForm : BaseForm
public partial class WebpageCaptureForm : Form
{
public event Action<Image> OnImageUploadRequested;
public event Action<Image> OnImageCopyRequested;
@ -45,6 +45,7 @@ public partial class WebpageCaptureForm : BaseForm
public WebpageCaptureForm()
{
InitializeComponent();
Icon = ShareXResources.Icon;
LoadSettings();
webpageCapture = new WebpageCapture();
webpageCapture.CaptureCompleted += webpageCapture_CaptureCompleted;

View file

@ -27,7 +27,6 @@
using ShareX.Properties;
using ShareX.UploadersLib;
using ShareX.UploadersLib.FileUploaders;
using ShareX.UploadersLib.GUI;
using ShareX.UploadersLib.HelperClasses;
using ShareX.UploadersLib.ImageUploaders;
using ShareX.UploadersLib.TextUploaders;