add BaseForm with default icon

This commit is contained in:
David Ruhmann 2015-08-31 13:36:50 -05:00
parent eef6a0cd21
commit 433e20f917
68 changed files with 253 additions and 105 deletions

View file

@ -34,7 +34,7 @@
namespace ShareX.HelpersLib
{
public partial class AutomateForm : Form
public partial class AutomateForm : BaseForm
{
private static AutomateForm instance;
@ -49,7 +49,6 @@ public partial class AutomateForm : Form
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 : Form
public partial class ColorPickerForm : BaseForm
{
public MyColor NewColor { get; protected set; }
public MyColor OldColor { get; private set; }
@ -66,7 +66,6 @@ public static Color GetColor(Color currentColor)
private void Initialize(Color currentColor)
{
InitializeComponent();
Icon = ShareXResources.Icon;
if (currentColor.IsEmpty)
{

View file

@ -30,7 +30,7 @@
namespace ShareX.HelpersLib
{
public partial class GradientPickerForm : Form
public partial class GradientPickerForm : BaseForm
{
public GradientInfo Gradient { get; set; }
@ -40,7 +40,6 @@ 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,12 +29,11 @@
namespace ShareX.HelpersLib
{
public partial class DNSChangerForm : Form
public partial class DNSChangerForm : BaseForm
{
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

@ -0,0 +1,46 @@
namespace ShareX.HelpersLib
{
partial class BaseForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// BaseForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(300, 300);
this.Name = "BaseForm";
this.Text = "ShareX";
this.ResumeLayout(false);
}
#endregion
}
}

View file

@ -0,0 +1,13 @@
using System.Windows.Forms;
namespace ShareX.HelpersLib
{
public partial class BaseForm : Form
{
public BaseForm()
{
InitializeComponent();
Icon = ShareXResources.Icon;
}
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

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

View file

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

View file

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

View file

@ -30,14 +30,13 @@
namespace ShareX.HelpersLib
{
public partial class HashCheckForm : Form
public partial class HashCheckForm : BaseForm
{
private HashCheck hashCheck;
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 : Form
public class ImageViewer : BaseForm
{
private Image screenshot;

View file

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

View file

@ -30,7 +30,7 @@
namespace ShareX.HelpersLib
{
public partial class MonitorTestForm : Form
public partial class MonitorTestForm : BaseForm
{
public MonitorTestForm()
{

View file

@ -29,7 +29,7 @@
namespace ShareX.HelpersLib
{
public class MyMessageBox : Form
public class MyMessageBox : BaseForm
{
private const int LabelHorizontalPadding = 15;
private const int LabelVerticalPadding = 20;

View file

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

View file

@ -33,14 +33,13 @@
namespace ShareX.HelpersLib
{
public partial class QRCodeForm : Form
public partial class QRCodeForm : BaseForm
{
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 : Form
public class TrayForm : BaseForm
{
protected NotifyIcon TrayIcon = null;

View file

@ -30,7 +30,7 @@
namespace ShareX.HelpersLib
{
public class LayeredForm : Form
public class LayeredForm : BaseForm
{
public LayeredForm()
{

View file

@ -30,7 +30,7 @@
namespace ShareX.HelpersLib
{
public partial class PrintForm : Form
public partial class PrintForm : BaseForm
{
private PrintHelper printHelper;
private PrintSettings printSettings;

View file

@ -30,7 +30,7 @@
namespace ShareX.HelpersLib
{
public partial class PrintTextForm : Form
public partial class PrintTextForm : BaseForm
{
private PrintHelper printHelper;
private PrintSettings printSettings;

View file

@ -130,6 +130,12 @@
<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\BaseForm.Designer.cs">
<DependentUpon>BaseForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\OutputBox.cs">
<SubType>Form</SubType>
</Compile>
@ -561,6 +567,9 @@
<EmbeddedResource Include="DNS\DNSChangerForm.zh-CN.resx">
<DependentUpon>DNSChangerForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\BaseForm.resx">
<DependentUpon>BaseForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\ClipboardContentViewer.de.resx">
<DependentUpon>ClipboardContentViewer.cs</DependentUpon>
</EmbeddedResource>

View file

@ -36,7 +36,7 @@
namespace ShareX.HelpersLib
{
public partial class DownloaderForm : Form
public partial class DownloaderForm : BaseForm
{
public delegate void DownloaderInstallEventHandler(string filePath);
public event DownloaderInstallEventHandler InstallRequested;
@ -60,7 +60,6 @@ public partial class DownloaderForm : Form
private DownloaderForm()
{
InitializeComponent();
Icon = ShareXResources.Icon;
fillRect = new Rectangle(0, 0, ClientSize.Width, ClientSize.Height);

View file

@ -30,7 +30,7 @@
namespace ShareX.HelpersLib
{
public partial class UpdateMessageBox : Form
public partial class UpdateMessageBox : BaseForm
{
public static bool IsOpen { get; private set; }
public static bool DontShow { get; private set; }
@ -43,7 +43,6 @@ public UpdateMessageBox()
{
InitializeComponent();
Icon = ShareXResources.Icon;
Text = Resources.UpdateMessageBox_UpdateMessageBox_update_is_available;
lblText.Text = string.Format(Resources.UpdateMessageBox_UpdateMessageBox_, Application.ProductName);

View file

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

View file

@ -23,11 +23,12 @@
#endregion License Information (GPL v3)
using ShareX.HelpersLib;
using System.Windows.Forms;
namespace ShareX.HistoryLib
{
public partial class HistoryItemInfoForm : Form
public partial class HistoryItemInfoForm : BaseForm
{
public HistoryItemInfoForm(object hi)
{

View file

@ -35,7 +35,7 @@
namespace ShareX.HistoryLib
{
public partial class ImageHistoryForm : Form
public partial class ImageHistoryForm : BaseForm
{
public string HistoryPath { get; private set; }
public int MaxItemCount { get; set; }
@ -74,7 +74,6 @@ 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

@ -30,7 +30,7 @@
namespace ShareX.IRCLib
{
public partial class IRCClientForm : Form
public partial class IRCClientForm : BaseForm
{
public IRCInfo Info { get; private set; }
public IRC IRC { get; private set; }
@ -45,7 +45,6 @@ public IRCClientForm() : this(new IRCInfo())
public IRCClientForm(IRCInfo info)
{
InitializeComponent();
Icon = ShareXResources.Icon;
((ToolStripDropDownMenu)tsmiColors.DropDown).ShowImageMargin = false;
tabManager = new TabManager(tcMessages);

View file

@ -34,7 +34,7 @@
namespace ShareX.ImageEffectsLib
{
public partial class ImageEffectsForm : Form
public partial class ImageEffectsForm : BaseForm
{
public Image DefaultImage { get; private set; }
@ -43,7 +43,6 @@ public partial class ImageEffectsForm : Form
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 : Form
public partial class WatermarkForm : BaseForm
{
private WatermarkConfig config;
private bool IsGuiReady;

View file

@ -33,7 +33,7 @@
namespace ShareX.MediaLib
{
public partial class VideoThumbnailerForm : Form
public partial class VideoThumbnailerForm : BaseForm
{
public event Action<List<VideoThumbnailInfo>> ThumbnailsTaken;
@ -45,7 +45,6 @@ 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

@ -35,7 +35,7 @@
namespace ShareX.ScreenCaptureLib
{
public class RectangleAnnotate : Form
public class RectangleAnnotate : BaseForm
{
public static Rectangle LastSelectionRectangle0Based { get; private set; }

View file

@ -34,7 +34,7 @@
namespace ShareX.ScreenCaptureLib
{
public class RectangleLight : Form
public class RectangleLight : BaseForm
{
public static Rectangle LastSelectionRectangle0Based { get; private set; }

View file

@ -37,7 +37,7 @@
namespace ShareX.ScreenCaptureLib
{
public class Surface : Form
public class Surface : BaseForm
{
public Image SurfaceImage { get; set; }
public SurfaceOptions Config { get; set; }

View file

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

View file

@ -33,7 +33,7 @@ private void InitializeComponent()
this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.lblStatus = new System.Windows.Forms.ToolStripStatusLabel();
this.lvFTPList = new UploadersLib.ListViewEx();
this.lvFTPList = new ShareX.UploadersLib.ListViewEx();
this.chFilename = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chFilesize = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chFiletype = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));

View file

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

View file

@ -280,7 +280,7 @@
<value>lvFTPList</value>
</data>
<data name="&gt;&gt;lvFTPList.Type" xml:space="preserve">
<value>UploadersLib.ListViewEx, UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>ShareX.UploadersLib.ListViewEx, ShareX.UploadersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;lvFTPList.Parent" xml:space="preserve">
<value>toolStripContainer1.ContentPanel</value>
@ -919,6 +919,6 @@
<value>FTPClientForm</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>ShareX.HelpersLib.BaseForm, ShareX.HelpersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>

View file

@ -35,7 +35,7 @@
namespace ShareX.UploadersLib.Forms
{
public partial class DropboxFilesForm : Form
public partial class DropboxFilesForm : BaseForm
{
public string CurrentFolderPath { get; private set; }

View file

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

View file

@ -31,9 +31,10 @@
namespace ShareX.UploadersLib.GUI
{
using ShareX.HelpersLib;
using System.Threading.Tasks;
public partial class JiraUpload : Form
public partial class JiraUpload : BaseForm
{
public delegate string GetSummaryHandler(string issueId);

View file

@ -31,7 +31,7 @@
namespace ShareX.UploadersLib.GUI
{
public partial class OAuthWebForm : Form
public partial class OAuthWebForm : BaseForm
{
public string AuthorizeURL { get; set; }
public string CallbackURL { get; set; }
@ -40,7 +40,6 @@ public partial class OAuthWebForm : Form
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 : Form
public partial class ResponseForm : BaseForm
{
public string Response { get; private set; }
@ -38,7 +38,6 @@ public partial class ResponseForm : Form
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 : Form
public partial class TwitterTweetForm : BaseForm
{
public string Message
{

View file

@ -39,7 +39,7 @@
namespace ShareX.UploadersLib
{
public partial class UploadersConfigForm : Form
public partial class UploadersConfigForm : BaseForm
{
public UploadersConfig Config { get; private set; }
@ -54,8 +54,6 @@ public UploadersConfigForm(UploadersConfig uploadersConfig)
{
Text += " - " + Config.FilePath;
}
Icon = ShareXResources.Icon;
}
private void UploadersConfigForm_Shown(object sender, EventArgs e)

View file

@ -23,12 +23,13 @@
#endregion License Information (GPL v3)
using ShareX.HelpersLib;
using System;
using System.Windows.Forms;
namespace ShareX.UploadersLib
{
public partial class UserPassBox : Form
public partial class UserPassBox : BaseForm
{
public string FullName { get; private set; }
public string UserName { get; private set; }

View file

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

View file

@ -30,7 +30,7 @@
namespace ShareX
{
public partial class ActionsForm : Form
public partial class ActionsForm : BaseForm
{
public ExternalProgram FileAction { get; private set; }
@ -42,7 +42,6 @@ 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 AfterCaptureForm : Form
public partial class AfterCaptureForm : BaseForm
{
public AfterCaptureTasks AfterCaptureTasks { get; private set; }
public AfterCaptureFormResult Result { get; private set; }
@ -39,7 +39,6 @@ public partial class AfterCaptureForm : Form
public AfterCaptureForm(Image img, TaskSettings taskSettings)
{
InitializeComponent();
Icon = ShareXResources.Icon;
ImageList imageList = new ImageList { ColorDepth = ColorDepth.Depth32Bit };
imageList.Images.Add(Resources.checkbox_uncheck);

View file

@ -31,7 +31,7 @@
namespace ShareX
{
public partial class AfterUploadForm : Form
public partial class AfterUploadForm : BaseForm
{
public TaskInfo Info { get; private set; }
@ -46,7 +46,6 @@ public partial class AfterUploadForm : Form
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 : Form
public partial class ApplicationSettingsForm : BaseForm
{
private bool loaded;
private const int MaxBufferSizePower = 14;
@ -48,8 +48,6 @@ public ApplicationSettingsForm()
private void LoadSettings()
{
Icon = ShareXResources.Icon;
// General
foreach (SupportedLanguage language in Helpers.GetEnums<SupportedLanguage>())

View file

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

View file

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

View file

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

View file

@ -30,7 +30,7 @@
namespace ShareX
{
public partial class ClipboardFormatForm : Form
public partial class ClipboardFormatForm : BaseForm
{
public ClipboardFormat ClipboardFormat { get; private set; }

View file

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

View file

@ -31,7 +31,7 @@
namespace ShareX
{
public partial class FileExistForm : Form
public partial class FileExistForm : BaseForm
{
public string Filepath { get; private set; }
@ -41,7 +41,6 @@ public partial class FileExistForm : Form
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 : Form
public class HotkeyForm : BaseForm
{
public int HotkeyRepeatLimit { get; set; }

View file

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

View file

@ -84,7 +84,6 @@ private void InitControls()
InitializeComponent();
Text = Program.Title;
Icon = ShareXResources.Icon;
((ToolStripDropDownMenu)tsddbWorkflows.DropDown).ShowImageMargin = ((ToolStripDropDownMenu)tsmiTrayWorkflows.DropDown).ShowImageMargin =
((ToolStripDropDownMenu)tsmiMonitor.DropDown).ShowImageMargin = ((ToolStripDropDownMenu)tsmiTrayMonitor.DropDown).ShowImageMargin =

View file

@ -31,7 +31,7 @@
namespace ShareX
{
public class NotificationForm : Form
public class NotificationForm : BaseForm
{
public NotificationFormConfig ToastConfig { get; private set; }

View file

@ -33,7 +33,7 @@
namespace ShareX
{
public partial class ScreenRegionForm : Form
public partial class ScreenRegionForm : BaseForm
{
public event Action StopRequested;

View file

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

View file

@ -30,7 +30,7 @@
namespace ShareX
{
public partial class VideoEncodersForm : Form
public partial class VideoEncodersForm : BaseForm
{
public VideoEncodersForm()
{

View file

@ -30,7 +30,7 @@
namespace ShareX
{
public partial class WatchFolderForm : Form
public partial class WatchFolderForm : BaseForm
{
public WatchFolderSettings WatchFolder { get; private set; }

View file

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

View file

@ -340,7 +340,6 @@ public void ShowResponse()
{
using (ResponseForm form = new ResponseForm(SelectedItem.Info.Result.Response))
{
form.Icon = ShareXResources.Icon;
form.ShowDialog();
}
}

View file

@ -1007,8 +1007,6 @@ public UploadResult UploadFile(Stream stream, string fileName)
using (EmailForm emailForm = new EmailForm(Program.UploadersConfig.EmailRememberLastTo ? Program.UploadersConfig.EmailLastTo : string.Empty,
Program.UploadersConfig.EmailDefaultSubject, Program.UploadersConfig.EmailDefaultBody))
{
emailForm.Icon = ShareXResources.Icon;
if (emailForm.ShowDialog() == DialogResult.OK)
{
if (Program.UploadersConfig.EmailRememberLastTo)