Добавили модель данных справочника

This commit is contained in:
klavirshik 2024-08-07 19:00:59 +02:00
parent 602232ce5b
commit 2d30585572
19 changed files with 969 additions and 47 deletions

View File

@ -37,6 +37,7 @@
this.tabPage1 = new System.Windows.Forms.TabPage();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.flow_words = new System.Windows.Forms.FlowLayoutPanel();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.button1 = new System.Windows.Forms.Button();
this.label6 = new System.Windows.Forms.Label();
@ -48,12 +49,17 @@
this.sm_RebootItem = new System.Windows.Forms.ToolStripMenuItem();
this.sm_SaveItem = new System.Windows.Forms.ToolStripMenuItem();
this.tabPage4 = new System.Windows.Forms.TabPage();
this.flow_words = new System.Windows.Forms.FlowLayoutPanel();
this.cm_words = new System.Windows.Forms.ContextMenuStrip(this.components);
this.mi_newitem = new System.Windows.Forms.ToolStripMenuItem();
this.mi_newcategory = new System.Windows.Forms.ToolStripMenuItem();
this.mi_edit = new System.Windows.Forms.ToolStripMenuItem();
this.mi_delete = new System.Windows.Forms.ToolStripMenuItem();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.tabPage3.SuspendLayout();
this.cm_history.SuspendLayout();
this.cm_words.SuspendLayout();
this.SuspendLayout();
//
// tb_comp
@ -137,6 +143,16 @@
this.tabPage2.Text = "Справочник";
this.tabPage2.UseVisualStyleBackColor = true;
//
// flow_words
//
this.flow_words.AutoScroll = true;
this.flow_words.ContextMenuStrip = this.cm_words;
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;
//
// tabPage3
//
this.tabPage3.Controls.Add(this.button1);
@ -253,14 +269,40 @@
this.tabPage4.Text = "Настройки";
this.tabPage4.UseVisualStyleBackColor = true;
//
// flow_words
// cm_words
//
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;
this.cm_words.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.mi_newitem,
this.mi_newcategory,
this.mi_edit,
this.mi_delete});
this.cm_words.Name = "cm_words";
this.cm_words.Size = new System.Drawing.Size(181, 114);
//
// mi_newitem
//
this.mi_newitem.Name = "mi_newitem";
this.mi_newitem.Size = new System.Drawing.Size(180, 22);
this.mi_newitem.Text = "Новый элемент";
this.mi_newitem.Click += new System.EventHandler(this.mi_newitem_Click);
//
// mi_newcategory
//
this.mi_newcategory.Name = "mi_newcategory";
this.mi_newcategory.Size = new System.Drawing.Size(166, 22);
this.mi_newcategory.Text = "Новая категория";
//
// mi_edit
//
this.mi_edit.Name = "mi_edit";
this.mi_edit.Size = new System.Drawing.Size(166, 22);
this.mi_edit.Text = "Изменить";
//
// mi_delete
//
this.mi_delete.Name = "mi_delete";
this.mi_delete.Size = new System.Drawing.Size(166, 22);
this.mi_delete.Text = "Удалить";
//
// Form1
//
@ -279,6 +321,7 @@
this.tabPage3.ResumeLayout(false);
this.tabPage3.PerformLayout();
this.cm_history.ResumeLayout(false);
this.cm_words.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@ -306,6 +349,11 @@
private System.Windows.Forms.ToolStripMenuItem sm_RebootItem;
private System.Windows.Forms.ToolStripMenuItem sm_SaveItem;
private System.Windows.Forms.FlowLayoutPanel flow_words;
private System.Windows.Forms.ContextMenuStrip cm_words;
private System.Windows.Forms.ToolStripMenuItem mi_newitem;
private System.Windows.Forms.ToolStripMenuItem mi_newcategory;
private System.Windows.Forms.ToolStripMenuItem mi_edit;
private System.Windows.Forms.ToolStripMenuItem mi_delete;
}
}

View File

@ -47,34 +47,7 @@ namespace Reseter2
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();
@ -160,5 +133,11 @@ namespace Reseter2
// selectItem = null;
FocusContext = false;
}
private void mi_newitem_Click(object sender, EventArgs e)
{
BilderWords bilderWords = new BilderWords();
bilderWords.ShowDialog();
}
}
}

View File

@ -120,6 +120,9 @@
<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_words.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>319, 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>

View File

