добавили функцию сохранения настроек поправил сами настройки
This commit is contained in:
parent
bf6260b211
commit
d78d2f58d7
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -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; }
|
||||
|
|
|
|||
|
|
@ -36,7 +36,8 @@ namespace Remontor
|
|||
{
|
||||
WordsTree.Nodes.Clear();
|
||||
WordsTree.Nodes.AddRange(WordsList.ListNodes());
|
||||
|
||||
SGlobalSetting.settingExpand.ExpendAll(WordsTree.Nodes);
|
||||
|
||||
}
|
||||
|
||||
public void Save()
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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")]
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -123,12 +123,12 @@
|
|||
<DependentUpon>SessionItemControl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Setting\SettingExpand.cs" />
|
||||
<Compile Include="Setting\SettingReboot.cs" />
|
||||
<Compile Include="Setting\SettingRebootControl.cs">
|
||||
<Compile Include="Setting\SettingApp.cs" />
|
||||
<Compile Include="Setting\SettingAppControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Setting\SettingRebootControl.Designer.cs">
|
||||
<DependentUpon>SettingRebootControl.cs</DependentUpon>
|
||||
<Compile Include="Setting\SettingAppControl.Designer.cs">
|
||||
<DependentUpon>SettingAppControl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Setting\SettingSCCM.cs" />
|
||||
<Compile Include="Setting\SettingSCCMControl.cs">
|
||||
|
|
@ -218,8 +218,8 @@
|
|||
<EmbeddedResource Include="SessionItemControl.resx">
|
||||
<DependentUpon>SessionItemControl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Setting\SettingRebootControl.resx">
|
||||
<DependentUpon>SettingRebootControl.cs</DependentUpon>
|
||||
<EmbeddedResource Include="Setting\SettingAppControl.resx">
|
||||
<DependentUpon>SettingAppControl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Setting\SettingSCCMControl.resx">
|
||||
<DependentUpon>SettingSCCMControl.cs</DependentUpon>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,6 @@ namespace Remontor.Setting
|
|||
public List<HistoryItem> historyItems;
|
||||
public SettingExpand settingExpand;
|
||||
public SettingSCCM settingSCCM;
|
||||
public SettingReboot settingReboot;
|
||||
public SettingApp settingApp;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
namespace Remontor.Setting
|
||||
{
|
||||
partial class settingAppControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Обязательная переменная конструктора.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Освободить все используемые ресурсы.
|
||||
/// </summary>
|
||||
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Код, автоматически созданный конструктором компонентов
|
||||
|
||||
/// <summary>
|
||||
/// Требуемый метод для поддержки конструктора — не изменяйте
|
||||
/// содержимое этого метода с помощью редактора кода.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -117,4 +117,7 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,185 +0,0 @@
|
|||
namespace Remontor.Setting
|
||||
{
|
||||
partial class SettingRebootControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Обязательная переменная конструктора.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Освободить все используемые ресурсы.
|
||||
/// </summary>
|
||||
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Код, автоматически созданный конструктором компонентов
|
||||
|
||||
/// <summary>
|
||||
/// Требуемый метод для поддержки конструктора — не изменяйте
|
||||
/// содержимое этого метода с помощью редактора кода.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
0e1e737b0acc802a68d47ea5c98b77e0da8be6fd
|
||||
b0e7fcb2ee6e153bc54901d6d96fe11158f2ea6b
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue