diff --git a/Reseter2/Form1.Designer.cs b/Reseter2/Form1.Designer.cs index d600eeb..7098d99 100644 --- a/Reseter2/Form1.Designer.cs +++ b/Reseter2/Form1.Designer.cs @@ -40,6 +40,8 @@ this.tabPage2 = new System.Windows.Forms.TabPage(); this.label2 = new System.Windows.Forms.Label(); this.bt_resetAll = new System.Windows.Forms.Button(); + this.checkControl1 = new Reseter2.CheckControl(); + this.treeView1 = new Reseter2.NewTreeView(); this.imageList1 = new System.Windows.Forms.ImageList(this.components); this.imageList2 = new System.Windows.Forms.ImageList(this.components); this.tabPage3 = new System.Windows.Forms.TabPage(); @@ -53,16 +55,21 @@ this.sm_RebootItem = new System.Windows.Forms.ToolStripMenuItem(); this.sm_SaveItem = new System.Windows.Forms.ToolStripMenuItem(); this.tabPage4 = new System.Windows.Forms.TabPage(); - this.bt_wordsBilder = new System.Windows.Forms.Button(); - this.checkControl1 = new Reseter2.CheckControl(); - this.treeView1 = new Reseter2.NewTreeView(); + this.settingRebootControl1 = new Reseter2.Setting.SettingRebootControl(); + this.settingSCCMControl1 = new Reseter2.Setting.SettingSCCMControl(); + this.settingWordsControl1 = new Reseter2.Setting.SettingWordsControl(); + this.button4 = new System.Windows.Forms.Button(); this.tabPage5 = new System.Windows.Forms.TabPage(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.label16 = new System.Windows.Forms.Label(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); this.tabPage3.SuspendLayout(); this.cm_history.SuspendLayout(); this.tabPage4.SuspendLayout(); + this.tabPage5.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // // tb_comp @@ -79,16 +86,19 @@ this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(47, 13); this.label1.TabIndex = 1; - this.label1.Text = "Имя ПК"; + this.label1.Text = "Имя ПК"; // // bt_reset // - this.bt_reset.Location = new System.Drawing.Point(280, 9); + this.bt_reset.BackColor = System.Drawing.Color.IndianRed; + this.bt_reset.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.bt_reset.ForeColor = System.Drawing.SystemColors.Control; + this.bt_reset.Location = new System.Drawing.Point(283, 10); this.bt_reset.Name = "bt_reset"; this.bt_reset.Size = new System.Drawing.Size(122, 23); this.bt_reset.TabIndex = 2; this.bt_reset.Text = "Перезагрузить"; - this.bt_reset.UseVisualStyleBackColor = true; + this.bt_reset.UseVisualStyleBackColor = false; this.bt_reset.Click += new System.EventHandler(this.bt_reset_Click); // // timer1 @@ -162,14 +172,47 @@ // // bt_resetAll // + this.bt_resetAll.BackColor = System.Drawing.Color.IndianRed; + this.bt_resetAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.bt_resetAll.ForeColor = System.Drawing.SystemColors.Control; this.bt_resetAll.Location = new System.Drawing.Point(224, 6); this.bt_resetAll.Name = "bt_resetAll"; this.bt_resetAll.Size = new System.Drawing.Size(168, 23); this.bt_resetAll.TabIndex = 1; this.bt_resetAll.Text = "Перезагрузить выделенное"; - this.bt_resetAll.UseVisualStyleBackColor = true; + this.bt_resetAll.UseVisualStyleBackColor = false; this.bt_resetAll.Click += new System.EventHandler(this.bt_resetAll_Click); // + // checkControl1 + // + this.checkControl1.Location = new System.Drawing.Point(14, 7); + this.checkControl1.Name = "checkControl1"; + this.checkControl1.Size = new System.Drawing.Size(18, 18); + this.checkControl1.TabIndex = 2; + // + // treeView1 + // + this.treeView1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.treeView1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.treeView1.HideSelection = false; + this.treeView1.ImageIndex = 0; + this.treeView1.ImageList = this.imageList1; + this.treeView1.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.treeView1.Indent = 27; + this.treeView1.ItemHeight = 24; + this.treeView1.Location = new System.Drawing.Point(3, 32); + this.treeView1.Name = "treeView1"; + this.treeView1.SelectedImageIndex = 0; + this.treeView1.ShowLines = false; + this.treeView1.ShowNodeToolTips = true; + this.treeView1.Size = new System.Drawing.Size(396, 653); + this.treeView1.StateImageList = this.imageList2; + this.treeView1.TabIndex = 0; + this.treeView1.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterCheck); + this.treeView1.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick); + this.treeView1.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseDoubleClick); + this.treeView1.MouseCaptureChanged += new System.EventHandler(this.treeView1_MouseCaptureChanged); + // // imageList1 // this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); @@ -302,7 +345,10 @@ // // tabPage4 // - this.tabPage4.Controls.Add(this.bt_wordsBilder); + this.tabPage4.Controls.Add(this.settingRebootControl1); + this.tabPage4.Controls.Add(this.settingSCCMControl1); + this.tabPage4.Controls.Add(this.settingWordsControl1); + this.tabPage4.Controls.Add(this.button4); this.tabPage4.Location = new System.Drawing.Point(4, 22); this.tabPage4.Name = "tabPage4"; this.tabPage4.Padding = new System.Windows.Forms.Padding(3); @@ -311,48 +357,41 @@ this.tabPage4.Text = "Настройки"; this.tabPage4.UseVisualStyleBackColor = true; // - // bt_wordsBilder + // settingRebootControl1 // - this.bt_wordsBilder.Location = new System.Drawing.Point(113, 6); - this.bt_wordsBilder.Name = "bt_wordsBilder"; - this.bt_wordsBilder.Size = new System.Drawing.Size(155, 23); - this.bt_wordsBilder.TabIndex = 0; - this.bt_wordsBilder.Text = "Редактор справочника"; - this.bt_wordsBilder.UseVisualStyleBackColor = true; - this.bt_wordsBilder.Click += new System.EventHandler(this.bt_wordsBilder_Click); + this.settingRebootControl1.Location = new System.Drawing.Point(6, 299); + this.settingRebootControl1.Name = "settingRebootControl1"; + this.settingRebootControl1.Size = new System.Drawing.Size(391, 130); + this.settingRebootControl1.TabIndex = 7; // - // checkControl1 + // settingSCCMControl1 // - this.checkControl1.Location = new System.Drawing.Point(14, 7); - this.checkControl1.Name = "checkControl1"; - this.checkControl1.Size = new System.Drawing.Size(18, 18); - this.checkControl1.TabIndex = 2; + this.settingSCCMControl1.Location = new System.Drawing.Point(6, 115); + this.settingSCCMControl1.Name = "settingSCCMControl1"; + this.settingSCCMControl1.Size = new System.Drawing.Size(391, 178); + this.settingSCCMControl1.TabIndex = 6; // - // treeView1 + // settingWordsControl1 // - this.treeView1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.treeView1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.treeView1.HideSelection = false; - this.treeView1.ImageIndex = 0; - this.treeView1.ImageList = this.imageList1; - this.treeView1.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.treeView1.Indent = 27; - this.treeView1.ItemHeight = 24; - this.treeView1.Location = new System.Drawing.Point(3, 32); - this.treeView1.Name = "treeView1"; - this.treeView1.SelectedImageIndex = 0; - this.treeView1.ShowLines = false; - this.treeView1.ShowNodeToolTips = true; - this.treeView1.Size = new System.Drawing.Size(396, 653); - this.treeView1.StateImageList = this.imageList2; - this.treeView1.TabIndex = 0; - this.treeView1.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterCheck); - this.treeView1.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick); - this.treeView1.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseDoubleClick); - this.treeView1.MouseCaptureChanged += new System.EventHandler(this.treeView1_MouseCaptureChanged); + this.settingWordsControl1.Location = new System.Drawing.Point(6, 6); + this.settingWordsControl1.Name = "settingWordsControl1"; + this.settingWordsControl1.Size = new System.Drawing.Size(391, 103); + this.settingWordsControl1.TabIndex = 5; + // + // button4 + // + this.button4.Location = new System.Drawing.Point(317, 435); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(75, 23); + this.button4.TabIndex = 4; + this.button4.Text = "Сохранить"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button4_Click); // // tabPage5 // + this.tabPage5.Controls.Add(this.pictureBox1); + this.tabPage5.Controls.Add(this.label16); this.tabPage5.Location = new System.Drawing.Point(4, 22); this.tabPage5.Name = "tabPage5"; this.tabPage5.Padding = new System.Windows.Forms.Padding(3); @@ -361,6 +400,23 @@ this.tabPage5.Text = "О программе"; this.tabPage5.UseVisualStyleBackColor = true; // + // pictureBox1 + // + this.pictureBox1.Location = new System.Drawing.Point(11, 6); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(100, 50); + this.pictureBox1.TabIndex = 1; + this.pictureBox1.TabStop = false; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.Location = new System.Drawing.Point(8, 59); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(50, 13); + this.label16.TabIndex = 0; + this.label16.Text = "Reseter2"; + // // Form1 // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -383,6 +439,9 @@ this.tabPage3.PerformLayout(); this.cm_history.ResumeLayout(false); this.tabPage4.ResumeLayout(false); + this.tabPage5.ResumeLayout(false); + this.tabPage5.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -409,7 +468,6 @@ private System.Windows.Forms.ContextMenuStrip cm_history; private System.Windows.Forms.ToolStripMenuItem sm_RebootItem; private System.Windows.Forms.ToolStripMenuItem sm_SaveItem; - private System.Windows.Forms.Button bt_wordsBilder; private System.Windows.Forms.Button bt_resetAll; public System.Windows.Forms.ImageList imageList1; private System.Windows.Forms.ImageList imageList2; @@ -417,6 +475,12 @@ private CheckControl checkControl1; private System.Windows.Forms.Label label2; private System.Windows.Forms.TabPage tabPage5; + private System.Windows.Forms.Button button4; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Label label16; + private Setting.SettingWordsControl settingWordsControl1; + private Setting.SettingRebootControl settingRebootControl1; + private Setting.SettingSCCMControl settingSCCMControl1; } } diff --git a/Reseter2/Form1.cs b/Reseter2/Form1.cs index 93504e7..5124c1b 100644 --- a/Reseter2/Form1.cs +++ b/Reseter2/Form1.cs @@ -8,6 +8,7 @@ using System.Data; using System.Drawing; using System.IO; using System.Linq; +using System.Runtime.CompilerServices; using System.Runtime.Serialization.Formatters.Binary; using System.Text; using System.Threading.Tasks; @@ -22,6 +23,8 @@ namespace Reseter2 private bool FocusContext; private object selectItem; + public delegate void saveSetting(); + public event saveSetting Save; public Form1() { @@ -51,6 +54,8 @@ namespace Reseter2 InitializeComponent(); + settingWordsControl1.treeView = treeView1; + this.Save += settingWordsControl1.Save; checkControl1.updateCheck += CheckControl1_updateCheck; flowLayoutPanel1.AutoScrollMinSize = new Size(0, 683) ; flowLayoutPanel1.VerticalScroll.Visible = true; @@ -149,17 +154,7 @@ namespace Reseter2 bilderWords.ShowDialog(); } - private void bt_wordsBilder_Click(object sender, EventArgs e) - { - BilderWords bilderWords = new BilderWords(); - DialogResult result = bilderWords.ShowDialog(); - if (result == DialogResult.OK) - { - treeView1.Nodes.Clear(); - treeView1.Nodes.AddRange(WordsList.ListNodes()); - } - - } + private void Form1_Load(object sender, EventArgs e) { @@ -409,5 +404,21 @@ namespace Reseter2 } } + private void label7_Click(object sender, EventArgs e) + { + + } + + private void button4_Click(object sender, EventArgs e) + { + Save(); + SGlobalSetting.settingExpand.SaveExpand(treeView1.Nodes); + SGlobalSetting.SaveSettig(); + SGlobalSetting.LoadSetting(); + WordsList.MainCategory = SGlobalSetting.LoadWords(); + treeView1.Nodes.Clear(); + treeView1.Nodes.AddRange(WordsList.ListNodes()); + SGlobalSetting.settingExpand.ExpendAll(treeView1.Nodes); + } } } diff --git a/Reseter2/Form1.resx b/Reseter2/Form1.resx index 4328061..628bd40 100644 --- a/Reseter2/Form1.resx +++ b/Reseter2/Form1.resx @@ -120,9 +120,6 @@ 122, 17 - - 209, 17 - 425, 17 @@ -131,7 +128,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACk - UQAAAk1TRnQBSQFMAgEBCQEAAWgBAQFoAQEBGAEAARgBAAT/AREBAAj/AUIBTQE2BwABNgMAASgDAAFg + UQAAAk1TRnQBSQFMAgEBCQEAAYABAQGAAQEBGAEAARgBAAT/AREBAAj/AUIBTQE2BwABNgMAASgDAAFg AwABSAMAAQEBAAEQBgABNhIAAf8BfwH/AX8B/wF/Af8BfwH/AX8B/wF/Af8BfwH/AX8B/wF/Af8BfwH/ AX8B/wF/Af8BfwH/AX8B/wF/Af8BfwH/AX8B/wF/Af8BfwH/AX8B/wF/Af8BfwH/AX8B/wF/kAAB/wF/ Af8BfwH/AX8B/wF/Af8BfwH/AX8B/wF/Af8BfwH/AX8B/wF/Af8BfwH/AX8B/wF/Af8BfwH/AX8B/wF/ @@ -489,8 +486,8 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 - ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABe - CgAAAk1TRnQBSQFMAgEBAwEAAQgBAAEIAQABEAEAARAB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y + Ae8BbQHxAcIBlwEzAlUBMwFVAfAE/wHyAe8BbQHyAv8BCAKYAggCmAHCAfQB/wHyAe8QAAFtAfIM/wHy + Ae8BbQG8AZcBVQGXAQgBwgFVATMBlwHwAfQC/wHyAe8BbQHyAf8B9AOYAZcBVQOYAcIB/wHyAe8QAAFt + AfIM/wHyAe8BbQHxAbwBmAHzAv8B8gIzAVUB8gL/AfIB7wFtAfIB/wHyApgBlwIzAVUBCAGXAQgB/wHy + Ae8QAAFtAfIM/wHyAe8BbQHyAf8BwgP/AfQB8gFVATMBlwEIAf8B8gHvAW0B8gH/AfIDmAFVATMBVQGY + AZcBCAH/AfIB7xAAAW0B8gz/AfIB7wFtAfIH/wHCAVUBMwGXAQgB8QHvAW0B8gH/AfQCmAEIAZgBlwOY + AfMB/wHyAe8QAAFtAfIM/wHyAe8BbQHyCP8BCAJVAZcBCAHvAW0B8gL/AfEGmAEIAv8B8gHvEAABbQHy + DP8B8gHvAW0B8gn/AQgCVQEIAe8BbQHyA/8B8QOYAQgB8QH0Av8B8gHvEAAB6wHxDP8B8gHvAesB8Qr/ + AQgBmAEIAe8B6wHxBP8B9ALyAfQE/wHxAe8QAAH3AbwB8wr/AfMBvAEHAfcBvAHzCv8B8QK8AfcBvAHz + Cv8B8wK8EAAB8wK8AfEI8gHxAbwBBwHyAfMCvAHxCPIB8QG8AQcB8gHzArwB8QjyAfEBvAEHAfIRAAHz + AfcB7AHrBm0B6wHsAe8B9AIAAfMB9wHsAesGbQHrAewB7wH0AgAB8wH3AewB6wZtAesB7AHvAfQRAAFC + AU0BPgcAAT4DAAEoAwABQAMAARADAAEBAQABAQUAAYAXAAP/AQABgAEAAYABAAGAcwABgAEBAYABAQGA + AQECAAs= + + 209, 17 + diff --git a/Reseter2/Reseter2.csproj b/Reseter2/Reseter2.csproj index 5b177d2..4d984d6 100644 --- a/Reseter2/Reseter2.csproj +++ b/Reseter2/Reseter2.csproj @@ -38,6 +38,7 @@ prompt 4 false + preview AnyCPU @@ -47,6 +48,7 @@ TRACE prompt 4 + preview reseter.ico @@ -92,7 +94,26 @@ + + UserControl + + + SettingRebootControl.cs + + + + UserControl + + + SettingSCCMControl.cs + + + UserControl + + + SettingWordsControl.cs + @@ -162,16 +183,21 @@ True Resources.resx + + SettingRebootControl.cs + + + SettingSCCMControl.cs + + + SettingWordsControl.cs + TaskControl.cs BilderWords.cs - - ResXFileCodeGenerator - Designer - WordsCategoryControl.cs diff --git a/Reseter2/Setting/SettingExpand.cs b/Reseter2/Setting/SettingExpand.cs index 1f6ca71..937bf17 100644 --- a/Reseter2/Setting/SettingExpand.cs +++ b/Reseter2/Setting/SettingExpand.cs @@ -38,7 +38,7 @@ namespace Reseter2.Setting } else { - Expand(nodes[i].Nodes, folder, number+1); + Expand(nodes[i].Nodes, folder, ++number); } } diff --git a/Reseter2/Setting/SettingRebootControl.Designer.cs b/Reseter2/Setting/SettingRebootControl.Designer.cs new file mode 100644 index 0000000..11b18a3 --- /dev/null +++ b/Reseter2/Setting/SettingRebootControl.Designer.cs @@ -0,0 +1,149 @@ +namespace Reseter2.Setting +{ + partial class SettingRebootControl + { + /// + /// Обязательная переменная конструктора. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Освободить все используемые ресурсы. + /// + /// истинно, если управляемый ресурс должен быть удален; иначе ложно. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Код, автоматически созданный конструктором компонентов + + /// + /// Требуемый метод для поддержки конструктора — не изменяйте + /// содержимое этого метода с помощью редактора кода. + /// + private void InitializeComponent() + { + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.label15 = new System.Windows.Forms.Label(); + this.textBox9 = new System.Windows.Forms.TextBox(); + this.label14 = new System.Windows.Forms.Label(); + this.textBox8 = new System.Windows.Forms.TextBox(); + this.label13 = new System.Windows.Forms.Label(); + this.textBox7 = new System.Windows.Forms.TextBox(); + this.label12 = new System.Windows.Forms.Label(); + this.textBox6 = new System.Windows.Forms.TextBox(); + this.groupBox3.SuspendLayout(); + this.SuspendLayout(); + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.label15); + this.groupBox3.Controls.Add(this.textBox9); + this.groupBox3.Controls.Add(this.label14); + this.groupBox3.Controls.Add(this.textBox8); + this.groupBox3.Controls.Add(this.label13); + this.groupBox3.Controls.Add(this.textBox7); + this.groupBox3.Controls.Add(this.label12); + this.groupBox3.Controls.Add(this.textBox6); + this.groupBox3.Location = new System.Drawing.Point(3, 3); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(386, 124); + this.groupBox3.TabIndex = 4; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "Параметры перезагрузки"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Location = new System.Drawing.Point(7, 99); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(130, 13); + this.label15.TabIndex = 11; + this.label15.Text = "Кол-во записей истории"; + // + // textBox9 + // + this.textBox9.Location = new System.Drawing.Point(184, 96); + this.textBox9.Name = "textBox9"; + this.textBox9.Size = new System.Drawing.Size(182, 20); + this.textBox9.TabIndex = 10; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(7, 73); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(196, 13); + this.label14.TabIndex = 9; + this.label14.Text = "Время контроля после перезагрузки"; + // + // textBox8 + // + this.textBox8.Location = new System.Drawing.Point(209, 70); + this.textBox8.Name = "textBox8"; + this.textBox8.Size = new System.Drawing.Size(157, 20); + this.textBox8.TabIndex = 8; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Location = new System.Drawing.Point(7, 47); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(166, 13); + this.label13.TabIndex = 7; + this.label13.Text = "Время ожидание перезагрузки"; + // + // textBox7 + // + this.textBox7.Location = new System.Drawing.Point(184, 44); + this.textBox7.Name = "textBox7"; + this.textBox7.Size = new System.Drawing.Size(182, 20); + this.textBox7.TabIndex = 6; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(7, 21); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(171, 13); + this.label12.TabIndex = 5; + this.label12.Text = "Кол-во попыток проверки связи"; + // + // textBox6 + // + this.textBox6.Location = new System.Drawing.Point(184, 18); + this.textBox6.Name = "textBox6"; + this.textBox6.Size = new System.Drawing.Size(182, 20); + this.textBox6.TabIndex = 4; + // + // SettingRebootControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.groupBox3); + this.Name = "SettingRebootControl"; + this.Size = new System.Drawing.Size(391, 130); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.TextBox textBox9; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.TextBox textBox8; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.TextBox textBox7; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.TextBox textBox6; + } +} diff --git a/Reseter2/Setting/SettingRebootControl.cs b/Reseter2/Setting/SettingRebootControl.cs new file mode 100644 index 0000000..def61dc --- /dev/null +++ b/Reseter2/Setting/SettingRebootControl.cs @@ -0,0 +1,20 @@ +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.Setting +{ + public partial class SettingRebootControl : UserControl + { + public SettingRebootControl() + { + InitializeComponent(); + } + } +} diff --git a/Reseter2/Words/Resource1.resx b/Reseter2/Setting/SettingRebootControl.resx similarity index 95% rename from Reseter2/Words/Resource1.resx rename to Reseter2/Setting/SettingRebootControl.resx index 2814f4f..1af7de1 100644 --- a/Reseter2/Words/Resource1.resx +++ b/Reseter2/Setting/SettingRebootControl.resx @@ -117,8 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - \ No newline at end of file diff --git a/Reseter2/Setting/SettingSCCM.cs b/Reseter2/Setting/SettingSCCM.cs new file mode 100644 index 0000000..6949340 --- /dev/null +++ b/Reseter2/Setting/SettingSCCM.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Reseter2.Setting +{ + [Serializable] + internal class SettingSCCM + { + public string server; + public string dataBase; + public string username; + public string password; + public bool on; + public bool windowsAuth; + + + } +} diff --git a/Reseter2/Setting/SettingSCCMControl.Designer.cs b/Reseter2/Setting/SettingSCCMControl.Designer.cs new file mode 100644 index 0000000..dae63e3 --- /dev/null +++ b/Reseter2/Setting/SettingSCCMControl.Designer.cs @@ -0,0 +1,187 @@ +namespace Reseter2.Setting +{ + partial class SettingSCCMControl + { + /// + /// Обязательная переменная конструктора. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Освободить все используемые ресурсы. + /// + /// истинно, если управляемый ресурс должен быть удален; иначе ложно. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Код, автоматически созданный конструктором компонентов + + /// + /// Требуемый метод для поддержки конструктора — не изменяйте + /// содержимое этого метода с помощью редактора кода. + /// + private void InitializeComponent() + { + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.button3 = new System.Windows.Forms.Button(); + this.label10 = new System.Windows.Forms.Label(); + this.textBox4 = new System.Windows.Forms.TextBox(); + this.label11 = new System.Windows.Forms.Label(); + this.textBox5 = new System.Windows.Forms.TextBox(); + this.checkBox2 = new System.Windows.Forms.CheckBox(); + this.label9 = new System.Windows.Forms.Label(); + this.textBox3 = new System.Windows.Forms.TextBox(); + this.label8 = new System.Windows.Forms.Label(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); + this.groupBox2.SuspendLayout(); + this.SuspendLayout(); + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.button3); + this.groupBox2.Controls.Add(this.label10); + this.groupBox2.Controls.Add(this.textBox4); + this.groupBox2.Controls.Add(this.label11); + this.groupBox2.Controls.Add(this.textBox5); + this.groupBox2.Controls.Add(this.checkBox2); + this.groupBox2.Controls.Add(this.label9); + this.groupBox2.Controls.Add(this.textBox3); + this.groupBox2.Controls.Add(this.label8); + this.groupBox2.Controls.Add(this.textBox2); + this.groupBox2.Controls.Add(this.checkBox1); + this.groupBox2.Location = new System.Drawing.Point(3, 3); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(386, 173); + this.groupBox2.TabIndex = 3; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Параметры поиска"; + // + // button3 + // + this.button3.Location = new System.Drawing.Point(263, 143); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(112, 23); + this.button3.TabIndex = 11; + this.button3.Text = "Проверить связь"; + this.button3.UseVisualStyleBackColor = true; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(193, 102); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(45, 13); + this.label10.TabIndex = 10; + this.label10.Text = "Пароль"; + // + // textBox4 + // + this.textBox4.Location = new System.Drawing.Point(193, 117); + this.textBox4.Name = "textBox4"; + this.textBox4.Size = new System.Drawing.Size(182, 20); + this.textBox4.TabIndex = 9; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(6, 102); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(38, 13); + this.label11.TabIndex = 8; + this.label11.Text = "Логин"; + // + // textBox5 + // + this.textBox5.Location = new System.Drawing.Point(6, 117); + this.textBox5.Name = "textBox5"; + this.textBox5.Size = new System.Drawing.Size(181, 20); + this.textBox5.TabIndex = 7; + // + // checkBox2 + // + this.checkBox2.AutoSize = true; + this.checkBox2.Location = new System.Drawing.Point(10, 82); + this.checkBox2.Name = "checkBox2"; + this.checkBox2.Size = new System.Drawing.Size(157, 17); + this.checkBox2.TabIndex = 6; + this.checkBox2.Text = "Аутентификация Windows"; + this.checkBox2.UseVisualStyleBackColor = true; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(193, 40); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(72, 13); + this.label9.TabIndex = 5; + this.label9.Text = "База данных"; + // + // textBox3 + // + this.textBox3.Location = new System.Drawing.Point(193, 55); + this.textBox3.Name = "textBox3"; + this.textBox3.Size = new System.Drawing.Size(182, 20); + this.textBox3.TabIndex = 4; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(6, 40); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(113, 13); + this.label8.TabIndex = 3; + this.label8.Text = "Сервер базы данных"; + // + // textBox2 + // + this.textBox2.Location = new System.Drawing.Point(6, 55); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(181, 20); + this.textBox2.TabIndex = 1; + // + // checkBox1 + // + this.checkBox1.AutoSize = true; + this.checkBox1.Location = new System.Drawing.Point(10, 20); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(215, 17); + this.checkBox1.TabIndex = 0; + this.checkBox1.Text = "Связь с SCCM (помощь в поиске ПК)"; + this.checkBox1.UseVisualStyleBackColor = true; + // + // SettingSCCMControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.groupBox2); + this.Name = "SettingSCCMControl"; + this.Size = new System.Drawing.Size(391, 178); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TextBox textBox4; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.TextBox textBox5; + private System.Windows.Forms.CheckBox checkBox2; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.TextBox textBox3; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.CheckBox checkBox1; + } +} diff --git a/Reseter2/Setting/SettingSCCMControl.cs b/Reseter2/Setting/SettingSCCMControl.cs new file mode 100644 index 0000000..559f1d9 --- /dev/null +++ b/Reseter2/Setting/SettingSCCMControl.cs @@ -0,0 +1,20 @@ +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.Setting +{ + public partial class SettingSCCMControl : UserControl + { + public SettingSCCMControl() + { + InitializeComponent(); + } + } +} diff --git a/Reseter2/Setting/SettingSCCMControl.resx b/Reseter2/Setting/SettingSCCMControl.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Reseter2/Setting/SettingSCCMControl.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Reseter2/Setting/SettingWords.cs b/Reseter2/Setting/SettingWords.cs index 362fa4c..97e5df7 100644 --- a/Reseter2/Setting/SettingWords.cs +++ b/Reseter2/Setting/SettingWords.cs @@ -22,7 +22,7 @@ namespace Reseter2.Setting private byte[] hash; public SettingWords() { - PathBase = "base.dat"; + PathBase = "base.wb"; } public SettingWords(string pathBase) diff --git a/Reseter2/Setting/SettingWordsControl.Designer.cs b/Reseter2/Setting/SettingWordsControl.Designer.cs new file mode 100644 index 0000000..5c1d951 --- /dev/null +++ b/Reseter2/Setting/SettingWordsControl.Designer.cs @@ -0,0 +1,119 @@ +namespace Reseter2.Setting +{ + partial class SettingWordsControl + { + /// + /// Обязательная переменная конструктора. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Освободить все используемые ресурсы. + /// + /// истинно, если управляемый ресурс должен быть удален; иначе ложно. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Код, автоматически созданный конструктором компонентов + + /// + /// Требуемый метод для поддержки конструктора — не изменяйте + /// содержимое этого метода с помощью редактора кода. + /// + private void InitializeComponent() + { + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.bt_path_open = new System.Windows.Forms.Button(); + this.path = new System.Windows.Forms.TextBox(); + this.label7 = new System.Windows.Forms.Label(); + this.bt_wordsBilder = new System.Windows.Forms.Button(); + this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.bt_path_open); + this.groupBox1.Controls.Add(this.path); + this.groupBox1.Controls.Add(this.label7); + this.groupBox1.Controls.Add(this.bt_wordsBilder); + this.groupBox1.Location = new System.Drawing.Point(3, 3); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(386, 98); + this.groupBox1.TabIndex = 2; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Параметры справочника"; + // + // bt_path_open + // + this.bt_path_open.Location = new System.Drawing.Point(348, 36); + this.bt_path_open.Name = "bt_path_open"; + this.bt_path_open.Size = new System.Drawing.Size(27, 23); + this.bt_path_open.TabIndex = 3; + this.bt_path_open.Text = "..."; + this.bt_path_open.UseVisualStyleBackColor = true; + this.bt_path_open.Click += new System.EventHandler(this.bt_path_open_Click); + // + // path + // + this.path.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.path.Location = new System.Drawing.Point(10, 37); + this.path.Name = "path"; + this.path.Size = new System.Drawing.Size(339, 20); + this.path.TabIndex = 2; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(7, 20); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(105, 13); + this.label7.TabIndex = 1; + this.label7.Text = "Файл базы данных"; + // + // bt_wordsBilder + // + this.bt_wordsBilder.Location = new System.Drawing.Point(220, 65); + this.bt_wordsBilder.Name = "bt_wordsBilder"; + this.bt_wordsBilder.Size = new System.Drawing.Size(155, 23); + this.bt_wordsBilder.TabIndex = 0; + this.bt_wordsBilder.Text = "Редактор справочника"; + this.bt_wordsBilder.UseVisualStyleBackColor = true; + this.bt_wordsBilder.Click += new System.EventHandler(this.bt_wordsBilder_Click); + // + // openFileDialog1 + // + this.openFileDialog1.CheckFileExists = false; + this.openFileDialog1.DefaultExt = "*.wb"; + this.openFileDialog1.Filter = "База справочника|*.wb"; + // + // SettingWordsControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.groupBox1); + this.Name = "SettingWordsControl"; + this.Size = new System.Drawing.Size(391, 103); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Button bt_path_open; + private System.Windows.Forms.TextBox path; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Button bt_wordsBilder; + private System.Windows.Forms.OpenFileDialog openFileDialog1; + } +} diff --git a/Reseter2/Setting/SettingWordsControl.cs b/Reseter2/Setting/SettingWordsControl.cs new file mode 100644 index 0000000..fedddeb --- /dev/null +++ b/Reseter2/Setting/SettingWordsControl.cs @@ -0,0 +1,61 @@ +using Reseter2.Words; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using static System.Windows.Forms.VisualStyles.VisualStyleElement; + +namespace Reseter2.Setting +{ + + partial class SettingWordsControl : UserControl + { + + public NewTreeView treeView; + public SettingWordsControl() + { + InitializeComponent(); + if(SGlobalSetting.settingWords != null) + { + path.Text = SGlobalSetting.settingWords.PathBase; + } + } + + private void bt_wordsBilder_Click(object sender, EventArgs e) + { + BilderWords bilderWords = new BilderWords(); + DialogResult result = bilderWords.ShowDialog(); + if (result == DialogResult.OK) + { + if (treeView != null) + { + treeView.Nodes.Clear(); + treeView.Nodes.AddRange(WordsList.ListNodes()); + } + } + } + + private void bt_path_open_Click(object sender, EventArgs e) + { + openFileDialog1.ShowDialog(); + if(openFileDialog1.FileName != null) + { + path.Text = openFileDialog1.FileName; + } + } + + public void Save() + { + if(SGlobalSetting.settingWords.PathBase != path.Text) + { + SGlobalSetting.settingWords.PathBase = path.Text; + } + + } + } +} diff --git a/Reseter2/Setting/SettingWordsControl.resx b/Reseter2/Setting/SettingWordsControl.resx new file mode 100644 index 0000000..9bad2f5 --- /dev/null +++ b/Reseter2/Setting/SettingWordsControl.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file