-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation. Allow to self-define hot key.
- Loading branch information
Showing
6 changed files
with
440 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Documentation of Quick-ScreenShot | Quick-ScreenShot文档</title> | ||
<style> | ||
</style> | ||
|
||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/markdown.css"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/highlight.css"> | ||
<style> | ||
body { | ||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif; | ||
font-size: 14px; | ||
line-height: 1.6; | ||
} | ||
</style> | ||
<style> | ||
.task-list-item { list-style-type: none; } .task-list-item-checkbox { margin-left: -20px; vertical-align: middle; } | ||
</style> | ||
|
||
|
||
|
||
</head> | ||
<body class="vscode-body vscode-light"> | ||
<h1 id="documentation-of-quick-screenshot--quick-screenshot文档">Documentation of Quick-ScreenShot | Quick-ScreenShot文档</h1> | ||
<p>Quick-ScreenShot is a desktop application allows user to get screenshot quickly and save it automatically.</p> | ||
<p>Quick-ScreenShot是允许用户快速获取截屏并自动保存的桌面应用。</p> | ||
<h2 id="basic-usage--基本使用">Basic Usage | 基本使用</h2> | ||
<ol> | ||
<li> | ||
<p>Click "Start" button.</p> | ||
</li> | ||
<li> | ||
<p>While need to get a screenshot, press Ctrl+Alt+A and the screenshot will be catched and saved.</p> | ||
</li> | ||
<li> | ||
<p>Click "Stop" button to stop.</p> | ||
</li> | ||
<li> | ||
<p>Click "Open" button to show the screenshots.</p> | ||
</li> | ||
<li> | ||
<p>点击“Start”按钮。</p> | ||
</li> | ||
<li> | ||
<p>当需要截屏时,同时按下Ctrl+Alt+A。</p> | ||
</li> | ||
<li> | ||
<p>点击“Stop”按钮停止自动捕获。</p> | ||
</li> | ||
<li> | ||
<p>点击“Open”按钮打开文件存储的位置。</p> | ||
</li> | ||
</ol> | ||
<h2 id="advanced-usage--进阶使用">Advanced Usage | 进阶使用</h2> | ||
<ol> | ||
<li> | ||
<p>Click "Select" to change the save floder.</p> | ||
</li> | ||
<li> | ||
<p>Choose hot keys. Remember that you can choose at most 3 keys and end your combination key with a non-modifier key (keys except Ctrl, Shift, Alt). And you can only set 1 non-modifier key.</p> | ||
</li> | ||
<li> | ||
<p>点击“Select”按钮改变存储文件夹。</p> | ||
</li> | ||
<li> | ||
<p>选择热键。用户最多可设置由3个键组成的组合键。组合键必须以非修改键(Ctrl、Shift、Alt以外的键)结束,且组合键只能包含1个非修改键。</p> | ||
</li> | ||
</ol> | ||
<h2 id="about--关于">About | 关于</h2> | ||
<p>This tools is developed by He Lingfeng. View source at <a href="https://github.com/Hedaozi/Quick-ScreenShot">https://github.com/Hedaozi/Quick-ScreenShot</a>. Click "View" button to open the web page in your default browser.</p> | ||
<p>本工具由何凌锋开发。在https://github.com/Hedaozi/Quick-ScreenShot 可以查看源代码。点击“View”按钮即可在默认浏览器中打开该网页。</p> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Documentation of Quick-ScreenShot | Quick-ScreenShot文档 | ||
|
||
Quick-ScreenShot is a desktop application allows user to get screenshot quickly and save it automatically. | ||
|
||
Quick-ScreenShot是允许用户快速获取截屏并自动保存的桌面应用。 | ||
|
||
## Basic Usage | 基本使用 | ||
|
||
1. Click "Start" button. | ||
2. While need to get a screenshot, press Ctrl+Alt+A and the screenshot will be catched and saved. | ||
3. Click "Stop" button to stop. | ||
4. Click "Open" button to show the screenshots. | ||
|
||
1. 点击“Start”按钮。 | ||
2. 当需要截屏时,同时按下Ctrl+Alt+A。 | ||
3. 点击“Stop”按钮停止自动捕获。 | ||
4. 点击“Open”按钮打开文件存储的位置。 | ||
|
||
## Advanced Usage | 进阶使用 | ||
|
||
1. Click "Select" to change the save floder. | ||
2. Choose hot keys. Remember that you can choose at most 3 keys and end your combination key with a non-modifier key (keys except Ctrl, Shift, Alt). And you can only set 1 non-modifier key. | ||
|
||
1. 点击“Select”按钮改变存储文件夹。 | ||
2. 选择热键。用户最多可设置由3个键组成的组合键。组合键必须以非修改键(Ctrl、Shift、Alt以外的键)结束,且组合键只能包含1个非修改键。 | ||
|
||
## About | 关于 | ||
|
||
This tools is developed by He Lingfeng. View source at https://github.com/Hedaozi/Quick-ScreenShot. Click "View" button to open the web page in your default browser. | ||
|
||
本工具由何凌锋开发。在https://github.com/Hedaozi/Quick-ScreenShot 可以查看源代码。点击“View”按钮即可在默认浏览器中打开该网页。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
using System; | ||
using System.Windows; | ||
using System.Windows.Forms; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace QucikScreenShot | ||
{ | ||
public partial class MainWindow : Window | ||
{ | ||
static class HotKey | ||
{ | ||
public static readonly Dictionary<string, Keys> ModifierKeys = | ||
new Dictionary<string, Keys>() | ||
{ | ||
{ "Ctrl", Keys.Control }, | ||
{ "Alt", Keys.Alt }, | ||
{ "Shift", Keys.Shift } | ||
}; | ||
|
||
public static readonly Dictionary<string, Keys> FunctionKeys = | ||
new Dictionary<string, Keys>() | ||
{ | ||
{ "F1", Keys.F1 }, | ||
{ "F2", Keys.F2 }, | ||
{ "F3", Keys.F3 }, | ||
{ "F4", Keys.F4 }, | ||
{ "F5", Keys.F5 }, | ||
{ "F6", Keys.F6 }, | ||
{ "F7", Keys.F7 }, | ||
{ "F8", Keys.F8 }, | ||
{ "F9", Keys.F9 }, | ||
{ "F10", Keys.F10 }, | ||
{ "F11", Keys.F11 }, | ||
{ "F12", Keys.F12 }, | ||
{ "Esc", Keys.Escape }, | ||
{ "Print Screen", Keys.PrintScreen }, | ||
{ "Scroll Lock", Keys.Scroll }, | ||
{ "Pause", Keys.Pause }, | ||
{ "Insert", Keys.Insert }, | ||
{ "Home", Keys.Home }, | ||
{ "End", Keys.End }, | ||
{ "Delete", Keys.Delete }, | ||
{ "Page Up", Keys.PageUp }, | ||
{ "Page Down", Keys.PageDown }, | ||
{ "Num Lock", Keys.NumLock }, | ||
{ "Caps Lock", Keys.CapsLock }, | ||
{ "Tab", Keys.Tab } | ||
}; | ||
|
||
public static readonly Dictionary<string, Keys> LetterKeys = | ||
new Dictionary<string, Keys>() | ||
{ | ||
{ "Q", Keys.Q }, | ||
{ "W", Keys.W }, | ||
{ "E", Keys.E }, | ||
{ "R", Keys.R }, | ||
{ "T", Keys.T }, | ||
{ "Y", Keys.Y }, | ||
{ "U", Keys.U }, | ||
{ "I", Keys.I }, | ||
{ "O", Keys.O }, | ||
{ "P", Keys.P }, | ||
{ "A", Keys.A }, | ||
{ "S", Keys.S }, | ||
{ "D", Keys.D }, | ||
{ "F", Keys.F }, | ||
{ "G", Keys.G }, | ||
{ "H", Keys.H }, | ||
{ "J", Keys.J }, | ||
{ "K", Keys.K }, | ||
{ "L", Keys.L }, | ||
{ "Z", Keys.Z }, | ||
{ "X", Keys.X }, | ||
{ "C", Keys.C }, | ||
{ "V", Keys.V }, | ||
{ "B", Keys.B }, | ||
{ "N", Keys.N }, | ||
{ "M", Keys.M } | ||
}; | ||
|
||
public static readonly Dictionary<string, Keys> NumberKeys = | ||
new Dictionary<string, Keys>() | ||
{ | ||
{ "1", Keys.D1 }, | ||
{ "2", Keys.D2 }, | ||
{ "3", Keys.D3 }, | ||
{ "4", Keys.D4 }, | ||
{ "5", Keys.D5 }, | ||
{ "6", Keys.D6 }, | ||
{ "7", Keys.D7 }, | ||
{ "8", Keys.D8 }, | ||
{ "9", Keys.D9 }, | ||
{ "0", Keys.D0 } | ||
}; | ||
|
||
public static readonly Dictionary<string, Keys> SymbolKeys = | ||
new Dictionary<string, Keys>() | ||
{ | ||
{ "`", Keys.Oemtilde }, | ||
//{ "-", Keys.Subtract }, // cannot | ||
//{ "=", Keys.Add }, // cannot | ||
{ "{", Keys.OemOpenBrackets }, | ||
{ "}", Keys.OemCloseBrackets }, | ||
//{ "\\", Keys.OemBackslash }, // cannot | ||
{ ";", Keys.OemSemicolon }, | ||
{ "'", Keys.OemQuotes }, | ||
{ ",", Keys.Oemcomma }, | ||
{ ".", Keys.OemPeriod }//, | ||
//{ "/", Keys.D8 } // cannot | ||
}; | ||
|
||
public static readonly Dictionary<string, Keys> SpecialKeys = | ||
new Dictionary<string, Keys>() | ||
{ | ||
{ "BackSpace", Keys.Back }, | ||
{ "Enter", Keys.Enter }, | ||
{ "SpaceBar", Keys.Space } | ||
}; | ||
|
||
public static Keys StringToKeys(string keyName) | ||
{ | ||
if (ModifierKeys.ContainsKey(keyName)) | ||
{ | ||
return ModifierKeys[keyName]; | ||
} | ||
else if (FunctionKeys.ContainsKey(keyName)) | ||
{ | ||
return FunctionKeys[keyName]; | ||
} | ||
else if (LetterKeys.ContainsKey(keyName)) | ||
{ | ||
return LetterKeys[keyName]; | ||
} | ||
else if (NumberKeys.ContainsKey(keyName)) | ||
{ | ||
return NumberKeys[keyName]; | ||
} | ||
else if (SymbolKeys.ContainsKey(keyName)) | ||
{ | ||
return SymbolKeys[keyName]; | ||
} | ||
else | ||
{ | ||
return SpecialKeys[keyName]; | ||
} | ||
} | ||
|
||
public static List<string> AllKeys() | ||
{ | ||
List<string> allKeys = new List<string>(ModifierKeys.Keys); | ||
allKeys.AddRange(FunctionKeys.Keys); | ||
allKeys.AddRange(LetterKeys.Keys); | ||
allKeys.AddRange(NumberKeys.Keys); | ||
allKeys.AddRange(SymbolKeys.Keys); | ||
allKeys.AddRange(SpecialKeys.Keys); | ||
return allKeys; | ||
} | ||
|
||
public static List<string> SubKeys(string key, bool allowModifier) | ||
{ | ||
List<string> subKeys = new List<string>(); | ||
if (allowModifier && ModifierKeys.ContainsKey(key)) | ||
{ | ||
subKeys.AddRange(ModifierKeys.Keys); | ||
subKeys.Remove(key); | ||
} | ||
subKeys.AddRange(FunctionKeys.Keys); | ||
subKeys.AddRange(LetterKeys.Keys); | ||
subKeys.AddRange(NumberKeys.Keys); | ||
subKeys.AddRange(SymbolKeys.Keys); | ||
subKeys.AddRange(SpecialKeys.Keys); | ||
return subKeys; | ||
} | ||
|
||
public static bool IsModifierKeys(string key) | ||
{ | ||
return ModifierKeys.ContainsKey(key); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.