Добавили словари

This commit is contained in:
klavirshik 2024-08-06 09:36:37 +02:00
parent b607f9d9bb
commit 602232ce5b
22 changed files with 900 additions and 21 deletions

View File

@ -35,6 +35,7 @@
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.button1 = new System.Windows.Forms.Button();
@ -43,18 +44,23 @@
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.lb_history = new System.Windows.Forms.ListBox();
this.cm_history = new System.Windows.Forms.ContextMenuStrip(this.components);
this.sm_RebootItem = new System.Windows.Forms.ToolStripMenuItem();
this.sm_SaveItem = new System.Windows.Forms.ToolStripMenuItem();
this.tabPage4 = new System.Windows.Forms.TabPage();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.flow_words = new System.Windows.Forms.FlowLayoutPanel();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.tabPage3.SuspendLayout();
this.cm_history.SuspendLayout();
this.SuspendLayout();
//
// tb_comp
//
this.tb_comp.Location = new System.Drawing.Point(67, 12);
this.tb_comp.Name = "tb_comp";
this.tb_comp.Size = new System.Drawing.Size(195, 20);
this.tb_comp.Size = new System.Drawing.Size(207, 20);
this.tb_comp.TabIndex = 0;
//
// label1
@ -69,7 +75,7 @@
//
// bt_reset
//
this.bt_reset.Location = new System.Drawing.Point(268, 10);
this.bt_reset.Location = new System.Drawing.Point(280, 9);
this.bt_reset.Name = "bt_reset";
this.bt_reset.Size = new System.Drawing.Size(122, 23);
this.bt_reset.TabIndex = 2;
@ -109,8 +115,20 @@
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Задания";
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.AutoScroll = true;
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 3);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(396, 682);
this.flowLayoutPanel1.TabIndex = 0;
this.flowLayoutPanel1.WrapContents = false;
//
// tabPage2
//
this.tabPage2.Controls.Add(this.flow_words);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
@ -189,6 +207,7 @@
//
this.lb_history.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lb_history.ContextMenuStrip = this.cm_history;
this.lb_history.Font = new System.Drawing.Font("Cascadia Code", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lb_history.FormattingEnabled = true;
this.lb_history.ItemHeight = 15;
@ -196,6 +215,33 @@
this.lb_history.Name = "lb_history";
this.lb_history.Size = new System.Drawing.Size(396, 634);
this.lb_history.TabIndex = 0;
this.lb_history.MouseDown += new System.Windows.Forms.MouseEventHandler(this.lb_history_MouseDown);
this.lb_history.MouseLeave += new System.EventHandler(this.lb_history_MouseLeave);
this.lb_history.MouseMove += new System.Windows.Forms.MouseEventHandler(this.lb_history_MouseMove);
//
// cm_history
//
this.cm_history.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.sm_RebootItem,
this.sm_SaveItem});
this.cm_history.Name = "cm_history";
this.cm_history.ShowImageMargin = false;
this.cm_history.Size = new System.Drawing.Size(130, 48);
this.cm_history.Closed += new System.Windows.Forms.ToolStripDropDownClosedEventHandler(this.cm_history_Closed);
this.cm_history.Opening += new System.ComponentModel.CancelEventHandler(this.cm_history_Opening);
//
// sm_RebootItem
//
this.sm_RebootItem.Name = "sm_RebootItem";
this.sm_RebootItem.Size = new System.Drawing.Size(129, 22);
this.sm_RebootItem.Text = "Перезагрузить";
this.sm_RebootItem.Click += new System.EventHandler(this.sm_RebootItem_Click);
//
// sm_SaveItem
//
this.sm_SaveItem.Name = "sm_SaveItem";
this.sm_SaveItem.Size = new System.Drawing.Size(129, 22);
this.sm_SaveItem.Text = "Сохранить";
//
// tabPage4
//
@ -207,16 +253,14 @@
this.tabPage4.Text = "Настройки";
this.tabPage4.UseVisualStyleBackColor = true;
//
// flowLayoutPanel1
// flow_words
//
this.flowLayoutPanel1.AutoScroll = true;
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 3);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(396, 682);
this.flowLayoutPanel1.TabIndex = 0;
this.flowLayoutPanel1.WrapContents = false;
this.flow_words.AutoScroll = true;
this.flow_words.Dock = System.Windows.Forms.DockStyle.Fill;
this.flow_words.Location = new System.Drawing.Point(3, 3);
this.flow_words.Name = "flow_words";
this.flow_words.Size = new System.Drawing.Size(396, 682);
this.flow_words.TabIndex = 0;
//
// Form1
//
@ -231,8 +275,10 @@
this.Text = "Reseter2";
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.tabPage3.ResumeLayout(false);
this.tabPage3.PerformLayout();
this.cm_history.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@ -256,6 +302,10 @@
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.ContextMenuStrip cm_history;
private System.Windows.Forms.ToolStripMenuItem sm_RebootItem;
private System.Windows.Forms.ToolStripMenuItem sm_SaveItem;
private System.Windows.Forms.FlowLayoutPanel flow_words;
}
}

