Changed a lot
This commit is contained in:
@@ -12,12 +12,12 @@ namespace NetMonitorClient
|
||||
{
|
||||
public partial class Netzmonitor : Form
|
||||
{
|
||||
private ServiceControl sc;
|
||||
private NetMonitorUtils.NetworkSetter sc;
|
||||
public Netzmonitor()
|
||||
{
|
||||
InitializeComponent();
|
||||
InitNetworks();
|
||||
this.sc = new ServiceControl("NetMonitorServer");
|
||||
this.sc = new NetMonitorUtils.NetworkSetter("network.ini","config.ini");
|
||||
}
|
||||
|
||||
private void Netzmonitor_Resize(object sender, System.EventArgs e)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NetMonitorClient</RootNamespace>
|
||||
<AssemblyName>NetMonitorClient</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
@@ -31,16 +31,18 @@
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>E:\Programme\NetMonitor\</OutputPath>
|
||||
<OutputPath>..\bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
@@ -50,6 +52,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
@@ -105,6 +108,7 @@
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="app.config" />
|
||||
<None Include="network.ini" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
@@ -139,6 +143,16 @@
|
||||
<ItemGroup>
|
||||
<None Include="Properties\icon_ok.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Utils\Utils\Utils.csproj">
|
||||
<Project>{fac8ce64-bf13-4ece-8097-aeb5dd060098}</Project>
|
||||
<Name>Utils</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\NetMonitorUtils\NetMonitorUtils.csproj">
|
||||
<Project>{45ee003d-5572-48fe-b90e-6bfe18d9eec8}</Project>
|
||||
<Name>NetMonitorUtils</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace NetMonitorClient
|
||||
{
|
||||
public class Networksetter
|
||||
{
|
||||
private ServiceControl sc;
|
||||
private NetMonitorUtils.NetworkSetter sc;
|
||||
private InIReader networkini;
|
||||
private string net_name;
|
||||
private List<string> loglist;
|
||||
@@ -25,7 +25,7 @@ namespace NetMonitorClient
|
||||
WinsAuto,
|
||||
Wins
|
||||
}
|
||||
public Networksetter(string name, InIReader ini, ServiceControl serv)
|
||||
public Networksetter(string name, InIReader ini, NetMonitorUtils.NetworkSetter serv)
|
||||
{
|
||||
this.net_name = name;
|
||||
this.networkini = ini;
|
||||
@@ -99,48 +99,48 @@ namespace NetMonitorClient
|
||||
text.Add("Ip: " + ip + ";Subnet: " + subnet + ";Gateway: " + gateway);
|
||||
loglist.Add("Gesendet: " + text);
|
||||
System.Windows.Forms.Application.DoEvents();
|
||||
status = this.sc.setNetworkIp(ip, subnet, gateway, adapter);
|
||||
status = this.sc.setNetworkIp(ip, subnet, gateway, adapter,"");
|
||||
}
|
||||
if (option == netsetter.Auto)
|
||||
{
|
||||
text.Add("Netzwerk auf Auto");
|
||||
loglist.Add("Gesendet: " + text);
|
||||
System.Windows.Forms.Application.DoEvents();
|
||||
status = this.sc.setNetworkAuto(adapter);
|
||||
status = this.sc.setNetworkAuto(adapter,"");
|
||||
}
|
||||
if (option == netsetter.IpAuto)
|
||||
{
|
||||
text.Add("Ip auf Auto");
|
||||
loglist.Add("Gesendet: " + text);
|
||||
System.Windows.Forms.Application.DoEvents();
|
||||
status = this.sc.setNetworkIpAuto(adapter);
|
||||
status = this.sc.setNetworkIpAuto(adapter,"");
|
||||
}
|
||||
if (option == netsetter.DnsAuto)
|
||||
{
|
||||
text.Add("Dns auf Auto");
|
||||
loglist.Add("Gesendet: " + text);
|
||||
System.Windows.Forms.Application.DoEvents();
|
||||
status = this.sc.setNetworkDnsAuto(adapter);
|
||||
status = this.sc.setNetworkDnsAuto(adapter,"");
|
||||
}
|
||||
if (option == netsetter.WinsAuto)
|
||||
{
|
||||
text.Add("Wins auf Auto");
|
||||
loglist.Add("Gesendet: " + text);
|
||||
System.Windows.Forms.Application.DoEvents();
|
||||
status = this.sc.setNetworkWinsAuto(adapter);
|
||||
status = this.sc.setNetworkWinsAuto(adapter,"");
|
||||
}
|
||||
if (option == netsetter.Dns)
|
||||
{
|
||||
text.Add("Dns: " + dns);
|
||||
loglist.Add("Gesendet: " + text);
|
||||
status = this.sc.setNetworkDNS(dns, adapter);
|
||||
status = this.sc.setNetworkDns(dns, adapter,"");
|
||||
}
|
||||
if (option == netsetter.Wins)
|
||||
{
|
||||
text.Add("Wins: " + wins);
|
||||
loglist.Add("Gesendet: " + text);
|
||||
System.Windows.Forms.Application.DoEvents();
|
||||
status = this.sc.setNetworkWINS(wins, adapter);
|
||||
status = this.sc.setNetworkWins(wins, adapter,"");
|
||||
}
|
||||
loglist.Add("Antwort: " + ((status) ? "Ok" : "Fehler"));
|
||||
System.Windows.Forms.Application.DoEvents();
|
||||
|
||||
+18
-12
@@ -1,10 +1,10 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.1
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.34209
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -13,12 +13,12 @@ namespace NetMonitorClient.Properties {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
@@ -33,7 +33,7 @@ namespace NetMonitorClient.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
@@ -47,8 +47,8 @@ namespace NetMonitorClient.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
@@ -60,6 +60,9 @@ namespace NetMonitorClient.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol).
|
||||
/// </summary>
|
||||
internal static System.Drawing.Icon icon_no {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("icon_no", resourceCulture);
|
||||
@@ -67,6 +70,9 @@ namespace NetMonitorClient.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol).
|
||||
/// </summary>
|
||||
internal static System.Drawing.Icon icon_ok {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("icon_ok", resourceCulture);
|
||||
|
||||
+5
-5
@@ -1,10 +1,10 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.1
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.34209
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace NetMonitorClient.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
|
||||
Reference in New Issue
Block a user