50 lines
2.0 KiB
C#
50 lines
2.0 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using System.Windows.Forms;
|
|||
|
using NetMonitorTray.Properties;
|
|||
|
using BlubbFish.Utils;
|
|||
|
|
|||
|
namespace NetMonitorTray.Model
|
|||
|
{
|
|||
|
public class Tray : OwnModel<Tray>
|
|||
|
{
|
|||
|
private bool serviceRun;
|
|||
|
private Tray()
|
|||
|
{
|
|||
|
this.init();
|
|||
|
}
|
|||
|
private void init()
|
|||
|
{
|
|||
|
this.serviceRun = false;
|
|||
|
}
|
|||
|
|
|||
|
internal Dictionary<string, Tuple<string, System.Drawing.Bitmap, bool, bool>> getMenuNetwork()
|
|||
|
{
|
|||
|
Dictionary<string, Tuple<string, System.Drawing.Bitmap, bool, bool>> ret = new Dictionary<string, Tuple<string, System.Drawing.Bitmap, bool, bool>>();
|
|||
|
ret.Add("network1", new Tuple<string, System.Drawing.Bitmap, bool, bool>("Netzwerk Home", null, true, false));
|
|||
|
ret.Add("network2", new Tuple<string, System.Drawing.Bitmap, bool, bool>("Netzwerk Arbeit", null, true, false));
|
|||
|
ret.Add("network3", new Tuple<string, System.Drawing.Bitmap, bool, bool>("Netzwerk Test", null, true, false));
|
|||
|
return ret;
|
|||
|
}
|
|||
|
|
|||
|
internal Dictionary<string, Tuple<string, System.Drawing.Bitmap, bool, bool>> getMenuOpenVpnService()
|
|||
|
{
|
|||
|
Dictionary<string, Tuple<string, System.Drawing.Bitmap, bool, bool>> ret = new Dictionary<string, Tuple<string, System.Drawing.Bitmap, bool, bool>>();
|
|||
|
ret.Add("StartService", new Tuple<string, System.Drawing.Bitmap, bool, bool>("Service Starten", Properties.Resources.MenuImagesServerConnect, !this.serviceRun, !this.serviceRun));
|
|||
|
ret.Add("StopService", new Tuple<string, System.Drawing.Bitmap, bool, bool>("Service Stoppen", Properties.Resources.MenuImagesServerDisconnect, this.serviceRun, this.serviceRun));
|
|||
|
return ret;
|
|||
|
}
|
|||
|
|
|||
|
public void setService(bool run)
|
|||
|
{
|
|||
|
this.serviceRun = run;
|
|||
|
this.update();
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
}
|