View File

@ -1,4 +1,5 @@
using Reseter2.History;
using Reseter2.Words;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@ -14,7 +15,8 @@ namespace Reseter2
public partial class Form1 : Form
{
//private FormHistory formHistory;
//public bool Focus;
private bool FocusContext;
private object selectItem;
public Form1()
{
@ -27,6 +29,61 @@ namespace Reseter2
HistoryList.Update += Update_lb;
lb_history.DataSource = HistoryList.Hitem;
lb_history.DisplayMember = "ToStr";
WordsCategoryControl wcc = new WordsCategoryControl();
flow_words.Controls.Add(wcc);
WordsItemControl wic1 = new WordsItemControl();
wcc.Add(wic1);
WordsItemControl wic2 = new WordsItemControl();
wcc.Add(wic2);
WordsItemControl wic3 = new WordsItemControl();
wcc.Add(wic3);
WordsItemControl wic4 = new WordsItemControl();
wcc.Add(wic4);
WordsItemControl wic5 = new WordsItemControl();
wcc.Add(wic5);
WordsItemControl wic6 = new WordsItemControl();
wcc.Add(wic6);
WordsItemControl wic10 = new WordsItemControl();
wcc.Add(wic10);
WordsItemControl wic11 = new WordsItemControl();
wcc.Add(wic11);
WordsItemControl wic12 = new WordsItemControl();
wcc.Add(wic12);
WordsItemControl wic13 = new WordsItemControl();
wcc.Add(wic13);
WordsItemControl wic14 = new WordsItemControl();
wcc.Add(wic14);
WordsItemControl wic21 = new WordsItemControl();
wcc.Add(wic21);
WordsItemControl wic22 = new WordsItemControl();
wcc.Add(wic22);
WordsItemControl wic23 = new WordsItemControl();
wcc.Add(wic23);
WordsItemControl wic24 = new WordsItemControl();
wcc.Add(wic24);
WordsItemControl wic25 = new WordsItemControl();
wcc.Add(wic25);
WordsItemControl wic26 = new WordsItemControl();
wcc.Add(wic26);
WordsItemControl wic30 = new WordsItemControl();
wcc.Add(wic30);
WordsItemControl wic31 = new WordsItemControl();
wcc.Add(wic31);
WordsItemControl wic32 = new WordsItemControl();
wcc.Add(wic32);
WordsItemControl wic33 = new WordsItemControl();
wcc.Add(wic33);
WordsItemControl wic34 = new WordsItemControl();
wcc.Add(wic34);
WordsCategoryControl wcc1 = new WordsCategoryControl();
flow_words.Controls.Add(wcc1);
WordsItemControl wic7 = new WordsItemControl();
wcc1.Add(wic7);
WordsItemControl wic8 = new WordsItemControl();
wcc1.Add(wic8);
}
private void label1_Click(object sender, EventArgs e)
@ -57,5 +114,51 @@ namespace Reseter2
lb_history.DataSource = HistoryList.Hitem;
lb_history.DisplayMember = "ToStr";
}
private void RebootItem_Click(object sender, EventArgs e)
{
}
private void sm_RebootItem_Click(object sender, EventArgs e)
{
if(selectItem is HistoryItem historyItem)
{
Reseter.AddTask(historyItem.GetComp());
}
}
private void lb_history_MouseMove(object sender, MouseEventArgs e)
{
lb_history.SelectedIndex = lb_history.IndexFromPoint(e.Location);
}
private void lb_history_MouseLeave(object sender, EventArgs e)
{
if(!FocusContext)
{
lb_history.SelectedIndex = -1;
}
}
private void cm_history_Opening(object sender, CancelEventArgs e)
{
selectItem = lb_history.SelectedItem;
FocusContext = true;
}
private void lb_history_MouseDown(object sender, MouseEventArgs e)
{
// lb_history.SelectedIndex = lb_history.IndexFromPoint(e.Location);
}
private void cm_history_Closed(object sender, ToolStripDropDownClosedEventArgs e)
{
// selectItem = null;
FocusContext = false;
}
}
}

