Commit Graph
29 Commits
Author SHA1 Message Date
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 4c49f1b736 Make the previous portable mode as default
- change dir name to "ss_win_temp" to make things clear.
- throw any exception caught when creating temp folder

To workaround silly cleaning softwares and careless users.

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2017-01-11 14:05:11 +08:00
noisyfox 41827f283e Refine code 2016-11-23 03:22:00 +11:00
noisyfox c908caa584 Use OpenRegKey 2016-11-06 01:25:22 +11:00
noisyfox aa9fd8ec06 Check .NET Framework version on startup 2016-11-05 23:23:04 +11:00
Syrone Wong 217e818339 Cleanup
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-10-26 16:50:28 +08:00
Syrone Wong 4b99a5c210 Make registry opening more generic
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-10-20 08:05:25 +08:00
Syrone Wong 70bff7d7cc Use wininet API to setup system proxy
Get rid of tricky registry handling

Several files come from https://code.msdn.microsoft.com/windowsapps/CSWebBrowserWithProxy-c8535715/view/SourceCode

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-10-06 16:12:35 +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
破娃酱 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
Noisyfox a1eef6eac1 Multiple instances of ss_privoxy (#665)
* Use job object to manage polipo service's external processes.

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

* Only kill those ss_privoxy.exe created by this ss instance.

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

* Update README

Signed-off-by: noisyfox <timemanager.rick@gmail.com>
2016-08-18 19:31:01 +08:00
Syrone Wong ddb7374432 Refine Windows registry again(#512)
Used a method added in .NET 4, user may not have
this version installed, reverting to an older
method seems to be a better solution.

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-08-17 11:13:35 +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 d67b94c76b Minor changes
- Revert UncompressFile() changes
- Simplify code

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-08-13 18:12:11 +08:00
Syrone Wong 6a26436850 Refine Windows registry handling(#512)
- Added a util function to handle x86 and x64
  currently, we only handle keys in HKCU
- Close registry key after operations

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-08-10 17:42:37 +08:00
Syrone Wong 0494f95fbb Merge branch 'log_connect_to' of https://github.com/kimw/shadowsocks-windows into kimw-log_connect_to 2016-08-05 15:42:14 +08:00
Allen Zhu b0f71c43f5 Add traffic chart and traffic icon support (#595)
* Implement the line chart on Log View window for inbound/outbound traffic per second

* Implement dynamic tray icon to indicate Inbound and Outbound

* Refine linechart

* Bugfix for dynamic icon

* Refine chart presentation

* Change the data points' type for more accurate calculation

* Tweak inbound/outbound indicator image for tray icon
2016-08-04 17:32:56 +08:00
kimw 4b3ec38691 featured print "connect to hostname:port" to log 2016-05-15 01:34:28 -04:00
kimw 6f38bbb1d3 fixed 0 bytes will not show up, and, corrected function name 2016-01-05 04:49:17 +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
kimw 2cce646700 featured show bandwidth in log form's title 2016-01-04 23:21:53 +08:00
kimw 0b16ef7445 Merge upstream
# Conflicts:
#	README.md
#	shadowsocks-csharp/Controller/Service/AvailabilityStatistics.cs
#	shadowsocks-csharp/Controller/Service/PACServer.cs
#	shadowsocks-csharp/Controller/Strategy/SimplyChooseByStatisticsStrategy.cs
#	shadowsocks-csharp/Data/cn.txt
#	shadowsocks-csharp/Model/Configuration.cs
#	shadowsocks-csharp/Model/LogViewerConfig.cs
#	shadowsocks-csharp/View/LogForm.Designer.cs
#	shadowsocks-csharp/View/LogForm.cs
#	shadowsocks-csharp/View/MenuViewController.cs
2016-01-04 09:14:55 +08:00
kimw 0a733c61b8 fixed: standardize Logging usage
1. Add Logging.Info()
2. Console.WriteLine() -> Logging.Info()
3. Console.WriteLine() in exceptions -> Logging.LogUsefulException()
2015-09-14 14:58:46 +08:00
clowwindy 765720dbd9 small fix 2015-08-19 21:51:28 -07:00
clowwindy c767f55b3c add portable mode 2015-08-19 21:39:06 -07:00
clowwindy 71bd0d2b5a improve user experience for some users 2015-08-18 04:26:11 -07:00
clowwindy a0a5cafe3d lint code 2015-01-08 21:57:51 +08:00
clowwindy 09ad2ca272 release memory periodically 2014-11-18 21:55:45 +08:00