|
@@ -1,16 +1,17 @@ |
|
|
using Shadowsocks.Controller;
|
|
|
|
|
|
using Shadowsocks.Model;
|
|
|
|
|
|
using Shadowsocks.Properties;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Diagnostics;
|
|
|
using System.Diagnostics;
|
|
|
using System.Drawing;
|
|
|
using System.Drawing;
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Windows.Forms;
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
using ZXing;
|
|
|
using ZXing;
|
|
|
using ZXing.Common;
|
|
|
using ZXing.Common;
|
|
|
using ZXing.QrCode;
|
|
|
using ZXing.QrCode;
|
|
|
|
|
|
|
|
|
|
|
|
using Shadowsocks.Controller;
|
|
|
|
|
|
using Shadowsocks.Model;
|
|
|
|
|
|
using Shadowsocks.Properties;
|
|
|
|
|
|
|
|
|
namespace Shadowsocks.View
|
|
|
namespace Shadowsocks.View
|
|
|
{
|
|
|
{
|
|
|
public class MenuViewController
|
|
|
public class MenuViewController
|
|
@@ -69,6 +70,7 @@ namespace Shadowsocks.View |
|
|
_notifyIcon.Visible = true;
|
|
|
_notifyIcon.Visible = true;
|
|
|
_notifyIcon.ContextMenu = contextMenu1;
|
|
|
_notifyIcon.ContextMenu = contextMenu1;
|
|
|
_notifyIcon.BalloonTipClicked += notifyIcon1_BalloonTipClicked;
|
|
|
_notifyIcon.BalloonTipClicked += notifyIcon1_BalloonTipClicked;
|
|
|
|
|
|
_notifyIcon.MouseClick += notifyIcon1_Click;
|
|
|
_notifyIcon.MouseDoubleClick += notifyIcon1_DoubleClick;
|
|
|
_notifyIcon.MouseDoubleClick += notifyIcon1_DoubleClick;
|
|
|
_notifyIcon.BalloonTipClosed += _notifyIcon_BalloonTipClosed;
|
|
|
_notifyIcon.BalloonTipClosed += _notifyIcon_BalloonTipClosed;
|
|
|
|
|
|
|
|
@@ -204,7 +206,6 @@ namespace Shadowsocks.View |
|
|
});
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void controller_ConfigChanged(object sender, EventArgs e)
|
|
|
private void controller_ConfigChanged(object sender, EventArgs e)
|
|
|
{
|
|
|
{
|
|
|
LoadCurrentConfiguration();
|
|
|
LoadCurrentConfiguration();
|
|
@@ -420,6 +421,18 @@ namespace Shadowsocks.View |
|
|
Process.Start("https://github.com/shadowsocks/shadowsocks-windows");
|
|
|
Process.Start("https://github.com/shadowsocks/shadowsocks-windows");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void notifyIcon1_Click(object sender, MouseEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (e.Button == MouseButtons.Left)
|
|
|
|
|
|
{
|
|
|
|
|
|
// TODO: show something interesting
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (e.Button == MouseButtons.Middle)
|
|
|
|
|
|
{
|
|
|
|
|
|
ShowLogForms();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
private void notifyIcon1_DoubleClick(object sender, MouseEventArgs e)
|
|
|
private void notifyIcon1_DoubleClick(object sender, MouseEventArgs e)
|
|
|
{
|
|
|
{
|
|
|
if (e.Button == MouseButtons.Left)
|
|
|
if (e.Button == MouseButtons.Left)
|
|
|