Added "Automatically hide desktop icons" option

This commit is contained in:
Jaex 2025-06-12 22:00:20 +03:00
parent 5d9054404b
commit cbef6253e8
6 changed files with 4490 additions and 1737 deletions

View File

@ -0,0 +1,83 @@
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
Copyright (c) 2007-2025 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;
namespace ShareX.HelpersLib
{
public static class DesktopIconManager
{
public static bool AreDesktopIconsVisible()
{
IntPtr hIcons = GetDesktopListViewHandle();
return hIcons != IntPtr.Zero && NativeMethods.IsWindowVisible(hIcons);
}
public static bool SetDesktopIconsVisibility(bool show)
{
IntPtr hIcons = GetDesktopListViewHandle();
if (hIcons != IntPtr.Zero)
{
NativeMethods.ShowWindow(hIcons, show ? (int)WindowShowStyle.Show : (int)WindowShowStyle.Hide);
return true;
}
return false;
}
private static IntPtr GetDesktopListViewHandle()
{
IntPtr progman = NativeMethods.FindWindow("Progman", null);
IntPtr desktopWnd = IntPtr.Zero;
IntPtr defView = NativeMethods.FindWindowEx(progman, IntPtr.Zero, "SHELLDLL_DefView", null);
if (defView == IntPtr.Zero)
{
IntPtr desktopHandle = IntPtr.Zero;
while ((desktopHandle = NativeMethods.FindWindowEx(IntPtr.Zero, desktopHandle, "WorkerW", null)) != IntPtr.Zero)
{
defView = NativeMethods.FindWindowEx(desktopHandle, IntPtr.Zero, "SHELLDLL_DefView", null);
if (defView != IntPtr.Zero)
{
break;
}
}
}
if (defView != IntPtr.Zero)
{
IntPtr sysListView = NativeMethods.FindWindowEx(defView, IntPtr.Zero, "SysListView32", "FolderView");
return sysListView;
}
return IntPtr.Zero;
}
}
}

View File

