56 Commits
Author SHA1 Message Date
celeron533 c24714e168 Simplify SystemEvents_PowerModeChanged() 2017-12-03 21:11:41 +08:00
noisyfox 41827f283e Refine code 2016-11-23 03:22:00 +11:00
noisyfox e7b559f1da Refine code 2016-11-23 02:42:12 +11:00
noisyfox 63816ccdd1 Fix hotkey unregister issue.
Use singleton mode for hotkey callbacks.
2016-11-23 02:34:07 +11:00
Syrone Wong abcf3004ac Detach static event handler before exiting
I hope this is the last one.

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-11-12 10:42:19 +08:00
Syrone Wong 199c204b5d Misc
- detach event handler before exiting
- eliminate UI and non-UI exception handling race
- rework exception message

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-11-10 08:45:13 +08:00
noisyfox a16e80743c Open .net download page automatically 2016-11-06 00:59:03 +11:00
noisyfox aa9fd8ec06 Check .NET Framework version on startup 2016-11-05 23:23:04 +11:00
Syrone Wong f06f6f2fbb Refine power mode handling
- enlarge timeout to 10 seconds
- detach event handler before exiting
- output log if success

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-10-24 08:27:49 +08:00
Syrone Wong 9c438ee745 Misc
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-10-21 08:17:28 +08:00
Syrone Wong 74ad98d9ce Distinguish unhandled error type
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-10-12 07:40:42 +08:00
Syrone Wong e099e92d1a Fix typo
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-10-08 14:13:08 +08:00
Syrone Wong ebc8d9c5bd Catch more exceptions
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-10-07 10:11:32 +08:00
Syrone Wong 433c3bfbcc Delay 5 seconds to start controller when OS is about to resume
Workaround for slow computers

