Interface erweitert
This commit is contained in:
parent
6a6bcc29b0
commit
93340aa3ea
19
NetMonitorCliend/Form1.Designer.cs
generated
19
NetMonitorCliend/Form1.Designer.cs
generated
@ -167,14 +167,14 @@
|
|||||||
this.trayIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("trayIcon.Icon")));
|
this.trayIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("trayIcon.Icon")));
|
||||||
this.trayIcon.Text = "notifyIcon1";
|
this.trayIcon.Text = "notifyIcon1";
|
||||||
this.trayIcon.Visible = true;
|
this.trayIcon.Visible = true;
|
||||||
this.trayIcon.MouseDoubleClick += trayIcon_Click_1;
|
this.trayIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.trayIcon_MouseDoubleClick);
|
||||||
//
|
//
|
||||||
// trayMenu
|
// trayMenu
|
||||||
//
|
//
|
||||||
this.trayMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.trayMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.trayMenuNetzwerk});
|
this.trayMenuNetzwerk});
|
||||||
this.trayMenu.Name = "trayMenu";
|
this.trayMenu.Name = "trayMenu";
|
||||||
this.trayMenu.Size = new System.Drawing.Size(124, 26);
|
this.trayMenu.Size = new System.Drawing.Size(153, 48);
|
||||||
//
|
//
|
||||||
// trayMenuNetzwerk
|
// trayMenuNetzwerk
|
||||||
//
|
//
|
||||||
@ -182,20 +182,22 @@
|
|||||||
this.homeToolStripMenuItem,
|
this.homeToolStripMenuItem,
|
||||||
this.fhgToolStripMenuItem});
|
this.fhgToolStripMenuItem});
|
||||||
this.trayMenuNetzwerk.Name = "trayMenuNetzwerk";
|
this.trayMenuNetzwerk.Name = "trayMenuNetzwerk";
|
||||||
this.trayMenuNetzwerk.Size = new System.Drawing.Size(123, 22);
|
this.trayMenuNetzwerk.Size = new System.Drawing.Size(152, 22);
|
||||||
this.trayMenuNetzwerk.Text = "Netzwerk";
|
this.trayMenuNetzwerk.Text = "Netzwerk";
|
||||||
//
|
//
|
||||||
// homeToolStripMenuItem
|
// homeToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.homeToolStripMenuItem.Name = "homeToolStripMenuItem";
|
this.homeToolStripMenuItem.Name = "homeToolStripMenuItem";
|
||||||
this.homeToolStripMenuItem.Size = new System.Drawing.Size(107, 22);
|
this.homeToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||||
this.homeToolStripMenuItem.Text = "Home";
|
this.homeToolStripMenuItem.Text = "Home";
|
||||||
|
this.homeToolStripMenuItem.Click += new System.EventHandler(this.homeToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// fhgToolStripMenuItem
|
// fhgToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.fhgToolStripMenuItem.Name = "fhgToolStripMenuItem";
|
this.fhgToolStripMenuItem.Name = "fhgToolStripMenuItem";
|
||||||
this.fhgToolStripMenuItem.Size = new System.Drawing.Size(107, 22);
|
this.fhgToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||||
this.fhgToolStripMenuItem.Text = "Fhg";
|
this.fhgToolStripMenuItem.Text = "Fhg";
|
||||||
|
this.fhgToolStripMenuItem.Click += new System.EventHandler(this.fhgToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// Netzmonitor
|
// Netzmonitor
|
||||||
//
|
//
|
||||||
@ -218,13 +220,6 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region Events für die UI
|
|
||||||
private void trayIcon_Click_1(object sender, System.EventArgs e)
|
|
||||||
{
|
|
||||||
this.WindowState = System.Windows.Forms.FormWindowState.Normal;
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
private System.ServiceProcess.ServiceController serviceController1;
|
private System.ServiceProcess.ServiceController serviceController1;
|
||||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||||
|
@ -11,9 +11,29 @@ namespace NetMonitorCliend
|
|||||||
{
|
{
|
||||||
public partial class Netzmonitor : Form
|
public partial class Netzmonitor : Form
|
||||||
{
|
{
|
||||||
|
private ServiceControl sc;
|
||||||
public Netzmonitor()
|
public Netzmonitor()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
this.serviceController1.ServiceName = "NetMonitorServer";
|
||||||
|
this.sc = new ServiceControl(this.serviceController1);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void trayIcon_MouseDoubleClick(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
this.WindowState = System.Windows.Forms.FormWindowState.Normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void homeToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.sc.setNetworkAuto();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fhgToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.sc.setNetworkIp("129.26.164.16","255.255.248.0","129.26.160.1");
|
||||||
|
this.sc.setNetworkDNS("129.26.165.177");
|
||||||
|
this.sc.setNetworkWINS("129.26.165.167");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,6 +78,7 @@
|
|||||||
<DependentUpon>Settings.settings</DependentUpon>
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="ServiceControl.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
36
NetMonitorCliend/ServiceControl.cs
Normal file
36
NetMonitorCliend/ServiceControl.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace NetMonitorCliend
|
||||||
|
{
|
||||||
|
class ServiceControl
|
||||||
|
{
|
||||||
|
private System.ServiceProcess.ServiceController sc;
|
||||||
|
public ServiceControl(System.ServiceProcess.ServiceController Controller)
|
||||||
|
{
|
||||||
|
this.sc = Controller;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void setNetworkAuto()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void setNetworkIp(string ip, string subnet, string gateway)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void setNetworkDNS(string dns)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void setNetworkWINS(string wins)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user