ShareX/ShareX/ApplicationConfig.cs

161 lines
6.1 KiB
C#
Raw Normal View History

2013-11-03 23:53:49 +13:00
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
2014-01-12 20:25:51 +13:00
Copyright (C) 2008-2014 ShareX Developers
2013-11-03 23:53:49 +13:00
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 HelpersLib;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Design;
2013-11-03 23:53:49 +13:00
using UploadersLib;
namespace ShareX
{
public class ApplicationConfig : SettingsBase<ApplicationConfig>
{
public TaskSettings DefaultTaskSettings = new TaskSettings();
public string FileUploadDefaultDirectory = "";
public bool ShowUploadWarning = true; // First time upload warning
public bool ShowMultiUploadWarning = true; // More than 10 files upload warning
public int NameParserAutoIncrementNumber = 0;
2014-04-09 12:50:34 +12:00
public ApplicationConfig()
{
this.ApplyDefaultPropertyValues();
}
2013-11-03 23:53:49 +13:00
#region Main Form
public bool ShowMenu = true;
public bool ShowPreview = true;
public int PreviewSplitterDistance = 400;
#endregion Main Form
#region Settings Form
#region General
public bool ShowTray = true;
public bool SilentRun = false;
2013-11-03 23:53:49 +13:00
public bool AutoCheckUpdate = true;
public bool TrayIconProgressEnabled = true;
public bool TaskbarProgressEnabled = true;
public bool RememberMainFormSize = false;
public Size MainFormSize = Size.Empty;
2013-11-03 23:53:49 +13:00
#endregion General
#region Paths
public bool UseCustomScreenshotsPath = false;
public string CustomScreenshotsPath = string.Empty;
public string SaveImageSubFolderPattern = "%y-%mo";
#endregion Paths
#region Proxy
public ProxyInfo ProxySettings = new ProxyInfo();
#endregion Proxy
#region Upload
public bool IfUploadFailRetryOnce = false;
public int UploadLimit = 5;
public int BufferSizePower = 5;
public List<ClipboardFormat> ClipboardContentFormats = new List<ClipboardFormat>();
#endregion Upload
#region Print
public bool DontShowPrintSettingsDialog = false;
public PrintSettings PrintSettings = new PrintSettings();
#endregion Print
#region Advanced
[Category("Application"), DefaultValue(false), Description("Calculate and show file sizes in binary units (KiB, MiB etc.)")]
public bool BinaryUnits { get; set; }
[Category("Application"), DefaultValue(false), Description("Show most recent task first.")]
public bool ShowMostRecentTaskFirst { get; set; }
[Category("Application"), DefaultValue(false), Description("By default copying \"Bitmap\" to clipboard. Alternative method copying \"PNG and DIB\" to clipboard.")]
public bool UseAlternativeClipboardCopyImage { get; set; }
2014-04-09 12:50:34 +12:00
[Category("Clipboard upload"), DefaultValue(true), Description("Show clipboard content viewer when using clipboard upload in main window.")]
2013-11-03 23:53:49 +13:00
public bool ShowClipboardContentViewer { get; set; }
[Category("Paths"), Description("Custom uploaders configuration path. If you have already configured this setting in another device and you are attempting to use the same location, then backup the file before configuring this setting and restore after exiting ShareX.")]
[Editor(typeof(DirectoryNameEditor), typeof(UITypeEditor))]
public string CustomUploadersConfigPath { get; set; }
[Category("Paths"), Description("Custom hotkeys configuration path. If you have already configured this setting in another device and you are attempting to use the same location, then backup the file before configuring this setting and restore after exiting ShareX.")]
[Editor(typeof(DirectoryNameEditor), typeof(UITypeEditor))]
public string CustomHotkeysConfigPath { get; set; }
2014-04-09 12:50:34 +12:00
[Category("Drag and drop window"), DefaultValue(150), Description("Size of drop window.")]
public int DropSize { get; set; }
[Category("Drag and drop window"), DefaultValue(5), Description("Position offset of drop window.")]
public int DropOffset { get; set; }
[Category("Drag and drop window"), DefaultValue(ContentAlignment.BottomRight), Description("Where drop window will open.")]
public ContentAlignment DropAlignment { get; set; }
[Category("Drag and drop window"), DefaultValue(100), Description("Opacity of drop window.")]
public int DropOpacity { get; set; }
[Category("Drag and drop window"), DefaultValue(255), Description("When you drag file to drop window then opacity will change to this.")]
public int DropHoverOpacity { get; set; }
2013-11-03 23:53:49 +13:00
#endregion Advanced
#endregion Settings Form
#region History Form
public WindowState HistoryWindowState = new WindowState();
public WindowState ImageHistoryWindowState = new WindowState();
public int ImageHistoryMaxItemCount = 100;
public int ImageHistoryViewMode = 3;
public Size ImageHistoryThumbnailSize = new Size(100, 100);
#endregion History Form
#region AutoCapture Form
2014-03-11 22:28:07 +13:00
public Rectangle AutoCaptureRegion = Rectangle.Empty;
2013-11-03 23:53:49 +13:00
public decimal AutoCaptureRepeatTime = 60;
public bool AutoCaptureMinimizeToTray = true;
public bool AutoCaptureWaitUpload = true;
#endregion AutoCapture Form
}
}