diff --git a/Remontor/.vs/Remontor/FileContentIndex/04c71609-7605-4221-a27b-6699449e439d.vsidx b/Remontor/.vs/Remontor/FileContentIndex/04c71609-7605-4221-a27b-6699449e439d.vsidx new file mode 100644 index 0000000..5e78cf6 Binary files /dev/null and b/Remontor/.vs/Remontor/FileContentIndex/04c71609-7605-4221-a27b-6699449e439d.vsidx differ diff --git a/Remontor/.vs/Remontor/FileContentIndex/18f2b697-7b7f-460f-b5bc-b32d44e6b46b.vsidx b/Remontor/.vs/Remontor/FileContentIndex/18f2b697-7b7f-460f-b5bc-b32d44e6b46b.vsidx new file mode 100644 index 0000000..5ec400c Binary files /dev/null and b/Remontor/.vs/Remontor/FileContentIndex/18f2b697-7b7f-460f-b5bc-b32d44e6b46b.vsidx differ diff --git a/Remontor/.vs/Remontor/FileContentIndex/288c9ec7-b545-4757-a8fe-c218411d4549.vsidx b/Remontor/.vs/Remontor/FileContentIndex/288c9ec7-b545-4757-a8fe-c218411d4549.vsidx deleted file mode 100644 index a499d37..0000000 Binary files a/Remontor/.vs/Remontor/FileContentIndex/288c9ec7-b545-4757-a8fe-c218411d4549.vsidx and /dev/null differ diff --git a/Remontor/.vs/Remontor/FileContentIndex/2e2aaaf7-e920-453f-a5b0-c8a50ccc7c07.vsidx b/Remontor/.vs/Remontor/FileContentIndex/2e2aaaf7-e920-453f-a5b0-c8a50ccc7c07.vsidx deleted file mode 100644 index a92e142..0000000 Binary files a/Remontor/.vs/Remontor/FileContentIndex/2e2aaaf7-e920-453f-a5b0-c8a50ccc7c07.vsidx and /dev/null differ diff --git a/Remontor/.vs/Remontor/FileContentIndex/572420f5-f22c-4bfe-95bf-67bbb0912573.vsidx b/Remontor/.vs/Remontor/FileContentIndex/572420f5-f22c-4bfe-95bf-67bbb0912573.vsidx new file mode 100644 index 0000000..f89285f Binary files /dev/null and b/Remontor/.vs/Remontor/FileContentIndex/572420f5-f22c-4bfe-95bf-67bbb0912573.vsidx differ diff --git a/Remontor/.vs/Remontor/FileContentIndex/83c16984-46f9-4650-894d-557be5ae12e9.vsidx b/Remontor/.vs/Remontor/FileContentIndex/83c16984-46f9-4650-894d-557be5ae12e9.vsidx deleted file mode 100644 index 3662aa8..0000000 Binary files a/Remontor/.vs/Remontor/FileContentIndex/83c16984-46f9-4650-894d-557be5ae12e9.vsidx and /dev/null differ diff --git a/Remontor/.vs/Remontor/FileContentIndex/857cf4a3-e158-4597-bf0f-9907b129dd68.vsidx b/Remontor/.vs/Remontor/FileContentIndex/857cf4a3-e158-4597-bf0f-9907b129dd68.vsidx new file mode 100644 index 0000000..446f21e Binary files /dev/null and b/Remontor/.vs/Remontor/FileContentIndex/857cf4a3-e158-4597-bf0f-9907b129dd68.vsidx differ diff --git a/Remontor/.vs/Remontor/v17/.suo b/Remontor/.vs/Remontor/v17/.suo index 02a0397..33e2121 100644 Binary files a/Remontor/.vs/Remontor/v17/.suo and b/Remontor/.vs/Remontor/v17/.suo differ diff --git a/Remontor/Finder/Finder.Designer.cs b/Remontor/Finder/Finder.Designer.cs index e3a1c45..ae3e3a4 100644 --- a/Remontor/Finder/Finder.Designer.cs +++ b/Remontor/Finder/Finder.Designer.cs @@ -29,19 +29,19 @@ private void InitializeComponent() { this.CompNameLB = new System.Windows.Forms.TextBox(); - this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.SeaherPanel = new System.Windows.Forms.FlowLayoutPanel(); this.label1 = new System.Windows.Forms.Label(); this.ConnectBtn = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.button4 = new System.Windows.Forms.Button(); + this.button5 = new System.Windows.Forms.Button(); this.sessionItemControl1 = new Remontor.SessionItemControl(); this.sessionItemControl2 = new Remontor.SessionItemControl(); this.sessionItemControl3 = new Remontor.SessionItemControl(); this.sessionItemControl4 = new Remontor.SessionItemControl(); - this.sessionItemControl6 = new Remontor.SessionItemControl(); - this.sessionItemControl9 = new Remontor.SessionItemControl(); - this.sessionItemControl8 = new Remontor.SessionItemControl(); - this.sessionItemControl7 = new Remontor.SessionItemControl(); - this.sessionItemControl5 = new Remontor.SessionItemControl(); - this.flowLayoutPanel1.SuspendLayout(); + this.SeaherPanel.SuspendLayout(); this.SuspendLayout(); // // CompNameLB @@ -50,27 +50,23 @@ | System.Windows.Forms.AnchorStyles.Right))); this.CompNameLB.Location = new System.Drawing.Point(125, 12); this.CompNameLB.Name = "CompNameLB"; - this.CompNameLB.Size = new System.Drawing.Size(328, 20); + this.CompNameLB.Size = new System.Drawing.Size(602, 20); this.CompNameLB.TabIndex = 0; + this.CompNameLB.TextChanged += new System.EventHandler(this.CompNameLB_TextChanged); // - // flowLayoutPanel1 + // SeaherPanel // - this.flowLayoutPanel1.BackColor = System.Drawing.SystemColors.Window; - this.flowLayoutPanel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.flowLayoutPanel1.Controls.Add(this.sessionItemControl1); - this.flowLayoutPanel1.Controls.Add(this.sessionItemControl2); - this.flowLayoutPanel1.Controls.Add(this.sessionItemControl3); - this.flowLayoutPanel1.Controls.Add(this.sessionItemControl4); - this.flowLayoutPanel1.Controls.Add(this.sessionItemControl6); - this.flowLayoutPanel1.Controls.Add(this.sessionItemControl9); - this.flowLayoutPanel1.Controls.Add(this.sessionItemControl8); - this.flowLayoutPanel1.Controls.Add(this.sessionItemControl7); - this.flowLayoutPanel1.Controls.Add(this.sessionItemControl5); - this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 52); - this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(592, 398); - this.flowLayoutPanel1.TabIndex = 1; + this.SeaherPanel.BackColor = System.Drawing.SystemColors.Window; + this.SeaherPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.SeaherPanel.Controls.Add(this.sessionItemControl1); + this.SeaherPanel.Controls.Add(this.sessionItemControl2); + this.SeaherPanel.Controls.Add(this.sessionItemControl4); + this.SeaherPanel.Controls.Add(this.sessionItemControl3); + this.SeaherPanel.Dock = System.Windows.Forms.DockStyle.Bottom; + this.SeaherPanel.Location = new System.Drawing.Point(0, 65); + this.SeaherPanel.Name = "SeaherPanel"; + this.SeaherPanel.Size = new System.Drawing.Size(866, 385); + this.SeaherPanel.TabIndex = 1; // // label1 // @@ -84,7 +80,7 @@ // ConnectBtn // this.ConnectBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ConnectBtn.Location = new System.Drawing.Point(459, 10); + this.ConnectBtn.Location = new System.Drawing.Point(733, 10); this.ConnectBtn.Name = "ConnectBtn"; this.ConnectBtn.Size = new System.Drawing.Size(91, 23); this.ConnectBtn.TabIndex = 3; @@ -92,81 +88,96 @@ this.ConnectBtn.UseVisualStyleBackColor = true; this.ConnectBtn.Click += new System.EventHandler(this.ConnectBtn_Click); // + // button1 + // + this.button1.Location = new System.Drawing.Point(607, 36); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(121, 23); + this.button1.TabIndex = 4; + this.button1.Text = "Подключиться по IP"; + this.button1.UseVisualStyleBackColor = true; + // + // button2 + // + this.button2.Location = new System.Drawing.Point(472, 36); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(129, 23); + this.button2.TabIndex = 5; + this.button2.Text = "Подключение по RDP"; + this.button2.UseVisualStyleBackColor = true; + // + // button3 + // + this.button3.Location = new System.Drawing.Point(329, 36); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(137, 23); + this.button3.TabIndex = 6; + this.button3.Text = "Открыть в проводнике"; + this.button3.UseVisualStyleBackColor = true; + // + // button4 + // + this.button4.Location = new System.Drawing.Point(223, 36); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(100, 23); + this.button4.TabIndex = 7; + this.button4.Text = "Открыть реестр "; + this.button4.UseVisualStyleBackColor = true; + // + // button5 + // + this.button5.Location = new System.Drawing.Point(21, 36); + this.button5.Name = "button5"; + this.button5.Size = new System.Drawing.Size(196, 23); + this.button5.TabIndex = 8; + this.button5.Text = "Открыть управление комьютером"; + this.button5.UseVisualStyleBackColor = true; + // // sessionItemControl1 // this.sessionItemControl1.Location = new System.Drawing.Point(3, 3); this.sessionItemControl1.Name = "sessionItemControl1"; - this.sessionItemControl1.Size = new System.Drawing.Size(264, 55); + this.sessionItemControl1.Size = new System.Drawing.Size(274, 55); this.sessionItemControl1.TabIndex = 0; // // sessionItemControl2 // - this.sessionItemControl2.Location = new System.Drawing.Point(273, 3); + this.sessionItemControl2.Location = new System.Drawing.Point(283, 3); this.sessionItemControl2.Name = "sessionItemControl2"; - this.sessionItemControl2.Size = new System.Drawing.Size(264, 55); + this.sessionItemControl2.Size = new System.Drawing.Size(274, 55); this.sessionItemControl2.TabIndex = 1; // // sessionItemControl3 // this.sessionItemControl3.Location = new System.Drawing.Point(3, 64); this.sessionItemControl3.Name = "sessionItemControl3"; - this.sessionItemControl3.Size = new System.Drawing.Size(264, 55); + this.sessionItemControl3.Size = new System.Drawing.Size(274, 55); this.sessionItemControl3.TabIndex = 2; // // sessionItemControl4 // - this.sessionItemControl4.Location = new System.Drawing.Point(273, 64); + this.sessionItemControl4.Location = new System.Drawing.Point(563, 3); this.sessionItemControl4.Name = "sessionItemControl4"; - this.sessionItemControl4.Size = new System.Drawing.Size(264, 55); + this.sessionItemControl4.Size = new System.Drawing.Size(274, 55); this.sessionItemControl4.TabIndex = 3; // - // sessionItemControl6 - // - this.sessionItemControl6.Location = new System.Drawing.Point(3, 125); - this.sessionItemControl6.Name = "sessionItemControl6"; - this.sessionItemControl6.Size = new System.Drawing.Size(264, 55); - this.sessionItemControl6.TabIndex = 5; - // - // sessionItemControl9 - // - this.sessionItemControl9.Location = new System.Drawing.Point(273, 125); - this.sessionItemControl9.Name = "sessionItemControl9"; - this.sessionItemControl9.Size = new System.Drawing.Size(264, 55); - this.sessionItemControl9.TabIndex = 8; - // - // sessionItemControl8 - // - this.sessionItemControl8.Location = new System.Drawing.Point(3, 186); - this.sessionItemControl8.Name = "sessionItemControl8"; - this.sessionItemControl8.Size = new System.Drawing.Size(264, 55); - this.sessionItemControl8.TabIndex = 7; - // - // sessionItemControl7 - // - this.sessionItemControl7.Location = new System.Drawing.Point(273, 186); - this.sessionItemControl7.Name = "sessionItemControl7"; - this.sessionItemControl7.Size = new System.Drawing.Size(264, 55); - this.sessionItemControl7.TabIndex = 6; - // - // sessionItemControl5 - // - this.sessionItemControl5.Location = new System.Drawing.Point(3, 247); - this.sessionItemControl5.Name = "sessionItemControl5"; - this.sessionItemControl5.Size = new System.Drawing.Size(264, 55); - this.sessionItemControl5.TabIndex = 4; - // // Finder // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(592, 450); + this.ClientSize = new System.Drawing.Size(866, 450); + this.Controls.Add(this.button5); + this.Controls.Add(this.button4); + this.Controls.Add(this.button3); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); this.Controls.Add(this.ConnectBtn); this.Controls.Add(this.label1); - this.Controls.Add(this.flowLayoutPanel1); + this.Controls.Add(this.SeaherPanel); this.Controls.Add(this.CompNameLB); this.Name = "Finder"; this.Text = "Новое подключение"; - this.flowLayoutPanel1.ResumeLayout(false); + this.SeaherPanel.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); @@ -175,17 +186,17 @@ #endregion private System.Windows.Forms.TextBox CompNameLB; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.FlowLayoutPanel SeaherPanel; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button ConnectBtn; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Button button4; + private System.Windows.Forms.Button button5; private SessionItemControl sessionItemControl1; private SessionItemControl sessionItemControl2; private SessionItemControl sessionItemControl3; private SessionItemControl sessionItemControl4; - private SessionItemControl sessionItemControl5; - private SessionItemControl sessionItemControl6; - private SessionItemControl sessionItemControl7; - private SessionItemControl sessionItemControl8; - private SessionItemControl sessionItemControl9; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Button ConnectBtn; } } \ No newline at end of file diff --git a/Remontor/Finder/Finder.cs b/Remontor/Finder/Finder.cs index 652d15a..339b6b1 100644 --- a/Remontor/Finder/Finder.cs +++ b/Remontor/Finder/Finder.cs @@ -1,4 +1,5 @@ using Remontor.Connector; +using Remontor.Seacher; using System; using System.Collections.Generic; using System.ComponentModel; @@ -11,8 +12,10 @@ using System.Windows.Forms; namespace Remontor.Finder { - public partial class Finder : Form + internal partial class Finder : Form { + private bool StopRefreshSeacher = false; + private int PreSelected = -1; public Finder() { InitializeComponent(); @@ -23,5 +26,52 @@ namespace Remontor.Finder SConnector.NewConnect(new CompId(CompNameLB.Text)); this.Close(); } + + private void CompNameLB_TextChanged(object sender, EventArgs e) + { + if (sender is TextBox && !StopRefreshSeacher) + { + TextBox textBox = (TextBox)sender; + SSeaher.seaherMetod.Change(cb_comp_ResultUpdate, textBox.Text); + // CompSelected = null; + // ListComp.Visible = true; + } + } + + public void cb_comp_ResultUpdate(List Items) + { + PreSelected = -1; + int prewY = 0; + int CountY = 1; + SeaherPanel.Controls.Clear(); + foreach (Control control in Items) + { + + } + foreach (Control control in SeaherPanel.Controls) + { + if (control.Bounds.Y == prewY) + { + CountY++; + } + else if(prewY > 0) + { + break; + } + prewY = control.Bounds.Y; + } + + // SeaherPanel. + + //ListComp.ItemHeight = itemHeight; + //ListComp.Height = ListComp.ItemHeight * (Items.Count + 1); + //ListComp.Items.Clear(); + //ListComp.Items.AddRange(Items.ToArray()); + //ListComp.Enabled = enable; + + // ListComp.Visible = true; + + + } } } diff --git a/Remontor/Form1.Designer.cs b/Remontor/Form1.Designer.cs index 17115f3..488829f 100644 --- a/Remontor/Form1.Designer.cs +++ b/Remontor/Form1.Designer.cs @@ -29,11 +29,11 @@ private void InitializeComponent() { this.panel3 = new System.Windows.Forms.Panel(); - this.label1 = new System.Windows.Forms.Label(); - this.flowContainerWords1 = new Remontor.FlowContainerWords(); - this.barSessionControl1 = new Remontor.BarSessionControl(); - this.flowContainer1 = new Remontor.FlowContainer(); this.flowConteinerSetting1 = new Remontor.FlowConteinerSetting(); + this.flowContainerWords1 = new Remontor.FlowContainerWords(); + this.flowContainer1 = new Remontor.FlowContainer(); + this.label1 = new System.Windows.Forms.Label(); + this.barSessionControl1 = new Remontor.BarSessionControl(); this.panel3.SuspendLayout(); this.SuspendLayout(); // @@ -42,15 +42,50 @@ this.panel3.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.panel3.Controls.Add(this.flowConteinerSetting1); - this.panel3.Controls.Add(this.flowContainerWords1); - this.panel3.Controls.Add(this.flowContainer1); this.panel3.Controls.Add(this.label1); - this.panel3.Location = new System.Drawing.Point(0, 25); + this.panel3.Location = new System.Drawing.Point(0, 12); this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(1094, 693); + this.panel3.Size = new System.Drawing.Size(1094, 706); this.panel3.TabIndex = 1; // + // flowConteinerSetting1 + // + this.flowConteinerSetting1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.flowConteinerSetting1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.flowConteinerSetting1.Location = new System.Drawing.Point(764, 40); + this.flowConteinerSetting1.Name = "flowConteinerSetting1"; + this.flowConteinerSetting1.Size = new System.Drawing.Size(330, 678); + this.flowConteinerSetting1.TabIndex = 1; + this.flowConteinerSetting1.Visible = false; + // + // flowContainerWords1 + // + this.flowContainerWords1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.flowContainerWords1.BackColor = System.Drawing.SystemColors.Control; + this.flowContainerWords1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.flowContainerWords1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.flowContainerWords1.Location = new System.Drawing.Point(764, 40); + this.flowContainerWords1.Margin = new System.Windows.Forms.Padding(0); + this.flowContainerWords1.Name = "flowContainerWords1"; + this.flowContainerWords1.Size = new System.Drawing.Size(330, 678); + this.flowContainerWords1.TabIndex = 1; + this.flowContainerWords1.Visible = false; + // + // flowContainer1 + // + this.flowContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.flowContainer1.BackColor = System.Drawing.Color.Transparent; + this.flowContainer1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.flowContainer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.flowContainer1.Location = new System.Drawing.Point(764, 40); + this.flowContainer1.Name = "flowContainer1"; + this.flowContainer1.Size = new System.Drawing.Size(333, 678); + this.flowContainer1.TabIndex = 1; + this.flowContainer1.Visible = false; + // // label1 // this.label1.AutoSize = true; @@ -61,20 +96,6 @@ this.label1.TabIndex = 0; this.label1.Text = "Нету активныйх соединений"; // - // flowContainerWords1 - // - this.flowContainerWords1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.flowContainerWords1.BackColor = System.Drawing.SystemColors.Control; - this.flowContainerWords1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.flowContainerWords1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.flowContainerWords1.Location = new System.Drawing.Point(764, 18); - this.flowContainerWords1.Margin = new System.Windows.Forms.Padding(0); - this.flowContainerWords1.Name = "flowContainerWords1"; - this.flowContainerWords1.Size = new System.Drawing.Size(330, 678); - this.flowContainerWords1.TabIndex = 1; - this.flowContainerWords1.Visible = false; - // // barSessionControl1 // this.barSessionControl1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) @@ -85,36 +106,15 @@ this.barSessionControl1.TabIndex = 1; this.barSessionControl1.Load += new System.EventHandler(this.barSessionControl1_Load); // - // flowContainer1 - // - this.flowContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.flowContainer1.BackColor = System.Drawing.Color.Transparent; - this.flowContainer1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.flowContainer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.flowContainer1.Location = new System.Drawing.Point(764, 18); - this.flowContainer1.Name = "flowContainer1"; - this.flowContainer1.Size = new System.Drawing.Size(330, 675); - this.flowContainer1.TabIndex = 1; - this.flowContainer1.Visible = false; - // - // flowConteinerSetting1 - // - this.flowConteinerSetting1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.flowConteinerSetting1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.flowConteinerSetting1.Location = new System.Drawing.Point(764, 18); - this.flowConteinerSetting1.Name = "flowConteinerSetting1"; - this.flowConteinerSetting1.Size = new System.Drawing.Size(330, 675); - this.flowConteinerSetting1.TabIndex = 1; - this.flowConteinerSetting1.Visible = false; - // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1094, 718); this.Controls.Add(this.barSessionControl1); + this.Controls.Add(this.flowContainer1); + this.Controls.Add(this.flowContainerWords1); + this.Controls.Add(this.flowConteinerSetting1); this.Controls.Add(this.panel3); this.Name = "Form1"; this.Text = "Form1"; diff --git a/Remontor/Form1.cs b/Remontor/Form1.cs index f9d5561..ac54944 100644 --- a/Remontor/Form1.cs +++ b/Remontor/Form1.cs @@ -21,24 +21,6 @@ namespace Remontor public partial class Form1 : Form { - - private const int SWP_NOOWNERZORDER = 0x200; - private const int SWP_NOREDRAW = 0x8; - private const int SWP_NOZORDER = 0x4; - private const int SWP_SHOWWINDOW = 0x0040; - private const int WS_EX_MDICHILD = 0x40; - private const int SWP_FRAMECHANGED = 0x20; - private const int SWP_NOACTIVATE = 0x10; - private const int SWP_ASYNCWINDOWPOS = 0x4000; - private const int SWP_NOMOVE = 0x2; - private const int SWP_NOSIZE = 0x1; - private const int GWL_STYLE = (-16); - private const int WS_VISIBLE = 0x10000000; - private const int WM_CLOSE = 0x10; - private const int WS_CHILD = 0x40000000; - - Process p1; - Process p; public bool CloseOn = false; public Form1() @@ -60,32 +42,7 @@ namespace Remontor this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); - - - - - - - - - - - - - //p1 = Process.Start("notepad"); - ////Thread.Sleep(500); // Allow the process to open it's window - //p1.WaitForInputIdle(); - //SetParent(p1.MainWindowHandle, panel1.Handle); - //SetWindowLong(p1.MainWindowHandle, GWL_STYLE, WS_VISIBLE); - //MoveWindow(p1.MainWindowHandle, panel1.Bounds.X, panel1.Bounds.Y - 24, panel1.Bounds.Width, panel1.Bounds.Height, true); - - - //p = Process.Start("notepad"); - //Thread.Sleep(500); // Allow the process to open it's window - //p.WaitForInputIdle(); - //SetParent(p.MainWindowHandle, panel3.Handle); - //SetWindowLong(p.MainWindowHandle, GWL_STYLE, WS_VISIBLE); - //MoveWindow(p.MainWindowHandle, panel3.Bounds.X, panel3.Bounds.Y, panel3.Bounds.Width, panel3.Bounds.Height, true); + } private void FlowConteinerSetting1_Save() @@ -103,8 +60,7 @@ namespace Remontor private void tabControl1_SizeChanged(object sender, EventArgs e) { SConnector.ResizeActiv(); - //MoveWindow(p1.MainWindowHandle, panel1.Bounds.X, panel1.Bounds.Y - 24, panel1.Bounds.Width, panel1.Bounds.Height, true); - //MoveWindow(p.MainWindowHandle, panel3.Bounds.X, panel3.Bounds.Y, panel3.Bounds.Width, panel3.Bounds.Height, true); + } protected override void WndProc(ref Message m) diff --git a/Remontor/Remontor.csproj b/Remontor/Remontor.csproj index 65d01b2..d6f18fc 100644 --- a/Remontor/Remontor.csproj +++ b/Remontor/Remontor.csproj @@ -112,7 +112,10 @@ + + + diff --git a/Remontor/Seacher/HistoryResult.cs b/Remontor/Seacher/HistoryResult.cs new file mode 100644 index 0000000..8e976b4 --- /dev/null +++ b/Remontor/Seacher/HistoryResult.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Remontor.Seacher +{ + internal class HistoryResult : ISeacherResult + { + private IComp Comp; + private DateTime LastConnect; + public HistoryResult() + { + + } + public HistoryResult(IComp comp, DateTime lastConnect) + { + Comp = comp; + LastConnect = lastConnect; + } + + public string toString() + { + return Comp.GetNetNameStr(); + } + } +} diff --git a/Remontor/Seacher/ISeacherResult.cs b/Remontor/Seacher/ISeacherResult.cs new file mode 100644 index 0000000..b876e97 --- /dev/null +++ b/Remontor/Seacher/ISeacherResult.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Remontor.Seacher +{ + internal interface ISeacherResult + { + string toString(); + } +} diff --git a/Remontor/Seacher/NoResult.cs b/Remontor/Seacher/NoResult.cs new file mode 100644 index 0000000..d56a54e --- /dev/null +++ b/Remontor/Seacher/NoResult.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Remontor.Seacher +{ + internal class NoResult : ISeacherResult + { + private string Status; + + public NoResult(string status) + { + Status = status; + } + + public string toString() + { + return ""; + } + } +} diff --git a/Remontor/Seacher/SeachSCCM.cs b/Remontor/Seacher/SeachSCCM.cs index fdd666b..e74faf5 100644 --- a/Remontor/Seacher/SeachSCCM.cs +++ b/Remontor/Seacher/SeachSCCM.cs @@ -60,31 +60,31 @@ namespace Remontor.Seacher } public void Change(ResultUpdate sender, string seach) { - Activate(); - Update = sender; - if (Connection != null && Connection.State == ConnectionState.Open) - { - List result; - if (seach.Length > 2) - { - result = ResultSeach(seach); - int itemHeight = 14; - if(enable) itemHeight = 40; - Update(result, enable, itemHeight); - } - else - { - result = new List(); - result.Add("Введите запрос, к бд подключенно"); - Update(result, false, 14); - } - } - else - { - List result = new List(); - result.Add(error); - Update(result, false,14); - } + //Activate(); + //Update = sender; + //if (Connection != null && Connection.State == ConnectionState.Open) + //{ + // List result; + // if (seach.Length > 2) + // { + // result = ResultSeach(seach); + // int itemHeight = 14; + // if(enable) itemHeight = 40; + // Update(result, enable, itemHeight); + // } + // else + // { + // result = new List(); + // result.Add("Введите запрос, к бд подключенно"); + // Update(result, false, 14); + // } + //} + //else + //{ + // List result = new List(); + // result.Add(error); + // Update(result, false,14); + //} } @@ -194,9 +194,9 @@ namespace Remontor.Seacher Connection.Close(); Connection = null; TimerDisconnect.Dispose(); - List result = new List(); - result.Add("Введите запрос"); - Update(result, false, 14); + List result = new List(); + result.Add(new NoResult("Введите запрос")); + Update(result); } public IComp Result(int index) diff --git a/Remontor/Seacher/SeahcLocal.cs b/Remontor/Seacher/SeahcLocal.cs index 574169c..65cd94a 100644 --- a/Remontor/Seacher/SeahcLocal.cs +++ b/Remontor/Seacher/SeahcLocal.cs @@ -9,7 +9,7 @@ namespace Remontor.Seacher { internal class SeahcLocal : ISeaherMetod { - internal delegate void ResultUpdate(List Item, bool eneble, int itemHeight); + internal delegate void ResultUpdate(List Item); private ResultUpdate Update; private List comps = new List(); private bool enable; @@ -19,49 +19,86 @@ namespace Remontor.Seacher if (seach.Length > 2) { - Update(ResultSeach(seach), enable,14); + Update(ResultSeach(seach)); } else { - List result = new List(); - result.Add("Введите запрос"); - Update(result,false, 14); + List result = new List(); + result.Add(new NoResult("Введите запрос")); + Update(result); } } - public List ResultSeach(string seach) + //public List ResultSeach(string seach) + //{ + // int i = 0; + // comps.Clear(); + // List result = new List(); + // foreach(HistoryItem item in HistoryList.Hitem) + // { + // if (item.NameNode().ToUpper().Contains(seach.ToUpper())) + // { + // int y = 0; + // foreach(string itemOk in result) + // { + // if (itemOk.ToUpper() == item.NameNode().ToUpper()) ++y; + // } + // if(y == 0) + // { + // result.Add(item.NameNode()); + // comps.Add(item.GetComp()); + // ++i; + // enable = true; + // if (i>6) return result; + // } + + // } + + // } + // if (i == 0) + // { + // enable = false; + // result.Add("Ничего не найдено"); + // } + // return result; + //} + + public List ResultSeach(string seach) { int i = 0; comps.Clear(); - List result = new List(); - foreach(HistoryItem item in HistoryList.Hitem) + List result = new List(); + foreach (HistoryItem item in HistoryList.Hitem) { if (item.NameNode().ToUpper().Contains(seach.ToUpper())) { int y = 0; - foreach(string itemOk in result) + foreach (ISeacherResult itemOk in result) { - if (itemOk.ToUpper() == item.NameNode().ToUpper()) ++y; + if (itemOk.toString().ToUpper() == item.NameNode().ToUpper()) ++y; } - if(y == 0) + if (y == 0) { - result.Add(item.NameNode()); - comps.Add(item.GetComp()); + + HistoryResult itemResult = new HistoryResult(item.GetComp(), item.GetStart()); + result.Add(itemResult); + ++i; enable = true; - if (i>6) return result; + if (i > 6) return result; } - + } - + } if (i == 0) - { + { enable = false; - result.Add("Ничего не найдено"); + result.Add(new NoResult("Ничего не найдено")); } return result; } + public IComp Result(int index) { return comps[index]; diff --git a/Remontor/SessionItemControl.Designer.cs b/Remontor/SessionItemControl.Designer.cs index 69f9a0f..9f81ccf 100644 --- a/Remontor/SessionItemControl.Designer.cs +++ b/Remontor/SessionItemControl.Designer.cs @@ -49,9 +49,9 @@ this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(57, 33); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(38, 13); + this.label2.Size = new System.Drawing.Size(57, 13); this.label2.TabIndex = 2; - this.label2.Text = "Логин"; + this.label2.Text = "LastLogon"; // // label3 // @@ -80,7 +80,7 @@ this.Controls.Add(this.label1); this.Controls.Add(this.pictureBox1); this.Name = "SessionItemControl"; - this.Size = new System.Drawing.Size(264, 55); + this.Size = new System.Drawing.Size(274, 55); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); diff --git a/Remontor/bin/Debug/Remontor.exe b/Remontor/bin/Debug/Remontor.exe index 9ec396c..c0687ea 100644 Binary files a/Remontor/bin/Debug/Remontor.exe and b/Remontor/bin/Debug/Remontor.exe differ diff --git a/Remontor/bin/Debug/Remontor.pdb b/Remontor/bin/Debug/Remontor.pdb index dd03de8..dacfc07 100644 Binary files a/Remontor/bin/Debug/Remontor.pdb and b/Remontor/bin/Debug/Remontor.pdb differ diff --git a/Remontor/bin/Debug/res.dat b/Remontor/bin/Debug/res.dat index 519fa9a..0090de6 100644 Binary files a/Remontor/bin/Debug/res.dat and b/Remontor/bin/Debug/res.dat differ diff --git a/Remontor/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Remontor/obj/Debug/DesignTimeResolveAssemblyReferences.cache index da12840..4d2f2c1 100644 Binary files a/Remontor/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/Remontor/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Remontor/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Remontor/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 69f0ddb..79eda44 100644 Binary files a/Remontor/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/Remontor/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Remontor/obj/Debug/Remontor.csproj.CoreCompileInputs.cache b/Remontor/obj/Debug/Remontor.csproj.CoreCompileInputs.cache index 5c9515b..21b9c0a 100644 --- a/Remontor/obj/Debug/Remontor.csproj.CoreCompileInputs.cache +++ b/Remontor/obj/Debug/Remontor.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -b0e7fcb2ee6e153bc54901d6d96fe11158f2ea6b +15aad57089c73c036769b7df150a74520e07d0a0 diff --git a/Remontor/obj/Debug/Remontor.csproj.FileListAbsolute.txt b/Remontor/obj/Debug/Remontor.csproj.FileListAbsolute.txt index 849385c..973df52 100644 --- a/Remontor/obj/Debug/Remontor.csproj.FileListAbsolute.txt +++ b/Remontor/obj/Debug/Remontor.csproj.FileListAbsolute.txt @@ -33,7 +33,6 @@ C:\Users\klavi\Source\Repos\Remontor\Remontor\obj\Debug\Remontor.FlowContainer.r C:\Users\klavi\Source\Repos\Remontor\Remontor\obj\Debug\Remontor.Form1.resources C:\Users\klavi\Source\Repos\Remontor\Remontor\obj\Debug\Remontor.Properties.Resources.resources C:\Users\klavi\Source\Repos\Remontor\Remontor\obj\Debug\Remontor.SessionItemControl.resources -C:\Users\klavi\Source\Repos\Remontor\Remontor\obj\Debug\Remontor.Setting.SettingRebootControl.resources C:\Users\klavi\Source\Repos\Remontor\Remontor\obj\Debug\Remontor.Setting.SettingSCCMControl.resources C:\Users\klavi\Source\Repos\Remontor\Remontor\obj\Debug\Remontor.Setting.SettingWordsControl.resources C:\Users\klavi\Source\Repos\Remontor\Remontor\obj\Debug\Remontor.Words.BilderWords.resources @@ -51,3 +50,5 @@ C:\Users\Владимир\source\repos\Remontor\Remontor\obj\Debug\Remontor.Flow C:\Users\Владимир\source\repos\Remontor\Remontor\obj\Debug\Remontor.History.HistoryControl.resources C:\Users\Владимир\source\repos\Remontor\Remontor\obj\Debug\Remontor.FlowConteinerSetting.resources C:\Users\Владимир\source\repos\Remontor\Remontor\obj\Debug\Remontor.Setting.settingAppControl.resources +C:\Users\klavi\source\repos\Remontor\Remontor\obj\Debug\Remontor.FlowConteinerSetting.resources +C:\Users\klavi\source\repos\Remontor\Remontor\obj\Debug\Remontor.Setting.settingAppControl.resources diff --git a/Remontor/obj/Debug/Remontor.csproj.GenerateResource.cache b/Remontor/obj/Debug/Remontor.csproj.GenerateResource.cache index 4ae0d03..45e3641 100644 Binary files a/Remontor/obj/Debug/Remontor.csproj.GenerateResource.cache and b/Remontor/obj/Debug/Remontor.csproj.GenerateResource.cache differ diff --git a/Remontor/obj/Debug/Remontor.exe b/Remontor/obj/Debug/Remontor.exe index 9ec396c..c0687ea 100644 Binary files a/Remontor/obj/Debug/Remontor.exe and b/Remontor/obj/Debug/Remontor.exe differ diff --git a/Remontor/obj/Debug/Remontor.pdb b/Remontor/obj/Debug/Remontor.pdb index dd03de8..dacfc07 100644 Binary files a/Remontor/obj/Debug/Remontor.pdb and b/Remontor/obj/Debug/Remontor.pdb differ