diff --git a/shadowsocks-csharp/View/LogForm.cs b/shadowsocks-csharp/View/LogForm.cs index c84d6dcc..d45b47b2 100644 --- a/shadowsocks-csharp/View/LogForm.cs +++ b/shadowsocks-csharp/View/LogForm.cs @@ -24,7 +24,6 @@ namespace Shadowsocks.View #region chart List inboundPoints = new List(); List outboundPoints = new List(); - long maxSpeed = 0; Tuple bandwidthScale = new Tuple(0, "B", 1); TextAnnotation inboundAnnotation = new TextAnnotation(); TextAnnotation outboundAnnotation = new TextAnnotation(); @@ -59,6 +58,7 @@ namespace Shadowsocks.View private void controller_TrafficChanged(object sender, EventArgs e) { + long maxSpeed = 0; inboundPoints.Clear(); outboundPoints.Clear(); foreach (var trafficPerSecond in controller.traffic) @@ -218,7 +218,7 @@ namespace Shadowsocks.View config.SetFont(LogMessageTextBox.Font); config.SetBackgroundColor(LogMessageTextBox.BackColor); config.SetTextColor(LogMessageTextBox.ForeColor); - if(!(config.maximized = WindowState == FormWindowState.Maximized)) { + if (WindowState != FormWindowState.Minimized && !(config.maximized = WindowState == FormWindowState.Maximized)) { config.top = Top; config.left = Left; config.height = Height; diff --git a/shadowsocks-csharp/View/MenuViewController.cs b/shadowsocks-csharp/View/MenuViewController.cs index af18a3e6..db0aef08 100644 --- a/shadowsocks-csharp/View/MenuViewController.cs +++ b/shadowsocks-csharp/View/MenuViewController.cs @@ -439,6 +439,7 @@ namespace Shadowsocks.View { configForm = new ConfigForm(controller); configForm.Show(); + configForm.Activate(); configForm.FormClosed += configForm_FormClosed; } } @@ -453,6 +454,7 @@ namespace Shadowsocks.View { proxyForm = new ProxyForm(controller); proxyForm.Show(); + proxyForm.Activate(); proxyForm.FormClosed += proxyForm_FormClosed; } } @@ -463,6 +465,7 @@ namespace Shadowsocks.View { LogForm f = new LogForm(controller, Logging.LogFilePath); f.Show(); + f.Activate(); f.FormClosed += logForm_FormClosed; logForms.Add(f);