diff --git a/Remontor/.vs/Remontor/FileContentIndex/205d4652-38fe-437c-9a0e-af2aabca7ed1.vsidx b/Remontor/.vs/Remontor/FileContentIndex/205d4652-38fe-437c-9a0e-af2aabca7ed1.vsidx deleted file mode 100644 index 721a25c..0000000 Binary files a/Remontor/.vs/Remontor/FileContentIndex/205d4652-38fe-437c-9a0e-af2aabca7ed1.vsidx and /dev/null 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 new file mode 100644 index 0000000..a499d37 Binary files /dev/null and b/Remontor/.vs/Remontor/FileContentIndex/288c9ec7-b545-4757-a8fe-c218411d4549.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 new file mode 100644 index 0000000..3662aa8 Binary files /dev/null and b/Remontor/.vs/Remontor/FileContentIndex/83c16984-46f9-4650-894d-557be5ae12e9.vsidx differ diff --git a/Remontor/.vs/Remontor/FileContentIndex/fe8b9727-c6ee-477c-9659-a902f8453f40.vsidx b/Remontor/.vs/Remontor/FileContentIndex/fe8b9727-c6ee-477c-9659-a902f8453f40.vsidx new file mode 100644 index 0000000..65108c0 Binary files /dev/null and b/Remontor/.vs/Remontor/FileContentIndex/fe8b9727-c6ee-477c-9659-a902f8453f40.vsidx differ diff --git a/Remontor/.vs/Remontor/v17/.suo b/Remontor/.vs/Remontor/v17/.suo index 120e308..dfafea5 100644 Binary files a/Remontor/.vs/Remontor/v17/.suo and b/Remontor/.vs/Remontor/v17/.suo differ diff --git a/Remontor/BarSessionControl.cs b/Remontor/BarSessionControl.cs index cda2767..d80d531 100644 --- a/Remontor/BarSessionControl.cs +++ b/Remontor/BarSessionControl.cs @@ -55,6 +55,7 @@ namespace Remontor public void ShowBarSet(BarShow barShow) { + if (barShow == BarShow.ShowWords) { ShowWords.BackColor = SystemColors.ActiveCaption; } else { ShowWords.BackColor = SystemColors.Control; } if (barShow == BarShow.ShowHistory) { ShowBar.BackColor = SystemColors.ActiveCaption; } diff --git a/Remontor/FlowContainerWords.cs b/Remontor/FlowContainerWords.cs index 743f053..a6acd5c 100644 --- a/Remontor/FlowContainerWords.cs +++ b/Remontor/FlowContainerWords.cs @@ -36,7 +36,8 @@ namespace Remontor { WordsTree.Nodes.Clear(); WordsTree.Nodes.AddRange(WordsList.ListNodes()); - + SGlobalSetting.settingExpand.ExpendAll(WordsTree.Nodes); + } public void Save() diff --git a/Remontor/FlowConteinerSetting.Designer.cs b/Remontor/FlowConteinerSetting.Designer.cs index 78bcaed..63309cc 100644 --- a/Remontor/FlowConteinerSetting.Designer.cs +++ b/Remontor/FlowConteinerSetting.Designer.cs @@ -31,6 +31,8 @@ this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.settingWordsControl1 = new Remontor.Setting.SettingWordsControl(); this.settingSCCMControl1 = new Remontor.Setting.SettingSCCMControl(); + this.settingAppControl1 = new Remontor.Setting.settingAppControl(); + this.BtSave = new System.Windows.Forms.Button(); this.flowLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // @@ -39,6 +41,8 @@ this.flowLayoutPanel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.flowLayoutPanel1.Controls.Add(this.settingWordsControl1); this.flowLayoutPanel1.Controls.Add(this.settingSCCMControl1); + this.flowLayoutPanel1.Controls.Add(this.settingAppControl1); + this.flowLayoutPanel1.Controls.Add(this.BtSave); this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; @@ -59,6 +63,23 @@ this.settingSCCMControl1.Size = new System.Drawing.Size(323, 178); this.settingSCCMControl1.TabIndex = 1; // + // settingAppControl1 + // + this.settingAppControl1.Location = new System.Drawing.Point(3, 296); + this.settingAppControl1.Name = "settingAppControl1"; + this.settingAppControl1.Size = new System.Drawing.Size(325, 130); + this.settingAppControl1.TabIndex = 2; + // + // BtSave + // + this.BtSave.Location = new System.Drawing.Point(3, 432); + this.BtSave.Name = "BtSave"; + this.BtSave.Size = new System.Drawing.Size(323, 28); + this.BtSave.TabIndex = 3; + this.BtSave.Text = "Сохранить"; + this.BtSave.UseVisualStyleBackColor = true; + this.BtSave.Click += new System.EventHandler(this.BtSave_Click); + // // FlowConteinerSetting // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -76,5 +97,7 @@ private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; public Setting.SettingWordsControl settingWordsControl1; private Setting.SettingSCCMControl settingSCCMControl1; + private Setting.settingAppControl settingAppControl1; + private System.Windows.Forms.Button BtSave; } } diff --git a/Remontor/FlowConteinerSetting.cs b/Remontor/FlowConteinerSetting.cs index e77a478..5f0e032 100644 --- a/Remontor/FlowConteinerSetting.cs +++ b/Remontor/FlowConteinerSetting.cs @@ -1,4 +1,6 @@ -using System; +using Remontor.Setting; +using Remontor.Words; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -7,14 +9,23 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; +using static System.Windows.Forms.VisualStyles.VisualStyleElement; namespace Remontor { internal partial class FlowConteinerSetting : UserControl { + public delegate void DUpdateTree(); + public DUpdateTree UpdateTree; + public delegate void saveSetting(); + public event saveSetting Save; + private bool unSave = false; public FlowConteinerSetting() { InitializeComponent(); + Save += settingAppControl1.Save; + Save += settingSCCMControl1.Save; + Save += settingWordsControl1.Save; } @@ -23,6 +34,9 @@ namespace Remontor if (barShow == BarShow.ShowSetting) { this.Visible = true; + settingAppControl1.UpdateSetting(); + settingSCCMControl1.UpdateSetting(); + settingWordsControl1.UpdateSetting(); } else { @@ -31,5 +45,47 @@ namespace Remontor return this.Visible; } + + //private bool NotSave() + //{ + // if (tabControl1.SelectedIndex == 3) + // { + // if (!unSave) + // { + // unSave = true; + // UpdateSetting(); + // } + + // } + // else + // { + // if (unSave && (settingAppControl1.edited() || + // settingSCCMControl1.edited() || + // settingWordsControl1.edited())) + // { + // DialogResult result = MessageBox.Show("Изменения не сохраненны. Продолжить?", "Изменения не сохраненны.", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); + // switch (result) + // { + // case DialogResult.Cancel: + // tabControl1.SelectedIndex = 3; + // break; + // case DialogResult.OK: + // unSave = false; + // break; + // } + // } + + // } + //} + + private void BtSave_Click(object sender, EventArgs e) + { + Save(); + SGlobalSetting.SaveSettig(); + SGlobalSetting.LoadSetting(); + WordsList.MainCategory = SGlobalSetting.LoadWords(); + UpdateTree(); + + } } } diff --git a/Remontor/Form1.cs b/Remontor/Form1.cs index 2fb36f2..578a418 100644 --- a/Remontor/Form1.cs +++ b/Remontor/Form1.cs @@ -52,8 +52,9 @@ namespace Remontor SConnector.FormMain = this; - flowConteinerSetting1.settingWordsControl1.UpdateTree = flowContainerWords1.UpdateTree; - + flowConteinerSetting1.settingWordsControl1.UpdateTree += flowContainerWords1.UpdateTree; + flowConteinerSetting1.UpdateTree += flowContainerWords1.UpdateTree; + flowConteinerSetting1.Save += flowContainerWords1.Save; this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); @@ -86,14 +87,9 @@ namespace Remontor //MoveWindow(p.MainWindowHandle, panel3.Bounds.X, panel3.Bounds.Y, panel3.Bounds.Width, panel3.Bounds.Height, true); } - private void button1_Click(object sender, EventArgs e) + private void FlowConteinerSetting1_Save() { - // panel1.Visible =! panel1.Visible; - } - - private void button2_Click(object sender, EventArgs e) - { - panel3.Visible =! panel3.Visible; + throw new NotImplementedException(); } [DllImport("user32.dll")] diff --git a/Remontor/History/HistoryList.cs b/Remontor/History/HistoryList.cs index ce3d50d..b7eff69 100644 --- a/Remontor/History/HistoryList.cs +++ b/Remontor/History/HistoryList.cs @@ -42,7 +42,7 @@ namespace Remontor.History static public void ClearFirst() { - if(Hitem.Count > SGlobalSetting.settingReboot.sizeHistoryItem) + if(Hitem.Count > SGlobalSetting.settingApp.sizeHistoryItem) { Hitem.RemoveAt(Hitem.Count() - 1); ClearFirst(); diff --git a/Remontor/Remontor.csproj b/Remontor/Remontor.csproj index ebbd9dd..65d01b2 100644 --- a/Remontor/Remontor.csproj +++ b/Remontor/Remontor.csproj @@ -123,12 +123,12 @@ SessionItemControl.cs - - + + UserControl - - SettingRebootControl.cs + + SettingAppControl.cs @@ -218,8 +218,8 @@ SessionItemControl.cs - - SettingRebootControl.cs + + SettingAppControl.cs SettingSCCMControl.cs diff --git a/Remontor/Setting/SGlobalSetting.cs b/Remontor/Setting/SGlobalSetting.cs index abe7896..c2dbd37 100644 --- a/Remontor/Setting/SGlobalSetting.cs +++ b/Remontor/Setting/SGlobalSetting.cs @@ -22,7 +22,7 @@ namespace Remontor.Setting public static SettingWords settingWords = new SettingWords(); public static SettingExpand settingExpand = new SettingExpand(); public static SettingSCCM settingSCCM = new SettingSCCM(); - public static SettingReboot settingReboot = new SettingReboot(); + public static SettingApp settingApp = new SettingApp(); //public static void LoadSetting() // { @@ -48,7 +48,7 @@ namespace Remontor.Setting if (setting.settingWords != null) settingWords = setting.settingWords; if (setting.settingExpand != null) settingExpand = setting.settingExpand; if (setting.settingSCCM != null) settingSCCM = setting.settingSCCM; - if (setting.settingReboot != null) settingReboot = setting.settingReboot; + if (setting.settingApp != null) settingApp = setting.settingApp; if (setting.historyItems != null) HistoryList.Hitem = setting.historyItems; SSeaher.LoadSetting(); // return output; @@ -61,7 +61,7 @@ namespace Remontor.Setting sSetting.historyItems = HistoryList.Hitem; sSetting.settingExpand = settingExpand; sSetting.settingSCCM = settingSCCM; - sSetting.settingReboot = settingReboot; + sSetting.settingApp = settingApp; if (Save("res.dat", sSetting)) { return true; diff --git a/Remontor/Setting/SSetting.cs b/Remontor/Setting/SSetting.cs index f48f587..9bf33d6 100644 --- a/Remontor/Setting/SSetting.cs +++ b/Remontor/Setting/SSetting.cs @@ -14,6 +14,6 @@ namespace Remontor.Setting public List historyItems; public SettingExpand settingExpand; public SettingSCCM settingSCCM; - public SettingReboot settingReboot; + public SettingApp settingApp; } } diff --git a/Remontor/Setting/SettingApp.cs b/Remontor/Setting/SettingApp.cs new file mode 100644 index 0000000..22e4824 --- /dev/null +++ b/Remontor/Setting/SettingApp.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Remontor.Setting +{ + [Serializable] + internal class SettingApp + { + public string pathApp; + public int sizeHistoryItem; + public SettingApp() + { + this.pathApp = "CmRcViewer.exe"; + this.sizeHistoryItem = 200; + } + } +} diff --git a/Remontor/Setting/SettingAppControl.Designer.cs b/Remontor/Setting/SettingAppControl.Designer.cs new file mode 100644 index 0000000..8589f11 --- /dev/null +++ b/Remontor/Setting/SettingAppControl.Designer.cs @@ -0,0 +1,135 @@ +namespace Remontor.Setting +{ + partial class settingAppControl + { + /// + /// Обязательная переменная конструктора. + /// + 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.bt_path_open = new System.Windows.Forms.Button(); + this.path = new System.Windows.Forms.TextBox(); + this.label12 = new System.Windows.Forms.Label(); + this.nb_ItemHistorySize = new System.Windows.Forms.NumericUpDown(); + this.label1 = new System.Windows.Forms.Label(); + this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + this.groupBox3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nb_ItemHistorySize)).BeginInit(); + this.SuspendLayout(); + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.label1); + this.groupBox3.Controls.Add(this.nb_ItemHistorySize); + this.groupBox3.Controls.Add(this.bt_path_open); + this.groupBox3.Controls.Add(this.path); + this.groupBox3.Controls.Add(this.label12); + this.groupBox3.Location = new System.Drawing.Point(3, 3); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(319, 124); + this.groupBox3.TabIndex = 4; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "Параметры подключений"; + // + // bt_path_open + // + this.bt_path_open.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.bt_path_open.Location = new System.Drawing.Point(281, 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 = 7; + 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(272, 20); + this.path.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(162, 13); + this.label12.TabIndex = 5; + this.label12.Text = "Приложение для подключения"; + // + // nb_ItemHistorySize + // + this.nb_ItemHistorySize.Location = new System.Drawing.Point(143, 65); + this.nb_ItemHistorySize.Maximum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.nb_ItemHistorySize.Name = "nb_ItemHistorySize"; + this.nb_ItemHistorySize.Size = new System.Drawing.Size(165, 20); + this.nb_ItemHistorySize.TabIndex = 8; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(7, 67); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(130, 13); + this.label1.TabIndex = 9; + this.label1.Text = "Кол-во записей истории"; + // + // openFileDialog1 + // + this.openFileDialog1.FileName = "openFileDialog1"; + // + // settingAppControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.groupBox3); + this.Name = "settingAppControl"; + this.Size = new System.Drawing.Size(325, 130); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nb_ItemHistorySize)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Button bt_path_open; + private System.Windows.Forms.TextBox path; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.NumericUpDown nb_ItemHistorySize; + private System.Windows.Forms.OpenFileDialog openFileDialog1; + } +} diff --git a/Remontor/Setting/SettingAppControl.cs b/Remontor/Setting/SettingAppControl.cs new file mode 100644 index 0000000..8a07749 --- /dev/null +++ b/Remontor/Setting/SettingAppControl.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Runtime; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Remontor.Setting +{ + public partial class settingAppControl : UserControl + { + public settingAppControl() + { + InitializeComponent(); + UpdateSetting(); + + } + public void UpdateSetting() + { + if (SGlobalSetting.settingApp != null) + { + path.Text = SGlobalSetting.settingApp.pathApp; + nb_ItemHistorySize.Value = SGlobalSetting.settingApp.sizeHistoryItem; + + } + } + + + public void Save() + { + SGlobalSetting.settingApp.pathApp = path.Text; + SGlobalSetting.settingApp.sizeHistoryItem = (int)nb_ItemHistorySize.Value; + + } + + public bool edited() + { + return (SGlobalSetting.settingApp.pathApp != path.Text || + SGlobalSetting.settingApp.sizeHistoryItem != (int)nb_ItemHistorySize.Value); + + } + + private void bt_path_open_Click(object sender, EventArgs e) + { + openFileDialog1.ShowDialog(); + if (openFileDialog1.FileName != null) + { + path.Text = openFileDialog1.FileName; + } + } + } +} diff --git a/Remontor/Setting/SettingRebootControl.resx b/Remontor/Setting/SettingAppControl.resx similarity index 96% rename from Remontor/Setting/SettingRebootControl.resx rename to Remontor/Setting/SettingAppControl.resx index 1af7de1..9bad2f5 100644 --- a/Remontor/Setting/SettingRebootControl.resx +++ b/Remontor/Setting/SettingAppControl.resx @@ -117,4 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + \ No newline at end of file diff --git a/Remontor/Setting/SettingReboot.cs b/Remontor/Setting/SettingReboot.cs deleted file mode 100644 index 5982552..0000000 --- a/Remontor/Setting/SettingReboot.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Remontor.Setting -{ - [Serializable] - internal class SettingReboot - { - public int checkConnect; - public int timeOutReboot; - public int timeCheckBeforReboot; - public int sizeHistoryItem; - public SettingReboot() - { - this.checkConnect = 5; - this.timeOutReboot = 5; - this.timeCheckBeforReboot = 50; - this.sizeHistoryItem = 200; - } - } -} diff --git a/Remontor/Setting/SettingRebootControl.Designer.cs b/Remontor/Setting/SettingRebootControl.Designer.cs deleted file mode 100644 index 58c35f7..0000000 --- a/Remontor/Setting/SettingRebootControl.Designer.cs +++ /dev/null @@ -1,185 +0,0 @@ -namespace Remontor.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.label14 = new System.Windows.Forms.Label(); - this.label13 = new System.Windows.Forms.Label(); - this.label12 = new System.Windows.Forms.Label(); - this.nb_checkConnect = new System.Windows.Forms.NumericUpDown(); - this.nb_timeOutReboot = new System.Windows.Forms.NumericUpDown(); - this.nb_timeCheckBeforReboot = new System.Windows.Forms.NumericUpDown(); - this.nb_sizeHistoryItem = new System.Windows.Forms.NumericUpDown(); - this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nb_checkConnect)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nb_timeOutReboot)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nb_timeCheckBeforReboot)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nb_sizeHistoryItem)).BeginInit(); - this.SuspendLayout(); - // - // groupBox3 - // - this.groupBox3.Controls.Add(this.nb_sizeHistoryItem); - this.groupBox3.Controls.Add(this.nb_timeCheckBeforReboot); - this.groupBox3.Controls.Add(this.nb_timeOutReboot); - this.groupBox3.Controls.Add(this.nb_checkConnect); - this.groupBox3.Controls.Add(this.label15); - this.groupBox3.Controls.Add(this.label14); - this.groupBox3.Controls.Add(this.label13); - this.groupBox3.Controls.Add(this.label12); - 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 = "Кол-во записей истории"; - // - // 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 = "Время контроля после перезагрузки"; - // - // 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 = "Время ожидание перезагрузки"; - // - // 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 = "Кол-во попыток проверки связи"; - // - // nb_checkConnect - // - this.nb_checkConnect.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.nb_checkConnect.Location = new System.Drawing.Point(184, 18); - this.nb_checkConnect.Maximum = new decimal(new int[] { - 1000000, - 0, - 0, - 0}); - this.nb_checkConnect.Name = "nb_checkConnect"; - this.nb_checkConnect.Size = new System.Drawing.Size(182, 20); - this.nb_checkConnect.TabIndex = 13; - // - // nb_timeOutReboot - // - this.nb_timeOutReboot.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.nb_timeOutReboot.Location = new System.Drawing.Point(184, 44); - this.nb_timeOutReboot.Maximum = new decimal(new int[] { - 100000, - 0, - 0, - 0}); - this.nb_timeOutReboot.Name = "nb_timeOutReboot"; - this.nb_timeOutReboot.Size = new System.Drawing.Size(182, 20); - this.nb_timeOutReboot.TabIndex = 14; - // - // nb_timeCheckBeforReboot - // - this.nb_timeCheckBeforReboot.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.nb_timeCheckBeforReboot.Location = new System.Drawing.Point(208, 70); - this.nb_timeCheckBeforReboot.Maximum = new decimal(new int[] { - 100000, - 0, - 0, - 0}); - this.nb_timeCheckBeforReboot.Name = "nb_timeCheckBeforReboot"; - this.nb_timeCheckBeforReboot.Size = new System.Drawing.Size(158, 20); - this.nb_timeCheckBeforReboot.TabIndex = 15; - // - // nb_sizeHistoryItem - // - this.nb_sizeHistoryItem.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.nb_sizeHistoryItem.Location = new System.Drawing.Point(184, 96); - this.nb_sizeHistoryItem.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nb_sizeHistoryItem.Name = "nb_sizeHistoryItem"; - this.nb_sizeHistoryItem.Size = new System.Drawing.Size(182, 20); - this.nb_sizeHistoryItem.TabIndex = 16; - // - // 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(); - ((System.ComponentModel.ISupportInitialize)(this.nb_checkConnect)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nb_timeOutReboot)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nb_timeCheckBeforReboot)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nb_sizeHistoryItem)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.Label label15; - private System.Windows.Forms.Label label14; - private System.Windows.Forms.Label label13; - private System.Windows.Forms.Label label12; - private System.Windows.Forms.NumericUpDown nb_timeOutReboot; - private System.Windows.Forms.NumericUpDown nb_checkConnect; - private System.Windows.Forms.NumericUpDown nb_sizeHistoryItem; - private System.Windows.Forms.NumericUpDown nb_timeCheckBeforReboot; - } -} diff --git a/Remontor/Setting/SettingRebootControl.cs b/Remontor/Setting/SettingRebootControl.cs deleted file mode 100644 index 80d5df3..0000000 --- a/Remontor/Setting/SettingRebootControl.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Runtime; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace Remontor.Setting -{ - public partial class SettingRebootControl : UserControl - { - public SettingRebootControl() - { - InitializeComponent(); - UpdateSetting(); - - } - public void UpdateSetting() - { - if (SGlobalSetting.settingReboot != null) - { - nb_checkConnect.Value = SGlobalSetting.settingReboot.checkConnect; - nb_timeOutReboot.Value = SGlobalSetting.settingReboot.timeOutReboot; - nb_timeCheckBeforReboot.Value = SGlobalSetting.settingReboot.timeCheckBeforReboot; - nb_sizeHistoryItem.Value = SGlobalSetting.settingReboot.sizeHistoryItem; - } - } - - - public void Save() - { - SGlobalSetting.settingReboot.checkConnect = (int)nb_checkConnect.Value; - SGlobalSetting.settingReboot.timeOutReboot = (int)nb_timeOutReboot.Value; - SGlobalSetting.settingReboot.timeCheckBeforReboot = (int)nb_timeCheckBeforReboot.Value; - SGlobalSetting.settingReboot.sizeHistoryItem = (int)nb_sizeHistoryItem.Value; - - } - - public bool edited() - { - return (SGlobalSetting.settingReboot.checkConnect != (int)nb_checkConnect.Value || - SGlobalSetting.settingReboot.timeOutReboot != (int)nb_timeOutReboot.Value || - SGlobalSetting.settingReboot.timeCheckBeforReboot != (int)nb_timeCheckBeforReboot.Value || - SGlobalSetting.settingReboot.sizeHistoryItem != (int)nb_sizeHistoryItem.Value); - - } - - - } -} diff --git a/Remontor/Setting/SettingSCCMControl.Designer.cs b/Remontor/Setting/SettingSCCMControl.Designer.cs index 0b11553..e440ea8 100644 --- a/Remontor/Setting/SettingSCCMControl.Designer.cs +++ b/Remontor/Setting/SettingSCCMControl.Designer.cs @@ -174,7 +174,7 @@ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.groupBox2); this.Name = "SettingSCCMControl"; - this.Size = new System.Drawing.Size(330, 178); + this.Size = new System.Drawing.Size(326, 178); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); diff --git a/Remontor/bin/Debug/Remontor.exe b/Remontor/bin/Debug/Remontor.exe index e7bd356..e40b548 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 1cbc284..e173883 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 c2bdda3..91cbee2 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 50cb706..6049997 100644 Binary files a/Remontor/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/Remontor/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Remontor/obj/Debug/Remontor.Setting.SettingRebootControl.resources b/Remontor/obj/Debug/Remontor.Setting.settingAppControl.resources similarity index 100% rename from Remontor/obj/Debug/Remontor.Setting.SettingRebootControl.resources rename to Remontor/obj/Debug/Remontor.Setting.settingAppControl.resources diff --git a/Remontor/obj/Debug/Remontor.csproj.CoreCompileInputs.cache b/Remontor/obj/Debug/Remontor.csproj.CoreCompileInputs.cache index eefb613..5c9515b 100644 --- a/Remontor/obj/Debug/Remontor.csproj.CoreCompileInputs.cache +++ b/Remontor/obj/Debug/Remontor.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -0e1e737b0acc802a68d47ea5c98b77e0da8be6fd +b0e7fcb2ee6e153bc54901d6d96fe11158f2ea6b diff --git a/Remontor/obj/Debug/Remontor.csproj.FileListAbsolute.txt b/Remontor/obj/Debug/Remontor.csproj.FileListAbsolute.txt index a236f4d..849385c 100644 --- a/Remontor/obj/Debug/Remontor.csproj.FileListAbsolute.txt +++ b/Remontor/obj/Debug/Remontor.csproj.FileListAbsolute.txt @@ -13,7 +13,6 @@ C:\Users\Владимир\source\repos\Remontor\Remontor\obj\Debug\Remontor.Flow C:\Users\Владимир\source\repos\Remontor\Remontor\obj\Debug\Remontor.SessionItemControl.resources C:\Users\Владимир\source\repos\Remontor\Remontor\obj\Debug\Remontor.BarSessionControl.resources C:\Users\Владимир\source\repos\Remontor\Remontor\obj\Debug\Remontor.Finder.Finder.resources -C:\Users\Владимир\source\repos\Remontor\Remontor\obj\Debug\Remontor.Setting.SettingRebootControl.resources C:\Users\Владимир\source\repos\Remontor\Remontor\obj\Debug\Remontor.Setting.SettingSCCMControl.resources C:\Users\Владимир\source\repos\Remontor\Remontor\obj\Debug\Remontor.Setting.SettingWordsControl.resources C:\Users\Владимир\source\repos\Remontor\Remontor\obj\Debug\Remontor.Words.BilderWords.resources @@ -51,3 +50,4 @@ C:\Users\klavi\Source\Repos\Remontor\Remontor\obj\Debug\Remontor.FlowContainerWo C:\Users\Владимир\source\repos\Remontor\Remontor\obj\Debug\Remontor.FlowContainerWords.resources 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 diff --git a/Remontor/obj/Debug/Remontor.csproj.GenerateResource.cache b/Remontor/obj/Debug/Remontor.csproj.GenerateResource.cache index 824fc19..d09e44b 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 e7bd356..e40b548 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 1cbc284..e173883 100644 Binary files a/Remontor/obj/Debug/Remontor.pdb and b/Remontor/obj/Debug/Remontor.pdb differ