View File

@ -120,4 +120,7 @@
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>122, 17</value>
</metadata>
<metadata name="cm_history.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>209, 17</value>
</metadata>
</root>

View File

@ -36,6 +36,12 @@ namespace Reseter2.History
}
public IComp GetComp()
{
return comp;
}
public void SetEndTime(DateTime endTime)
{
this.endTime = endTime;

View File

@ -14,12 +14,22 @@ namespace Reseter2
public int TimeoutPing { get; set; }
public IPAddress Ip;
public bool TimedOut;
public bool Succes;
public PingResult(long ping, int timeoutPing, IPAddress ip, bool timedOut, bool succes)
{
Ping = ping;
TimeoutPing = timeoutPing;
Ip = ip;
TimedOut = timedOut;
Succes = succes;
}
public PingResult(long ping, int timeoutPing, IPAddress ip, bool timedOut)
{
Ping = ping;
TimeoutPing = timeoutPing;
Ip = ip;
TimedOut = timedOut;
Succes = false;
}
}
}

View File

@ -25,6 +25,7 @@ namespace Reseter2
public PingResult PingHost()
{
bool pingable = false;
bool succes = false;
long ping = 0;
Ping pinger = null;
try
@ -32,6 +33,7 @@ namespace Reseter2
pinger = new Ping();
PingReply reply = pinger.Send(this.NameOrAddress);
pingable = reply.Status == IPStatus.TimedOut;
succes = reply.Status == IPStatus.Success;
ping = reply.RoundtripTime;
Ip = reply.Address;
}
@ -47,7 +49,7 @@ namespace Reseter2
}
}
if (pingable) TimeoutCount++;
return new PingResult(ping, TimeoutCount, Ip, pingable);
return new PingResult(ping, TimeoutCount, Ip, pingable, succes);
}
}

View File

@ -65,7 +65,9 @@
<Compile Include="reseter.cs" />
<Compile Include="ReseteTask.cs" />
<Compile Include="Shutdown.cs" />
<Compile Include="StatusCanceled.cs" />
<Compile Include="StatusReboot.cs" />
<Compile Include="StatusRebootError.cs" />
<Compile Include="StatusRebooting.cs" />
<Compile Include="StatusRebootStop.cs" />
<Compile Include="StatusRebootSucces.cs" />
@ -76,6 +78,21 @@
<Compile Include="TaskControl.Designer.cs">
<DependentUpon>TaskControl.cs</DependentUpon>
</Compile>
<Compile Include="Words\IWordsItem.cs" />
<Compile Include="Words\WordsCategory.cs" />
<Compile Include="Words\WordsCategoryControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Words\WordsCategoryControl.Designer.cs">
<DependentUpon>WordsCategoryControl.cs</DependentUpon>
</Compile>
<Compile Include="Words\WordsItemControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Words\WordsItemControl.Designer.cs">
<DependentUpon>WordsItemControl.cs</DependentUpon>
</Compile>
<Compile Include="Words\WordsList.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
@ -91,6 +108,12 @@
<EmbeddedResource Include="TaskControl.resx">
<DependentUpon>TaskControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Words\WordsCategoryControl.resx">
<DependentUpon>WordsCategoryControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Words\WordsItemControl.resx">
<DependentUpon>WordsItemControl.cs</DependentUpon>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>

View File

@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Reseter2
{
internal class StatusCanceled : AStatusTask
{
private PingResult PingResult;
public StatusCanceled(ReseterTask reseterTask) : base(reseterTask)
{
resetertask.SetNameStage("Отмененно");
resetertask.historyItem.SetEndTime(DateTime.Now);
PingResult = resetertask.Ping();
reseterTask.sw.Stop();
}
public override Task<PingResult> Tick()
{
return Task.FromResult(PingResult);
}
public override void Next()
{
}
public override string GetName()
{
return "Отмененно";
}
}
}

View File

@ -15,7 +15,7 @@ namespace Reseter2
private PingResult PingResult = new PingResult(0, 0, null, false);
public StatusReboot(ReseterTask reseterTask) : base(reseterTask)
{
resetertask.SetNameStage("Отправка в перезагрузки");
resetertask.SetNameStage("Отправка в перезагрузку");
Shutdown.RestartPC(reseterTask.Comp.GetResetName());
}

View File

@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Reseter2
{
internal class StatusRebootError : AStatusTask
{
private PingResult PingResult = new PingResult(0, 0, null, false);
public StatusRebootError(ReseterTask reseterTask) : base(reseterTask)
{
resetertask.SetNameStage("Ошибка перезагрузки");
resetertask.historyItem.SetEndTime(DateTime.Now);
reseterTask.sw.Stop();
}
public override Task<PingResult> Tick()
{
return Task.FromResult(PingResult);
}
public override void Next()
{
}
public override string GetName()
{
return "Ошибка";
}
}
}

View File

@ -24,7 +24,7 @@ namespace Reseter2
}
public override void Next()
{
if (PingResult.TimedOut == false)
if (PingResult.Succes)
{
TimeCount++;
}

View File

@ -9,7 +9,7 @@ namespace Reseter2
{
internal class StatusPreReboot : AStatusTask
{
private int time;
private int timeOut;
private PingResult PingResult = new PingResult(0,0,null, false);
public StatusPreReboot(ReseterTask reseterTask) : base(reseterTask)
{
@ -19,7 +19,7 @@ namespace Reseter2
public override Task<PingResult> Tick()
{
time++;
PingResult = resetertask.Ping();
return Task.FromResult(PingResult);
// return resetertask.DataContrl(pingResult.Ping.ToString(), pingResult.Ping.ToString());
@ -27,12 +27,21 @@ namespace Reseter2
}
public override void Next()
{
if (PingResult.TimedOut == false)
{
if (PingResult.Succes)
{
resetertask.StatusTask = new StatusReboot(resetertask);
HistoryList.Updated();
return;
}
else
{
timeOut++;
}
if(timeOut > 2)
{
resetertask.StatusTask = new StatusRebootError(resetertask);
HistoryList.Updated();
}
}
public override string GetName()

View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Reseter2.Words
{
internal abstract class IWordsItem
{
public abstract bool Cheked();
public abstract string GetName();
public IWordsItem()
{
}
}
}

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Reseter2.Words
{
internal class WordsCategory : IWordsItem
{
private string Name;
private bool cheked;
public override string GetName()
{
return Name;
}
public override bool Cheked()
{
return cheked;
}
}
}

View File

@ -0,0 +1,113 @@
namespace Reseter2.Words
{
partial class WordsCategoryControl
{
/// <summary>
/// Обязательная переменная конструктора.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Освободить все используемые ресурсы.
/// </summary>
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Код, автоматически созданный конструктором компонентов
/// <summary>
/// Требуемый метод для поддержки конструктора — не изменяйте
/// содержимое этого метода с помощью редактора кода.
/// </summary>
private void InitializeComponent()
{
this.Select = new System.Windows.Forms.CheckBox();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.flow_wordsItem = new System.Windows.Forms.FlowLayoutPanel();
this.SuspendLayout();
//
// Select
//
this.Select.AutoSize = true;
this.Select.Location = new System.Drawing.Point(6, 2);
this.Select.Name = "Select";
this.Select.Size = new System.Drawing.Size(15, 14);
this.Select.TabIndex = 1;
this.Select.UseVisualStyleBackColor = true;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(3, 5);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(367, 13);
this.label2.TabIndex = 0;
this.label2.Text = "____________________________________________________________";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(23, 2);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(88, 13);
this.label3.TabIndex = 2;
this.label3.Text = "Вебинарные ПК";
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label1.Location = new System.Drawing.Point(366, -4);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(30, 29);
this.label1.TabIndex = 3;
this.label1.Text = "⟱";
this.label1.Click += new System.EventHandler(this.label1_Click);
//
// flow_wordsItem
//
this.flow_wordsItem.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.flow_wordsItem.AutoSize = true;
this.flow_wordsItem.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flow_wordsItem.Location = new System.Drawing.Point(0, 20);
this.flow_wordsItem.Name = "flow_wordsItem";
this.flow_wordsItem.Size = new System.Drawing.Size(403, 5);
this.flow_wordsItem.TabIndex = 4;
this.flow_wordsItem.WrapContents = false;
//
// WordsCategoryControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.AutoSize = true;
this.Controls.Add(this.flow_wordsItem);
this.Controls.Add(this.Select);
this.Controls.Add(this.label1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Name = "WordsCategoryControl";
this.Size = new System.Drawing.Size(403, 25);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.CheckBox Select;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.FlowLayoutPanel flow_wordsItem;
}
}

View File

@ -0,0 +1,32 @@
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;
namespace Reseter2.Words
{
[DefaultEvent(nameof(WordsCategoryControl))]
partial class WordsCategoryControl : UserControl
{
public WordsCategoryControl()
{
InitializeComponent();
}
public void Add(WordsItemControl wic)
{
flow_wordsItem.Controls.Add(wic);
}
private void label1_Click(object sender, EventArgs e)
{
flow_wordsItem.Visible = !flow_wordsItem.Visible;
//flow_wordsItem.s
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,132 @@
namespace Reseter2.Words
{
partial class WordsItemControl
{
/// <summary>
/// Обязательная переменная конструктора.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Освободить все используемые ресурсы.
/// </summary>
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Код, автоматически созданный конструктором компонентов
/// <summary>
/// Требуемый метод для поддержки конструктора — не изменяйте
/// содержимое этого метода с помощью редактора кода.
/// </summary>
private void InitializeComponent()
{
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.label1 = new System.Windows.Forms.Label();
this.lb_name = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.lb_ip = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Location = new System.Drawing.Point(8, 6);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(15, 14);
this.checkBox1.TabIndex = 0;
this.checkBox1.UseVisualStyleBackColor = true;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(31, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(47, 13);
this.label1.TabIndex = 1;
this.label1.Text = "Имя ПК";
//
// lb_name
//
this.lb_name.AutoSize = true;
this.lb_name.Location = new System.Drawing.Point(84, 0);
this.lb_name.Name = "lb_name";
this.lb_name.Size = new System.Drawing.Size(65, 13);
this.lb_name.TabIndex = 2;
this.lb_name.Text = "1MA001234";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(183, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(50, 13);
this.label2.TabIndex = 3;
this.label2.Text = "IP адрес";
//
// lb_ip
//
this.lb_ip.AutoSize = true;
this.lb_ip.Location = new System.Drawing.Point(239, 0);
this.lb_ip.Name = "lb_ip";
this.lb_ip.Size = new System.Drawing.Size(70, 13);
this.lb_ip.TabIndex = 4;
this.lb_ip.Text = "10,3,100,252";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(31, 15);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(57, 13);
this.label3.TabIndex = 5;
this.label3.Text = "Описание";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(88, 15);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(220, 13);
this.label4.TabIndex = 6;
this.label4.Text = "Контролер оповещения физлица главный";
//
// WordsItemControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.lb_ip);
this.Controls.Add(this.label2);
this.Controls.Add(this.lb_name);
this.Controls.Add(this.label1);
this.Controls.Add(this.checkBox1);
this.Name = "WordsItemControl";
this.Size = new System.Drawing.Size(371, 27);
this.Load += new System.EventHandler(this.WordsItemControl_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label lb_name;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label lb_ip;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
}
}

View File

@ -0,0 +1,29 @@
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;
namespace Reseter2.Words
{
[DefaultEvent(nameof(WordsItemControl))]
public partial class WordsItemControl : UserControl
{
public WordsItemControl()
{
InitializeComponent();
}
private void WordsItemControl_Load(object sender, EventArgs e)
{
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Reseter2.Words
{
static class WordsList
{
private static List<IWordsItem> wordsItems = new List<IWordsItem>();
private static void Add()
{
}
}
}

View File

@ -52,6 +52,7 @@ namespace Reseter2
public static async void Clear(ReseterTask reseterTask, TaskControl taskControl)
{
reseterTask.StatusTask = new StatusCanceled(reseterTask);
reseterTask.historyItem.SetEndTime(DateTime.Now);
HistoryList.Updated();
flow_conteiner.Controls.Remove(taskControl);