@ -69,9 +69,26 @@ namespace ShareX
private void CaptureInternal(TaskSettings taskSettings, bool autoHideForm) private void CaptureInternal(TaskSettings taskSettings, bool autoHideForm)
{ {
bool wait = false;
bool showDesktopIcons = false;
bool showMainForm = false;
if (taskSettings.CaptureSettings.CaptureAutoHideDesktopIcons && !CaptureHelpers.IsActiveWindowFullscreen() && DesktopIconManager.AreDesktopIconsVisible())
{
DesktopIconManager.SetDesktopIconsVisibility(false);
showDesktopIcons = true;
wait = true;
}
if (autoHideForm && AllowAutoHideForm) if (autoHideForm && AllowAutoHideForm)
{ {
Program.MainForm.Hide(); Program.MainForm.Hide();
showMainForm = true;
wait = true;
}
if (wait)
{
Thread.Sleep(250); Thread.Sleep(250);
} }
@ -88,7 +105,12 @@ namespace ShareX
} }
finally finally
{ {
if (autoHideForm && AllowAutoHideForm) if (showDesktopIcons)
{
DesktopIconManager.SetDesktopIconsVisibility(true);
}
if (showMainForm)
{ {
Program.MainForm.ForceActivate(); Program.MainForm.ForceActivate();
} }

View File

@ -48,16 +48,12 @@
this.cbOverrideCustomUploader = new System.Windows.Forms.CheckBox(); this.cbOverrideCustomUploader = new System.Windows.Forms.CheckBox();
this.cbOverrideFTPAccount = new System.Windows.Forms.CheckBox(); this.cbOverrideFTPAccount = new System.Windows.Forms.CheckBox();
this.cbFTPAccounts = new System.Windows.Forms.ComboBox(); this.cbFTPAccounts = new System.Windows.Forms.ComboBox();
this.btnAfterCapture = new ShareX.HelpersLib.MenuButton();
this.btnAfterUpload = new ShareX.HelpersLib.MenuButton();
this.btnDestinations = new ShareX.HelpersLib.MenuButton();
this.cmsDestinations = new System.Windows.Forms.ContextMenuStrip(this.components); this.cmsDestinations = new System.Windows.Forms.ContextMenuStrip(this.components);
this.tsmiImageUploaders = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiImageUploaders = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiTextUploaders = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiTextUploaders = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiFileUploaders = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiFileUploaders = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiURLShorteners = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiURLShorteners = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiURLSharingServices = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiURLSharingServices = new System.Windows.Forms.ToolStripMenuItem();
this.btnTask = new ShareX.HelpersLib.MenuButton();
this.tpGeneral = new System.Windows.Forms.TabPage(); this.tpGeneral = new System.Windows.Forms.TabPage();
this.tcGeneral = new System.Windows.Forms.TabControl(); this.tcGeneral = new System.Windows.Forms.TabControl();
this.tpGeneralMain = new System.Windows.Forms.TabPage(); this.tpGeneralMain = new System.Windows.Forms.TabPage();
@ -260,9 +256,6 @@
this.cbClipboardUploadAutoIndexFolder = new System.Windows.Forms.CheckBox(); this.cbClipboardUploadAutoIndexFolder = new System.Windows.Forms.CheckBox();
this.cbClipboardUploadShortenURL = new System.Windows.Forms.CheckBox(); this.cbClipboardUploadShortenURL = new System.Windows.Forms.CheckBox();
this.tpUploaderFilters = new System.Windows.Forms.TabPage(); this.tpUploaderFilters = new System.Windows.Forms.TabPage();
this.lvUploaderFiltersList = new ShareX.HelpersLib.MyListView();
this.chUploaderFiltersName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chUploaderFiltersExtension = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.btnUploaderFiltersRemove = new System.Windows.Forms.Button(); this.btnUploaderFiltersRemove = new System.Windows.Forms.Button();
this.btnUploaderFiltersUpdate = new System.Windows.Forms.Button(); this.btnUploaderFiltersUpdate = new System.Windows.Forms.Button();
this.btnUploaderFiltersAdd = new System.Windows.Forms.Button(); this.btnUploaderFiltersAdd = new System.Windows.Forms.Button();
@ -277,21 +270,12 @@
this.lblActionsNote = new System.Windows.Forms.Label(); this.lblActionsNote = new System.Windows.Forms.Label();
this.btnActionsDuplicate = new System.Windows.Forms.Button(); this.btnActionsDuplicate = new System.Windows.Forms.Button();
this.btnActionsAdd = new System.Windows.Forms.Button(); this.btnActionsAdd = new System.Windows.Forms.Button();
this.lvActions = new ShareX.HelpersLib.MyListView();
this.chActionsName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chActionsPath = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chActionsArgs = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chActionsExtensions = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.btnActionsEdit = new System.Windows.Forms.Button(); this.btnActionsEdit = new System.Windows.Forms.Button();
this.btnActionsRemove = new System.Windows.Forms.Button(); this.btnActionsRemove = new System.Windows.Forms.Button();
this.cbOverrideActions = new System.Windows.Forms.CheckBox(); this.cbOverrideActions = new System.Windows.Forms.CheckBox();
this.tpWatchFolders = new System.Windows.Forms.TabPage(); this.tpWatchFolders = new System.Windows.Forms.TabPage();
this.btnWatchFolderEdit = new System.Windows.Forms.Button(); this.btnWatchFolderEdit = new System.Windows.Forms.Button();
this.cbWatchFolderEnabled = new System.Windows.Forms.CheckBox(); this.cbWatchFolderEnabled = new System.Windows.Forms.CheckBox();
this.lvWatchFolderList = new ShareX.HelpersLib.MyListView();
this.chWatchFolderFolderPath = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chWatchFolderFilter = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chWatchFolderIncludeSubdirectories = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.btnWatchFolderRemove = new System.Windows.Forms.Button(); this.btnWatchFolderRemove = new System.Windows.Forms.Button();
this.btnWatchFolderAdd = new System.Windows.Forms.Button(); this.btnWatchFolderAdd = new System.Windows.Forms.Button();
this.tpTools = new System.Windows.Forms.TabPage(); this.tpTools = new System.Windows.Forms.TabPage();
@ -306,7 +290,24 @@
this.tpAdvanced = new System.Windows.Forms.TabPage(); this.tpAdvanced = new System.Windows.Forms.TabPage();
this.pgTaskSettings = new System.Windows.Forms.PropertyGrid(); this.pgTaskSettings = new System.Windows.Forms.PropertyGrid();
this.cbOverrideAdvancedSettings = new System.Windows.Forms.CheckBox(); this.cbOverrideAdvancedSettings = new System.Windows.Forms.CheckBox();
this.btnAfterCapture = new ShareX.HelpersLib.MenuButton();
this.btnAfterUpload = new ShareX.HelpersLib.MenuButton();
this.btnDestinations = new ShareX.HelpersLib.MenuButton();
this.btnTask = new ShareX.HelpersLib.MenuButton();
this.lvUploaderFiltersList = new ShareX.HelpersLib.MyListView();
this.chUploaderFiltersName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chUploaderFiltersExtension = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.lvActions = new ShareX.HelpersLib.MyListView();
this.chActionsName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chActionsPath = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chActionsArgs = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chActionsExtensions = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.lvWatchFolderList = new ShareX.HelpersLib.MyListView();
this.chWatchFolderFolderPath = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chWatchFolderFilter = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chWatchFolderIncludeSubdirectories = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.tttvMain = new ShareX.HelpersLib.TabToTreeView(); this.tttvMain = new ShareX.HelpersLib.TabToTreeView();
this.cbCaptureAutoHideDesktopIcons = new System.Windows.Forms.CheckBox();
this.tcTaskSettings.SuspendLayout(); this.tcTaskSettings.SuspendLayout();
this.tpTask.SuspendLayout(); this.tpTask.SuspendLayout();
this.cmsDestinations.SuspendLayout(); this.cmsDestinations.SuspendLayout();
@ -511,30 +512,6 @@
this.cbFTPAccounts.Name = "cbFTPAccounts"; this.cbFTPAccounts.Name = "cbFTPAccounts";
this.cbFTPAccounts.SelectedIndexChanged += new System.EventHandler(this.cbFTPAccounts_SelectedIndexChanged); this.cbFTPAccounts.SelectedIndexChanged += new System.EventHandler(this.cbFTPAccounts_SelectedIndexChanged);
// //
// btnAfterCapture
//
resources.ApplyResources(this.btnAfterCapture, "btnAfterCapture");
this.btnAfterCapture.Menu = this.cmsAfterCapture;
this.btnAfterCapture.Name = "btnAfterCapture";
this.btnAfterCapture.UseMnemonic = false;
this.btnAfterCapture.UseVisualStyleBackColor = true;
//
// btnAfterUpload
//
resources.ApplyResources(this.btnAfterUpload, "btnAfterUpload");
this.btnAfterUpload.Menu = this.cmsAfterUpload;
this.btnAfterUpload.Name = "btnAfterUpload";
this.btnAfterUpload.UseMnemonic = false;
this.btnAfterUpload.UseVisualStyleBackColor = true;
//
// btnDestinations
//
resources.ApplyResources(this.btnDestinations, "btnDestinations");
this.btnDestinations.Menu = this.cmsDestinations;
this.btnDestinations.Name = "btnDestinations";
this.btnDestinations.UseMnemonic = false;
this.btnDestinations.UseVisualStyleBackColor = true;
//
// cmsDestinations // cmsDestinations
// //
this.cmsDestinations.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.cmsDestinations.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -576,15 +553,6 @@
this.tsmiURLSharingServices.Name = "tsmiURLSharingServices"; this.tsmiURLSharingServices.Name = "tsmiURLSharingServices";
resources.ApplyResources(this.tsmiURLSharingServices, "tsmiURLSharingServices"); resources.ApplyResources(this.tsmiURLSharingServices, "tsmiURLSharingServices");
// //
// btnTask
//
this.btnTask.Image = global::ShareX.Properties.Resources.gear;
resources.ApplyResources(this.btnTask, "btnTask");
this.btnTask.Menu = this.cmsTask;
this.btnTask.Name = "btnTask";
this.btnTask.UseMnemonic = false;
this.btnTask.UseVisualStyleBackColor = true;
//
// tpGeneral // tpGeneral
// //
this.tpGeneral.BackColor = System.Drawing.SystemColors.Window; this.tpGeneral.BackColor = System.Drawing.SystemColors.Window;
@ -1241,6 +1209,7 @@
// //
// pCapture // pCapture
// //
this.pCapture.Controls.Add(this.cbCaptureAutoHideDesktopIcons);
this.pCapture.Controls.Add(this.txtCaptureCustomWindow); this.pCapture.Controls.Add(this.txtCaptureCustomWindow);
this.pCapture.Controls.Add(this.lblCaptureCustomWindow); this.pCapture.Controls.Add(this.lblCaptureCustomWindow);
this.pCapture.Controls.Add(this.lblScreenshotDelay); this.pCapture.Controls.Add(this.lblScreenshotDelay);
@ -2330,28 +2299,6 @@
resources.ApplyResources(this.tpUploaderFilters, "tpUploaderFilters"); resources.ApplyResources(this.tpUploaderFilters, "tpUploaderFilters");
this.tpUploaderFilters.Name = "tpUploaderFilters"; this.tpUploaderFilters.Name = "tpUploaderFilters";
// //
// lvUploaderFiltersList
//
resources.ApplyResources(this.lvUploaderFiltersList, "lvUploaderFiltersList");
this.lvUploaderFiltersList.AutoFillColumn = true;
this.lvUploaderFiltersList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.chUploaderFiltersName,
this.chUploaderFiltersExtension});
this.lvUploaderFiltersList.FullRowSelect = true;
this.lvUploaderFiltersList.HideSelection = false;
this.lvUploaderFiltersList.Name = "lvUploaderFiltersList";
this.lvUploaderFiltersList.UseCompatibleStateImageBehavior = false;
this.lvUploaderFiltersList.View = System.Windows.Forms.View.Details;
this.lvUploaderFiltersList.SelectedIndexChanged += new System.EventHandler(this.lvUploaderFiltersList_SelectedIndexChanged);
//
// chUploaderFiltersName
//
resources.ApplyResources(this.chUploaderFiltersName, "chUploaderFiltersName");
//
// chUploaderFiltersExtension
//
resources.ApplyResources(this.chUploaderFiltersExtension, "chUploaderFiltersExtension");
//
// btnUploaderFiltersRemove // btnUploaderFiltersRemove
// //
resources.ApplyResources(this.btnUploaderFiltersRemove, "btnUploaderFiltersRemove"); resources.ApplyResources(this.btnUploaderFiltersRemove, "btnUploaderFiltersRemove");
@ -2446,45 +2393,6 @@
this.btnActionsAdd.UseVisualStyleBackColor = true; this.btnActionsAdd.UseVisualStyleBackColor = true;
this.btnActionsAdd.Click += new System.EventHandler(this.btnActionsAdd_Click); this.btnActionsAdd.Click += new System.EventHandler(this.btnActionsAdd_Click);
// //
// lvActions
//
this.lvActions.AllowDrop = true;
this.lvActions.AllowItemDrag = true;
resources.ApplyResources(this.lvActions, "lvActions");
this.lvActions.AutoFillColumn = true;
this.lvActions.AutoFillColumnIndex = 2;
this.lvActions.CheckBoxes = true;
this.lvActions.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.chActionsName,
this.chActionsPath,
this.chActionsArgs,
this.chActionsExtensions});
this.lvActions.FullRowSelect = true;
this.lvActions.HideSelection = false;
this.lvActions.MultiSelect = false;
this.lvActions.Name = "lvActions";
this.lvActions.UseCompatibleStateImageBehavior = false;
this.lvActions.View = System.Windows.Forms.View.Details;
this.lvActions.ItemMoved += new ShareX.HelpersLib.MyListView.ListViewItemMovedEventHandler(this.lvActions_ItemMoved);
this.lvActions.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.lvActions_ItemChecked);
this.lvActions.SelectedIndexChanged += new System.EventHandler(this.lvActions_SelectedIndexChanged);
//
// chActionsName
//
resources.ApplyResources(this.chActionsName, "chActionsName");
//
// chActionsPath
//
resources.ApplyResources(this.chActionsPath, "chActionsPath");
//
// chActionsArgs
//
resources.ApplyResources(this.chActionsArgs, "chActionsArgs");
//
// chActionsExtensions
//
resources.ApplyResources(this.chActionsExtensions, "chActionsExtensions");
//
// btnActionsEdit // btnActionsEdit
// //
resources.ApplyResources(this.btnActionsEdit, "btnActionsEdit"); resources.ApplyResources(this.btnActionsEdit, "btnActionsEdit");
@ -2533,33 +2441,6 @@
this.cbWatchFolderEnabled.UseVisualStyleBackColor = true; this.cbWatchFolderEnabled.UseVisualStyleBackColor = true;
this.cbWatchFolderEnabled.CheckedChanged += new System.EventHandler(this.cbWatchFolderEnabled_CheckedChanged); this.cbWatchFolderEnabled.CheckedChanged += new System.EventHandler(this.cbWatchFolderEnabled_CheckedChanged);
// //
// lvWatchFolderList
//
resources.ApplyResources(this.lvWatchFolderList, "lvWatchFolderList");
this.lvWatchFolderList.AutoFillColumn = true;
this.lvWatchFolderList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.chWatchFolderFolderPath,
this.chWatchFolderFilter,
this.chWatchFolderIncludeSubdirectories});
this.lvWatchFolderList.FullRowSelect = true;
this.lvWatchFolderList.HideSelection = false;
this.lvWatchFolderList.Name = "lvWatchFolderList";
this.lvWatchFolderList.UseCompatibleStateImageBehavior = false;
this.lvWatchFolderList.View = System.Windows.Forms.View.Details;
this.lvWatchFolderList.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.lvWatchFolderList_MouseDoubleClick);
//
// chWatchFolderFolderPath
//
resources.ApplyResources(this.chWatchFolderFolderPath, "chWatchFolderFolderPath");
//
// chWatchFolderFilter
//
resources.ApplyResources(this.chWatchFolderFilter, "chWatchFolderFilter");
//
// chWatchFolderIncludeSubdirectories
//
resources.ApplyResources(this.chWatchFolderIncludeSubdirectories, "chWatchFolderIncludeSubdirectories");
//
// btnWatchFolderRemove // btnWatchFolderRemove
// //
resources.ApplyResources(this.btnWatchFolderRemove, "btnWatchFolderRemove"); resources.ApplyResources(this.btnWatchFolderRemove, "btnWatchFolderRemove");
@ -2659,6 +2540,127 @@
this.cbOverrideAdvancedSettings.UseVisualStyleBackColor = true; this.cbOverrideAdvancedSettings.UseVisualStyleBackColor = true;
this.cbOverrideAdvancedSettings.CheckedChanged += new System.EventHandler(this.cbUseDefaultAdvancedSettings_CheckedChanged); this.cbOverrideAdvancedSettings.CheckedChanged += new System.EventHandler(this.cbUseDefaultAdvancedSettings_CheckedChanged);
// //
// btnAfterCapture
//
resources.ApplyResources(this.btnAfterCapture, "btnAfterCapture");
this.btnAfterCapture.Menu = this.cmsAfterCapture;
this.btnAfterCapture.Name = "btnAfterCapture";
this.btnAfterCapture.UseMnemonic = false;
this.btnAfterCapture.UseVisualStyleBackColor = true;
//
// btnAfterUpload
//
resources.ApplyResources(this.btnAfterUpload, "btnAfterUpload");
this.btnAfterUpload.Menu = this.cmsAfterUpload;
this.btnAfterUpload.Name = "btnAfterUpload";
this.btnAfterUpload.UseMnemonic = false;
this.btnAfterUpload.UseVisualStyleBackColor = true;
//
// btnDestinations
//
resources.ApplyResources(this.btnDestinations, "btnDestinations");
this.btnDestinations.Menu = this.cmsDestinations;
this.btnDestinations.Name = "btnDestinations";
this.btnDestinations.UseMnemonic = false;
this.btnDestinations.UseVisualStyleBackColor = true;
//
// btnTask
//
this.btnTask.Image = global::ShareX.Properties.Resources.gear;
resources.ApplyResources(this.btnTask, "btnTask");
this.btnTask.Menu = this.cmsTask;
this.btnTask.Name = "btnTask";
this.btnTask.UseMnemonic = false;
this.btnTask.UseVisualStyleBackColor = true;
//
// lvUploaderFiltersList
//
resources.ApplyResources(this.lvUploaderFiltersList, "lvUploaderFiltersList");
this.lvUploaderFiltersList.AutoFillColumn = true;
this.lvUploaderFiltersList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.chUploaderFiltersName,
this.chUploaderFiltersExtension});
this.lvUploaderFiltersList.FullRowSelect = true;
this.lvUploaderFiltersList.HideSelection = false;
this.lvUploaderFiltersList.Name = "lvUploaderFiltersList";
this.lvUploaderFiltersList.UseCompatibleStateImageBehavior = false;
this.lvUploaderFiltersList.View = System.Windows.Forms.View.Details;
this.lvUploaderFiltersList.SelectedIndexChanged += new System.EventHandler(this.lvUploaderFiltersList_SelectedIndexChanged);
//
// chUploaderFiltersName
//
resources.ApplyResources(this.chUploaderFiltersName, "chUploaderFiltersName");
//
// chUploaderFiltersExtension
//
resources.ApplyResources(this.chUploaderFiltersExtension, "chUploaderFiltersExtension");
//
// lvActions
//
this.lvActions.AllowDrop = true;
this.lvActions.AllowItemDrag = true;
resources.ApplyResources(this.lvActions, "lvActions");
this.lvActions.AutoFillColumn = true;
this.lvActions.AutoFillColumnIndex = 2;
this.lvActions.CheckBoxes = true;
this.lvActions.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.chActionsName,
this.chActionsPath,
this.chActionsArgs,
this.chActionsExtensions});
this.lvActions.FullRowSelect = true;
this.lvActions.HideSelection = false;
this.lvActions.MultiSelect = false;
this.lvActions.Name = "lvActions";
this.lvActions.UseCompatibleStateImageBehavior = false;
this.lvActions.View = System.Windows.Forms.View.Details;
this.lvActions.ItemMoved += new ShareX.HelpersLib.MyListView.ListViewItemMovedEventHandler(this.lvActions_ItemMoved);
this.lvActions.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.lvActions_ItemChecked);
this.lvActions.SelectedIndexChanged += new System.EventHandler(this.lvActions_SelectedIndexChanged);
//
// chActionsName
//
resources.ApplyResources(this.chActionsName, "chActionsName");
//
// chActionsPath
//
resources.ApplyResources(this.chActionsPath, "chActionsPath");
//
// chActionsArgs
//
resources.ApplyResources(this.chActionsArgs, "chActionsArgs");
//
// chActionsExtensions
//
resources.ApplyResources(this.chActionsExtensions, "chActionsExtensions");
//
// lvWatchFolderList
//
resources.ApplyResources(this.lvWatchFolderList, "lvWatchFolderList");
this.lvWatchFolderList.AutoFillColumn = true;
this.lvWatchFolderList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.chWatchFolderFolderPath,
this.chWatchFolderFilter,
this.chWatchFolderIncludeSubdirectories});
this.lvWatchFolderList.FullRowSelect = true;
this.lvWatchFolderList.HideSelection = false;
this.lvWatchFolderList.Name = "lvWatchFolderList";
this.lvWatchFolderList.UseCompatibleStateImageBehavior = false;
this.lvWatchFolderList.View = System.Windows.Forms.View.Details;
this.lvWatchFolderList.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.lvWatchFolderList_MouseDoubleClick);
//
// chWatchFolderFolderPath
//
resources.ApplyResources(this.chWatchFolderFolderPath, "chWatchFolderFolderPath");
//
// chWatchFolderFilter
//
resources.ApplyResources(this.chWatchFolderFilter, "chWatchFolderFilter");
//
// chWatchFolderIncludeSubdirectories
//
resources.ApplyResources(this.chWatchFolderIncludeSubdirectories, "chWatchFolderIncludeSubdirectories");
//
// tttvMain // tttvMain
// //
resources.ApplyResources(this.tttvMain, "tttvMain"); resources.ApplyResources(this.tttvMain, "tttvMain");
@ -2671,6 +2673,13 @@
this.tttvMain.TreeViewSize = 190; this.tttvMain.TreeViewSize = 190;
this.tttvMain.TabChanged += new ShareX.HelpersLib.TabToTreeView.TabChangedEventHandler(this.tttvMain_TabChanged); this.tttvMain.TabChanged += new ShareX.HelpersLib.TabToTreeView.TabChangedEventHandler(this.tttvMain_TabChanged);
// //
// cbCaptureAutoHideDesktopIcons
//
resources.ApplyResources(this.cbCaptureAutoHideDesktopIcons, "cbCaptureAutoHideDesktopIcons");
this.cbCaptureAutoHideDesktopIcons.Name = "cbCaptureAutoHideDesktopIcons";
this.cbCaptureAutoHideDesktopIcons.UseVisualStyleBackColor = true;
this.cbCaptureAutoHideDesktopIcons.CheckedChanged += new System.EventHandler(this.cbCaptureAutoHideDesktopIcons_CheckedChanged);
//
// TaskSettingsForm // TaskSettingsForm
// //
resources.ApplyResources(this, "$this"); resources.ApplyResources(this, "$this");
@ -3051,5 +3060,6 @@
private System.Windows.Forms.Button btnCustomActionCompletedSoundPath; private System.Windows.Forms.Button btnCustomActionCompletedSoundPath;
private System.Windows.Forms.TextBox txtCustomActionCompletedSoundPath; private System.Windows.Forms.TextBox txtCustomActionCompletedSoundPath;
private System.Windows.Forms.CheckBox cbUseCustomActionCompletedSound; private System.Windows.Forms.CheckBox cbUseCustomActionCompletedSound;
private System.Windows.Forms.CheckBox cbCaptureAutoHideDesktopIcons;
} }
} }

