2023-03-05 09:41:48 +13:00
|
|
|
|
#region License Information (GPL v3)
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
ShareX - A program that allows you to take screenshots and share any file type
|
2024-01-03 12:57:14 +13:00
|
|
|
|
Copyright (c) 2007-2024 ShareX Team
|
2023-03-05 09:41:48 +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 ShareX.HelpersLib;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
namespace ShareX.ScreenCaptureLib
|
|
|
|
|
{
|
|
|
|
|
public partial class ScrollingCaptureOptionsForm : Form
|
|
|
|
|
{
|
|
|
|
|
public ScrollingCaptureOptions Options { get; private set; }
|
|
|
|
|
|
|
|
|
|
public ScrollingCaptureOptionsForm(ScrollingCaptureOptions options)
|
|
|
|
|
{
|
|
|
|
|
Options = options;
|
|
|
|
|
|
|
|
|
|
InitializeComponent();
|
2024-01-17 20:12:48 +13:00
|
|
|
|
ShareXResources.ApplyTheme(this, true);
|
2023-03-05 09:41:48 +13:00
|
|
|
|
|
2023-03-09 17:57:19 +13:00
|
|
|
|
LoadOptions();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void LoadOptions()
|
|
|
|
|
{
|
2023-03-05 09:41:48 +13:00
|
|
|
|
nudStartDelay.SetValue(Options.StartDelay);
|
2023-03-07 10:14:02 +13:00
|
|
|
|
cbAutoScrollTop.Checked = Options.AutoScrollTop;
|
2023-03-05 09:41:48 +13:00
|
|
|
|
nudScrollDelay.SetValue(Options.ScrollDelay);
|
2023-03-08 16:23:05 +13:00
|
|
|
|
nudScrollAmount.SetValue(Options.ScrollAmount);
|
2023-03-08 16:47:44 +13:00
|
|
|
|
cbAutoUpload.Checked = Options.AutoUpload;
|
2023-03-12 19:05:56 +13:00
|
|
|
|
cbShowRegion.Checked = Options.ShowRegion;
|
2023-03-05 09:41:48 +13:00
|
|
|
|
}
|
|
|
|
|
|
2023-03-09 17:57:19 +13:00
|
|
|
|
private void SaveOptions()
|
2023-03-05 09:41:48 +13:00
|
|
|
|
{
|
|
|
|
|
Options.StartDelay = (int)nudStartDelay.Value;
|
2023-03-07 10:14:02 +13:00
|
|
|
|
Options.AutoScrollTop = cbAutoScrollTop.Checked;
|
2023-03-05 09:41:48 +13:00
|
|
|
|
Options.ScrollDelay = (int)nudScrollDelay.Value;
|
2023-03-09 17:57:19 +13:00
|
|
|
|
Options.ScrollAmount = (int)nudScrollAmount.Value;
|
|
|
|
|
Options.AutoUpload = cbAutoUpload.Checked;
|
2023-03-12 19:05:56 +13:00
|
|
|
|
Options.ShowRegion = cbShowRegion.Checked;
|
2023-03-05 09:41:48 +13:00
|
|
|
|
}
|
2023-03-08 16:23:05 +13:00
|
|
|
|
|
2023-03-09 17:57:19 +13:00
|
|
|
|
private void btnOK_Click(object sender, EventArgs e)
|
2023-03-08 16:23:05 +13:00
|
|
|
|
{
|
2023-03-09 17:57:19 +13:00
|
|
|
|
SaveOptions();
|
|
|
|
|
|
2023-06-05 10:17:51 +12:00
|
|
|
|
DialogResult = DialogResult.OK;
|
2023-03-09 17:57:19 +13:00
|
|
|
|
Close();
|
2023-03-08 16:23:05 +13:00
|
|
|
|
}
|
2023-03-08 16:47:44 +13:00
|
|
|
|
|
2023-03-09 17:57:19 +13:00
|
|
|
|
private void btnCancel_Click(object sender, EventArgs e)
|
2023-03-08 16:47:44 +13:00
|
|
|
|
{
|
2023-06-05 10:17:51 +12:00
|
|
|
|
DialogResult = DialogResult.Cancel;
|
2023-03-09 17:57:19 +13:00
|
|
|
|
Close();
|
2023-03-08 16:47:44 +13:00
|
|
|
|
}
|
2023-03-05 09:41:48 +13:00
|
|
|
|
}
|
|
|
|
|
}
|