File tree Expand file tree Collapse file tree 6 files changed +28
-1
lines changed
Expand file tree Collapse file tree 6 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ public static async Task<bool> Kill()
7676 return await IsRunning ( async p => p ? . Kill ( ) ) ;
7777 }
7878
79+ public static bool TwiceEsc { get ; set ; } = false ;
7980 public static async Task < bool > Logout ( )
8081 {
8182 return await IsRunning ( async p =>
@@ -85,7 +86,12 @@ public static async Task<bool> Logout()
8586 NativeMethods . Focus ( hwnd ) ;
8687 NativeMethods . CursorCenterPos ( hwnd ) ;
8788 UserSimulator . Input . Keyboard . KeyPress ( VirtualKeyCode . ESCAPE ) ;
88- await JiggingProcessor . Delay ( 950 ) ;
89+ if ( TwiceEsc )
90+ {
91+ await JiggingProcessor . Delay ( 600 ) ;
92+ UserSimulator . Input . Keyboard . KeyPress ( VirtualKeyCode . ESCAPE ) ;
93+ }
94+ await JiggingProcessor . Delay ( 850 ) ;
8995 RECT rect = NativeMethods . GetWindowRECT ( hwnd ) ;
9096 NativeMethods . SetCursorPos ( rect . Left + 20 , rect . Bottom - 30 ) ;
9197 await JiggingProcessor . Delay ( 100 ) ;
Original file line number Diff line number Diff line change 7171 <s : String x : Key =" CancelShutdown" >Cancel Shutdown</s : String >
7272 <s : String x : Key =" ShutdownTimerSettings" >Timed Shutdown Settings</s : String >
7373 <s : String x : Key =" Hour" >hour</s : String >
74+ <s : String x : Key =" SpecialScript" >Special Script</s : String >
75+ <s : String x : Key =" SpecialScript1" >Douleb ESC during logout</s : String >
76+ <s : String x : Key =" SpecialScript1Detail" >When some wood over than 9999, using double ESC for canceling the tips during logout.</s : String >
7477</ResourceDictionary >
Original file line number Diff line number Diff line change 7171 <s : String x : Key =" CancelShutdown" >電源オフをキャンセル</s : String >
7272 <s : String x : Key =" ShutdownTimerSettings" >自動電源オフ設定</s : String >
7373 <s : String x : Key =" Hour" >時間</s : String >
74+ <s : String x : Key =" SpecialScript" >特殊な脚本</s : String >
75+ <s : String x : Key =" SpecialScript1" >ログアウト時にESCを2回</s : String >
76+ <s : String x : Key =" SpecialScript1Detail" >その内の木材が9999に達した時のログアウト時にESCを2回してヒントを消すためである。</s : String >
7477</ResourceDictionary >
Original file line number Diff line number Diff line change 7171 <s : String x : Key =" CancelShutdown" >取消关机</s : String >
7272 <s : String x : Key =" ShutdownTimerSettings" >定时关机设定</s : String >
7373 <s : String x : Key =" Hour" >时</s : String >
74+ <s : String x : Key =" SpecialScript" >特殊脚本</s : String >
75+ <s : String x : Key =" SpecialScript1" >登出时ESC按2次</s : String >
76+ <s : String x : Key =" SpecialScript1Detail" >当组合点里其中一种木材达到9999后,采用登出时ESC按2次便于取消提示框。</s : String >
7477</ResourceDictionary >
Original file line number Diff line number Diff line change @@ -272,6 +272,12 @@ public CountSettingsCase CountSettingsCase
272272 ShutdownTimerSettingsDialogShown = false ;
273273 } ) ;
274274
275+ public bool TwiceEsc
276+ {
277+ get => LaunchCtrl . TwiceEsc ;
278+ set => LaunchCtrl . TwiceEsc = value ;
279+ }
280+
275281 public MainViewModel ( MainWindow source )
276282 {
277283 Source = source ;
Original file line number Diff line number Diff line change 402402 <TextBlock Text ="  " FontSize =" 8" FontFamily =" {StaticResource SegoeFluent}" />
403403 </MenuItem .Icon>
404404 </MenuItem >
405+ <MenuItem Header =" {DynamicResource SpecialScript}" >
406+ <MenuItem .Icon>
407+ <TextBlock Text ="  " FontSize =" 8" FontFamily =" {StaticResource SegoeFluent}" />
408+ </MenuItem .Icon>
409+ <MenuItem Header =" {DynamicResource SpecialScript1}" ToolTip =" {DynamicResource SpecialScript1Detail}" IsChecked =" {Binding TwiceEsc}" IsCheckable =" True" MinWidth =" 200" />
410+ </MenuItem >
405411 <MenuItem Header =" {DynamicResource VisitWebsite}" Command =" {Binding GitHubCommand}" >
406412 <MenuItem .Icon>
407413 <TextBlock Text ="  " FontSize =" 8" FontFamily =" {StaticResource SegoeFluent}" />
You can’t perform that action at this time.
0 commit comments