Credit to GangZhou's code

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-17 13:24:30 +08:00
Syrone Wong 99bdec334c Add global hotkey support (#724)
Design:

Use the plain string for both config and hotkey parsing
and make use of KeyConverter, ModifierKeysConverter
to make it more rubust.

Find corresponding label (to display operation result) and callback (to do the real work) based on textbox name. In this case, they should be named as `<Feature-Name><Control-Name>`.

ShowLogsTextBox,
ShowLogsLabel,
ShowLogsCallback.

If this requirement doesn't meet, throw an exception at runtime.

Logic:

How to input keys:
1. put focus in the corresponding textbox
2. press the key combination you want to use
3. when you think it is ready, release all keys
4. the textbox shows your input

How to change keys:
1. put focus in the corresponding textbox
2. press BackSpace to clear content
3. re-input new one

How to deactivate:
1. clear content in the textbox
2. press OK button

Meaning of label color:
- Green: this combination is not occupied by other programs and register successfully
- Yellow: this combination is occupied by other programs and you have to change to another one
- Transparent without color: initial status

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-16 23:42:16 -05:00
Syrone Wong 33b2ca8c8a Refactor
- Only use one instance of LogForm

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-16 00:47:05 +08:00
Syrone Wong ab464ca8b1 change controller status if needed
- Change controller based on power mode
- Stop before exiting

Based on GangZhuo's code

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-12 16:23:03 +08:00
Syrone Wong 3417a984fa Change requirements
- Running on Windows Vista or above

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-08-17 11:13:25 +08:00
Syrone Wong a9af9fdfc0 Refactor
- use null conditional access in case some connections been
  cancelled unexpectedly and may cause null reference exception
- Refine error message
- use conditional operator to simplify some code

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-08-10 15:27:38 +08:00
Syrone Wong 6a8a09983e Merge fixes from @GangZhuo, close #478 (#638)
Squashed commit of the following:

commit e280c2385c
Merge: 579039f 87aa9eb
Author: Gang Zhuo <gang.zhuo@gmail.com>
Date:   Wed Mar 16 04:02:27 2016 -0400

    Merge remote-tracking branch 'origin/master'

commit 579039fe40
Author: Gang Zhuo <gang.zhuo@gmail.com>
Date:   Fri Mar 4 21:45:23 2016 +0800

    log unhandle exception

commit 8d863f1d5f
Author: Gang Zhuo <gang.zhuo@gmail.com>
Date:   Fri Mar 4 21:44:54 2016 +0800

    fix Availability Statistics

commit b3ce1c698a
Author: Gang Zhuo <gang.zhuo@gmail.com>
Date:   Fri Mar 4 21:07:54 2016 +0800

    tiny refactor

commit 0f7d39e27e
Merge: bd7078a b01aced
Author: Gang Zhuo <gang.zhuo@gmail.com>
Date:   Fri Mar 4 20:02:58 2016 +0800

    Merge remote-tracking branch 'origin/master'

commit bd7078aa4f
Author: Gang Zhuo <gang.zhuo@gmail.com>
Date:   Fri Mar 4 20:01:58 2016 +0800

    tiny refactor

commit 49adb95b6e
Author: Gang Zhuo <gang.zhuo@gmail.com>
Date:   Fri Mar 4 03:44:26 2016 -0500

    log more Ping information for debug

commit 2aa0620ddd
Author: Gang Zhuo <gang.zhuo@gmail.com>
Date:   Fri Mar 4 03:04:10 2016 -0500

    reduce 3rd packages

[solve conflicts and squash to make history clean]
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-08-05 11:05:16 +08:00
kimw 64390d45ac GetTempPath() now supports: return a full path with filename combined which pointed to the temporary directory 2016-01-04 23:56:43 +08:00
10people ca44b52593 Fix error in open log file in debug mode. 2015-11-16 14:48:26 +08:00
clowwindy 71bd0d2b5a improve user experience for some users 2015-08-18 04:26:11 -07:00
clowwindy ab38538b34 allow multiple instances 2015-08-17 19:49:49 -07:00
clowwindy a0a5cafe3d lint code 2015-01-08 21:57:51 +08:00
clowwindy 6192e09970 revert stop call 2015-01-08 21:16:45 +08:00
Gang Zhuo f1c821a9cd call controller.Stop() when application exit 2015-01-07 23:08:25 +08:00
clowwindy e53873276f translate Microsoft language into human language 2014-12-17 17:21:39 +08:00
clowwindy 09ad2ca272 release memory periodically 2014-11-18 21:55:45 +08:00
clowwindy ca0774ddb3 enable visual styles before alert() 2014-11-15 03:21:39 +08:00
clowwindy 7f76141ca2 seperate tray menu from ConfigForm 2014-11-15 03:08:53 +08:00
clowwindy 0d78051318 fix #60 2014-11-13 22:24:51 +08:00
clowwindy b8252d11e4 remove OpenSSL 2014-11-12 23:19:02 +08:00
clowwindy ed2722a993 back to polarssl 2014-11-12 02:24:50 +08:00
clowwindy acf2f807a8 experimental 2014-11-11 20:31:10 +08:00
clowwindy b538a89fdf add openssl 2014-11-11 10:16:30 +08:00
clowwindy afc5137355 some fix 2014-11-11 02:28:12 +08:00
clowwindy 5c2a93e901 use a fixed GUID 2014-11-10 03:02:31 +08:00
wzxjohn ac4748d6bf lint code 2014-11-09 20:41:42 +08:00
clowwindy 492869fd5c move log to temp path 2014-11-09 11:56:30 +08:00
clowwindy 3d6ee55f5a close #17 2014-11-08 15:27:49 +08:00
clowwindy 04a4427cff update namespace 2014-11-08 01:02:50 +08:00
clowwindy 28b582590a update namespace 2014-11-08 01:01:30 +08:00
clowwindy ce6d4964be PAC edit 2014-11-07 21:46:27 +08:00
clowwindy 8c09e4a9a5 remove TODO 2014-11-07 03:12:47 +08:00
clowwindy 32cadc3c18 use different namespace 2014-11-07 03:11:14 +08:00
clowwindy 1de2d001d7 lint project 2014-11-07 01:33:36 +08:00
clowwindy aa105ccfe3 seperate controller and view 2014-11-07 01:26:32 +08:00
clowwindy 53401a4b9b rename ConfigForm 2014-11-06 02:04:36 +08:00
clowwindy 17765a772f embed polarssl into exe 2014-11-06 01:55:37 +08:00