mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 17:56:51 +13:00
fixed OAuth control and hotkey control DPI problem
This commit is contained in:
parent
5dff007a22
commit
88fbbcd367
10 changed files with 425 additions and 793 deletions
106
ShareX/Controls/HotkeyManagerControl.Designer.cs
generated
106
ShareX/Controls/HotkeyManagerControl.Designer.cs
generated
|
@ -1,106 +0,0 @@
|
||||||
namespace ShareX
|
|
||||||
{
|
|
||||||
partial class HotkeyManagerControl
|
|
||||||
{
|
|
||||||
/// <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 Component 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()
|
|
||||||
{
|
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HotkeyManagerControl));
|
|
||||||
this.flpHotkeys = new System.Windows.Forms.FlowLayoutPanel();
|
|
||||||
this.btnAdd = new System.Windows.Forms.Button();
|
|
||||||
this.btnRemove = new System.Windows.Forms.Button();
|
|
||||||
this.btnEdit = new System.Windows.Forms.Button();
|
|
||||||
this.btnReset = new System.Windows.Forms.Button();
|
|
||||||
this.btnDuplicate = new System.Windows.Forms.Button();
|
|
||||||
this.SuspendLayout();
|
|
||||||
//
|
|
||||||
// flpHotkeys
|
|
||||||
//
|
|
||||||
resources.ApplyResources(this.flpHotkeys, "flpHotkeys");
|
|
||||||
this.flpHotkeys.Name = "flpHotkeys";
|
|
||||||
this.flpHotkeys.Layout += new System.Windows.Forms.LayoutEventHandler(this.flpHotkeys_Layout);
|
|
||||||
//
|
|
||||||
// btnAdd
|
|
||||||
//
|
|
||||||
resources.ApplyResources(this.btnAdd, "btnAdd");
|
|
||||||
this.btnAdd.Name = "btnAdd";
|
|
||||||
this.btnAdd.UseVisualStyleBackColor = true;
|
|
||||||
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
|
|
||||||
//
|
|
||||||
// btnRemove
|
|
||||||
//
|
|
||||||
resources.ApplyResources(this.btnRemove, "btnRemove");
|
|
||||||
this.btnRemove.Name = "btnRemove";
|
|
||||||
this.btnRemove.UseVisualStyleBackColor = true;
|
|
||||||
this.btnRemove.Click += new System.EventHandler(this.btnRemove_Click);
|
|
||||||
//
|
|
||||||
// btnEdit
|
|
||||||
//
|
|
||||||
resources.ApplyResources(this.btnEdit, "btnEdit");
|
|
||||||
this.btnEdit.Name = "btnEdit";
|
|
||||||
this.btnEdit.UseVisualStyleBackColor = true;
|
|
||||||
this.btnEdit.Click += new System.EventHandler(this.btnEdit_Click);
|
|
||||||
//
|
|
||||||
// btnReset
|
|
||||||
//
|
|
||||||
resources.ApplyResources(this.btnReset, "btnReset");
|
|
||||||
this.btnReset.Name = "btnReset";
|
|
||||||
this.btnReset.UseVisualStyleBackColor = true;
|
|
||||||
this.btnReset.Click += new System.EventHandler(this.btnReset_Click);
|
|
||||||
//
|
|
||||||
// btnDuplicate
|
|
||||||
//
|
|
||||||
resources.ApplyResources(this.btnDuplicate, "btnDuplicate");
|
|
||||||
this.btnDuplicate.Name = "btnDuplicate";
|
|
||||||
this.btnDuplicate.UseVisualStyleBackColor = true;
|
|
||||||
this.btnDuplicate.Click += new System.EventHandler(this.btnDuplicate_Click);
|
|
||||||
//
|
|
||||||
// HotkeyManagerControl
|
|
||||||
//
|
|
||||||
resources.ApplyResources(this, "$this");
|
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
|
||||||
this.BackColor = System.Drawing.Color.White;
|
|
||||||
this.Controls.Add(this.btnDuplicate);
|
|
||||||
this.Controls.Add(this.btnReset);
|
|
||||||
this.Controls.Add(this.flpHotkeys);
|
|
||||||
this.Controls.Add(this.btnEdit);
|
|
||||||
this.Controls.Add(this.btnRemove);
|
|
||||||
this.Controls.Add(this.btnAdd);
|
|
||||||
this.Name = "HotkeyManagerControl";
|
|
||||||
this.ResumeLayout(false);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private System.Windows.Forms.FlowLayoutPanel flpHotkeys;
|
|
||||||
private System.Windows.Forms.Button btnReset;
|
|
||||||
private System.Windows.Forms.Button btnEdit;
|
|
||||||
private System.Windows.Forms.Button btnRemove;
|
|
||||||
private System.Windows.Forms.Button btnAdd;
|
|
||||||
private System.Windows.Forms.Button btnDuplicate;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,192 +0,0 @@
|
||||||
#region License Information (GPL v3)
|
|
||||||
|
|
||||||
/*
|
|
||||||
ShareX - A program that allows you to take screenshots and share any file type
|
|
||||||
Copyright (C) 2007-2014 ShareX Developers
|
|
||||||
|
|
||||||
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;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace ShareX
|
|
||||||
{
|
|
||||||
public partial class HotkeyManagerControl : UserControl
|
|
||||||
{
|
|
||||||
public HotkeySelectionControl Selected { get; private set; }
|
|
||||||
|
|
||||||
private HotkeyManager manager;
|
|
||||||
|
|
||||||
public HotkeyManagerControl()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PrepareHotkeys(HotkeyManager hotkeyManager)
|
|
||||||
{
|
|
||||||
if (manager == null)
|
|
||||||
{
|
|
||||||
manager = hotkeyManager;
|
|
||||||
AddControls();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void AddControls()
|
|
||||||
{
|
|
||||||
flpHotkeys.Controls.Clear();
|
|
||||||
|
|
||||||
foreach (HotkeySettings hotkeySetting in manager.Hotkeys)
|
|
||||||
{
|
|
||||||
AddHotkeySelectionControl(hotkeySetting);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdateButtons()
|
|
||||||
{
|
|
||||||
btnEdit.Enabled = btnRemove.Enabled = btnDuplicate.Enabled = Selected != null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private HotkeySelectionControl FindSelectionControl(HotkeySettings hotkeySetting)
|
|
||||||
{
|
|
||||||
return flpHotkeys.Controls.Cast<HotkeySelectionControl>().FirstOrDefault(hsc => hsc.Setting == hotkeySetting);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void control_SelectedChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
Selected = (HotkeySelectionControl)sender;
|
|
||||||
UpdateButtons();
|
|
||||||
UpdateCheckStates();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdateCheckStates()
|
|
||||||
{
|
|
||||||
foreach (Control control in flpHotkeys.Controls)
|
|
||||||
{
|
|
||||||
((HotkeySelectionControl)control).Selected = Selected == control;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void control_HotkeyChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
HotkeySelectionControl control = (HotkeySelectionControl)sender;
|
|
||||||
manager.RegisterHotkey(control.Setting);
|
|
||||||
}
|
|
||||||
|
|
||||||
private HotkeySelectionControl AddHotkeySelectionControl(HotkeySettings hotkeySetting)
|
|
||||||
{
|
|
||||||
HotkeySelectionControl control = new HotkeySelectionControl(hotkeySetting);
|
|
||||||
control.Margin = new Padding(0, 0, 0, 2);
|
|
||||||
control.SelectedChanged += control_SelectedChanged;
|
|
||||||
control.HotkeyChanged += control_HotkeyChanged;
|
|
||||||
control.LabelDoubleClick += control_LabelDoubleClick;
|
|
||||||
flpHotkeys.Controls.Add(control);
|
|
||||||
return control;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Edit(HotkeySelectionControl selectionControl)
|
|
||||||
{
|
|
||||||
using (TaskSettingsForm taskSettingsForm = new TaskSettingsForm(selectionControl.Setting.TaskSettings))
|
|
||||||
{
|
|
||||||
taskSettingsForm.ShowDialog();
|
|
||||||
selectionControl.UpdateDescription();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void control_LabelDoubleClick(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
Edit((HotkeySelectionControl)sender);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void EditSelected()
|
|
||||||
{
|
|
||||||
if (Selected != null)
|
|
||||||
{
|
|
||||||
Edit(Selected);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void flpHotkeys_Layout(object sender, LayoutEventArgs e)
|
|
||||||
{
|
|
||||||
foreach (Control control in flpHotkeys.Controls)
|
|
||||||
{
|
|
||||||
control.ClientSize = new Size(flpHotkeys.ClientSize.Width, control.ClientSize.Height);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void btnAdd_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
HotkeySettings hotkeySetting = new HotkeySettings();
|
|
||||||
hotkeySetting.TaskSettings = TaskSettings.GetDefaultTaskSettings();
|
|
||||||
manager.Hotkeys.Add(hotkeySetting);
|
|
||||||
HotkeySelectionControl control = AddHotkeySelectionControl(hotkeySetting);
|
|
||||||
control.Selected = true;
|
|
||||||
Selected = control;
|
|
||||||
UpdateButtons();
|
|
||||||
UpdateCheckStates();
|
|
||||||
control.Focus();
|
|
||||||
Update();
|
|
||||||
EditSelected();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void btnRemove_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (Selected != null)
|
|
||||||
{
|
|
||||||
manager.UnregisterHotkey(Selected.Setting);
|
|
||||||
HotkeySelectionControl hsc = FindSelectionControl(Selected.Setting);
|
|
||||||
if (hsc != null) flpHotkeys.Controls.Remove(hsc);
|
|
||||||
Selected = null;
|
|
||||||
UpdateButtons();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void btnEdit_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
EditSelected();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void btnDuplicate_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (Selected != null)
|
|
||||||
{
|
|
||||||
HotkeySettings hotkeySetting = new HotkeySettings();
|
|
||||||
hotkeySetting.TaskSettings = Selected.Setting.TaskSettings.Copy();
|
|
||||||
hotkeySetting.TaskSettings.WatchFolderEnabled = false;
|
|
||||||
hotkeySetting.TaskSettings.WatchFolderList = new List<WatchFolderSettings>();
|
|
||||||
manager.Hotkeys.Add(hotkeySetting);
|
|
||||||
HotkeySelectionControl control = AddHotkeySelectionControl(hotkeySetting);
|
|
||||||
control.Selected = true;
|
|
||||||
Selected = control;
|
|
||||||
UpdateCheckStates();
|
|
||||||
control.Focus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void btnReset_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
manager.ResetHotkeys();
|
|
||||||
AddControls();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,303 +0,0 @@
|
||||||
<?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>
|
|
||||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
|
||||||
<data name="flpHotkeys.TabIndex" type="System.Int32, mscorlib">
|
|
||||||
<value>5</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>btnReset.Parent" xml:space="preserve">
|
|
||||||
<value>$this</value>
|
|
||||||
</data>
|
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
|
||||||
<data name="btnAdd.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>72, 23</value>
|
|
||||||
</data>
|
|
||||||
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>496, 350</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>flpHotkeys.Name" xml:space="preserve">
|
|
||||||
<value>flpHotkeys</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnReset.TabIndex" type="System.Int32, mscorlib">
|
|
||||||
<value>4</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>btnAdd.Parent" xml:space="preserve">
|
|
||||||
<value>$this</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnRemove.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>152, 8</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>btnEdit.Name" xml:space="preserve">
|
|
||||||
<value>btnEdit</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnEdit.Enabled" type="System.Boolean, mscorlib">
|
|
||||||
<value>False</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnDuplicate.Enabled" type="System.Boolean, mscorlib">
|
|
||||||
<value>False</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnDuplicate.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>72, 23</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnRemove.TabIndex" type="System.Int32, mscorlib">
|
|
||||||
<value>2</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>btnDuplicate.Parent" xml:space="preserve">
|
|
||||||
<value>$this</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>$this.Name" xml:space="preserve">
|
|
||||||
<value>HotkeyManagerControl</value>
|
|
||||||
</data>
|
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
|
||||||
<data name="btnReset.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
|
||||||
<value>Top, Right</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnEdit.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>72, 23</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>btnAdd.Name" xml:space="preserve">
|
|
||||||
<value>btnAdd</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>btnRemove.Type" xml:space="preserve">
|
|
||||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>flpHotkeys.ZOrder" xml:space="preserve">
|
|
||||||
<value>2</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnRemove.Text" xml:space="preserve">
|
|
||||||
<value>Remove</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>btnEdit.ZOrder" xml:space="preserve">
|
|
||||||
<value>3</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnEdit.TabIndex" type="System.Int32, mscorlib">
|
|
||||||
<value>1</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>btnReset.Type" xml:space="preserve">
|
|
||||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>btnDuplicate.Name" xml:space="preserve">
|
|
||||||
<value>btnDuplicate</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>btnReset.ZOrder" xml:space="preserve">
|
|
||||||
<value>1</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnAdd.TabIndex" type="System.Int32, mscorlib">
|
|
||||||
<value>0</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>btnDuplicate.ZOrder" xml:space="preserve">
|
|
||||||
<value>0</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnRemove.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>72, 23</value>
|
|
||||||
</data>
|
|
||||||
<data name="flpHotkeys.WrapContents" type="System.Boolean, mscorlib">
|
|
||||||
<value>False</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>$this.Type" xml:space="preserve">
|
|
||||||
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnEdit.Text" xml:space="preserve">
|
|
||||||
<value>Edit...</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>btnRemove.Parent" xml:space="preserve">
|
|
||||||
<value>$this</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>btnEdit.Type" xml:space="preserve">
|
|
||||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnEdit.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>80, 8</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>btnDuplicate.Type" xml:space="preserve">
|
|
||||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnAdd.Text" xml:space="preserve">
|
|
||||||
<value>Add...</value>
|
|
||||||
</data>
|
|
||||||
<data name="flpHotkeys.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
|
||||||
<value>Top, Bottom, Left, Right</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>flpHotkeys.Parent" xml:space="preserve">
|
|
||||||
<value>$this</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnDuplicate.TabIndex" type="System.Int32, mscorlib">
|
|
||||||
<value>3</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>btnRemove.ZOrder" xml:space="preserve">
|
|
||||||
<value>4</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>btnRemove.Name" xml:space="preserve">
|
|
||||||
<value>btnRemove</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnAdd.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>8, 8</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnReset.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>144, 23</value>
|
|
||||||
</data>
|
|
||||||
<data name="flpHotkeys.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>481, 309</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnReset.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>345, 8</value>
|
|
||||||
</data>
|
|
||||||
<data name="flpHotkeys.AutoScroll" type="System.Boolean, mscorlib">
|
|
||||||
<value>True</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>btnReset.Name" xml:space="preserve">
|
|
||||||
<value>btnReset</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>btnAdd.Type" xml:space="preserve">
|
|
||||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>flpHotkeys.Type" xml:space="preserve">
|
|
||||||
<value>System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</data>
|
|
||||||
<data name="flpHotkeys.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>8, 35</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnDuplicate.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>224, 8</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnRemove.Enabled" type="System.Boolean, mscorlib">
|
|
||||||
<value>False</value>
|
|
||||||
</data>
|
|
||||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
|
||||||
<value>6, 13</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnReset.Text" xml:space="preserve">
|
|
||||||
<value>Restore default hotkeys</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>btnEdit.Parent" xml:space="preserve">
|
|
||||||
<value>$this</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnDuplicate.Text" xml:space="preserve">
|
|
||||||
<value>Duplicate</value>
|
|
||||||
</data>
|
|
||||||
<data name="flpHotkeys.FlowDirection" type="System.Windows.Forms.FlowDirection, System.Windows.Forms">
|
|
||||||
<value>TopDown</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>btnAdd.ZOrder" xml:space="preserve">
|
|
||||||
<value>5</value>
|
|
||||||
</data>
|
|
||||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
</root>
|
|
|
@ -1,135 +0,0 @@
|
||||||
<?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>
|
|
||||||
<data name="btnAdd.Text" xml:space="preserve">
|
|
||||||
<value>Ekle...</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnRemove.Text" xml:space="preserve">
|
|
||||||
<value>Kaldır</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnEdit.Text" xml:space="preserve">
|
|
||||||
<value>Düzenle...</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnReset.Text" xml:space="preserve">
|
|
||||||
<value>Varsayılan kısayollara dön</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnDuplicate.Text" xml:space="preserve">
|
|
||||||
<value>Çoğalt</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
|
65
ShareX/Forms/HotkeySettingsForm.Designer.cs
generated
65
ShareX/Forms/HotkeySettingsForm.Designer.cs
generated
|
@ -29,21 +29,66 @@ protected override void Dispose(bool disposing)
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HotkeySettingsForm));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HotkeySettingsForm));
|
||||||
this.hmHotkeys = new ShareX.HotkeyManagerControl();
|
this.btnDuplicate = new System.Windows.Forms.Button();
|
||||||
|
this.btnReset = new System.Windows.Forms.Button();
|
||||||
|
this.flpHotkeys = new System.Windows.Forms.FlowLayoutPanel();
|
||||||
|
this.btnEdit = new System.Windows.Forms.Button();
|
||||||
|
this.btnRemove = new System.Windows.Forms.Button();
|
||||||
|
this.btnAdd = new System.Windows.Forms.Button();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// hmHotkeys
|
// btnDuplicate
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.hmHotkeys, "hmHotkeys");
|
resources.ApplyResources(this.btnDuplicate, "btnDuplicate");
|
||||||
this.hmHotkeys.BackColor = System.Drawing.Color.White;
|
this.btnDuplicate.Name = "btnDuplicate";
|
||||||
this.hmHotkeys.Name = "hmHotkeys";
|
this.btnDuplicate.UseVisualStyleBackColor = true;
|
||||||
|
this.btnDuplicate.Click += new System.EventHandler(this.btnDuplicate_Click);
|
||||||
|
//
|
||||||
|
// btnReset
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.btnReset, "btnReset");
|
||||||
|
this.btnReset.Name = "btnReset";
|
||||||
|
this.btnReset.UseVisualStyleBackColor = true;
|
||||||
|
this.btnReset.Click += new System.EventHandler(this.btnReset_Click);
|
||||||
|
//
|
||||||
|
// flpHotkeys
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.flpHotkeys, "flpHotkeys");
|
||||||
|
this.flpHotkeys.Name = "flpHotkeys";
|
||||||
|
this.flpHotkeys.Layout += new System.Windows.Forms.LayoutEventHandler(this.flpHotkeys_Layout);
|
||||||
|
//
|
||||||
|
// btnEdit
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.btnEdit, "btnEdit");
|
||||||
|
this.btnEdit.Name = "btnEdit";
|
||||||
|
this.btnEdit.UseVisualStyleBackColor = true;
|
||||||
|
this.btnEdit.Click += new System.EventHandler(this.btnEdit_Click);
|
||||||
|
//
|
||||||
|
// btnRemove
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.btnRemove, "btnRemove");
|
||||||
|
this.btnRemove.Name = "btnRemove";
|
||||||
|
this.btnRemove.UseVisualStyleBackColor = true;
|
||||||
|
this.btnRemove.Click += new System.EventHandler(this.btnRemove_Click);
|
||||||
|
//
|
||||||
|
// btnAdd
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.btnAdd, "btnAdd");
|
||||||
|
this.btnAdd.Name = "btnAdd";
|
||||||
|
this.btnAdd.UseVisualStyleBackColor = true;
|
||||||
|
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
|
||||||
//
|
//
|
||||||
// HotkeySettingsForm
|
// HotkeySettingsForm
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this, "$this");
|
resources.ApplyResources(this, "$this");
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.BackColor = System.Drawing.Color.White;
|
this.BackColor = System.Drawing.Color.White;
|
||||||
this.Controls.Add(this.hmHotkeys);
|
this.Controls.Add(this.btnDuplicate);
|
||||||
|
this.Controls.Add(this.btnReset);
|
||||||
|
this.Controls.Add(this.flpHotkeys);
|
||||||
|
this.Controls.Add(this.btnEdit);
|
||||||
|
this.Controls.Add(this.btnRemove);
|
||||||
|
this.Controls.Add(this.btnAdd);
|
||||||
this.Name = "HotkeySettingsForm";
|
this.Name = "HotkeySettingsForm";
|
||||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.HotkeySettingsForm_FormClosed);
|
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.HotkeySettingsForm_FormClosed);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
@ -52,6 +97,12 @@ private void InitializeComponent()
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private HotkeyManagerControl hmHotkeys;
|
private System.Windows.Forms.Button btnDuplicate;
|
||||||
|
private System.Windows.Forms.Button btnReset;
|
||||||
|
private System.Windows.Forms.FlowLayoutPanel flpHotkeys;
|
||||||
|
private System.Windows.Forms.Button btnEdit;
|
||||||
|
private System.Windows.Forms.Button btnRemove;
|
||||||
|
private System.Windows.Forms.Button btnAdd;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -24,12 +24,20 @@ You should have received a copy of the GNU General Public License
|
||||||
#endregion License Information (GPL v3)
|
#endregion License Information (GPL v3)
|
||||||
|
|
||||||
using HelpersLib;
|
using HelpersLib;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace ShareX
|
namespace ShareX
|
||||||
{
|
{
|
||||||
public partial class HotkeySettingsForm : Form
|
public partial class HotkeySettingsForm : Form
|
||||||
{
|
{
|
||||||
|
public HotkeySelectionControl Selected { get; private set; }
|
||||||
|
|
||||||
|
private HotkeyManager manager;
|
||||||
|
|
||||||
public HotkeySettingsForm()
|
public HotkeySettingsForm()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
@ -37,7 +45,7 @@ public HotkeySettingsForm()
|
||||||
|
|
||||||
if (Program.HotkeyManager != null)
|
if (Program.HotkeyManager != null)
|
||||||
{
|
{
|
||||||
hmHotkeys.PrepareHotkeys(Program.HotkeyManager);
|
PrepareHotkeys(Program.HotkeyManager);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,5 +53,151 @@ private void HotkeySettingsForm_FormClosed(object sender, FormClosedEventArgs e)
|
||||||
{
|
{
|
||||||
Program.HotkeyManager.IgnoreHotkeys = false;
|
Program.HotkeyManager.IgnoreHotkeys = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void PrepareHotkeys(HotkeyManager hotkeyManager)
|
||||||
|
{
|
||||||
|
if (manager == null)
|
||||||
|
{
|
||||||
|
manager = hotkeyManager;
|
||||||
|
AddControls();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddControls()
|
||||||
|
{
|
||||||
|
flpHotkeys.Controls.Clear();
|
||||||
|
|
||||||
|
foreach (HotkeySettings hotkeySetting in manager.Hotkeys)
|
||||||
|
{
|
||||||
|
AddHotkeySelectionControl(hotkeySetting);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateButtons()
|
||||||
|
{
|
||||||
|
btnEdit.Enabled = btnRemove.Enabled = btnDuplicate.Enabled = Selected != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private HotkeySelectionControl FindSelectionControl(HotkeySettings hotkeySetting)
|
||||||
|
{
|
||||||
|
return flpHotkeys.Controls.Cast<HotkeySelectionControl>().FirstOrDefault(hsc => hsc.Setting == hotkeySetting);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void control_SelectedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Selected = (HotkeySelectionControl)sender;
|
||||||
|
UpdateButtons();
|
||||||
|
UpdateCheckStates();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateCheckStates()
|
||||||
|
{
|
||||||
|
foreach (Control control in flpHotkeys.Controls)
|
||||||
|
{
|
||||||
|
((HotkeySelectionControl)control).Selected = Selected == control;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void control_HotkeyChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
HotkeySelectionControl control = (HotkeySelectionControl)sender;
|
||||||
|
manager.RegisterHotkey(control.Setting);
|
||||||
|
}
|
||||||
|
|
||||||
|
private HotkeySelectionControl AddHotkeySelectionControl(HotkeySettings hotkeySetting)
|
||||||
|
{
|
||||||
|
HotkeySelectionControl control = new HotkeySelectionControl(hotkeySetting);
|
||||||
|
control.Margin = new Padding(0, 0, 0, 2);
|
||||||
|
control.SelectedChanged += control_SelectedChanged;
|
||||||
|
control.HotkeyChanged += control_HotkeyChanged;
|
||||||
|
control.LabelDoubleClick += control_LabelDoubleClick;
|
||||||
|
flpHotkeys.Controls.Add(control);
|
||||||
|
return control;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Edit(HotkeySelectionControl selectionControl)
|
||||||
|
{
|
||||||
|
using (TaskSettingsForm taskSettingsForm = new TaskSettingsForm(selectionControl.Setting.TaskSettings))
|
||||||
|
{
|
||||||
|
taskSettingsForm.ShowDialog();
|
||||||
|
selectionControl.UpdateDescription();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void control_LabelDoubleClick(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Edit((HotkeySelectionControl)sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void EditSelected()
|
||||||
|
{
|
||||||
|
if (Selected != null)
|
||||||
|
{
|
||||||
|
Edit(Selected);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void flpHotkeys_Layout(object sender, LayoutEventArgs e)
|
||||||
|
{
|
||||||
|
foreach (Control control in flpHotkeys.Controls)
|
||||||
|
{
|
||||||
|
control.ClientSize = new Size(flpHotkeys.ClientSize.Width, control.ClientSize.Height);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnAdd_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
HotkeySettings hotkeySetting = new HotkeySettings();
|
||||||
|
hotkeySetting.TaskSettings = TaskSettings.GetDefaultTaskSettings();
|
||||||
|
manager.Hotkeys.Add(hotkeySetting);
|
||||||
|
HotkeySelectionControl control = AddHotkeySelectionControl(hotkeySetting);
|
||||||
|
control.Selected = true;
|
||||||
|
Selected = control;
|
||||||
|
UpdateButtons();
|
||||||
|
UpdateCheckStates();
|
||||||
|
control.Focus();
|
||||||
|
Update();
|
||||||
|
EditSelected();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnRemove_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (Selected != null)
|
||||||
|
{
|
||||||
|
manager.UnregisterHotkey(Selected.Setting);
|
||||||
|
HotkeySelectionControl hsc = FindSelectionControl(Selected.Setting);
|
||||||
|
if (hsc != null) flpHotkeys.Controls.Remove(hsc);
|
||||||
|
Selected = null;
|
||||||
|
UpdateButtons();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnEdit_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
EditSelected();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnDuplicate_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (Selected != null)
|
||||||
|
{
|
||||||
|
HotkeySettings hotkeySetting = new HotkeySettings();
|
||||||
|
hotkeySetting.TaskSettings = Selected.Setting.TaskSettings.Copy();
|
||||||
|
hotkeySetting.TaskSettings.WatchFolderEnabled = false;
|
||||||
|
hotkeySetting.TaskSettings.WatchFolderList = new List<WatchFolderSettings>();
|
||||||
|
manager.Hotkeys.Add(hotkeySetting);
|
||||||
|
HotkeySelectionControl control = AddHotkeySelectionControl(hotkeySetting);
|
||||||
|
control.Selected = true;
|
||||||
|
Selected = control;
|
||||||
|
UpdateCheckStates();
|
||||||
|
control.Focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnReset_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
manager.ResetHotkeys();
|
||||||
|
AddControls();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
|
@ -117,55 +117,211 @@
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
<data name="hmHotkeys.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="btnDuplicate.Enabled" type="System.Boolean, mscorlib">
|
||||||
<value>534, 412</value>
|
<value>False</value>
|
||||||
</data>
|
|
||||||
<data name=">>$this.Type" xml:space="preserve">
|
|
||||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</data>
|
</data>
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
<data name="hmHotkeys.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
<data name="btnDuplicate.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||||
<value>Fill</value>
|
<value>NoControl</value>
|
||||||
</data>
|
</data>
|
||||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
<data name="hmHotkeys.TabIndex" type="System.Int32, mscorlib">
|
<data name="btnDuplicate.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>0</value>
|
<value>224, 8</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
<data name="btnDuplicate.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>534, 412</value>
|
<value>72, 23</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="hmHotkeys.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="btnDuplicate.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>0, 0</value>
|
<value>9</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
<data name="btnDuplicate.Text" xml:space="preserve">
|
||||||
<value>6, 13</value>
|
<value>Duplicate</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>hmHotkeys.Type" xml:space="preserve">
|
<data name=">>btnDuplicate.Name" xml:space="preserve">
|
||||||
<value>ShareX.HotkeyManagerControl, ShareX, Version=9.4.0.0, Culture=neutral, PublicKeyToken=null</value>
|
<value>btnDuplicate</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="$this.Text" xml:space="preserve">
|
<data name=">>btnDuplicate.Type" xml:space="preserve">
|
||||||
<value>ShareX - Hotkey settings</value>
|
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>hmHotkeys.ZOrder" xml:space="preserve">
|
<data name=">>btnDuplicate.Parent" xml:space="preserve">
|
||||||
<value>0</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>hmHotkeys.Parent" xml:space="preserve">
|
|
||||||
<value>$this</value>
|
<value>$this</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>$this.Name" xml:space="preserve">
|
<data name=">>btnDuplicate.ZOrder" xml:space="preserve">
|
||||||
<value>HotkeySettingsForm</value>
|
<value>0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="$this.MinimumSize" type="System.Drawing.Size, System.Drawing">
|
<data name="btnReset.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||||
<value>550, 200</value>
|
<value>Top, Right</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
<data name="btnReset.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||||
<value>CenterScreen</value>
|
<value>NoControl</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>hmHotkeys.Name" xml:space="preserve">
|
<data name="btnReset.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>hmHotkeys</value>
|
<value>385, 8</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnReset.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>144, 23</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnReset.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>10</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnReset.Text" xml:space="preserve">
|
||||||
|
<value>Restore default hotkeys</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnReset.Name" xml:space="preserve">
|
||||||
|
<value>btnReset</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnReset.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnReset.Parent" xml:space="preserve">
|
||||||
|
<value>$this</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnReset.ZOrder" xml:space="preserve">
|
||||||
|
<value>1</value>
|
||||||
|
</data>
|
||||||
|
<data name="flpHotkeys.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||||
|
<value>Top, Bottom, Left, Right</value>
|
||||||
|
</data>
|
||||||
|
<data name="flpHotkeys.AutoScroll" type="System.Boolean, mscorlib">
|
||||||
|
<value>True</value>
|
||||||
|
</data>
|
||||||
|
<data name="flpHotkeys.FlowDirection" type="System.Windows.Forms.FlowDirection, System.Windows.Forms">
|
||||||
|
<value>TopDown</value>
|
||||||
|
</data>
|
||||||
|
<data name="flpHotkeys.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>8, 35</value>
|
||||||
|
</data>
|
||||||
|
<data name="flpHotkeys.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>520, 373</value>
|
||||||
|
</data>
|
||||||
|
<data name="flpHotkeys.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>11</value>
|
||||||
|
</data>
|
||||||
|
<data name="flpHotkeys.WrapContents" type="System.Boolean, mscorlib">
|
||||||
|
<value>False</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>flpHotkeys.Name" xml:space="preserve">
|
||||||
|
<value>flpHotkeys</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>flpHotkeys.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>flpHotkeys.Parent" xml:space="preserve">
|
||||||
|
<value>$this</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>flpHotkeys.ZOrder" xml:space="preserve">
|
||||||
|
<value>2</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnEdit.Enabled" type="System.Boolean, mscorlib">
|
||||||
|
<value>False</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnEdit.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||||
|
<value>NoControl</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnEdit.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>80, 8</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnEdit.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>72, 23</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnEdit.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>7</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnEdit.Text" xml:space="preserve">
|
||||||
|
<value>Edit...</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnEdit.Name" xml:space="preserve">
|
||||||
|
<value>btnEdit</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnEdit.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnEdit.Parent" xml:space="preserve">
|
||||||
|
<value>$this</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnEdit.ZOrder" xml:space="preserve">
|
||||||
|
<value>3</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnRemove.Enabled" type="System.Boolean, mscorlib">
|
||||||
|
<value>False</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnRemove.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||||
|
<value>NoControl</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnRemove.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>152, 8</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnRemove.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>72, 23</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnRemove.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>8</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnRemove.Text" xml:space="preserve">
|
||||||
|
<value>Remove</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnRemove.Name" xml:space="preserve">
|
||||||
|
<value>btnRemove</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnRemove.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnRemove.Parent" xml:space="preserve">
|
||||||
|
<value>$this</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnRemove.ZOrder" xml:space="preserve">
|
||||||
|
<value>4</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnAdd.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||||
|
<value>NoControl</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnAdd.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>8, 8</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnAdd.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>72, 23</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnAdd.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>6</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnAdd.Text" xml:space="preserve">
|
||||||
|
<value>Add...</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnAdd.Name" xml:space="preserve">
|
||||||
|
<value>btnAdd</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnAdd.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnAdd.Parent" xml:space="preserve">
|
||||||
|
<value>$this</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnAdd.ZOrder" xml:space="preserve">
|
||||||
|
<value>5</value>
|
||||||
</data>
|
</data>
|
||||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||||
|
<value>6, 13</value>
|
||||||
|
</data>
|
||||||
|
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>536, 415</value>
|
||||||
|
</data>
|
||||||
|
<data name="$this.MinimumSize" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>552, 200</value>
|
||||||
|
</data>
|
||||||
|
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||||
|
<value>CenterScreen</value>
|
||||||
|
</data>
|
||||||
|
<data name="$this.Text" xml:space="preserve">
|
||||||
|
<value>ShareX - Hotkey settings</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>$this.Name" xml:space="preserve">
|
||||||
|
<value>HotkeySettingsForm</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>$this.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
|
@ -120,4 +120,19 @@
|
||||||
<data name="$this.Text" xml:space="preserve">
|
<data name="$this.Text" xml:space="preserve">
|
||||||
<value>ShareX - Kısayol ayarları</value>
|
<value>ShareX - Kısayol ayarları</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="btnAdd.Text" xml:space="preserve">
|
||||||
|
<value>Ekle...</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnDuplicate.Text" xml:space="preserve">
|
||||||
|
<value>Çoğalt</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnEdit.Text" xml:space="preserve">
|
||||||
|
<value>Düzenle...</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnRemove.Text" xml:space="preserve">
|
||||||
|
<value>Kaldır</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnReset.Text" xml:space="preserve">
|
||||||
|
<value>Varsayılan kısayollara dön</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -185,12 +185,6 @@
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="HotkeyInfo.cs" />
|
<Compile Include="HotkeyInfo.cs" />
|
||||||
<Compile Include="Controls\HotkeyManagerControl.cs">
|
|
||||||
<SubType>UserControl</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Controls\HotkeyManagerControl.Designer.cs">
|
|
||||||
<DependentUpon>HotkeyManagerControl.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Controls\HotkeySelectionControl.cs">
|
<Compile Include="Controls\HotkeySelectionControl.cs">
|
||||||
<SubType>UserControl</SubType>
|
<SubType>UserControl</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -240,9 +234,6 @@
|
||||||
<Compile Include="WatchFolder.cs" />
|
<Compile Include="WatchFolder.cs" />
|
||||||
<Compile Include="WatchFolderManager.cs" />
|
<Compile Include="WatchFolderManager.cs" />
|
||||||
<Compile Include="WatchFolderSettings.cs" />
|
<Compile Include="WatchFolderSettings.cs" />
|
||||||
<EmbeddedResource Include="Controls\HotkeyManagerControl.tr.resx">
|
|
||||||
<DependentUpon>HotkeyManagerControl.cs</DependentUpon>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="Controls\HotkeySelectionControl.tr.resx">
|
<EmbeddedResource Include="Controls\HotkeySelectionControl.tr.resx">
|
||||||
<DependentUpon>HotkeySelectionControl.cs</DependentUpon>
|
<DependentUpon>HotkeySelectionControl.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
@ -335,9 +326,6 @@
|
||||||
<EmbeddedResource Include="Forms\WatchFolderForm.resx">
|
<EmbeddedResource Include="Forms\WatchFolderForm.resx">
|
||||||
<DependentUpon>WatchFolderForm.cs</DependentUpon>
|
<DependentUpon>WatchFolderForm.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Controls\HotkeyManagerControl.resx">
|
|
||||||
<DependentUpon>HotkeyManagerControl.cs</DependentUpon>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="Controls\HotkeySelectionControl.resx">
|
<EmbeddedResource Include="Controls\HotkeySelectionControl.resx">
|
||||||
<DependentUpon>HotkeySelectionControl.cs</DependentUpon>
|
<DependentUpon>HotkeySelectionControl.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
|
|
@ -91,21 +91,25 @@ public bool IsRefreshable
|
||||||
|
|
||||||
if (isRefreshable)
|
if (isRefreshable)
|
||||||
{
|
{
|
||||||
gbUserAccount.Size = new Size(320, 230);
|
gbUserAccount.Size = defaultGroupBoxSize;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gbUserAccount.Size = new Size(320, 198);
|
gbUserAccount.Size = smallGroupBoxSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
btnRefreshAuthorization.Visible = isRefreshable;
|
btnRefreshAuthorization.Visible = isRefreshable;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Size defaultGroupBoxSize, smallGroupBoxSize;
|
||||||
|
|
||||||
public OAuthControl()
|
public OAuthControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Status = OAuthLoginStatus.LoginRequired;
|
Status = OAuthLoginStatus.LoginRequired;
|
||||||
|
defaultGroupBoxSize = gbUserAccount.Size;
|
||||||
|
smallGroupBoxSize = new Size(defaultGroupBoxSize.Width, (int)(defaultGroupBoxSize.Height / 1.16f));
|
||||||
IsRefreshable = true;
|
IsRefreshable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue