* 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.
- 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>
- Revert bandwidthScale when throughput gets smaller
- Don't save coordinates when LogForm is minimized. Otherwise, we get negative values
- activate ConfigForm & ProxyForm & LogForm
* Drop unused variable to suppress warning in LogForm
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
* Fix IPv6 displaying
It is a little ugly, send a PR if you can find a better way.
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
This exception is caused by processing Invoke Action while trafficChart is already disposed.
=====
Exception reproduce frequency: RARE. Once triggered, ShadowSocks crashes.
* 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