редактирование статусов вида истории
This commit is contained in:
parent
382e9a3876
commit
e3268653ae
|
|
@ -29,22 +29,25 @@
|
|||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
|
||||
this.tb_comp = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.bt_reset = new System.Windows.Forms.Button();
|
||||
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
||||
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripButton3 = new System.Windows.Forms.ToolStripButton();
|
||||
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.toolStrip1.SuspendLayout();
|
||||
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.tabPage4 = new System.Windows.Forms.TabPage();
|
||||
this.lb_history = new System.Windows.Forms.ListBox();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.tabPage3.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tb_comp
|
||||
//
|
||||
this.tb_comp.Location = new System.Drawing.Point(65, 33);
|
||||
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.TabIndex = 0;
|
||||
|
|
@ -52,7 +55,7 @@
|
|||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(12, 36);
|
||||
this.label1.Location = new System.Drawing.Point(14, 15);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(47, 13);
|
||||
this.label1.TabIndex = 1;
|
||||
|
|
@ -61,7 +64,7 @@
|
|||
//
|
||||
// bt_reset
|
||||
//
|
||||
this.bt_reset.Location = new System.Drawing.Point(266, 31);
|
||||
this.bt_reset.Location = new System.Drawing.Point(268, 10);
|
||||
this.bt_reset.Name = "bt_reset";
|
||||
this.bt_reset.Size = new System.Drawing.Size(122, 23);
|
||||
this.bt_reset.TabIndex = 2;
|
||||
|
|
@ -69,46 +72,37 @@
|
|||
this.bt_reset.UseVisualStyleBackColor = true;
|
||||
this.bt_reset.Click += new System.EventHandler(this.bt_reset_Click);
|
||||
//
|
||||
// toolStrip1
|
||||
// timer1
|
||||
//
|
||||
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripButton1,
|
||||
this.toolStripButton2,
|
||||
this.toolStripButton3});
|
||||
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.toolStrip1.Name = "toolStrip1";
|
||||
this.toolStrip1.Size = new System.Drawing.Size(394, 25);
|
||||
this.toolStrip1.TabIndex = 3;
|
||||
this.toolStrip1.Text = "toolStrip1";
|
||||
this.timer1.Enabled = true;
|
||||
this.timer1.Interval = 1000;
|
||||
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
|
||||
//
|
||||
// toolStripButton1
|
||||
// tabControl1
|
||||
//
|
||||
this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
|
||||
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripButton1.Name = "toolStripButton1";
|
||||
this.toolStripButton1.Size = new System.Drawing.Size(54, 22);
|
||||
this.toolStripButton1.Text = "Каталог";
|
||||
this.tabControl1.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.tabControl1.Controls.Add(this.tabPage1);
|
||||
this.tabControl1.Controls.Add(this.tabPage2);
|
||||
this.tabControl1.Controls.Add(this.tabPage3);
|
||||
this.tabControl1.Controls.Add(this.tabPage4);
|
||||
this.tabControl1.Location = new System.Drawing.Point(2, 39);
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
this.tabControl1.Size = new System.Drawing.Size(410, 697);
|
||||
this.tabControl1.TabIndex = 4;
|
||||
//
|
||||
// toolStripButton2
|
||||
// tabPage1
|
||||
//
|
||||
this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image")));
|
||||
this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripButton2.Name = "toolStripButton2";
|
||||
this.toolStripButton2.Size = new System.Drawing.Size(58, 22);
|
||||
this.toolStripButton2.Text = "История";
|
||||
this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click);
|
||||
//
|
||||
// toolStripButton3
|
||||
//
|
||||
this.toolStripButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.toolStripButton3.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton3.Image")));
|
||||
this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripButton3.Name = "toolStripButton3";
|
||||
this.toolStripButton3.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||
this.toolStripButton3.Size = new System.Drawing.Size(86, 22);
|
||||
this.toolStripButton3.Text = "О программе";
|
||||
this.tabPage1.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.tabPage1.Controls.Add(this.flowLayoutPanel1);
|
||||
this.tabPage1.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage1.Size = new System.Drawing.Size(402, 671);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
this.tabPage1.Text = "Задания";
|
||||
//
|
||||
// flowLayoutPanel1
|
||||
//
|
||||
|
|
@ -116,35 +110,68 @@
|
|||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.flowLayoutPanel1.AutoScroll = true;
|
||||
this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.flowLayoutPanel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
||||
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
||||
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 67);
|
||||
this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 3);
|
||||
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||
this.flowLayoutPanel1.Size = new System.Drawing.Size(394, 654);
|
||||
this.flowLayoutPanel1.TabIndex = 4;
|
||||
this.flowLayoutPanel1.Size = new System.Drawing.Size(396, 665);
|
||||
this.flowLayoutPanel1.TabIndex = 0;
|
||||
this.flowLayoutPanel1.WrapContents = false;
|
||||
//
|
||||
// timer1
|
||||
// tabPage2
|
||||
//
|
||||
this.timer1.Enabled = true;
|
||||
this.timer1.Interval = 1000;
|
||||
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
|
||||
this.tabPage2.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage2.Size = new System.Drawing.Size(392, 671);
|
||||
this.tabPage2.TabIndex = 1;
|
||||
this.tabPage2.Text = "Справочник";
|
||||
this.tabPage2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tabPage3
|
||||
//
|
||||
this.tabPage3.Controls.Add(this.lb_history);
|
||||
this.tabPage3.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage3.Name = "tabPage3";
|
||||
this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage3.Size = new System.Drawing.Size(402, 671);
|
||||
this.tabPage3.TabIndex = 2;
|
||||
this.tabPage3.Text = "История";
|
||||
this.tabPage3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tabPage4
|
||||
//
|
||||
this.tabPage4.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage4.Name = "tabPage4";
|
||||
this.tabPage4.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage4.Size = new System.Drawing.Size(392, 671);
|
||||
this.tabPage4.TabIndex = 3;
|
||||
this.tabPage4.Text = "Настройки";
|
||||
this.tabPage4.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// lb_history
|
||||
//
|
||||
this.lb_history.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lb_history.FormattingEnabled = true;
|
||||
this.lb_history.Location = new System.Drawing.Point(3, 3);
|
||||
this.lb_history.Name = "lb_history";
|
||||
this.lb_history.Size = new System.Drawing.Size(396, 665);
|
||||
this.lb_history.TabIndex = 0;
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.ClientSize = new System.Drawing.Size(394, 717);
|
||||
this.Controls.Add(this.flowLayoutPanel1);
|
||||
this.Controls.Add(this.toolStrip1);
|
||||
this.ClientSize = new System.Drawing.Size(410, 753);
|
||||
this.Controls.Add(this.tabControl1);
|
||||
this.Controls.Add(this.bt_reset);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.tb_comp);
|
||||
this.Name = "Form1";
|
||||
this.Text = "Reseter2";
|
||||
this.toolStrip1.ResumeLayout(false);
|
||||
this.toolStrip1.PerformLayout();
|
||||
|
||||
this.tabControl1.ResumeLayout(false);
|
||||
this.tabPage1.ResumeLayout(false);
|
||||
this.tabPage3.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
|
@ -155,12 +182,14 @@
|
|||
private System.Windows.Forms.TextBox tb_comp;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button bt_reset;
|
||||
private System.Windows.Forms.ToolStrip toolStrip1;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButton1;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButton2;
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||
private System.Windows.Forms.Timer timer1;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButton3;
|
||||
private System.Windows.Forms.TabControl tabControl1;
|
||||
private System.Windows.Forms.TabPage tabPage1;
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||
private System.Windows.Forms.TabPage tabPage2;
|
||||
private System.Windows.Forms.TabPage tabPage3;
|
||||
private System.Windows.Forms.TabPage tabPage4;
|
||||
private System.Windows.Forms.ListBox lb_history;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,14 +13,20 @@ namespace Reseter2
|
|||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
private FormHistory formHistory;
|
||||
//private FormHistory formHistory;
|
||||
public bool Focus;
|
||||
public Form1()
|
||||
{
|
||||
|
||||
|
||||
|
||||
InitializeComponent();
|
||||
flowLayoutPanel1.AutoScrollMinSize = new Size(0, 655) ;
|
||||
flowLayoutPanel1.AutoScrollMinSize = new Size(0, 666) ;
|
||||
flowLayoutPanel1.VerticalScroll.Visible = true;
|
||||
Reseter.SetForm(flowLayoutPanel1);
|
||||
HistoryList.Update += Update_lb;
|
||||
lb_history.DataSource = HistoryList.Hitem;
|
||||
lb_history.DisplayMember = "ToStr";
|
||||
}
|
||||
|
||||
private void label1_Click(object sender, EventArgs e)
|
||||
|
|
@ -37,22 +43,12 @@ namespace Reseter2
|
|||
{
|
||||
Reseter.Tick();
|
||||
}
|
||||
|
||||
private void toolStripButton2_Click(object sender, EventArgs e)
|
||||
public void Update_lb()
|
||||
{
|
||||
if (formHistory == null)
|
||||
{
|
||||
formHistory = new FormHistory();
|
||||
HistoryList.SetControl(formHistory);
|
||||
formHistory.Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
formHistory.Activate();
|
||||
}
|
||||
|
||||
|
||||
lb_history.DataSource = null;
|
||||
lb_history.DataSource = HistoryList.Hitem;
|
||||
lb_history.DisplayMember = "ToStr";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,58 +117,6 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
|
||||
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
|
||||
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
|
||||
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
|
||||
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
|
||||
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripButton2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
|
||||
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
|
||||
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
|
||||
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
|
||||
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
|
||||
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripButton3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
|
||||
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
|
||||
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
|
||||
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
|
||||
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
|
||||
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="flowLayoutPanel1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>122, 17</value>
|
||||
</metadata>
|
||||
|
|
|
|||
|
|
@ -1,79 +0,0 @@
|
|||
namespace Reseter2
|
||||
{
|
||||
partial class FormHistory
|
||||
{
|
||||
/// <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.button1 = new System.Windows.Forms.Button();
|
||||
this.TableHistory = new System.Windows.Forms.DataGridView();
|
||||
((System.ComponentModel.ISupportInitialize)(this.TableHistory)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.button1.Location = new System.Drawing.Point(316, 414);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(75, 23);
|
||||
this.button1.TabIndex = 0;
|
||||
this.button1.Text = "button1";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// TableHistory
|
||||
//
|
||||
this.TableHistory.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.TableHistory.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.TableHistory.Location = new System.Drawing.Point(0, 0);
|
||||
this.TableHistory.Name = "TableHistory";
|
||||
this.TableHistory.RowHeadersVisible = false;
|
||||
this.TableHistory.Size = new System.Drawing.Size(403, 409);
|
||||
this.TableHistory.TabIndex = 1;
|
||||
//
|
||||
// FormHistory
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(403, 441);
|
||||
this.Controls.Add(this.TableHistory);
|
||||
this.Controls.Add(this.button1);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "FormHistory";
|
||||
this.Text = "FormHistory";
|
||||
((System.ComponentModel.ISupportInitialize)(this.TableHistory)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.DataGridView TableHistory;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
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
|
||||
{
|
||||
public partial class FormHistory : Form
|
||||
{
|
||||
private DataTable dataTable;
|
||||
private DataSet ds;
|
||||
private DataRow row;
|
||||
public FormHistory()
|
||||
{
|
||||
|
||||
InitializeComponent();
|
||||
ds = new DataSet();
|
||||
dataTable = new DataTable();
|
||||
TableHistory.DataSource = dataTable;
|
||||
dataTable.Columns.Add("Время");
|
||||
dataTable.Columns.Add("Имя");
|
||||
dataTable.Columns.Add("Статус");
|
||||
ds.Tables.Add(dataTable);
|
||||
row = dataTable.NewRow();
|
||||
row[0] = "12";
|
||||
row[1] = "123";
|
||||
row[2] = "12444";
|
||||
dataTable.Rows.Add(row);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,120 +0,0 @@
|
|||
<?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>
|
||||
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
|
||||
namespace Reseter2.History
|
||||
{
|
||||
|
|
@ -14,6 +15,7 @@ namespace Reseter2.History
|
|||
private ReseterTask task;
|
||||
private AStatusTask statusTask;
|
||||
private DateTime startTime;
|
||||
private string statusName;
|
||||
public HistoryItem(IComp comp, AStatusTask statusTask, DateTime startTime)
|
||||
{
|
||||
this.comp = comp;
|
||||
|
|
@ -32,5 +34,24 @@ namespace Reseter2.History
|
|||
return new SHistory(comp.GetName(), startTime.ToShortTimeString(), statusTask.GetName());
|
||||
|
||||
}
|
||||
|
||||
public void ClearTask()
|
||||
{
|
||||
this.task = null;
|
||||
this.statusTask = null;
|
||||
}
|
||||
public string ToStr
|
||||
{
|
||||
|
||||
get {
|
||||
if (this.task != null)
|
||||
{
|
||||
this.statusTask = this.task.StatusTask;
|
||||
this.statusName = this.statusTask.GetName();
|
||||
}
|
||||
string output = string.Format("{0,5}|{1,10}|{2,10}", startTime.ToString(), comp.GetResetName(), this.statusName, startTime.ToString());
|
||||
return output;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,30 +1,36 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Reseter2.History
|
||||
{
|
||||
internal static class HistoryList
|
||||
{
|
||||
static private List<HistoryItem> Hitem;
|
||||
static private FormHistory formHistory;
|
||||
static public List<HistoryItem> Hitem = new List<HistoryItem>();
|
||||
//static private FormHistory formHistory;
|
||||
|
||||
public delegate void UpdateMethod();
|
||||
static public event UpdateMethod Update;
|
||||
static public HistoryItem Add(ReseterTask reseterTask)
|
||||
{
|
||||
HistoryItem historyItem = new HistoryItem(reseterTask);
|
||||
Hitem.Add(historyItem);
|
||||
return historyItem;
|
||||
}
|
||||
static public void SetControl(FormHistory formhistory)
|
||||
{
|
||||
formHistory = formhistory;
|
||||
}
|
||||
static public void Update()
|
||||
{
|
||||
|
||||
HistoryItem historyItem = new HistoryItem(reseterTask);
|
||||
Hitem.Add(historyItem);
|
||||
Update();
|
||||
|
||||
return historyItem;
|
||||
|
||||
}
|
||||
static public void Updated()
|
||||
{
|
||||
Update();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using Reseter2.History;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
|
@ -18,10 +19,14 @@ namespace Reseter2
|
|||
public abstract string GetName();
|
||||
public void Stop() {
|
||||
resetertask.StatusTask = new StatusRebootStop(resetertask);
|
||||
HistoryList.Updated();
|
||||
}
|
||||
public void RebootReturn()
|
||||
{
|
||||
resetertask.historyItem.ClearTask();
|
||||
resetertask.StatusTask = new StatusPreReboot(resetertask);
|
||||
resetertask.historyItem = HistoryList.Add(resetertask);
|
||||
HistoryList.Updated();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using Reseter2.History;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
|
|
@ -18,6 +19,7 @@ namespace Reseter2
|
|||
private Pinger Pingers;
|
||||
public Stopwatch sw = new Stopwatch();
|
||||
public PingResult pingResult;
|
||||
public HistoryItem historyItem;
|
||||
|
||||
|
||||
public ReseterTask(IComp comp, TaskControl taskCntrl)
|
||||
|
|
@ -26,6 +28,7 @@ namespace Reseter2
|
|||
taskControl = taskCntrl;
|
||||
StatusTask = new StatusPreReboot(this);
|
||||
Pingers = new Pinger(Comp.GetResetName());
|
||||
historyItem = HistoryList.Add(this);
|
||||
}
|
||||
|
||||
public async Task Tick()
|
||||
|
|
|
|||
|
|
@ -53,12 +53,6 @@
|
|||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="History\FormHistory.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="History\FormHistory.Designer.cs">
|
||||
<DependentUpon>FormHistory.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="History\HistoryItem.cs" />
|
||||
<Compile Include="History\HistoryList.cs" />
|
||||
<Compile Include="History\SHistory.cs" />
|
||||
|
|
@ -85,9 +79,6 @@
|
|||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="History\FormHistory.resx">
|
||||
<DependentUpon>FormHistory.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace Reseter2
|
|||
{
|
||||
if (param.Length > 0)
|
||||
{
|
||||
MessageBox.Show(@"-r -m \\" + param + " -f -t 5");
|
||||
// MessageBox.Show(@"-r -m \\" + param + " -f -t 5");
|
||||
StartShutDown(@"-r -m \\" + param + " -f -t 5");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using Reseter2.History;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
|
@ -14,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());
|
||||
}
|
||||
|
||||
|
|
@ -32,11 +33,12 @@ namespace Reseter2
|
|||
if (TimeCount > 3)
|
||||
{
|
||||
resetertask.StatusTask = new StatusRebooting(resetertask);
|
||||
HistoryList.Updated();
|
||||
}
|
||||
}
|
||||
public override string GetName()
|
||||
{
|
||||
return "Отправляем команду перезагрузки";
|
||||
return "Отправка команды";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace Reseter2
|
|||
private PingResult PingResult;
|
||||
public StatusRebootStop(ReseterTask reseterTask) : base(reseterTask)
|
||||
{
|
||||
resetertask.SetNameStage("Перезагрузка остановленна");
|
||||
resetertask.SetNameStage("Остановленно");
|
||||
PingResult = resetertask.pingResult;
|
||||
reseterTask.sw.Stop();
|
||||
}
|
||||
|
|
@ -25,7 +25,7 @@ namespace Reseter2
|
|||
}
|
||||
public override string GetName()
|
||||
{
|
||||
return "Перезагрузка остановленна";
|
||||
return "Остановленно";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ namespace Reseter2
|
|||
}
|
||||
public override string GetName()
|
||||
{
|
||||
return "Успешно перезагруженно";
|
||||
return "Успешно";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using Reseter2.History;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
|
@ -30,6 +31,7 @@ namespace Reseter2
|
|||
if (TimeCount > 50)
|
||||
{
|
||||
resetertask.StatusTask = new StatusRebootSucces(resetertask);
|
||||
HistoryList.Updated();
|
||||
}
|
||||
}
|
||||
public override string GetName()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using Reseter2.History;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
|
@ -26,10 +27,11 @@ namespace Reseter2
|
|||
}
|
||||
public override void Next()
|
||||
{
|
||||
if (!PingResult.TimedOut)
|
||||
if (PingResult.TimedOut == false)
|
||||
{
|
||||
resetertask.StatusTask = new StatusReboot(resetertask);
|
||||
}
|
||||
HistoryList.Updated();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue