Menüs repariert und Begonnen den editor für Netzwerke zu schreiben

This commit is contained in:
BlubbFish 2010-06-08 23:38:45 +00:00
parent e0f0a32129
commit fc1d294b61
7 changed files with 233 additions and 108 deletions

View File

@ -0,0 +1,38 @@
namespace NetMonitorClient
{
partial class EditNetworks
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Text = "EditNetworks";
}
#endregion
}
}

View File

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace NetMonitorClient
{
public partial class EditNetworks : Form
{
public enum Options
{
Show
}
internal enum RWFlag
{
Read,
Write
}
private RWFlag acess;
public EditNetworks(Options option)
{
if (option == Options.Show)
{
this.acess = RWFlag.Read;
}
InitializeComponent();
}
}
}

View File

@ -29,121 +29,134 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
this.hinzufügenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.hinzufügenToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
this.ansehenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.hinzufügenToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem();
this.dienstToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.startenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.stoppenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.ProgramMenu = new System.Windows.Forms.MenuStrip();
this.ProgramMenuDatei = new System.Windows.Forms.ToolStripMenuItem();
this.ProgramMenuDateiNetzwerke = new System.Windows.Forms.ToolStripMenuItem();
this.ProgramMenuDateiNetzwerkeAnsehen = new System.Windows.Forms.ToolStripMenuItem();
this.ProgramMenuDateiNetzwerkeBearbeiten = new System.Windows.Forms.ToolStripMenuItem();
this.ProgramMenuDateiEmail = new System.Windows.Forms.ToolStripMenuItem();
this.ProgramMenuDateiEmailAnsehen = new System.Windows.Forms.ToolStripMenuItem();
this.ProgramMenuDateiEmailHinzufuegen = new System.Windows.Forms.ToolStripMenuItem();
this.ProgramMenuDateiBeenden = new System.Windows.Forms.ToolStripMenuItem();
this.ProgramMenuDienst = new System.Windows.Forms.ToolStripMenuItem();
this.ProgramMenuDienstStarten = new System.Windows.Forms.ToolStripMenuItem();
this.ProgramMenuDienstStoppen = new System.Windows.Forms.ToolStripMenuItem();
this.Statusbar = new System.Windows.Forms.StatusStrip();
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
this.trayIcon = new System.Windows.Forms.NotifyIcon(this.components);
this.trayMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.trayMenuNetzwerk = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout();
this.statusStrip1.SuspendLayout();
this.StatusbarLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.StatusbarDienst = new System.Windows.Forms.ToolStripStatusLabel();
this.StatusbarProgress = new System.Windows.Forms.ToolStripProgressBar();
this.ProgramMenuNetzwerke = new System.Windows.Forms.ToolStripMenuItem();
this.ProgramMenu.SuspendLayout();
this.Statusbar.SuspendLayout();
this.SuspendLayout();
//
// menuStrip1
// ProgramMenu
//
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(284, 24);
this.menuStrip1.TabIndex = 0;
this.menuStrip1.Text = "menuStrip1";
this.ProgramMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ProgramMenuDatei,
this.ProgramMenuDienst,
this.ProgramMenuNetzwerke});
this.ProgramMenu.Location = new System.Drawing.Point(0, 0);
this.ProgramMenu.Name = "ProgramMenu";
this.ProgramMenu.Size = new System.Drawing.Size(284, 24);
this.ProgramMenu.TabIndex = 0;
this.ProgramMenu.Text = "menuStrip1";
//
// toolStripMenuItem1
// ProgramMenuDatei
//
this.toolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItem2,
this.toolStripMenuItem3,
this.toolStripMenuItem4});
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(46, 20);
this.toolStripMenuItem1.Text = "Datei";
this.ProgramMenuDatei.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ProgramMenuDateiNetzwerke,
this.ProgramMenuDateiEmail,
this.ProgramMenuDateiBeenden});
this.ProgramMenuDatei.Name = "ProgramMenuDatei";
this.ProgramMenuDatei.Size = new System.Drawing.Size(46, 20);
this.ProgramMenuDatei.Text = "Datei";
//
// toolStripMenuItem2
// ProgramMenuDateiNetzwerke
//
this.toolStripMenuItem2.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.hinzufügenToolStripMenuItem,
this.hinzufügenToolStripMenuItem1});
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(129, 22);
this.toolStripMenuItem2.Text = "Netzwerke";
this.ProgramMenuDateiNetzwerke.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ProgramMenuDateiNetzwerkeAnsehen,
this.ProgramMenuDateiNetzwerkeBearbeiten});
this.ProgramMenuDateiNetzwerke.Name = "ProgramMenuDateiNetzwerke";
this.ProgramMenuDateiNetzwerke.Size = new System.Drawing.Size(152, 22);
this.ProgramMenuDateiNetzwerke.Text = "Netzwerke";
//
// hinzufügenToolStripMenuItem
// ProgramMenuDateiNetzwerkeAnsehen
//
this.hinzufügenToolStripMenuItem.Name = "hinzufügenToolStripMenuItem";
this.hinzufügenToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
this.hinzufügenToolStripMenuItem.Text = "Ansehen";
this.ProgramMenuDateiNetzwerkeAnsehen.Name = "ProgramMenuDateiNetzwerkeAnsehen";
this.ProgramMenuDateiNetzwerkeAnsehen.Size = new System.Drawing.Size(152, 22);
this.ProgramMenuDateiNetzwerkeAnsehen.Text = "Ansehen";
this.ProgramMenuDateiNetzwerkeAnsehen.Click += new System.EventHandler(this.ProgramMenuDateiNetzwerkeAnsehen_Click);
//
// hinzufügenToolStripMenuItem1
// ProgramMenuDateiNetzwerkeBearbeiten
//
this.hinzufügenToolStripMenuItem1.Name = "hinzufügenToolStripMenuItem1";
this.hinzufügenToolStripMenuItem1.Size = new System.Drawing.Size(136, 22);
this.hinzufügenToolStripMenuItem1.Text = "Hinzufügen";
this.ProgramMenuDateiNetzwerkeBearbeiten.Name = "ProgramMenuDateiNetzwerkeBearbeiten";
this.ProgramMenuDateiNetzwerkeBearbeiten.Size = new System.Drawing.Size(152, 22);
this.ProgramMenuDateiNetzwerkeBearbeiten.Text = "Bearbeiten";
//
// toolStripMenuItem3
// ProgramMenuDateiEmail
//
this.toolStripMenuItem3.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ansehenToolStripMenuItem,
this.hinzufügenToolStripMenuItem2});
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
this.toolStripMenuItem3.Size = new System.Drawing.Size(129, 22);
this.toolStripMenuItem3.Text = "E-Mail";
this.ProgramMenuDateiEmail.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ProgramMenuDateiEmailAnsehen,
this.ProgramMenuDateiEmailHinzufuegen});
this.ProgramMenuDateiEmail.Name = "ProgramMenuDateiEmail";
this.ProgramMenuDateiEmail.Size = new System.Drawing.Size(152, 22);
this.ProgramMenuDateiEmail.Text = "E-Mail";
//
// ansehenToolStripMenuItem
// ProgramMenuDateiEmailAnsehen
//
this.ansehenToolStripMenuItem.Name = "ansehenToolStripMenuItem";
this.ansehenToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
this.ansehenToolStripMenuItem.Text = "Ansehen";
this.ProgramMenuDateiEmailAnsehen.Name = "ProgramMenuDateiEmailAnsehen";
this.ProgramMenuDateiEmailAnsehen.Size = new System.Drawing.Size(152, 22);
this.ProgramMenuDateiEmailAnsehen.Text = "Ansehen";
//
// hinzufügenToolStripMenuItem2
// ProgramMenuDateiEmailHinzufuegen
//
this.hinzufügenToolStripMenuItem2.Name = "hinzufügenToolStripMenuItem2";
this.hinzufügenToolStripMenuItem2.Size = new System.Drawing.Size(136, 22);
this.hinzufügenToolStripMenuItem2.Text = "Hinzufügen";
this.ProgramMenuDateiEmailHinzufuegen.Name = "ProgramMenuDateiEmailHinzufuegen";
this.ProgramMenuDateiEmailHinzufuegen.Size = new System.Drawing.Size(152, 22);
this.ProgramMenuDateiEmailHinzufuegen.Text = "Hinzufügen";
//
// toolStripMenuItem4
// ProgramMenuDateiBeenden
//
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
this.toolStripMenuItem4.Size = new System.Drawing.Size(129, 22);
this.toolStripMenuItem4.Text = "Beenden";
this.ProgramMenuDateiBeenden.Name = "ProgramMenuDateiBeenden";
this.ProgramMenuDateiBeenden.Size = new System.Drawing.Size(152, 22);
this.ProgramMenuDateiBeenden.Text = "Beenden";
//
// dienstToolStripMenuItem
// ProgramMenuDienst
//
this.dienstToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.startenToolStripMenuItem,
this.stoppenToolStripMenuItem});
this.dienstToolStripMenuItem.Name = "dienstToolStripMenuItem";
this.dienstToolStripMenuItem.Size = new System.Drawing.Size(52, 20);
this.dienstToolStripMenuItem.Text = "Dienst";
this.ProgramMenuDienst.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ProgramMenuDienstStarten,
this.ProgramMenuDienstStoppen});
this.ProgramMenuDienst.Name = "ProgramMenuDienst";
this.ProgramMenuDienst.Size = new System.Drawing.Size(52, 20);
this.ProgramMenuDienst.Text = "Dienst";
//
// startenToolStripMenuItem
// ProgramMenuDienstStarten
//
this.startenToolStripMenuItem.Name = "startenToolStripMenuItem";
this.startenToolStripMenuItem.Size = new System.Drawing.Size(118, 22);
this.startenToolStripMenuItem.Text = "Starten";
this.ProgramMenuDienstStarten.Name = "ProgramMenuDienstStarten";
this.ProgramMenuDienstStarten.Size = new System.Drawing.Size(152, 22);
this.ProgramMenuDienstStarten.Text = "Starten";
//
// stoppenToolStripMenuItem
// ProgramMenuDienstStoppen
//
this.stoppenToolStripMenuItem.Name = "stoppenToolStripMenuItem";
this.stoppenToolStripMenuItem.Size = new System.Drawing.Size(118, 22);
this.stoppenToolStripMenuItem.Text = "Stoppen";
this.ProgramMenuDienstStoppen.Name = "ProgramMenuDienstStoppen";
this.ProgramMenuDienstStoppen.Size = new System.Drawing.Size(152, 22);
this.ProgramMenuDienstStoppen.Text = "Stoppen";
//
// statusStrip1
// Statusbar
//
this.statusStrip1.Location = new System.Drawing.Point(0, 240);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(284, 22);
this.statusStrip1.TabIndex = 1;
this.statusStrip1.Text = "statusStrip1";
this.Statusbar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.StatusbarLabel,
this.StatusbarProgress,
this.StatusbarDienst});
this.Statusbar.Location = new System.Drawing.Point(0, 240);
this.Statusbar.Name = "Statusbar";
this.Statusbar.Size = new System.Drawing.Size(284, 22);
this.Statusbar.TabIndex = 1;
this.Statusbar.Text = "statusStrip1";
//
// toolStripStatusLabel1
//
@ -161,27 +174,51 @@
// trayMenu
//
this.trayMenu.Name = "trayMenu";
this.trayMenu.Size = new System.Drawing.Size(61, 4);
//
// trayMenuNetzwerk
//
this.trayMenuNetzwerk.Name = "trayMenuNetzwerk";
this.trayMenuNetzwerk.Size = new System.Drawing.Size(32, 19);
//
// StatusbarLabel
//
this.StatusbarLabel.Name = "StatusbarLabel";
this.StatusbarLabel.Size = new System.Drawing.Size(50, 17);
this.StatusbarLabel.Text = "Alles Ok";
//
// StatusbarDienst
//
this.StatusbarDienst.Name = "StatusbarDienst";
this.StatusbarDienst.Size = new System.Drawing.Size(70, 17);
this.StatusbarDienst.Text = "Dienst Läuft";
//
// StatusbarProgress
//
this.StatusbarProgress.Name = "StatusbarProgress";
this.StatusbarProgress.Size = new System.Drawing.Size(50, 16);
//
// ProgramMenuNetzwerke
//
this.ProgramMenuNetzwerke.Name = "ProgramMenuNetzwerke";
this.ProgramMenuNetzwerke.Size = new System.Drawing.Size(74, 20);
this.ProgramMenuNetzwerke.Text = "Netzwerke";
//
// Netzmonitor
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 262);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.menuStrip1);
this.MainMenuStrip = this.menuStrip1;
this.Controls.Add(this.Statusbar);
this.Controls.Add(this.ProgramMenu);
this.MainMenuStrip = this.ProgramMenu;
this.Name = "Netzmonitor";
this.Resize += new System.EventHandler(Netzmonitor_Resize);
this.Text = "Netzmonitor";
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
this.Resize += new System.EventHandler(this.Netzmonitor_Resize);
this.ProgramMenu.ResumeLayout(false);
this.ProgramMenu.PerformLayout();
this.Statusbar.ResumeLayout(false);
this.Statusbar.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@ -189,24 +226,28 @@
#endregion
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem4;
private System.Windows.Forms.ToolStripMenuItem dienstToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem hinzufügenToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem hinzufügenToolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem ansehenToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem hinzufügenToolStripMenuItem2;
private System.Windows.Forms.ToolStripMenuItem startenToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem stoppenToolStripMenuItem;
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.MenuStrip ProgramMenu;
private System.Windows.Forms.ToolStripMenuItem ProgramMenuDatei;
private System.Windows.Forms.ToolStripMenuItem ProgramMenuDateiNetzwerke;
private System.Windows.Forms.ToolStripMenuItem ProgramMenuDateiEmail;
private System.Windows.Forms.ToolStripMenuItem ProgramMenuDateiBeenden;
private System.Windows.Forms.ToolStripMenuItem ProgramMenuDienst;
private System.Windows.Forms.ToolStripMenuItem ProgramMenuDateiNetzwerkeAnsehen;
private System.Windows.Forms.ToolStripMenuItem ProgramMenuDateiNetzwerkeBearbeiten;
private System.Windows.Forms.ToolStripMenuItem ProgramMenuDateiEmailAnsehen;
private System.Windows.Forms.ToolStripMenuItem ProgramMenuDateiEmailHinzufuegen;
private System.Windows.Forms.ToolStripMenuItem ProgramMenuDienstStarten;
private System.Windows.Forms.ToolStripMenuItem ProgramMenuDienstStoppen;
private System.Windows.Forms.StatusStrip Statusbar;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
private System.Windows.Forms.NotifyIcon trayIcon;
private System.Windows.Forms.ContextMenuStrip trayMenu;
private System.Windows.Forms.ToolStripMenuItem trayMenuNetzwerk;
private InIReader networkini;
private System.Windows.Forms.ToolStripStatusLabel StatusbarLabel;
private System.Windows.Forms.ToolStripProgressBar StatusbarProgress;
private System.Windows.Forms.ToolStripStatusLabel StatusbarDienst;
private System.Windows.Forms.ToolStripMenuItem ProgramMenuNetzwerke;
}
}