@ -35,6 +35,7 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.ServiceProcess" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
@ -78,6 +79,12 @@
<Compile Include="TaskControl.Designer.cs">
<DependentUpon>TaskControl.cs</DependentUpon>
</Compile>
<Compile Include="Words\BilderWords.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Words\BilderWords.Designer.cs">
<DependentUpon>BilderWords.cs</DependentUpon>
</Compile>
<Compile Include="Words\IWordsItem.cs" />
<Compile Include="Words\WordsCategory.cs" />
<Compile Include="Words\WordsCategoryControl.cs">
@ -86,6 +93,19 @@
<Compile Include="Words\WordsCategoryControl.Designer.cs">
<DependentUpon>WordsCategoryControl.cs</DependentUpon>
</Compile>
<Compile Include="Words\WordsComp.cs" />
<Compile Include="Words\WordsEditCompControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Words\WordsEditCompControl.Designer.cs">
<DependentUpon>WordsEditCompControl.cs</DependentUpon>
</Compile>
<Compile Include="Words\WordsEditCategoryControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Words\WordsEditCategoryControl.Designer.cs">
<DependentUpon>WordsEditCategoryControl.cs</DependentUpon>
</Compile>
<Compile Include="Words\WordsItemControl.cs">
<SubType>UserControl</SubType>
</Compile>
@ -108,9 +128,18 @@
<EmbeddedResource Include="TaskControl.resx">
<DependentUpon>TaskControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Words\BilderWords.resx">
<DependentUpon>BilderWords.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Words\WordsCategoryControl.resx">
<DependentUpon>WordsCategoryControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Words\WordsEditCompControl.resx">
<DependentUpon>WordsEditCompControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Words\WordsEditCategoryControl.resx">
<DependentUpon>WordsEditCategoryControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Words\WordsItemControl.resx">
<DependentUpon>WordsItemControl.cs</DependentUpon>
</EmbeddedResource>

View File

@ -25,6 +25,7 @@ namespace Reseter2
}
public override string GetName()
{
return "Ошибка";
}
}

77
Reseter2/Words/BilderWords.Designer.cs generated Normal file
View File

@ -0,0 +1,77 @@
namespace Reseter2.Words
{
partial class BilderWords
{
/// <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.rb_category = new System.Windows.Forms.RadioButton();
this.rb_comp = new System.Windows.Forms.RadioButton();
this.SuspendLayout();
//
// rb_category
//
this.rb_category.AutoSize = true;
this.rb_category.Checked = true;
this.rb_category.Location = new System.Drawing.Point(13, 13);
this.rb_category.Name = "rb_category";
this.rb_category.Size = new System.Drawing.Size(78, 17);
this.rb_category.TabIndex = 0;
this.rb_category.TabStop = true;
this.rb_category.Text = "Категория";
this.rb_category.UseVisualStyleBackColor = true;
this.rb_category.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
//
// rb_comp
//
this.rb_comp.AutoSize = true;
this.rb_comp.Location = new System.Drawing.Point(97, 13);
this.rb_comp.Name = "rb_comp";
this.rb_comp.Size = new System.Drawing.Size(83, 17);
this.rb_comp.TabIndex = 1;
this.rb_comp.Text = "Компьютер";
this.rb_comp.UseVisualStyleBackColor = true;
//
// BilderWords
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(327, 264);
this.Controls.Add(this.rb_comp);
this.Controls.Add(this.rb_category);
this.Name = "BilderWords";
this.Text = "BilderWords";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.RadioButton rb_category;
private System.Windows.Forms.RadioButton rb_comp;
}
}

View File

@ -0,0 +1,42 @@
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
{
internal partial class BilderWords : Form
{
public BilderWords()
{
InitializeComponent();
}
public BilderWords(WordsCategory category):base()
{
}
public BilderWords(WordsComp item) : base()
{
}
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
if(rb_category.Checked)
{
}
else
{
}
}
}
}

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

