featured middle click on tray pops up log viewer
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
using Shadowsocks.Controller;
|
||||
using Shadowsocks.Model;
|
||||
using Shadowsocks.Properties;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using ZXing;
|
||||
using ZXing.Common;
|
||||
using ZXing.QrCode;
|
||||
|
||||
using Shadowsocks.Controller;
|
||||
using Shadowsocks.Model;
|
||||
using Shadowsocks.Properties;
|
||||
|
||||
namespace Shadowsocks.View
|
||||
{
|
||||
public class MenuViewController
|
||||
@@ -69,6 +70,7 @@ namespace Shadowsocks.View
|
||||
_notifyIcon.Visible = true;
|
||||
_notifyIcon.ContextMenu = contextMenu1;
|
||||
_notifyIcon.BalloonTipClicked += notifyIcon1_BalloonTipClicked;
|
||||
_notifyIcon.MouseClick += notifyIcon1_Click;
|
||||
_notifyIcon.MouseDoubleClick += notifyIcon1_DoubleClick;
|
||||
_notifyIcon.BalloonTipClosed += _notifyIcon_BalloonTipClosed;
|
||||
|
||||
@@ -204,7 +206,6 @@ namespace Shadowsocks.View
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void controller_ConfigChanged(object sender, EventArgs e)
|
||||
{
|
||||
LoadCurrentConfiguration();
|
||||
@@ -420,6 +421,18 @@ namespace Shadowsocks.View
|
||||
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)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left)
|
||||
|
||||
Reference in New Issue
Block a user