masscheckin ganz viel kram
This commit is contained in:
@@ -6,6 +6,8 @@ using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using NetMonitorUtils;
|
||||
using BlubbFish.Utils;
|
||||
using System.Threading;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace NetMonitorTray.Controller {
|
||||
public class Tray : OwnController {
|
||||
@@ -13,12 +15,14 @@ namespace NetMonitorTray.Controller {
|
||||
private static OpenVpnSetter vpn;
|
||||
private static NetworkSetter network;
|
||||
private static Controller.Window window;
|
||||
private static Thread trayMenuRefresh;
|
||||
/// <summary>
|
||||
/// Tray Controller
|
||||
/// </summary>
|
||||
public Tray() {
|
||||
vpn = new OpenVpnSetter("vpn.ini", "config.ini");
|
||||
network = new NetworkSetter("network.ini", "config.ini");
|
||||
trayMenuRefresh = new Thread(menuRefresh);
|
||||
}
|
||||
/// <summary>
|
||||
/// Init!
|
||||
@@ -28,15 +32,38 @@ namespace NetMonitorTray.Controller {
|
||||
window = new Controller.Window();
|
||||
tray.setWorkingIcon();
|
||||
try {
|
||||
tray.Model.connectedStatus = false;
|
||||
List<string> vpns = tray.Model.getVpnList();
|
||||
tray.Model.VpnSelected = vpn.getStatus(vpns);
|
||||
List<string> adapter = tray.Model.getAdapterList();
|
||||
tray.Model.NetworkSelected = network.getNetwork(adapter);
|
||||
updateMenu();
|
||||
} catch(Exception e) {
|
||||
tray.showError(e.Message);
|
||||
tray.Model.connectedStatus = false;
|
||||
}
|
||||
trayMenuRefresh.Start();
|
||||
}
|
||||
|
||||
private static void menuRefresh() {
|
||||
while(true) {
|
||||
Thread.Sleep(10 * 60 * 1000); //Wait 10 Minutes
|
||||
updateMenu();
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||
private static void updateMenu() {
|
||||
List<string> adapter = tray.Model.getAdapterList();
|
||||
tray.Model.NetworkSelected = network.getNetwork(adapter);
|
||||
List<string> vpns = tray.Model.getVpnList();
|
||||
tray.Model.VpnSelected = vpn.getStatus(vpns);
|
||||
checkWorkingIcon();
|
||||
}
|
||||
|
||||
private static void checkWorkingIcon() {
|
||||
bool w = false;
|
||||
foreach(KeyValuePair<string, string> item in tray.Model.VpnSelected) {
|
||||
if(item.Value == "connected") {
|
||||
w = true;
|
||||
}
|
||||
}
|
||||
tray.Model.connectedStatus = w;
|
||||
}
|
||||
/// <summary>
|
||||
/// User klickt auf den Eintrag Beenden
|
||||
@@ -44,10 +71,12 @@ namespace NetMonitorTray.Controller {
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
internal static void Click_Quit(object sender, EventArgs e) {
|
||||
trayMenuRefresh.Abort();
|
||||
while(trayMenuRefresh.ThreadState != ThreadState.Aborted) { Thread.Sleep(100); }
|
||||
tray.Dispose();
|
||||
//Application.ExitThread();
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// User klick auf einen Eintrag Service Starten/Stoppen
|
||||
/// </summary>
|
||||
@@ -55,7 +84,6 @@ namespace NetMonitorTray.Controller {
|
||||
/// <param name="e"></param>
|
||||
internal static void Click_Vpn(object sender, EventArgs e) {
|
||||
tray.setWorkingIcon();
|
||||
|
||||
string[] conf = ((ToolStripMenuItem)sender).Name.Split('|');
|
||||
switch(tray.Model.VpnSelected[conf[1]]) {
|
||||
case "disconnected":
|
||||
@@ -74,7 +102,6 @@ namespace NetMonitorTray.Controller {
|
||||
System.Threading.Thread.Sleep(3000);
|
||||
}
|
||||
} catch(Exception ex) {
|
||||
tray.Model.connectedStatus = false;
|
||||
tray.showError("Fehler beim starten von Openvpn mit " + conf[1] + ": " + ex.Message);
|
||||
}
|
||||
break;
|
||||
@@ -91,12 +118,13 @@ namespace NetMonitorTray.Controller {
|
||||
System.Threading.Thread.Sleep(1000);
|
||||
}
|
||||
} catch(Exception ex) {
|
||||
tray.Model.connectedStatus = false;
|
||||
tray.showError("Fehler beim beenden von Openvpn mit " + conf + ": " + ex.Message);
|
||||
}
|
||||
break;
|
||||
}
|
||||
checkWorkingIcon();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// User klickt Doppelt auf das TrayIcon
|
||||
/// </summary>
|
||||
@@ -105,13 +133,14 @@ namespace NetMonitorTray.Controller {
|
||||
internal static void Click_Tray(object sender, EventArgs e) {
|
||||
Click_Open(sender, e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// User klickt auf den Tray-Ballon
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
internal static void Click_Ballon(object sender, EventArgs e) {
|
||||
throw new NotImplementedException();
|
||||
Click_Open(sender, e);
|
||||
}
|
||||
/// <summary>
|
||||
/// User klickt auf einen Eintrag Netzwerk
|
||||
@@ -121,12 +150,13 @@ namespace NetMonitorTray.Controller {
|
||||
internal static void Click_Network(object sender, EventArgs e) {
|
||||
tray.setWorkingIcon();
|
||||
try {
|
||||
network.setNetwork(((ToolStripMenuItem)sender).Name);
|
||||
string n = ((ToolStripMenuItem)sender).Name;
|
||||
network.setNetwork(n.Split('|')[1]);
|
||||
tray.Model.NetworkSelected[n.Split('|')[0]] = n.Split('|')[1];
|
||||
} catch(Exception ex) {
|
||||
tray.showError("Fehler beim setzen des Netzwerks: " + ex.Message);
|
||||
}
|
||||
checkWorkingIcon();
|
||||
}
|
||||
/// <summary>
|
||||
/// User klickt auf den Eintrag Öffnen
|
||||
|
||||
@@ -7,32 +7,65 @@ using System.Windows.Forms;
|
||||
using NetMonitorUtils;
|
||||
using BlubbFish.Utils;
|
||||
|
||||
namespace NetMonitorTray.Controller
|
||||
{
|
||||
public class Window : OwnController
|
||||
{
|
||||
private static View.Window window;
|
||||
/// <summary>
|
||||
/// Tray Controller
|
||||
/// </summary>
|
||||
public Window()
|
||||
{
|
||||
|
||||
}
|
||||
namespace NetMonitorTray.Controller {
|
||||
public class Window : OwnController {
|
||||
private static View.Window window;
|
||||
/// <summary>
|
||||
/// Tray Controller
|
||||
/// </summary>
|
||||
public Window() {
|
||||
|
||||
override protected void init()
|
||||
{
|
||||
window = new View.Window();
|
||||
}
|
||||
|
||||
public static void FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
window.Dispose();
|
||||
}
|
||||
|
||||
internal static void NetworkSelected(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show("Angeklickt!");
|
||||
}
|
||||
}
|
||||
|
||||
override protected void init() {
|
||||
window = new View.Window();
|
||||
}
|
||||
|
||||
public static void FormClosed(object sender, FormClosedEventArgs e) {
|
||||
window.Dispose();
|
||||
}
|
||||
|
||||
internal static void NetworkSelected(object sender, EventArgs e) {
|
||||
ListView list = sender as ListView;
|
||||
for(int i = 0; i < list.Items.Count; i++) {
|
||||
if(list.Items[i].Selected) {
|
||||
window.networkSelected(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal static void VpnSelected(object sender, EventArgs e) {
|
||||
ListView list = sender as ListView;
|
||||
for(int i = 0; i < list.Items.Count; i++) {
|
||||
if(list.Items[i].Selected) {
|
||||
window.vpnSelected(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e) {
|
||||
|
||||
}
|
||||
|
||||
internal static void ChangeOpenVpnFolder(object sender, EventArgs e) {
|
||||
window.Folderpicker();
|
||||
}
|
||||
|
||||
internal static void ChangeLogFolder(object sender, EventArgs e) {
|
||||
window.Folderpicker();
|
||||
}
|
||||
|
||||
internal static void ChangeOpenVpnConfigFile(object sender, EventArgs e) {
|
||||
window.Filepicker();
|
||||
}
|
||||
|
||||
|
||||
internal static void NetworkAktivate(object sender, EventArgs e) {
|
||||
MessageBox.Show("Network Verbinden!");
|
||||
}
|
||||
|
||||
internal static void VpnAktivate(object sender, EventArgs e) {
|
||||
MessageBox.Show("VPN Verbinden!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,63 +6,78 @@ using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using NetMonitorTray.Properties;
|
||||
using BlubbFish.Utils;
|
||||
using NetMonitorUtils;
|
||||
|
||||
namespace NetMonitorTray.Models
|
||||
{
|
||||
public class Window : OwnModel<Window>
|
||||
{
|
||||
private InIReader networkfile;
|
||||
private Window()
|
||||
{
|
||||
this.init();
|
||||
}
|
||||
|
||||
override protected void init()
|
||||
{
|
||||
this.networkfile = InIReader.getInstance("network.ini");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Listet alle Netzwerke auf
|
||||
/// </summary>
|
||||
public List<string> Networks
|
||||
{
|
||||
get { return this.networkfile.getSections(); }
|
||||
}
|
||||
|
||||
public string getNetworkProperty(string network, string property)
|
||||
{
|
||||
return this.networkfile.getValue(network, property);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fügt ein neues Netzwerk hinzu
|
||||
/// </summary>
|
||||
/// <param name="name">Netzwerkid</param>
|
||||
/// <returns>true if added, false if error</returns>
|
||||
public bool addNetwork(string name)
|
||||
{
|
||||
if (this.networkfile.addSection(name))
|
||||
{
|
||||
this.update();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Löscht ein Netzwerk
|
||||
/// </summary>
|
||||
/// <param name="name">Netzwerkid</param>
|
||||
/// <returns>true if deleted, false if error</returns>
|
||||
public bool removeNetwork(string name)
|
||||
{
|
||||
if (this.networkfile.removeSection(name))
|
||||
{
|
||||
this.update();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
namespace NetMonitorTray.Models {
|
||||
public class Window : OwnModel<Window> {
|
||||
private InIReader networkfile;
|
||||
private InIReader vpnfile;
|
||||
private InIReader settingsfile;
|
||||
private NetworkSetter networksetter;
|
||||
private Window() {
|
||||
this.init();
|
||||
}
|
||||
|
||||
override protected void init() {
|
||||
this.networkfile = InIReader.getInstance("network.ini");
|
||||
this.vpnfile = InIReader.getInstance("vpn.ini");
|
||||
this.settingsfile = InIReader.getInstance("config.ini");
|
||||
this.networksetter = new NetworkSetter("network.ini", "config.ini");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Listet alle Netzwerke auf
|
||||
/// </summary>
|
||||
public List<string> Networks {
|
||||
get { return this.networkfile.getSections(); }
|
||||
}
|
||||
|
||||
public List<string> Vpns {
|
||||
get { return this.vpnfile.getSections(); }
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Fügt ein neues Netzwerk hinzu
|
||||
/// </summary>
|
||||
/// <param name="name">Netzwerkid</param>
|
||||
/// <returns>true if added, false if error</returns>
|
||||
public bool addNetwork(string name) {
|
||||
if(this.networkfile.addSection(name)) {
|
||||
this.update();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Löscht ein Netzwerk
|
||||
/// </summary>
|
||||
/// <param name="name">Netzwerkid</param>
|
||||
/// <returns>true if deleted, false if error</returns>
|
||||
public bool removeNetwork(string name) {
|
||||
if(this.networkfile.removeSection(name)) {
|
||||
this.update();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
internal string getVpnProperty(string vpn, string property) {
|
||||
return this.vpnfile.getValue(vpn, property);
|
||||
}
|
||||
|
||||
public string getNetworkProperty(string network, string property) {
|
||||
return this.networkfile.getValue(network, property);
|
||||
}
|
||||
|
||||
public string getSettingsProperty(string setting, string property) {
|
||||
return this.settingsfile.getValue(setting, property);
|
||||
}
|
||||
|
||||
public List<string> getNetworkAdapters() {
|
||||
return this.networksetter.getAdapters();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,12 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="icon.ico" />
|
||||
<Content Include="Resources\Icons\add.png" />
|
||||
<Content Include="Resources\Icons\cancel.png" />
|
||||
<Content Include="Resources\Icons\disk.png" />
|
||||
<Content Include="Resources\Icons\door_open.png" />
|
||||
<Content Include="Resources\Icons\folder.png" />
|
||||
<Content Include="Resources\Icons\page_gear.png" />
|
||||
<Content Include="Resources\Icons\server_connect.png" />
|
||||
<Content Include="Resources\Icons\server_delete.png" />
|
||||
<Content Include="Resources\Icons\server_link.png" />
|
||||
|
||||
+12
-10
@@ -6,15 +6,17 @@ using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
|
||||
namespace NetMonitorTray
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Controller.Tray t = new Controller.Tray();
|
||||
t.execute();
|
||||
Application.Run();
|
||||
}
|
||||
namespace NetMonitorTray {
|
||||
class Program {
|
||||
[STAThread]
|
||||
static void Main(string[] args) {
|
||||
try {
|
||||
Controller.Tray t = new Controller.Tray();
|
||||
t.execute();
|
||||
Application.Run();
|
||||
} catch(Exception e) {
|
||||
MessageBox.Show("Fehler: " + e.Message + "\nStack: " + e.StackTrace, "Exception: " + e.GetType().ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+50
@@ -60,6 +60,46 @@ namespace NetMonitorTray.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap add {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("add", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap delete {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("delete", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap file {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("file", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap folder {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("folder", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol).
|
||||
/// </summary>
|
||||
@@ -139,5 +179,15 @@ namespace NetMonitorTray.Properties {
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap save {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("save", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,6 +118,12 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="add" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\icons\add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\icons\cancel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="IconConnected" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\connected.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -142,4 +148,13 @@
|
||||
<data name="MenuImagesServerDisconnect" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Icons\server_delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="save" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\icons\disk.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="file" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\icons\page_gear.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="folder" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\icons\folder.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -41,5 +41,22 @@ namespace NetMonitorTray.View
|
||||
}
|
||||
|
||||
public Models.Window Model { get; private set; }
|
||||
|
||||
public string Folderpicker() {
|
||||
return this.form.FolderPicker();
|
||||
}
|
||||
|
||||
internal void networkSelected(int i) {
|
||||
this.form.showSelectedNetwork(i);
|
||||
}
|
||||
|
||||
internal void vpnSelected(int i) {
|
||||
this.form.showSelectedOpenvpn(i);
|
||||
}
|
||||
|
||||
internal string Filepicker() {
|
||||
return this.form.FilePicker();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+793
-159
@@ -28,165 +28,747 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
this.networks = new System.Windows.Forms.TabPage();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.listView1 = new System.Windows.Forms.ListView();
|
||||
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.buttonNetworkAdd = new System.Windows.Forms.Button();
|
||||
this.openvpn = new System.Windows.Forms.TabPage();
|
||||
this.global = new System.Windows.Forms.TabPage();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.logBox = new System.Windows.Forms.TextBox();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.networks.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 336);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.Size = new System.Drawing.Size(780, 22);
|
||||
this.statusStrip1.SizingGrip = false;
|
||||
this.statusStrip1.TabIndex = 0;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// tabControl1
|
||||
//
|
||||
this.tabControl1.Controls.Add(this.networks);
|
||||
this.tabControl1.Controls.Add(this.openvpn);
|
||||
this.tabControl1.Controls.Add(this.global);
|
||||
this.tabControl1.Location = new System.Drawing.Point(12, 12);
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
this.tabControl1.Size = new System.Drawing.Size(591, 321);
|
||||
this.tabControl1.TabIndex = 1;
|
||||
//
|
||||
// networks
|
||||
//
|
||||
this.networks.Controls.Add(this.groupBox2);
|
||||
this.networks.Controls.Add(this.groupBox1);
|
||||
this.networks.Location = new System.Drawing.Point(4, 22);
|
||||
this.networks.Name = "networks";
|
||||
this.networks.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.networks.Size = new System.Drawing.Size(583, 295);
|
||||
this.networks.TabIndex = 0;
|
||||
this.networks.Text = "Netzwerke";
|
||||
this.networks.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Location = new System.Drawing.Point(189, 6);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(388, 283);
|
||||
this.groupBox2.TabIndex = 3;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "groupBox2";
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.listView1);
|
||||
this.groupBox1.Controls.Add(this.buttonNetworkAdd);
|
||||
this.groupBox1.Location = new System.Drawing.Point(6, 6);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(177, 283);
|
||||
this.groupBox1.TabIndex = 2;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "groupBox1";
|
||||
//
|
||||
// listView1
|
||||
//
|
||||
this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
this.networks = new System.Windows.Forms.TabPage();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.networkButtonDelete = new System.Windows.Forms.Button();
|
||||
this.networkAdapter = new System.Windows.Forms.ComboBox();
|
||||
this.label16 = new System.Windows.Forms.Label();
|
||||
this.networkWins = new System.Windows.Forms.TextBox();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.networkAutoWins = new System.Windows.Forms.CheckBox();
|
||||
this.networkDns = new System.Windows.Forms.TextBox();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.networkAutoDns = new System.Windows.Forms.CheckBox();
|
||||
this.networkGateway = new System.Windows.Forms.TextBox();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.networkSubnet = new System.Windows.Forms.TextBox();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.networkIp = new System.Windows.Forms.TextBox();
|
||||
this.label11 = new System.Windows.Forms.Label();
|
||||
this.networkName = new System.Windows.Forms.TextBox();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.networkButtonSave = new System.Windows.Forms.Button();
|
||||
this.networkAutoIp = new System.Windows.Forms.CheckBox();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.networksList = new System.Windows.Forms.ListView();
|
||||
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.networksAddButton = new System.Windows.Forms.Button();
|
||||
this.openvpn = new System.Windows.Forms.TabPage();
|
||||
this.groupBox4 = new System.Windows.Forms.GroupBox();
|
||||
this.openvpnList = new System.Windows.Forms.ListView();
|
||||
this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.openvpnButtonAdd = new System.Windows.Forms.Button();
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.openvpnButtonSave = new System.Windows.Forms.Button();
|
||||
this.openvpnButtonDelete = new System.Windows.Forms.Button();
|
||||
this.openvpnConfig = new System.Windows.Forms.TextBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.openvpnButtonConfigfile = new System.Windows.Forms.Button();
|
||||
this.openvpnName = new System.Windows.Forms.TextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.global = new System.Windows.Forms.TabPage();
|
||||
this.groupBox8 = new System.Windows.Forms.GroupBox();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.settingsLogLevel = new System.Windows.Forms.ComboBox();
|
||||
this.settingsButtonSave = new System.Windows.Forms.Button();
|
||||
this.settingsFolderPickerLog = new System.Windows.Forms.Button();
|
||||
this.settingsLogFolder = new System.Windows.Forms.TextBox();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.groupBox6 = new System.Windows.Forms.GroupBox();
|
||||
this.settingsFolderpickerVpn = new System.Windows.Forms.Button();
|
||||
this.settingsVpnFolder = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.groupBox5 = new System.Windows.Forms.GroupBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.settingsClientPortTo = new System.Windows.Forms.TextBox();
|
||||
this.settingsClientPortFrom = new System.Windows.Forms.TextBox();
|
||||
this.settingsServerPort = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.logBox = new System.Windows.Forms.TextBox();
|
||||
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
|
||||
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.networks.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.openvpn.SuspendLayout();
|
||||
this.groupBox4.SuspendLayout();
|
||||
this.groupBox3.SuspendLayout();
|
||||
this.global.SuspendLayout();
|
||||
this.groupBox8.SuspendLayout();
|
||||
this.groupBox6.SuspendLayout();
|
||||
this.groupBox5.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 336);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.Size = new System.Drawing.Size(780, 22);
|
||||
this.statusStrip1.SizingGrip = false;
|
||||
this.statusStrip1.TabIndex = 0;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// tabControl1
|
||||
//
|
||||
this.tabControl1.Controls.Add(this.networks);
|
||||
this.tabControl1.Controls.Add(this.openvpn);
|
||||
this.tabControl1.Controls.Add(this.global);
|
||||
this.tabControl1.Location = new System.Drawing.Point(12, 12);
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
this.tabControl1.Size = new System.Drawing.Size(591, 321);
|
||||
this.tabControl1.TabIndex = 1;
|
||||
//
|
||||
// networks
|
||||
//
|
||||
this.networks.Controls.Add(this.groupBox2);
|
||||
this.networks.Controls.Add(this.groupBox1);
|
||||
this.networks.Location = new System.Drawing.Point(4, 22);
|
||||
this.networks.Name = "networks";
|
||||
this.networks.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.networks.Size = new System.Drawing.Size(583, 295);
|
||||
this.networks.TabIndex = 0;
|
||||
this.networks.Text = "Netzwerke";
|
||||
this.networks.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Controls.Add(this.networkButtonDelete);
|
||||
this.groupBox2.Controls.Add(this.networkAdapter);
|
||||
this.groupBox2.Controls.Add(this.label16);
|
||||
this.groupBox2.Controls.Add(this.networkWins);
|
||||
this.groupBox2.Controls.Add(this.label15);
|
||||
this.groupBox2.Controls.Add(this.networkAutoWins);
|
||||
this.groupBox2.Controls.Add(this.networkDns);
|
||||
this.groupBox2.Controls.Add(this.label14);
|
||||
this.groupBox2.Controls.Add(this.networkAutoDns);
|
||||
this.groupBox2.Controls.Add(this.networkGateway);
|
||||
this.groupBox2.Controls.Add(this.label13);
|
||||
this.groupBox2.Controls.Add(this.networkSubnet);
|
||||
this.groupBox2.Controls.Add(this.label12);
|
||||
this.groupBox2.Controls.Add(this.networkIp);
|
||||
this.groupBox2.Controls.Add(this.label11);
|
||||
this.groupBox2.Controls.Add(this.networkName);
|
||||
this.groupBox2.Controls.Add(this.label10);
|
||||
this.groupBox2.Controls.Add(this.networkButtonSave);
|
||||
this.groupBox2.Controls.Add(this.networkAutoIp);
|
||||
this.groupBox2.Location = new System.Drawing.Point(189, 6);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(388, 283);
|
||||
this.groupBox2.TabIndex = 3;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Eigenschaften";
|
||||
//
|
||||
// networkButtonDelete
|
||||
//
|
||||
this.networkButtonDelete.Image = global::NetMonitorTray.Properties.Resources.delete;
|
||||
this.networkButtonDelete.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.networkButtonDelete.Location = new System.Drawing.Point(220, 251);
|
||||
this.networkButtonDelete.Name = "networkButtonDelete";
|
||||
this.networkButtonDelete.Size = new System.Drawing.Size(75, 23);
|
||||
this.networkButtonDelete.TabIndex = 20;
|
||||
this.networkButtonDelete.Text = "Löschen";
|
||||
this.networkButtonDelete.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.networkButtonDelete.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// networkAdapter
|
||||
//
|
||||
this.networkAdapter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.networkAdapter.FormattingEnabled = true;
|
||||
this.networkAdapter.Location = new System.Drawing.Point(9, 231);
|
||||
this.networkAdapter.Name = "networkAdapter";
|
||||
this.networkAdapter.Size = new System.Drawing.Size(198, 21);
|
||||
this.networkAdapter.TabIndex = 19;
|
||||
//
|
||||
// label16
|
||||
//
|
||||
this.label16.AutoSize = true;
|
||||
this.label16.Location = new System.Drawing.Point(6, 214);
|
||||
this.label16.Name = "label16";
|
||||
this.label16.Size = new System.Drawing.Size(47, 13);
|
||||
this.label16.TabIndex = 18;
|
||||
this.label16.Text = "Adapter:";
|
||||
//
|
||||
// networkWins
|
||||
//
|
||||
this.networkWins.Location = new System.Drawing.Point(9, 191);
|
||||
this.networkWins.Name = "networkWins";
|
||||
this.networkWins.Size = new System.Drawing.Size(266, 20);
|
||||
this.networkWins.TabIndex = 17;
|
||||
//
|
||||
// label15
|
||||
//
|
||||
this.label15.AutoSize = true;
|
||||
this.label15.Location = new System.Drawing.Point(6, 175);
|
||||
this.label15.Name = "label15";
|
||||
this.label15.Size = new System.Drawing.Size(34, 13);
|
||||
this.label15.TabIndex = 16;
|
||||
this.label15.Text = "Wins:";
|
||||
//
|
||||
// networkAutoWins
|
||||
//
|
||||
this.networkAutoWins.AutoSize = true;
|
||||
this.networkAutoWins.Location = new System.Drawing.Point(281, 193);
|
||||
this.networkAutoWins.Name = "networkAutoWins";
|
||||
this.networkAutoWins.Size = new System.Drawing.Size(48, 17);
|
||||
this.networkAutoWins.TabIndex = 15;
|
||||
this.networkAutoWins.Text = "Auto";
|
||||
this.networkAutoWins.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// networkDns
|
||||
//
|
||||
this.networkDns.Location = new System.Drawing.Point(9, 152);
|
||||
this.networkDns.Name = "networkDns";
|
||||
this.networkDns.Size = new System.Drawing.Size(266, 20);
|
||||
this.networkDns.TabIndex = 14;
|
||||
//
|
||||
// label14
|
||||
//
|
||||
this.label14.AutoSize = true;
|
||||
this.label14.Location = new System.Drawing.Point(6, 136);
|
||||
this.label14.Name = "label14";
|
||||
this.label14.Size = new System.Drawing.Size(33, 13);
|
||||
this.label14.TabIndex = 13;
|
||||
this.label14.Text = "DNS:";
|
||||
//
|
||||
// networkAutoDns
|
||||
//
|
||||
this.networkAutoDns.AutoSize = true;
|
||||
this.networkAutoDns.Location = new System.Drawing.Point(281, 154);
|
||||
this.networkAutoDns.Name = "networkAutoDns";
|
||||
this.networkAutoDns.Size = new System.Drawing.Size(48, 17);
|
||||
this.networkAutoDns.TabIndex = 12;
|
||||
this.networkAutoDns.Text = "Auto";
|
||||
this.networkAutoDns.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// networkGateway
|
||||
//
|
||||
this.networkGateway.Location = new System.Drawing.Point(9, 113);
|
||||
this.networkGateway.Name = "networkGateway";
|
||||
this.networkGateway.Size = new System.Drawing.Size(266, 20);
|
||||
this.networkGateway.TabIndex = 11;
|
||||
//
|
||||
// label13
|
||||
//
|
||||
this.label13.AutoSize = true;
|
||||
this.label13.Location = new System.Drawing.Point(6, 97);
|
||||
this.label13.Name = "label13";
|
||||
this.label13.Size = new System.Drawing.Size(52, 13);
|
||||
this.label13.TabIndex = 10;
|
||||
this.label13.Text = "Gateway:";
|
||||
//
|
||||
// networkSubnet
|
||||
//
|
||||
this.networkSubnet.Location = new System.Drawing.Point(145, 74);
|
||||
this.networkSubnet.Name = "networkSubnet";
|
||||
this.networkSubnet.Size = new System.Drawing.Size(130, 20);
|
||||
this.networkSubnet.TabIndex = 8;
|
||||
//
|
||||
// label12
|
||||
//
|
||||
this.label12.AutoSize = true;
|
||||
this.label12.Location = new System.Drawing.Point(142, 58);
|
||||
this.label12.Name = "label12";
|
||||
this.label12.Size = new System.Drawing.Size(44, 13);
|
||||
this.label12.TabIndex = 7;
|
||||
this.label12.Text = "Subnet:";
|
||||
//
|
||||
// networkIp
|
||||
//
|
||||
this.networkIp.Location = new System.Drawing.Point(9, 74);
|
||||
this.networkIp.Name = "networkIp";
|
||||
this.networkIp.Size = new System.Drawing.Size(130, 20);
|
||||
this.networkIp.TabIndex = 5;
|
||||
//
|
||||
// label11
|
||||
//
|
||||
this.label11.AutoSize = true;
|
||||
this.label11.Location = new System.Drawing.Point(6, 58);
|
||||
this.label11.Name = "label11";
|
||||
this.label11.Size = new System.Drawing.Size(20, 13);
|
||||
this.label11.TabIndex = 4;
|
||||
this.label11.Text = "IP:";
|
||||
//
|
||||
// networkName
|
||||
//
|
||||
this.networkName.Location = new System.Drawing.Point(9, 35);
|
||||
this.networkName.Name = "networkName";
|
||||
this.networkName.Size = new System.Drawing.Size(266, 20);
|
||||
this.networkName.TabIndex = 3;
|
||||
//
|
||||
// label10
|
||||
//
|
||||
this.label10.AutoSize = true;
|
||||
this.label10.Location = new System.Drawing.Point(6, 19);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(38, 13);
|
||||
this.label10.TabIndex = 2;
|
||||
this.label10.Text = "Name:";
|
||||
//
|
||||
// networkButtonSave
|
||||
//
|
||||
this.networkButtonSave.Image = global::NetMonitorTray.Properties.Resources.save;
|
||||
this.networkButtonSave.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.networkButtonSave.Location = new System.Drawing.Point(301, 251);
|
||||
this.networkButtonSave.Name = "networkButtonSave";
|
||||
this.networkButtonSave.Size = new System.Drawing.Size(81, 23);
|
||||
this.networkButtonSave.TabIndex = 1;
|
||||
this.networkButtonSave.Text = "Speichern";
|
||||
this.networkButtonSave.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.networkButtonSave.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// networkAutoIp
|
||||
//
|
||||
this.networkAutoIp.AutoSize = true;
|
||||
this.networkAutoIp.Location = new System.Drawing.Point(281, 76);
|
||||
this.networkAutoIp.Name = "networkAutoIp";
|
||||
this.networkAutoIp.Size = new System.Drawing.Size(48, 17);
|
||||
this.networkAutoIp.TabIndex = 0;
|
||||
this.networkAutoIp.Text = "Auto";
|
||||
this.networkAutoIp.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.networksList);
|
||||
this.groupBox1.Controls.Add(this.networksAddButton);
|
||||
this.groupBox1.Location = new System.Drawing.Point(6, 6);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(177, 283);
|
||||
this.groupBox1.TabIndex = 2;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Alle Netzwerke";
|
||||
//
|
||||
// networksList
|
||||
//
|
||||
this.networksList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.columnHeader1,
|
||||
this.columnHeader2});
|
||||
this.listView1.FullRowSelect = true;
|
||||
this.listView1.GridLines = true;
|
||||
this.listView1.HideSelection = false;
|
||||
this.listView1.Location = new System.Drawing.Point(7, 19);
|
||||
this.listView1.MultiSelect = false;
|
||||
this.listView1.Name = "listView1";
|
||||
this.listView1.ShowGroups = false;
|
||||
this.listView1.Size = new System.Drawing.Size(164, 226);
|
||||
this.listView1.TabIndex = 2;
|
||||
this.listView1.UseCompatibleStateImageBehavior = false;
|
||||
this.listView1.View = System.Windows.Forms.View.Details;
|
||||
//
|
||||
// columnHeader1
|
||||
//
|
||||
this.columnHeader1.Text = "ID";
|
||||
//
|
||||
// columnHeader2
|
||||
//
|
||||
this.columnHeader2.Text = "Label";
|
||||
this.columnHeader2.Width = 100;
|
||||
//
|
||||
// buttonNetworkAdd
|
||||
//
|
||||
this.buttonNetworkAdd.Location = new System.Drawing.Point(7, 251);
|
||||
this.buttonNetworkAdd.Name = "buttonNetworkAdd";
|
||||
this.buttonNetworkAdd.Size = new System.Drawing.Size(164, 23);
|
||||
this.buttonNetworkAdd.TabIndex = 1;
|
||||
this.buttonNetworkAdd.Text = "Netzwerk Hinzufügen";
|
||||
this.buttonNetworkAdd.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// openvpn
|
||||
//
|
||||
this.openvpn.Location = new System.Drawing.Point(4, 22);
|
||||
this.openvpn.Name = "openvpn";
|
||||
this.openvpn.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.openvpn.Size = new System.Drawing.Size(583, 295);
|
||||
this.openvpn.TabIndex = 1;
|
||||
this.openvpn.Text = "OpenVPN";
|
||||
this.openvpn.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// global
|
||||
//
|
||||
this.global.Location = new System.Drawing.Point(4, 22);
|
||||
this.global.Name = "global";
|
||||
this.global.Size = new System.Drawing.Size(583, 295);
|
||||
this.global.TabIndex = 2;
|
||||
this.global.Text = "Einstellungen";
|
||||
this.global.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(609, 12);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(35, 13);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "label1";
|
||||
//
|
||||
// logBox
|
||||
//
|
||||
this.logBox.Location = new System.Drawing.Point(609, 34);
|
||||
this.logBox.Multiline = true;
|
||||
this.logBox.Name = "logBox";
|
||||
this.logBox.Size = new System.Drawing.Size(163, 295);
|
||||
this.logBox.TabIndex = 3;
|
||||
//
|
||||
// ViewWindowForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(780, 358);
|
||||
this.Controls.Add(this.logBox);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.tabControl1);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "ViewWindowForm";
|
||||
this.Text = "NetMonitorTray";
|
||||
this.tabControl1.ResumeLayout(false);
|
||||
this.networks.ResumeLayout(false);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
this.networksList.FullRowSelect = true;
|
||||
this.networksList.GridLines = true;
|
||||
this.networksList.HideSelection = false;
|
||||
this.networksList.Location = new System.Drawing.Point(7, 19);
|
||||
this.networksList.MultiSelect = false;
|
||||
this.networksList.Name = "networksList";
|
||||
this.networksList.ShowGroups = false;
|
||||
this.networksList.Size = new System.Drawing.Size(164, 226);
|
||||
this.networksList.TabIndex = 2;
|
||||
this.networksList.UseCompatibleStateImageBehavior = false;
|
||||
this.networksList.View = System.Windows.Forms.View.Details;
|
||||
//
|
||||
// columnHeader1
|
||||
//
|
||||
this.columnHeader1.Text = "ID";
|
||||
//
|
||||
// columnHeader2
|
||||
//
|
||||
this.columnHeader2.Text = "Label";
|
||||
this.columnHeader2.Width = 100;
|
||||
//
|
||||
// networksAddButton
|
||||
//
|
||||
this.networksAddButton.Image = global::NetMonitorTray.Properties.Resources.add;
|
||||
this.networksAddButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.networksAddButton.Location = new System.Drawing.Point(7, 251);
|
||||
this.networksAddButton.Name = "networksAddButton";
|
||||
this.networksAddButton.Size = new System.Drawing.Size(164, 23);
|
||||
this.networksAddButton.TabIndex = 1;
|
||||
this.networksAddButton.Text = "Netzwerk Hinzufügen";
|
||||
this.networksAddButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// openvpn
|
||||
//
|
||||
this.openvpn.Controls.Add(this.groupBox4);
|
||||
this.openvpn.Controls.Add(this.groupBox3);
|
||||
this.openvpn.Location = new System.Drawing.Point(4, 22);
|
||||
this.openvpn.Name = "openvpn";
|
||||
this.openvpn.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.openvpn.Size = new System.Drawing.Size(583, 295);
|
||||
this.openvpn.TabIndex = 1;
|
||||
this.openvpn.Text = "OpenVPN";
|
||||
this.openvpn.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBox4
|
||||
//
|
||||
this.groupBox4.Controls.Add(this.openvpnList);
|
||||
this.groupBox4.Controls.Add(this.openvpnButtonAdd);
|
||||
this.groupBox4.Location = new System.Drawing.Point(6, 6);
|
||||
this.groupBox4.Name = "groupBox4";
|
||||
this.groupBox4.Size = new System.Drawing.Size(177, 283);
|
||||
this.groupBox4.TabIndex = 5;
|
||||
this.groupBox4.TabStop = false;
|
||||
this.groupBox4.Text = "Alle Vpn Netze";
|
||||
//
|
||||
// openvpnList
|
||||
//
|
||||
this.openvpnList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.columnHeader3,
|
||||
this.columnHeader4});
|
||||
this.openvpnList.FullRowSelect = true;
|
||||
this.openvpnList.GridLines = true;
|
||||
this.openvpnList.HideSelection = false;
|
||||
this.openvpnList.Location = new System.Drawing.Point(7, 19);
|
||||
this.openvpnList.MultiSelect = false;
|
||||
this.openvpnList.Name = "openvpnList";
|
||||
this.openvpnList.ShowGroups = false;
|
||||
this.openvpnList.Size = new System.Drawing.Size(164, 226);
|
||||
this.openvpnList.TabIndex = 2;
|
||||
this.openvpnList.UseCompatibleStateImageBehavior = false;
|
||||
this.openvpnList.View = System.Windows.Forms.View.Details;
|
||||
//
|
||||
// columnHeader3
|
||||
//
|
||||
this.columnHeader3.Text = "ID";
|
||||
//
|
||||
// columnHeader4
|
||||
//
|
||||
this.columnHeader4.Text = "Label";
|
||||
this.columnHeader4.Width = 100;
|
||||
//
|
||||
// openvpnButtonAdd
|
||||
//
|
||||
this.openvpnButtonAdd.Image = global::NetMonitorTray.Properties.Resources.add;
|
||||
this.openvpnButtonAdd.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.openvpnButtonAdd.Location = new System.Drawing.Point(7, 251);
|
||||
this.openvpnButtonAdd.Name = "openvpnButtonAdd";
|
||||
this.openvpnButtonAdd.Size = new System.Drawing.Size(164, 23);
|
||||
this.openvpnButtonAdd.TabIndex = 1;
|
||||
this.openvpnButtonAdd.Text = "OpenVPN Hinzufügen";
|
||||
this.openvpnButtonAdd.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.Controls.Add(this.openvpnButtonSave);
|
||||
this.groupBox3.Controls.Add(this.openvpnButtonDelete);
|
||||
this.groupBox3.Controls.Add(this.openvpnConfig);
|
||||
this.groupBox3.Controls.Add(this.label7);
|
||||
this.groupBox3.Controls.Add(this.openvpnButtonConfigfile);
|
||||
this.groupBox3.Controls.Add(this.openvpnName);
|
||||
this.groupBox3.Controls.Add(this.label6);
|
||||
this.groupBox3.Location = new System.Drawing.Point(189, 6);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(388, 283);
|
||||
this.groupBox3.TabIndex = 4;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "Eigenschaften";
|
||||
//
|
||||
// openvpnButtonSave
|
||||
//
|
||||
this.openvpnButtonSave.Image = global::NetMonitorTray.Properties.Resources.save;
|
||||
this.openvpnButtonSave.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.openvpnButtonSave.Location = new System.Drawing.Point(303, 251);
|
||||
this.openvpnButtonSave.Name = "openvpnButtonSave";
|
||||
this.openvpnButtonSave.Size = new System.Drawing.Size(79, 23);
|
||||
this.openvpnButtonSave.TabIndex = 6;
|
||||
this.openvpnButtonSave.Text = "Speichern";
|
||||
this.openvpnButtonSave.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.openvpnButtonSave.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// openvpnButtonDelete
|
||||
//
|
||||
this.openvpnButtonDelete.Image = global::NetMonitorTray.Properties.Resources.delete;
|
||||
this.openvpnButtonDelete.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.openvpnButtonDelete.Location = new System.Drawing.Point(222, 251);
|
||||
this.openvpnButtonDelete.Name = "openvpnButtonDelete";
|
||||
this.openvpnButtonDelete.Size = new System.Drawing.Size(75, 23);
|
||||
this.openvpnButtonDelete.TabIndex = 5;
|
||||
this.openvpnButtonDelete.Text = "Löschen";
|
||||
this.openvpnButtonDelete.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.openvpnButtonDelete.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// openvpnConfig
|
||||
//
|
||||
this.openvpnConfig.Location = new System.Drawing.Point(9, 71);
|
||||
this.openvpnConfig.Name = "openvpnConfig";
|
||||
this.openvpnConfig.ReadOnly = true;
|
||||
this.openvpnConfig.Size = new System.Drawing.Size(248, 20);
|
||||
this.openvpnConfig.TabIndex = 4;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(6, 55);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(60, 13);
|
||||
this.label7.TabIndex = 3;
|
||||
this.label7.Text = "Configdatei";
|
||||
//
|
||||
// openvpnButtonConfigfile
|
||||
//
|
||||
this.openvpnButtonConfigfile.Image = global::NetMonitorTray.Properties.Resources.file;
|
||||
this.openvpnButtonConfigfile.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.openvpnButtonConfigfile.Location = new System.Drawing.Point(263, 69);
|
||||
this.openvpnButtonConfigfile.Name = "openvpnButtonConfigfile";
|
||||
this.openvpnButtonConfigfile.Size = new System.Drawing.Size(92, 23);
|
||||
this.openvpnButtonConfigfile.TabIndex = 2;
|
||||
this.openvpnButtonConfigfile.Text = "Datei öffnen";
|
||||
this.openvpnButtonConfigfile.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.openvpnButtonConfigfile.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// openvpnName
|
||||
//
|
||||
this.openvpnName.Location = new System.Drawing.Point(9, 32);
|
||||
this.openvpnName.Name = "openvpnName";
|
||||
this.openvpnName.Size = new System.Drawing.Size(248, 20);
|
||||
this.openvpnName.TabIndex = 1;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(6, 16);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(35, 13);
|
||||
this.label6.TabIndex = 0;
|
||||
this.label6.Text = "Name";
|
||||
//
|
||||
// global
|
||||
//
|
||||
this.global.Controls.Add(this.groupBox8);
|
||||
this.global.Controls.Add(this.groupBox6);
|
||||
this.global.Controls.Add(this.groupBox5);
|
||||
this.global.Location = new System.Drawing.Point(4, 22);
|
||||
this.global.Name = "global";
|
||||
this.global.Size = new System.Drawing.Size(583, 295);
|
||||
this.global.TabIndex = 2;
|
||||
this.global.Text = "Einstellungen";
|
||||
this.global.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBox8
|
||||
//
|
||||
this.groupBox8.Controls.Add(this.label8);
|
||||
this.groupBox8.Controls.Add(this.settingsLogLevel);
|
||||
this.groupBox8.Controls.Add(this.settingsButtonSave);
|
||||
this.groupBox8.Controls.Add(this.settingsFolderPickerLog);
|
||||
this.groupBox8.Controls.Add(this.settingsLogFolder);
|
||||
this.groupBox8.Controls.Add(this.label9);
|
||||
this.groupBox8.Location = new System.Drawing.Point(3, 80);
|
||||
this.groupBox8.Name = "groupBox8";
|
||||
this.groupBox8.Size = new System.Drawing.Size(577, 99);
|
||||
this.groupBox8.TabIndex = 2;
|
||||
this.groupBox8.TabStop = false;
|
||||
this.groupBox8.Text = "Allgemein";
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(6, 55);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(125, 13);
|
||||
this.label8.TabIndex = 5;
|
||||
this.label8.Text = "Server-Log Einstellungen";
|
||||
//
|
||||
// settingsLogLevel
|
||||
//
|
||||
this.settingsLogLevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.settingsLogLevel.FormattingEnabled = true;
|
||||
this.settingsLogLevel.Location = new System.Drawing.Point(9, 71);
|
||||
this.settingsLogLevel.Name = "settingsLogLevel";
|
||||
this.settingsLogLevel.Size = new System.Drawing.Size(121, 21);
|
||||
this.settingsLogLevel.TabIndex = 4;
|
||||
//
|
||||
// settingsButtonSave
|
||||
//
|
||||
this.settingsButtonSave.Image = global::NetMonitorTray.Properties.Resources.save;
|
||||
this.settingsButtonSave.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.settingsButtonSave.Location = new System.Drawing.Point(489, 69);
|
||||
this.settingsButtonSave.Name = "settingsButtonSave";
|
||||
this.settingsButtonSave.Size = new System.Drawing.Size(82, 23);
|
||||
this.settingsButtonSave.TabIndex = 3;
|
||||
this.settingsButtonSave.Text = "Speichern";
|
||||
this.settingsButtonSave.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.settingsButtonSave.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// settingsFolderPickerLog
|
||||
//
|
||||
this.settingsFolderPickerLog.Image = global::NetMonitorTray.Properties.Resources.folder;
|
||||
this.settingsFolderPickerLog.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.settingsFolderPickerLog.Location = new System.Drawing.Point(289, 30);
|
||||
this.settingsFolderPickerLog.Name = "settingsFolderPickerLog";
|
||||
this.settingsFolderPickerLog.Size = new System.Drawing.Size(66, 23);
|
||||
this.settingsFolderPickerLog.TabIndex = 3;
|
||||
this.settingsFolderPickerLog.Text = "Ändern";
|
||||
this.settingsFolderPickerLog.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.settingsFolderPickerLog.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// settingsLogFolder
|
||||
//
|
||||
this.settingsLogFolder.Location = new System.Drawing.Point(9, 32);
|
||||
this.settingsLogFolder.Name = "settingsLogFolder";
|
||||
this.settingsLogFolder.ReadOnly = true;
|
||||
this.settingsLogFolder.Size = new System.Drawing.Size(274, 20);
|
||||
this.settingsLogFolder.TabIndex = 2;
|
||||
//
|
||||
// label9
|
||||
//
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Location = new System.Drawing.Point(6, 16);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(85, 13);
|
||||
this.label9.TabIndex = 1;
|
||||
this.label9.Text = "Log Verzeichnis:";
|
||||
//
|
||||
// groupBox6
|
||||
//
|
||||
this.groupBox6.Controls.Add(this.settingsFolderpickerVpn);
|
||||
this.groupBox6.Controls.Add(this.settingsVpnFolder);
|
||||
this.groupBox6.Controls.Add(this.label5);
|
||||
this.groupBox6.Location = new System.Drawing.Point(209, 3);
|
||||
this.groupBox6.Name = "groupBox6";
|
||||
this.groupBox6.Size = new System.Drawing.Size(371, 77);
|
||||
this.groupBox6.TabIndex = 1;
|
||||
this.groupBox6.TabStop = false;
|
||||
this.groupBox6.Text = "VPN";
|
||||
//
|
||||
// settingsFolderpickerVpn
|
||||
//
|
||||
this.settingsFolderpickerVpn.Image = global::NetMonitorTray.Properties.Resources.folder;
|
||||
this.settingsFolderpickerVpn.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.settingsFolderpickerVpn.Location = new System.Drawing.Point(290, 44);
|
||||
this.settingsFolderpickerVpn.Name = "settingsFolderpickerVpn";
|
||||
this.settingsFolderpickerVpn.Size = new System.Drawing.Size(66, 23);
|
||||
this.settingsFolderpickerVpn.TabIndex = 2;
|
||||
this.settingsFolderpickerVpn.Text = "Ändern";
|
||||
this.settingsFolderpickerVpn.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.settingsFolderpickerVpn.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// settingsVpnFolder
|
||||
//
|
||||
this.settingsVpnFolder.Location = new System.Drawing.Point(10, 46);
|
||||
this.settingsVpnFolder.Name = "settingsVpnFolder";
|
||||
this.settingsVpnFolder.ReadOnly = true;
|
||||
this.settingsVpnFolder.Size = new System.Drawing.Size(274, 20);
|
||||
this.settingsVpnFolder.TabIndex = 1;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(7, 23);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(148, 13);
|
||||
this.label5.TabIndex = 0;
|
||||
this.label5.Text = "OpenVpn Installations Ordner:";
|
||||
//
|
||||
// groupBox5
|
||||
//
|
||||
this.groupBox5.Controls.Add(this.label4);
|
||||
this.groupBox5.Controls.Add(this.settingsClientPortTo);
|
||||
this.groupBox5.Controls.Add(this.settingsClientPortFrom);
|
||||
this.groupBox5.Controls.Add(this.settingsServerPort);
|
||||
this.groupBox5.Controls.Add(this.label3);
|
||||
this.groupBox5.Controls.Add(this.label2);
|
||||
this.groupBox5.Location = new System.Drawing.Point(3, 3);
|
||||
this.groupBox5.Name = "groupBox5";
|
||||
this.groupBox5.Size = new System.Drawing.Size(200, 77);
|
||||
this.groupBox5.TabIndex = 0;
|
||||
this.groupBox5.TabStop = false;
|
||||
this.groupBox5.Text = "UDP Ports";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(121, 49);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(10, 13);
|
||||
this.label4.TabIndex = 5;
|
||||
this.label4.Text = "-";
|
||||
//
|
||||
// settingsClientPortTo
|
||||
//
|
||||
this.settingsClientPortTo.Location = new System.Drawing.Point(137, 46);
|
||||
this.settingsClientPortTo.Name = "settingsClientPortTo";
|
||||
this.settingsClientPortTo.Size = new System.Drawing.Size(40, 20);
|
||||
this.settingsClientPortTo.TabIndex = 4;
|
||||
//
|
||||
// settingsClientPortFrom
|
||||
//
|
||||
this.settingsClientPortFrom.Location = new System.Drawing.Point(77, 46);
|
||||
this.settingsClientPortFrom.Name = "settingsClientPortFrom";
|
||||
this.settingsClientPortFrom.Size = new System.Drawing.Size(38, 20);
|
||||
this.settingsClientPortFrom.TabIndex = 3;
|
||||
//
|
||||
// settingsServerPort
|
||||
//
|
||||
this.settingsServerPort.Location = new System.Drawing.Point(77, 20);
|
||||
this.settingsServerPort.Name = "settingsServerPort";
|
||||
this.settingsServerPort.Size = new System.Drawing.Size(100, 20);
|
||||
this.settingsServerPort.TabIndex = 2;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(6, 49);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(63, 13);
|
||||
this.label3.TabIndex = 1;
|
||||
this.label3.Text = "Client Ports:";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(6, 23);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(63, 13);
|
||||
this.label2.TabIndex = 0;
|
||||
this.label2.Text = "Server Port:";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(609, 12);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(59, 13);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "Server-Log";
|
||||
//
|
||||
// logBox
|
||||
//
|
||||
this.logBox.Location = new System.Drawing.Point(609, 34);
|
||||
this.logBox.Multiline = true;
|
||||
this.logBox.Name = "logBox";
|
||||
this.logBox.Size = new System.Drawing.Size(163, 295);
|
||||
this.logBox.TabIndex = 3;
|
||||
//
|
||||
// openFileDialog1
|
||||
//
|
||||
this.openFileDialog1.FileName = "openFileDialog1";
|
||||
//
|
||||
// ViewWindowForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(780, 358);
|
||||
this.Controls.Add(this.logBox);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.tabControl1);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "ViewWindowForm";
|
||||
this.Text = "NetMonitorTray";
|
||||
this.tabControl1.ResumeLayout(false);
|
||||
this.networks.ResumeLayout(false);
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox2.PerformLayout();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.openvpn.ResumeLayout(false);
|
||||
this.groupBox4.ResumeLayout(false);
|
||||
this.groupBox3.ResumeLayout(false);
|
||||
this.groupBox3.PerformLayout();
|
||||
this.global.ResumeLayout(false);
|
||||
this.groupBox8.ResumeLayout(false);
|
||||
this.groupBox8.PerformLayout();
|
||||
this.groupBox6.ResumeLayout(false);
|
||||
this.groupBox6.PerformLayout();
|
||||
this.groupBox5.ResumeLayout(false);
|
||||
this.groupBox5.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
@@ -200,10 +782,62 @@
|
||||
private System.Windows.Forms.TextBox logBox;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.Button buttonNetworkAdd;
|
||||
private System.Windows.Forms.Button networksAddButton;
|
||||
private System.Windows.Forms.TabPage global;
|
||||
private System.Windows.Forms.ListView listView1;
|
||||
private System.Windows.Forms.ListView networksList;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader1;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader2;
|
||||
private System.Windows.Forms.GroupBox groupBox4;
|
||||
private System.Windows.Forms.ListView openvpnList;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader3;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader4;
|
||||
private System.Windows.Forms.Button openvpnButtonAdd;
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private System.Windows.Forms.GroupBox groupBox5;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.GroupBox groupBox6;
|
||||
private System.Windows.Forms.Button settingsFolderpickerVpn;
|
||||
private System.Windows.Forms.TextBox settingsVpnFolder;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox settingsClientPortTo;
|
||||
private System.Windows.Forms.TextBox settingsClientPortFrom;
|
||||
private System.Windows.Forms.TextBox settingsServerPort;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
|
||||
private System.Windows.Forms.Button networkButtonDelete;
|
||||
private System.Windows.Forms.ComboBox networkAdapter;
|
||||
private System.Windows.Forms.Label label16;
|
||||
private System.Windows.Forms.TextBox networkWins;
|
||||
private System.Windows.Forms.Label label15;
|
||||
private System.Windows.Forms.CheckBox networkAutoWins;
|
||||
private System.Windows.Forms.TextBox networkDns;
|
||||
private System.Windows.Forms.Label label14;
|
||||
private System.Windows.Forms.CheckBox networkAutoDns;
|
||||
private System.Windows.Forms.TextBox networkGateway;
|
||||
private System.Windows.Forms.Label label13;
|
||||
private System.Windows.Forms.TextBox networkSubnet;
|
||||
private System.Windows.Forms.Label label12;
|
||||
private System.Windows.Forms.TextBox networkIp;
|
||||
private System.Windows.Forms.Label label11;
|
||||
private System.Windows.Forms.TextBox networkName;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private System.Windows.Forms.Button networkButtonSave;
|
||||
private System.Windows.Forms.CheckBox networkAutoIp;
|
||||
private System.Windows.Forms.GroupBox groupBox8;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.ComboBox settingsLogLevel;
|
||||
private System.Windows.Forms.Button settingsButtonSave;
|
||||
private System.Windows.Forms.Button settingsFolderPickerLog;
|
||||
private System.Windows.Forms.TextBox settingsLogFolder;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.Button openvpnButtonSave;
|
||||
private System.Windows.Forms.Button openvpnButtonDelete;
|
||||
private System.Windows.Forms.TextBox openvpnConfig;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Button openvpnButtonConfigfile;
|
||||
private System.Windows.Forms.TextBox openvpnName;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.OpenFileDialog openFileDialog1;
|
||||
}
|
||||
}
|
||||
@@ -7,38 +7,181 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using BlubbFish.Utils;
|
||||
|
||||
namespace NetMonitorTray.View
|
||||
{
|
||||
public partial class ViewWindowForm : Form
|
||||
{
|
||||
private Models.Window model;
|
||||
public ViewWindowForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.FormClosed += Controller.Window.FormClosed;
|
||||
listView1.ItemActivate += Controller.Window.NetworkSelected;
|
||||
}
|
||||
namespace NetMonitorTray.View {
|
||||
public partial class ViewWindowForm : Form {
|
||||
private Models.Window model;
|
||||
private int clickedNetwork = 0;
|
||||
private int clickedVpn = 0;
|
||||
|
||||
public void UpdateForm()
|
||||
{
|
||||
this.BeginInvoke((Action)(() =>
|
||||
{
|
||||
this.logBox.Text = "Loaded";
|
||||
List<string> networks = this.model.Networks;
|
||||
foreach(string network in networks) {
|
||||
ListViewItem item = new ListViewItem();
|
||||
item.Text = network;
|
||||
item.SubItems.Add(this.model.getNetworkProperty(network, "Name"));
|
||||
listView1.Items.Add(item);
|
||||
}
|
||||
|
||||
}));
|
||||
}
|
||||
public ViewWindowForm() {
|
||||
this.InitializeComponent();
|
||||
this.FormClosed += Controller.Window.FormClosed;
|
||||
|
||||
public void SetModel(Models.Window window)
|
||||
{
|
||||
this.model = window;
|
||||
}
|
||||
this.networksList.ItemActivate += Controller.Window.NetworkAktivate;
|
||||
this.openvpnList.ItemActivate += Controller.Window.VpnAktivate;
|
||||
this.networksList.Click += Controller.Window.NetworkSelected;
|
||||
this.openvpnList.Click += Controller.Window.VpnSelected;
|
||||
|
||||
this.settingsFolderpickerVpn.Click += new System.EventHandler(Controller.Window.ChangeOpenVpnFolder);
|
||||
this.openvpnButtonConfigfile.Click += new System.EventHandler(Controller.Window.ChangeOpenVpnConfigFile);
|
||||
this.settingsFolderPickerLog.Click += new System.EventHandler(Controller.Window.ChangeLogFolder);
|
||||
}
|
||||
|
||||
public void UpdateForm() {
|
||||
this.BeginInvoke((Action)(() => {
|
||||
updateLog();
|
||||
updateNetworks();
|
||||
updateVpn();
|
||||
updateSettings();
|
||||
}));
|
||||
}
|
||||
|
||||
private void updateLog() {
|
||||
this.logBox.Text = "TODO: Read Log File";
|
||||
}
|
||||
|
||||
private void updateVpn() {
|
||||
List<string> vpns = this.model.Vpns;
|
||||
foreach(string vpn in vpns) {
|
||||
ListViewItem item = new ListViewItem();
|
||||
item.Text = vpn;
|
||||
item.SubItems.Add(this.model.getVpnProperty(vpn, "Name"));
|
||||
openvpnList.Items.Add(item);
|
||||
}
|
||||
showSelectedOpenvpn(clickedVpn);
|
||||
}
|
||||
|
||||
public void showSelectedOpenvpn(int i) {
|
||||
List<string> vpns = this.model.Vpns;
|
||||
if(vpns.Count == 0) {
|
||||
return;
|
||||
}
|
||||
if(vpns.Count <= i) {
|
||||
i = 0;
|
||||
}
|
||||
for(int j = 0; j < this.openvpnList.Items.Count; j++) {
|
||||
if(j == i) {
|
||||
this.openvpnList.Items[j].Selected = true;
|
||||
} else {
|
||||
this.openvpnList.Items[j].Selected = false;
|
||||
}
|
||||
string n = vpns[i];
|
||||
string v = this.model.getVpnProperty(n, "Name");
|
||||
this.openvpnName.Text = v;
|
||||
v = this.model.getVpnProperty(n, "Config");
|
||||
this.openvpnConfig.Text = v;
|
||||
}
|
||||
}
|
||||
|
||||
private void updateNetworks() {
|
||||
List<string> networks = this.model.Networks;
|
||||
foreach(string network in networks) {
|
||||
ListViewItem item = new ListViewItem();
|
||||
item.Text = network;
|
||||
item.SubItems.Add(this.model.getNetworkProperty(network, "Name"));
|
||||
networksList.Items.Add(item);
|
||||
}
|
||||
List<string> adapters = this.model.getNetworkAdapters();
|
||||
this.networkAdapter.Items.AddRange(adapters.ToArray<string>());
|
||||
showSelectedNetwork(clickedNetwork);
|
||||
}
|
||||
|
||||
public void showSelectedNetwork(int i) {
|
||||
List<string> networks = this.model.Networks;
|
||||
if(networks.Count == 0) {
|
||||
return;
|
||||
}
|
||||
if(networks.Count <= i) {
|
||||
i = 0;
|
||||
}
|
||||
for(int j=0; j<this.networksList.Items.Count;j++) {
|
||||
if(j == i) {
|
||||
this.networksList.Items[j].Selected = true;
|
||||
} else {
|
||||
this.networksList.Items[j].Selected = false;
|
||||
}
|
||||
}
|
||||
string n = networks[i];
|
||||
string v = this.model.getNetworkProperty(n, "Name");
|
||||
this.networkName.Text = v;
|
||||
v = this.model.getNetworkProperty(n, "Ip");
|
||||
if(v == "auto") {
|
||||
this.networkIp.ReadOnly = true;
|
||||
this.networkIp.Text = "";
|
||||
this.networkSubnet.ReadOnly = true;
|
||||
this.networkSubnet.Text = "";
|
||||
this.networkGateway.ReadOnly = true;
|
||||
this.networkGateway.Text = "";
|
||||
this.networkAutoIp.Checked = true;
|
||||
} else {
|
||||
this.networkIp.ReadOnly = false;
|
||||
this.networkIp.Text = v;
|
||||
v = this.model.getNetworkProperty(n, "Subnet");
|
||||
this.networkSubnet.ReadOnly = false;
|
||||
this.networkSubnet.Text = v;
|
||||
v = this.model.getNetworkProperty(n, "Gateway");
|
||||
this.networkGateway.ReadOnly = false;
|
||||
this.networkGateway.Text = v;
|
||||
this.networkAutoIp.Checked = false;
|
||||
}
|
||||
v = this.model.getNetworkProperty(n, "Dns");
|
||||
if(v == "auto") {
|
||||
this.networkDns.ReadOnly = true;
|
||||
this.networkDns.Text = "";
|
||||
this.networkAutoDns.Checked = true;
|
||||
} else {
|
||||
this.networkDns.ReadOnly = false;
|
||||
this.networkDns.Text = v;
|
||||
this.networkAutoDns.Checked = false;
|
||||
}
|
||||
v = this.model.getNetworkProperty(n, "Wins");
|
||||
if(v == "auto") {
|
||||
this.networkWins.ReadOnly = true;
|
||||
this.networkWins.Text = "";
|
||||
this.networkAutoWins.Checked = true;
|
||||
} else {
|
||||
this.networkWins.ReadOnly = false;
|
||||
this.networkWins.Text = v;
|
||||
this.networkAutoWins.Checked = false;
|
||||
}
|
||||
v = this.model.getNetworkProperty(n, "Adapter");
|
||||
this.networkAdapter.Text = v;
|
||||
}
|
||||
|
||||
private void updateSettings() {
|
||||
settingsServerPort.Text = this.model.getSettingsProperty("ports", "server");
|
||||
settingsClientPortFrom.Text = this.model.getSettingsProperty("ports", "client_from");
|
||||
settingsClientPortTo.Text = this.model.getSettingsProperty("ports", "client_to");
|
||||
settingsVpnFolder.Text = this.model.getSettingsProperty("program", "openvpn");
|
||||
settingsLogFolder.Text = this.model.getSettingsProperty("program", "logfolder");
|
||||
foreach(OwnObject.LogLevel item in Enum.GetValues(typeof(OwnObject.LogLevel))) {
|
||||
settingsLogLevel.Items.Add(item.ToString());
|
||||
}
|
||||
settingsLogLevel.Text = this.model.getSettingsProperty("program", "loglevel");
|
||||
}
|
||||
|
||||
public void SetModel(Models.Window window) {
|
||||
this.model = window;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public string FolderPicker() {
|
||||
DialogResult r = this.folderBrowserDialog1.ShowDialog();
|
||||
if(r == System.Windows.Forms.DialogResult.OK) {
|
||||
return this.folderBrowserDialog1.SelectedPath;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
internal string FilePicker() {
|
||||
DialogResult r = this.openFileDialog1.ShowDialog();
|
||||
if(r == System.Windows.Forms.DialogResult.OK) {
|
||||
return this.openFileDialog1.FileName;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,4 +120,10 @@
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>133, 17</value>
|
||||
</metadata>
|
||||
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>302, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
Reference in New Issue
Block a user