@ -8,12 +8,12 @@ namespace Reseter2.Words
{
internal abstract class IWordsItem
{
public abstract bool Cheked();
public abstract string GetName();
public IWordsItem()
{
public abstract List<WordsComp> ChekList();
public abstract List<WordsCategory> CategoryList();
}
public abstract void ChekChange(bool chek);

View File

@ -10,14 +10,49 @@ namespace Reseter2.Words
{
private string Name;
private bool cheked;
private List<IWordsItem> items;
public override string GetName()
public WordsCategory(string name)
{
Name = name;
}
public void Add(IWordsItem newitem)
{
items.Add(newitem);
}
public string GetName()
{
return Name;
}
public override bool Cheked()
public override void ChekChange(bool chek)
{
return cheked;
cheked = chek;
foreach(var item in items)
{
item.ChekChange(chek);
}
}
public override List<WordsComp> ChekList()
{
List<WordsComp> itemsChek = new List<WordsComp>();
foreach (var item in items)
{
itemsChek.AddRange(item.ChekList());
}
return itemsChek;
}
public override List<WordsCategory> CategoryList()
{
List<WordsCategory> itemsCatrgory = new List<WordsCategory>();
itemsCatrgory.Add(this);
foreach (var item in items)
{
itemsCatrgory.AddRange(item.CategoryList());
}
return itemsCatrgory;
}
}
}

View File

@ -91,6 +91,7 @@
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.AutoSize = true;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.Controls.Add(this.flow_wordsItem);
this.Controls.Add(this.Select);
this.Controls.Add(this.label1);

View File

@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Reseter2.Words
{
internal class WordsComp : IWordsItem
{
private IComp Comp;
private bool cheked;
public WordsComp(IComp comp)
{
Comp = comp;
}
public string GetName()
{
return Comp.GetName();
}
public override void ChekChange(bool chek)
{
cheked = chek;
}
public override List<WordsComp> ChekList()
{
List<WordsComp> itemsChek = new List<WordsComp>();
if (cheked) {itemsChek.Add(this); }
return itemsChek;
}
public override List<WordsCategory> CategoryList()
{
return new List<WordsCategory>();
}
}
}

View File

@ -0,0 +1,116 @@
namespace Reseter2.Words
{
partial class WordsEditCategoryControl
{
/// <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.label1 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.listBox1 = new System.Windows.Forms.ListBox();
this.label3 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(3, 35);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(112, 13);
this.label1.TabIndex = 0;
this.label1.Text = "Название категории";
this.label1.Click += new System.EventHandler(this.label1_Click);
//
// comboBox1
//
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(134, 4);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(179, 21);
this.comboBox1.TabIndex = 1;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(3, 7);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(125, 13);
this.label2.TabIndex = 2;
this.label2.Text = "Родтиельский элемент";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(134, 32);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(179, 20);
this.textBox1.TabIndex = 3;
//
// listBox1
//
this.listBox1.FormattingEnabled = true;
this.listBox1.Location = new System.Drawing.Point(6, 82);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(307, 147);
this.listBox1.TabIndex = 4;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(6, 63);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(173, 13);
this.label3.TabIndex = 5;
this.label3.Text = "Порядок элементов в категории";
//
// WordsEditCategoryControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.label3);
this.Controls.Add(this.listBox1);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label2);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.label1);
this.Name = "WordsEditCategoryControl";
this.Size = new System.Drawing.Size(316, 233);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.Label label3;
}
}

View File

@ -0,0 +1,26 @@
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(WordsEditCategoryControl))]
public partial class WordsEditCategoryControl : UserControl
{
public WordsEditCategoryControl()
{
InitializeComponent();
}
private void label1_Click(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,139 @@
namespace Reseter2.Words
{
partial class WordsEditCompControl
{
/// <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.label1 = new System.Windows.Forms.Label();
this.serviceController1 = new System.ServiceProcess.ServiceController();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(3, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(125, 13);
this.label1.TabIndex = 0;
this.label1.Text = "Родительский элемент";
//
// comboBox1
//
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(136, 5);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(177, 21);
this.comboBox1.TabIndex = 1;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(66, 33);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(247, 20);
this.textBox1.TabIndex = 2;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(3, 36);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(47, 13);
this.label2.TabIndex = 3;
this.label2.Text = "Имя ПК";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(3, 62);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(50, 13);
this.label3.TabIndex = 5;
this.label3.Text = "IP адрес";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(66, 59);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(247, 20);
this.textBox2.TabIndex = 4;
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(66, 85);
this.textBox3.Multiline = true;
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(247, 63);
this.textBox3.TabIndex = 6;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(3, 87);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(57, 13);
this.label4.TabIndex = 7;
this.label4.Text = "Описание";
//
// WordsCompCategoryControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.label4);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.label3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.label2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.label1);
this.Name = "WordsCompCategoryControl";
this.Size = new System.Drawing.Size(316, 150);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.ServiceProcess.ServiceController serviceController1;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Label label4;
}
}

View File

@ -0,0 +1,23 @@
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(WordsEditCompControl))]
public partial class WordsEditCompControl : UserControl
{
public WordsEditCompControl()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,123 @@
<?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>
<metadata name="serviceController1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -9,10 +9,10 @@ namespace Reseter2.Words
{
static class WordsList
{
private static List<IWordsItem> wordsItems = new List<IWordsItem>();
private static void Add()
private static WordsCategory MainCategory = new WordsCategory("Main");
private static void AddItem(IWordsItem item)
{
}
}
}