Commit Graph
288 Commits
Author SHA1 Message Date
SharerMax acc192df34 Remove useless code 2017-10-11 01:04:55 +08:00
SharerMax eae0b1cfac Add option to show password 2017-10-11 01:00:24 +08:00
celeron533 a4c4967f5f Rename GetQRCode() to GetServerURL() 2017-09-25 20:24:15 +08:00
celeron533 05df449826 Add notification message 2017-09-05 22:31:54 +08:00
Raif Atef f04b497d79 SIP002 and SIP003 support 2017-08-14 11:48:41 +02:00
Allen Zhu 84b69d3dff Chart Refactor (#1019)
* Rename variable 'traffic' to 'trafficPerSecondQueue' and 'trafficInfoQueue'

* Remove class QueueLast<T> by using linq Queue.Last()

* Slight changes, such as rename, move several variables from function domain to class domain to improve performance.
Logic remains the same.

* Update the logic of copying queue from Controller to View.

* Move the TrafficInfo declaration into LogForm class

Overwise, the VS UI designer does not work.
2017-03-31 22:21:01 +08:00
Syrone Wong 7408a75f0e drop OTA; add AEAD config 2017-03-31 22:04:41 +08:00
破娃酱 b266bf42f5 create "help" menu group (#989) 2017-01-08 08:44:49 +08:00
破娃酱 18e956f34c not set alpha of the icon (#981) 2017-01-02 15:19:23 +08:00
Syrone Wong d21162318e Workaround NotifyIcon's 63 chars limit(#965)
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-12-23 21:41:11 +08:00
noisyfox a447feece2 Adjust qrcode display 2016-12-13 20:43:51 +11:00
noisyfox 2a0dd88525 Add import URL from clipboard 2016-12-13 02:52:58 +11:00
noisyfox b972cb250b Don't zoom QRCode 2016-12-13 02:31:01 +11:00
noisyfox f363b94fd6 Show ss URL in QRCode form 2016-12-13 02:22:37 +11:00
noisyfox 8a68a3515b Check server url before saving it
Don't clear the textbox, focus it instead. We want the user to see the wrong input instead of a blank textbox.
2016-12-10 01:50:28 +11:00
noisyfox 76fbd808e3 Add menu item to copy local pac url 2016-12-10 01:26:40 +11:00
noisyfox 264b91d6b0 Fix a problem that forward proxy settings are saved twice
Fix #926
2016-12-09 02:05:42 +11:00
noisyfox 22d8cdeff7 Add secret in local pac url. 2016-12-08 18:13:22 +11:00
noisyfox 65b9c9f5fa Allow check pre-release version 2016-12-06 22:01:00 +11: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
noisyfox 86eeba3b7d Fix crash while showing config dialog.
If user manually deleted servers from gui-config.json
2016-11-21 13:50:15 +11:00
Syrone Wong c25e70e888 hotkey: Refine system proxy mode switching logic
Merge 'Switch to PAC' and 'Switch to Global'

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-11-15 18:14:56 +08:00
noisyfox b63bab0d1a Refine LogViewerConfig. Don't store window size in main settings file 2016-11-15 04:23:59 +11:00
Syrone Wong 131114f0c2 Fix #779
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-10-12 09:36:17 +08:00
Syrone Wong af139d7587 Only integer is allowed for timeout
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-10-07 08:57:55 +08:00
Syrone Wong 04ed25e16f Add timeout support for server and forward proxy
Also, fix typo in ProxyForm

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-10-06 21:03:45 +08:00
Syrone Wong 6e8d6d3d21 Adjust garbage collection
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-30 15:15:39 +08:00
Syrone Wong 46d95e7411 Get rid of lock(this)
- Use readonly object as lock

Info from stackoverflow:

If I want to be sure that it will be locked for all threads inside my
application:
The lock object has to be static, if it locks access to static state.
Otherwise it has to be instance, because there's no need to lock state of
one class instance, and prevent other threads to work with another class
instance at the same time.

everyone says that the object has to be "readonly" I didn't found the
reason
Well, it doesn't have to be. This is just a best practice, which helps you
to avoid errors.

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-29 16:39:58 +08:00
Noisyfox 35fc73b58b Add HTTP proxy support in forward proxy (#745)
* Add HTTP proxy support in forward proxy

Signed-off-by: noisyfox <timemanager.rick@gmail.com>

* Typo

* Throw exception if forward proxy not supported.
2016-09-24 23:37:24 -05:00
Syrone Wong 8cf582803d Fix #740
>_<

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-22 08:40:22 +08:00
Syrone Wong c671c7c32d Add easter egg
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-21 20:00:55 +08:00
Syrone Wong b10f7cb3a6 Refine duplicate behaviour in ConfigForm
- Use insert instead and move to newly inserted
  item instead of the last one after operation

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-20 08:43:34 +08:00
Syrone Wong ef17b72d25 Refine PR #730
Squashed commit of the following:

commit 48eb4d88391b85986190ace825ec0a167df16f8a
Author: Syrone Wong <wong.syrone@gmail.com>
Date:   Sun Sep 18 15:46:09 2016 +0800

    Drop useless interface impl

    Signed-off-by: Syrone Wong <wong.syrone@gmail.com>

commit c0a4f3421a
Author: Logan Zhou <xorcererzc@gmail.com>
Date:   Sun Sep 18 00:58:02 2016 +0800

    Revert "Updated to meet the hint from Wongsyrone."

    This reverts commit 84c8053577.

commit 84c8053577
Author: Logan Zhou <xorcererzc@gmail.com>
Date:   Sun Sep 18 00:52:21 2016 +0800

    Updated to meet the hint from Wongsyrone.

commit 333ccb6d1f
Author: Logan Zhou <xorcererzc@gmail.com>
Date:   Sun Sep 18 00:34:52 2016 +0800

    Added duplicate button to config form.

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-18 16:06:00 +08:00
破娃酱 fabe270813 Resize the button 2016-09-17 20:22:29 +08:00
破娃酱 db626dac42 set AutoScaleMode is DPI 2016-09-17 19:27:52 +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
破娃酱 7586739a52 remove all tuple (#718) 2016-09-15 22:02:55 -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 be63f96d50 Merge branch 'proxy-form' 2016-09-15 10:21:52 +08:00
破娃酱 836a58775f optimize LogMessageTextBox (#719)
* optimize LogMessageTextBox

* StringBuilder instead
2016-09-14 21:14:33 -05:00
Syrone Wong c1ec851627 Refine ProxyForm
- Save empty config if null ref
- only save config when clicking OK button

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-15 10:09:04 +08:00
Syrone Wong d3c6039c61 Refine Proxy config
- Move to seperate model

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-14 23:19:39 +08:00
破娃酱 2a6da8af3f smooth traffic chart lines (#709) 2016-09-11 06:32:37 +08:00
破娃酱 59c315d465 new traffic chart style (#704)
* new traffic chart style
- remove invoke
- force to set AxisY.Maximum not zero
- format LogForm.cs

* avoid data race
2016-09-08 15:24:46 +08:00
Syrone Wong f8c9bdda12 Drop redundant type casting
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-08 08:20:12 +08:00
破娃酱 707442163d New traffic icon style (#703) 2016-09-07 20:00:31 +08:00
破娃酱 d958c5c393 fix bandwidthScale of the LogForm (#701)
- Revert bandwidthScale when throughput gets smaller
- Don't save coordinates when LogForm is minimized. Otherwise, we get negative values
- activate ConfigForm & ProxyForm & LogForm
2016-09-06 18:46:35 +08:00
Syrone Wong 514bb02098 Fix config selection
User wants to use that server after selected it in the ConfigForm. If user deletes
the server in use, we can't find its index, then the previous logic will revert to
index 0, which is not expected behaviour.

Since we handled 'ServersListBox.SelectedIndex' in various event handlers, we can
trust it all the time.

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-04 08:04:56 +08:00