Form für die Multicast-Adressen erstellt
Speicherung bzw. Scope der Settings Properties angepasst von "Anwendung" zu "Benutzer"
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
|
||||
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="WOLWin.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
@@ -8,11 +10,16 @@
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
</startup>
|
||||
<userSettings>
|
||||
|
||||
|
||||
<userSettings>
|
||||
<WOLWin.Properties.Settings>
|
||||
<setting name="PathToMacs" serializeAs="String">
|
||||
<value>Assets\RQ_MAC.csv</value>
|
||||
</setting>
|
||||
<setting name="NetIps" serializeAs="String">
|
||||
<value>172.16.87.255;172.19.139.255;10.250.139.255;10.250.87.255;10.250.139.255</value>
|
||||
</setting>
|
||||
</WOLWin.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
172.16.87.255;172.19.139.255;10.250.139.255;10.250.87.255;172.16.139.255
|
||||
RQ610000;04:D4:C4:EC:EB:FF;
|
||||
RQ610001;48:89:E7:4A:9F:89;54:05:3E:E3:18:0E
|
||||
RQ610003;BC:83:85:F0:4B:E9;
|
||||
|
||||
|
35
WOLWin/Forms/Form1.Designer.cs
generated
35
WOLWin/Forms/Form1.Designer.cs
generated
@@ -43,9 +43,10 @@ namespace WOLWin
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(12, 51);
|
||||
this.button1.Location = new System.Drawing.Point(18, 78);
|
||||
this.button1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(80, 23);
|
||||
this.button1.Size = new System.Drawing.Size(120, 35);
|
||||
this.button1.TabIndex = 2;
|
||||
this.button1.Text = "Aufwecken";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
@@ -54,36 +55,40 @@ namespace WOLWin
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(13, 9);
|
||||
this.label1.Location = new System.Drawing.Point(20, 14);
|
||||
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(65, 13);
|
||||
this.label1.Size = new System.Drawing.Size(98, 20);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "RQ-Nummer";
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
this.textBox1.Location = new System.Drawing.Point(12, 25);
|
||||
this.textBox1.Location = new System.Drawing.Point(18, 38);
|
||||
this.textBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(80, 20);
|
||||
this.textBox1.Size = new System.Drawing.Size(118, 26);
|
||||
this.textBox1.TabIndex = 1;
|
||||
this.toolTip1.SetToolTip(this.textBox1, "RQ-Nummer z.B. RQ610586");
|
||||
//
|
||||
// listBox1
|
||||
//
|
||||
this.listBox1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
|
||||
this.listBox1.Location = new System.Drawing.Point(12, 89);
|
||||
this.listBox1.Location = new System.Drawing.Point(18, 137);
|
||||
this.listBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.listBox1.Name = "listBox1";
|
||||
this.listBox1.Size = new System.Drawing.Size(202, 121);
|
||||
this.listBox1.Size = new System.Drawing.Size(301, 173);
|
||||
this.listBox1.TabIndex = 4;
|
||||
this.listBox1.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.listBox1_DrawItem);
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
this.checkBox1.AutoSize = true;
|
||||
this.checkBox1.Location = new System.Drawing.Point(109, 55);
|
||||
this.checkBox1.Location = new System.Drawing.Point(164, 85);
|
||||
this.checkBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.Size = new System.Drawing.Size(58, 17);
|
||||
this.checkBox1.Size = new System.Drawing.Size(84, 24);
|
||||
this.checkBox1.TabIndex = 5;
|
||||
this.checkBox1.Text = "Details";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
@@ -91,18 +96,19 @@ namespace WOLWin
|
||||
//
|
||||
// progressBar1
|
||||
//
|
||||
this.progressBar1.Location = new System.Drawing.Point(12, 76);
|
||||
this.progressBar1.Location = new System.Drawing.Point(18, 117);
|
||||
this.progressBar1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.progressBar1.Name = "progressBar1";
|
||||
this.progressBar1.Size = new System.Drawing.Size(158, 10);
|
||||
this.progressBar1.Size = new System.Drawing.Size(237, 15);
|
||||
this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Marquee;
|
||||
this.progressBar1.TabIndex = 6;
|
||||
this.progressBar1.Visible = false;
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(179, 89);
|
||||
this.ClientSize = new System.Drawing.Size(268, 137);
|
||||
this.Controls.Add(this.progressBar1);
|
||||
this.Controls.Add(this.checkBox1);
|
||||
this.Controls.Add(this.listBox1);
|
||||
@@ -112,6 +118,7 @@ namespace WOLWin
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.HelpButton = true;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "Form1";
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace WOLWin
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public readonly string macsPath = Properties.Settings.Default.PathToMacs;
|
||||
public readonly string netIPs = Properties.Settings.Default.NetIps;
|
||||
|
||||
bool verfügbar;
|
||||
List<string> macs;
|
||||
@@ -25,7 +26,7 @@ namespace WOLWin
|
||||
public Form1()
|
||||
{
|
||||
macs = new List<string>();
|
||||
multicastAddr = WOLLib.GetMulticastAddresses(macsPath);
|
||||
multicastAddr = WOLLib.GetMulticastAddresses(netIPs);
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
@@ -191,5 +192,7 @@ namespace WOLWin
|
||||
|
||||
e.Graphics.DrawString(selectedItem, e.Font, solidBrush, left, top);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
201
WOLWin/Forms/Net_Form.Designer.cs
generated
Normal file
201
WOLWin/Forms/Net_Form.Designer.cs
generated
Normal file
@@ -0,0 +1,201 @@
|
||||
namespace WOLWin.Forms
|
||||
{
|
||||
partial class Net_Form
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Net_Form));
|
||||
this.tbNet1 = new System.Windows.Forms.TextBox();
|
||||
this.tbNet3 = new System.Windows.Forms.TextBox();
|
||||
this.tbNet5 = new System.Windows.Forms.TextBox();
|
||||
this.tbNet2 = new System.Windows.Forms.TextBox();
|
||||
this.tbNet4 = new System.Windows.Forms.TextBox();
|
||||
this.tbNet6 = new System.Windows.Forms.TextBox();
|
||||
this.lNet1 = new System.Windows.Forms.Label();
|
||||
this.lNet3 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.lNet4 = new System.Windows.Forms.Label();
|
||||
this.lNet5 = new System.Windows.Forms.Label();
|
||||
this.lNet6 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tbNet1
|
||||
//
|
||||
this.tbNet1.Location = new System.Drawing.Point(20, 35);
|
||||
this.tbNet1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.tbNet1.Name = "tbNet1";
|
||||
this.tbNet1.Size = new System.Drawing.Size(148, 26);
|
||||
this.tbNet1.TabIndex = 0;
|
||||
//
|
||||
// tbNet3
|
||||
//
|
||||
this.tbNet3.Location = new System.Drawing.Point(18, 105);
|
||||
this.tbNet3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.tbNet3.Name = "tbNet3";
|
||||
this.tbNet3.Size = new System.Drawing.Size(148, 26);
|
||||
this.tbNet3.TabIndex = 2;
|
||||
//
|
||||
// tbNet5
|
||||
//
|
||||
this.tbNet5.Location = new System.Drawing.Point(18, 172);
|
||||
this.tbNet5.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.tbNet5.Name = "tbNet5";
|
||||
this.tbNet5.Size = new System.Drawing.Size(148, 26);
|
||||
this.tbNet5.TabIndex = 4;
|
||||
//
|
||||
// tbNet2
|
||||
//
|
||||
this.tbNet2.Location = new System.Drawing.Point(218, 35);
|
||||
this.tbNet2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.tbNet2.Name = "tbNet2";
|
||||
this.tbNet2.Size = new System.Drawing.Size(148, 26);
|
||||
this.tbNet2.TabIndex = 1;
|
||||
//
|
||||
// tbNet4
|
||||
//
|
||||
this.tbNet4.Location = new System.Drawing.Point(218, 105);
|
||||
this.tbNet4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.tbNet4.Name = "tbNet4";
|
||||
this.tbNet4.Size = new System.Drawing.Size(148, 26);
|
||||
this.tbNet4.TabIndex = 3;
|
||||
//
|
||||
// tbNet6
|
||||
//
|
||||
this.tbNet6.Location = new System.Drawing.Point(218, 172);
|
||||
this.tbNet6.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.tbNet6.Name = "tbNet6";
|
||||
this.tbNet6.Size = new System.Drawing.Size(148, 26);
|
||||
this.tbNet6.TabIndex = 5;
|
||||
//
|
||||
// lNet1
|
||||
//
|
||||
this.lNet1.AutoSize = true;
|
||||
this.lNet1.Location = new System.Drawing.Point(18, 11);
|
||||
this.lNet1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.lNet1.Name = "lNet1";
|
||||
this.lNet1.Size = new System.Drawing.Size(43, 20);
|
||||
this.lNet1.TabIndex = 6;
|
||||
this.lNet1.Text = "Net1";
|
||||
//
|
||||
// lNet3
|
||||
//
|
||||
this.lNet3.AutoSize = true;
|
||||
this.lNet3.Location = new System.Drawing.Point(15, 80);
|
||||
this.lNet3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.lNet3.Name = "lNet3";
|
||||
this.lNet3.Size = new System.Drawing.Size(43, 20);
|
||||
this.lNet3.TabIndex = 7;
|
||||
this.lNet3.Text = "Net3";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(218, 11);
|
||||
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(43, 20);
|
||||
this.label2.TabIndex = 8;
|
||||
this.label2.Text = "Net2";
|
||||
//
|
||||
// lNet4
|
||||
//
|
||||
this.lNet4.AutoSize = true;
|
||||
this.lNet4.Location = new System.Drawing.Point(218, 80);
|
||||
this.lNet4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.lNet4.Name = "lNet4";
|
||||
this.lNet4.Size = new System.Drawing.Size(43, 20);
|
||||
this.lNet4.TabIndex = 9;
|
||||
this.lNet4.Text = "Net4";
|
||||
//
|
||||
// lNet5
|
||||
//
|
||||
this.lNet5.AutoSize = true;
|
||||
this.lNet5.Location = new System.Drawing.Point(20, 148);
|
||||
this.lNet5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.lNet5.Name = "lNet5";
|
||||
this.lNet5.Size = new System.Drawing.Size(43, 20);
|
||||
this.lNet5.TabIndex = 10;
|
||||
this.lNet5.Text = "Net5";
|
||||
//
|
||||
// lNet6
|
||||
//
|
||||
this.lNet6.AutoSize = true;
|
||||
this.lNet6.Location = new System.Drawing.Point(220, 148);
|
||||
this.lNet6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.lNet6.Name = "lNet6";
|
||||
this.lNet6.Size = new System.Drawing.Size(43, 20);
|
||||
this.lNet6.TabIndex = 11;
|
||||
this.lNet6.Text = "Net6";
|
||||
//
|
||||
// Net_Form
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(387, 221);
|
||||
this.Controls.Add(this.lNet6);
|
||||
this.Controls.Add(this.lNet5);
|
||||
this.Controls.Add(this.lNet4);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.lNet3);
|
||||
this.Controls.Add(this.lNet1);
|
||||
this.Controls.Add(this.tbNet6);
|
||||
this.Controls.Add(this.tbNet4);
|
||||
this.Controls.Add(this.tbNet2);
|
||||
this.Controls.Add(this.tbNet5);
|
||||
this.Controls.Add(this.tbNet3);
|
||||
this.Controls.Add(this.tbNet1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "Net_Form";
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Net Addresses";
|
||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Net_Form_FormClosed);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox tbNet1;
|
||||
private System.Windows.Forms.TextBox tbNet3;
|
||||
private System.Windows.Forms.TextBox tbNet5;
|
||||
private System.Windows.Forms.TextBox tbNet2;
|
||||
private System.Windows.Forms.TextBox tbNet4;
|
||||
private System.Windows.Forms.TextBox tbNet6;
|
||||
private System.Windows.Forms.Label lNet1;
|
||||
private System.Windows.Forms.Label lNet3;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label lNet4;
|
||||
private System.Windows.Forms.Label lNet5;
|
||||
private System.Windows.Forms.Label lNet6;
|
||||
}
|
||||
}
|
||||
47
WOLWin/Forms/Net_Form.cs
Normal file
47
WOLWin/Forms/Net_Form.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using WOLWin.Properties;
|
||||
|
||||
namespace WOLWin.Forms
|
||||
{
|
||||
public partial class Net_Form : Form
|
||||
{
|
||||
public Net_Form()
|
||||
{
|
||||
InitializeComponent();
|
||||
LoadvaluesFromSettings();
|
||||
}
|
||||
|
||||
private void Net_Form_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
Properties.Settings.Default["NetIps"] = string.Concat(tbNet1.Text + ";", tbNet2.Text + ";", tbNet3.Text + ";", tbNet4.Text + ";", tbNet5.Text + ";", tbNet6.Text + ";");
|
||||
Properties.Settings.Default.Save();
|
||||
Settings.Default.Reload();
|
||||
}
|
||||
|
||||
private void LoadvaluesFromSettings()
|
||||
{
|
||||
var netIPs = Properties.Settings.Default.NetIps.Split(';');
|
||||
int i = 0;
|
||||
foreach (var tb in this.Controls.OfType<TextBox>().Reverse())
|
||||
{
|
||||
for (; i < netIPs.Length; i++)
|
||||
{
|
||||
if (tb.Text == string.Empty)
|
||||
{
|
||||
tb.Text = netIPs[i];
|
||||
i++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
4615
WOLWin/Forms/Net_Form.resx
Normal file
4615
WOLWin/Forms/Net_Form.resx
Normal file
File diff suppressed because it is too large
Load Diff
41
WOLWin/Forms/Readme_Form.Designer.cs
generated
41
WOLWin/Forms/Readme_Form.Designer.cs
generated
@@ -30,8 +30,8 @@
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Readme_Form));
|
||||
this.readme = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.lVersion = new System.Windows.Forms.Label();
|
||||
this.lCopyright = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// readme
|
||||
@@ -43,31 +43,32 @@
|
||||
this.readme.Size = new System.Drawing.Size(327, 288);
|
||||
this.readme.TabIndex = 0;
|
||||
//
|
||||
// label1
|
||||
// lVersion
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(291, 304);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(35, 13);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "label1";
|
||||
this.lVersion.AutoSize = true;
|
||||
this.lVersion.Location = new System.Drawing.Point(291, 304);
|
||||
this.lVersion.Name = "lVersion";
|
||||
this.lVersion.Size = new System.Drawing.Size(42, 13);
|
||||
this.lVersion.TabIndex = 1;
|
||||
this.lVersion.Text = "Version";
|
||||
this.lVersion.Click += new System.EventHandler(this.lVersion_Click);
|
||||
//
|
||||
// label2
|
||||
// lCopyright
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(12, 304);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(35, 13);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "label2";
|
||||
this.lCopyright.AutoSize = true;
|
||||
this.lCopyright.Location = new System.Drawing.Point(12, 304);
|
||||
this.lCopyright.Name = "lCopyright";
|
||||
this.lCopyright.Size = new System.Drawing.Size(51, 13);
|
||||
this.lCopyright.TabIndex = 2;
|
||||
this.lCopyright.Text = "Copyright";
|
||||
//
|
||||
// Readme_Form
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(353, 321);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.lCopyright);
|
||||
this.Controls.Add(this.lVersion);
|
||||
this.Controls.Add(this.readme);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
@@ -86,7 +87,7 @@
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox readme;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label lVersion;
|
||||
private System.Windows.Forms.Label lCopyright;
|
||||
}
|
||||
}
|
||||
@@ -8,17 +8,20 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Reflection;
|
||||
using WOLWin.Forms;
|
||||
|
||||
namespace WOLWin
|
||||
{
|
||||
public partial class Readme_Form : Form
|
||||
{
|
||||
bool help = false;
|
||||
Net_Form netForm;
|
||||
|
||||
public Readme_Form()
|
||||
{
|
||||
InitializeComponent();
|
||||
label1.Text = Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
label2.Text = Convert.ToChar(169) + "Stadtplanungs- und Bauordnungsamt Dortmund";
|
||||
lVersion.Text = Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
lCopyright.Text = Convert.ToChar(169) + "Stadtplanungs- und Bauordnungsamt Dortmund";
|
||||
if (!help)
|
||||
{
|
||||
readme.Text = "Das Programm weckt einen beliebigen Rechner im StA61 auf.\r\n\r\n" +
|
||||
@@ -37,7 +40,7 @@ namespace WOLWin
|
||||
"- es liegt ein anderes Problem vor\r\n" +
|
||||
"\r\n" +
|
||||
"Rückfragen bitte an: IT61@stadtdo.de\r\n";
|
||||
|
||||
|
||||
readme.SelectionStart = 0;
|
||||
help = true;
|
||||
}
|
||||
@@ -51,5 +54,19 @@ namespace WOLWin
|
||||
{
|
||||
help = false;
|
||||
}
|
||||
|
||||
private void lVersion_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
if((Application.OpenForms["Net_Form"]) != null)
|
||||
{
|
||||
this.netForm.BringToFront();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.netForm = new Net_Form();
|
||||
this.netForm.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,21 +53,19 @@ namespace WOLWin
|
||||
|
||||
public static List<string> GetMulticastAddresses(string pathToMacs)
|
||||
{
|
||||
using (StreamReader sr = new StreamReader(pathToMacs))
|
||||
|
||||
var addresses = new List<string>();
|
||||
|
||||
foreach (var addr in pathToMacs.Split(';'))
|
||||
{
|
||||
string line = sr.ReadLine();
|
||||
var addresses = new List<string>();
|
||||
|
||||
foreach (var addr in line.Split(';'))
|
||||
{
|
||||
addresses.Add(addr);
|
||||
}
|
||||
|
||||
return addresses;
|
||||
|
||||
addresses.Add(addr);
|
||||
}
|
||||
|
||||
return addresses;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Weckt entfernten Rechner aus dem Energiesparmodus auf
|
||||
/// </summary>
|
||||
@@ -76,7 +74,7 @@ namespace WOLWin
|
||||
public static async Task<int> WakeOnLanAsync(string mac, List<string> multicastAddr)
|
||||
{
|
||||
int result = 0;
|
||||
byte[] magicPacket = CreateMagicPacket(mac);
|
||||
byte[] magicPacket = CreateMagicPacket(mac);
|
||||
|
||||
foreach (NetworkInterface networkInterface in NetworkInterface.GetAllNetworkInterfaces().Where(n => n.NetworkInterfaceType != NetworkInterfaceType.Loopback && n.OperationalStatus == OperationalStatus.Up))
|
||||
{
|
||||
@@ -90,7 +88,7 @@ namespace WOLWin
|
||||
if (unicastIPAddressInformation != null)
|
||||
{
|
||||
result = await SendUdpAsync(unicastIPAddressInformation.Address, multiCastAdr, magicPacket);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -180,3 +178,4 @@ namespace WOLWin
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,9 +4,6 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
|
||||
|
||||
namespace WOLWin
|
||||
{
|
||||
@@ -18,9 +15,6 @@ namespace WOLWin
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
var builder = new ConfigurationBuilder();
|
||||
IConfiguration configuration = builder.SetBasePath(Directory.GetCurrentDirectory()).AddJsonFile("appsettings.json",optional:false, reloadOnChange:true).Build();
|
||||
|
||||
if (!File.Exists(Properties.Settings.Default.PathToMacs))
|
||||
{
|
||||
MessageBox.Show("MAC-Datei nicht gefunden. Bitte prüfen.", "Fehler", MessageBoxButtons.OK, MessageBoxIcon.Error); ;
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("1.23.4.26")]
|
||||
[assembly: AssemblyVersion("1.24.4.26")]
|
||||
|
||||
|
||||
12
WOLWin/Properties/Settings.Designer.cs
generated
12
WOLWin/Properties/Settings.Designer.cs
generated
@@ -34,5 +34,17 @@ namespace WOLWin.Properties {
|
||||
this["PathToMacs"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("172.16.87.255;172.19.139.255;10.250.139.255;10.250.87.255;10.250.139.255")]
|
||||
public string NetIps {
|
||||
get {
|
||||
return ((string)(this["NetIps"]));
|
||||
}
|
||||
set {
|
||||
this["NetIps"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,5 +5,8 @@
|
||||
<Setting Name="PathToMacs" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">Assets\RQ_MAC.csv</Value>
|
||||
</Setting>
|
||||
<Setting Name="NetIps" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">172.16.87.255;172.19.139.255;10.250.139.255;10.250.87.255;10.250.139.255</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -29,8 +29,6 @@
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -101,61 +99,8 @@
|
||||
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=10.0.0.7, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.10.0.7\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration, Version=10.0.0.7, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.10.0.7\lib\net462\Microsoft.Extensions.Configuration.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.Abstractions, Version=10.0.0.7, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.Abstractions.10.0.7\lib\net462\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.FileExtensions, Version=10.0.0.7, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.FileExtensions.10.0.7\lib\net462\Microsoft.Extensions.Configuration.FileExtensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.Json, Version=10.0.0.7, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.Json.10.0.7\lib\net462\Microsoft.Extensions.Configuration.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.FileProviders.Abstractions, Version=10.0.0.7, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.FileProviders.Abstractions.10.0.7\lib\net462\Microsoft.Extensions.FileProviders.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.FileProviders.Physical, Version=10.0.0.7, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.FileProviders.Physical.10.0.7\lib\net462\Microsoft.Extensions.FileProviders.Physical.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.FileSystemGlobbing, Version=10.0.0.7, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.FileSystemGlobbing.10.0.7\lib\net462\Microsoft.Extensions.FileSystemGlobbing.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Primitives, Version=10.0.0.7, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Primitives.10.0.7\lib\net462\Microsoft.Extensions.Primitives.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.6.1\lib\net462\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.IO.Pipelines, Version=10.0.0.7, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.IO.Pipelines.10.0.7\lib\net462\System.IO.Pipelines.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Memory, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.6.3\lib\net462\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.6.1\lib\net462\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.1.2\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Encodings.Web, Version=10.0.0.7, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encodings.Web.10.0.7\lib\net462\System.Text.Encodings.Web.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Json, Version=10.0.0.7, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Json.10.0.7\lib\net462\System.Text.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.6.3\lib\net462\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
@@ -173,6 +118,12 @@
|
||||
<Compile Include="Forms\Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Net_Form.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Net_Form.Designer.cs">
|
||||
<DependentUpon>Net_Form.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Forms\Readme_Form.cs">
|
||||
@@ -190,6 +141,9 @@
|
||||
<EmbeddedResource Include="Forms\Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Net_Form.resx">
|
||||
<DependentUpon>Net_Form.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
@@ -203,18 +157,14 @@
|
||||
<EmbeddedResource Include="Forms\Readme_Form.resx">
|
||||
<DependentUpon>Readme_Form.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<Content Include="appsettings.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="Assets\RQ_MAC.csv">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\app.manifest" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<EmbeddedResource Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
@@ -249,11 +199,4 @@
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v17.0\TextTemplating\Microsoft.TextTemplating.targets" />
|
||||
<Import Project="..\packages\System.ValueTuple.4.6.2\build\net471\System.ValueTuple.targets" Condition="Exists('..\packages\System.ValueTuple.4.6.2\build\net471\System.ValueTuple.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\System.ValueTuple.4.6.2\build\net471\System.ValueTuple.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.ValueTuple.4.6.2\build\net471\System.ValueTuple.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user