View File

@ -278,6 +278,7 @@ namespace ShareX
cbCaptureShadow.Checked = TaskSettings.CaptureSettings.CaptureShadow; cbCaptureShadow.Checked = TaskSettings.CaptureSettings.CaptureShadow;
nudCaptureShadowOffset.SetValue(TaskSettings.CaptureSettings.CaptureShadowOffset); nudCaptureShadowOffset.SetValue(TaskSettings.CaptureSettings.CaptureShadowOffset);
cbCaptureClientArea.Checked = TaskSettings.CaptureSettings.CaptureClientArea; cbCaptureClientArea.Checked = TaskSettings.CaptureSettings.CaptureClientArea;
cbCaptureAutoHideDesktopIcons.Checked = TaskSettings.CaptureSettings.CaptureAutoHideDesktopIcons;
cbCaptureAutoHideTaskbar.Checked = TaskSettings.CaptureSettings.CaptureAutoHideTaskbar; cbCaptureAutoHideTaskbar.Checked = TaskSettings.CaptureSettings.CaptureAutoHideTaskbar;
nudCaptureCustomRegionX.SetValue(TaskSettings.CaptureSettings.CaptureCustomRegion.X); nudCaptureCustomRegionX.SetValue(TaskSettings.CaptureSettings.CaptureCustomRegion.X);
nudCaptureCustomRegionY.SetValue(TaskSettings.CaptureSettings.CaptureCustomRegion.Y); nudCaptureCustomRegionY.SetValue(TaskSettings.CaptureSettings.CaptureCustomRegion.Y);
@ -1091,6 +1092,11 @@ namespace ShareX
TaskSettings.CaptureSettings.CaptureClientArea = cbCaptureClientArea.Checked; TaskSettings.CaptureSettings.CaptureClientArea = cbCaptureClientArea.Checked;
} }
private void cbCaptureAutoHideDesktopIcons_CheckedChanged(object sender, EventArgs e)
{
TaskSettings.CaptureSettings.CaptureAutoHideDesktopIcons = cbCaptureAutoHideDesktopIcons.Checked;
}
private void cbCaptureAutoHideTaskbar_CheckedChanged(object sender, EventArgs e) private void cbCaptureAutoHideTaskbar_CheckedChanged(object sender, EventArgs e)
{ {
TaskSettings.CaptureSettings.CaptureAutoHideTaskbar = cbCaptureAutoHideTaskbar.Checked; TaskSettings.CaptureSettings.CaptureAutoHideTaskbar = cbCaptureAutoHideTaskbar.Checked;

File diff suppressed because it is too large Load Diff

View File

@ -378,6 +378,7 @@ namespace ShareX
public int CaptureShadowOffset = 100; public int CaptureShadowOffset = 100;
public bool CaptureClientArea = false; public bool CaptureClientArea = false;
public bool CaptureAutoHideTaskbar = false; public bool CaptureAutoHideTaskbar = false;
public bool CaptureAutoHideDesktopIcons = false;
public Rectangle CaptureCustomRegion = new Rectangle(0, 0, 0, 0); public Rectangle CaptureCustomRegion = new Rectangle(0, 0, 0, 0);
public string CaptureCustomWindow = ""; public string CaptureCustomWindow = "";