View File

@ -80,7 +80,13 @@ namespace NetMonitorClient
this.trayIcon.BalloonTipIcon = ToolTipIcon.Error;
this.trayIcon.BalloonTipText = text + " nicht gesetzt";
}
this.trayIcon.ShowBalloonTip(1000);
this.StatusbarLabel.Text = this.trayIcon.BalloonTipText;
this.trayIcon.ShowBalloonTip(200);
}
private void ProgramMenuDateiNetzwerkeAnsehen_Click(object sender, EventArgs e)
{
new EditNetworks(EditNetworks.Options.Show).ShowDialog(this);
}
}
}

View File

@ -117,10 +117,10 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="ProgramMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>167, 17</value>
</metadata>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="Statusbar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>282, 17</value>
</metadata>
<metadata name="trayIcon.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">

View File

@ -70,6 +70,12 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="EditNetworks.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="EditNetworks.Designer.cs">
<DependentUpon>EditNetworks.cs</DependentUpon>
</Compile>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>

View File

@ -40,6 +40,7 @@ namespace NetMonitorClient
tsi[i++] = TrayItemNet;
}
this.trayMenuNetzwerk.DropDownItems.AddRange(tsi);
this.ProgramMenuNetzwerke.DropDownItems.AddRange(tsi);
this.trayIcon.Icon = Properties.Resources.icon_ok;
}