From 19b19d52710b4d652229ebdee217633596653879 Mon Sep 17 00:00:00 2001 From: Seonjae Date: Thu, 6 Apr 2023 17:08:14 +0900 Subject: [PATCH] =?UTF-8?q?=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20?= =?UTF-8?q?=EC=99=84=EB=A3=8C=203=EC=B4=88=ED=9B=84=20=EC=9E=90=EB=8F=99?= =?UTF-8?q?=20=EC=9E=AC=EB=B6=80=ED=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DialogFormProgressBar.Designer.cs | 15 ++++++++-- .../DialogForms/DialogFormProgressBar.cs | 29 ++++++++++++------- .../DialogForms/DialogFormProgressBar.resx | 3 ++ INT_PT002/Forms/FormMain.cs | 2 +- 4 files changed, 36 insertions(+), 13 deletions(-) diff --git a/INT_PT002/DialogForms/DialogFormProgressBar.Designer.cs b/INT_PT002/DialogForms/DialogFormProgressBar.Designer.cs index 2c308c1..6aaf662 100644 --- a/INT_PT002/DialogForms/DialogFormProgressBar.Designer.cs +++ b/INT_PT002/DialogForms/DialogFormProgressBar.Designer.cs @@ -38,6 +38,7 @@ this.smartTimerUpdate = new SmartX.SmartTimer(); this.smartSerialPort2 = new SmartX.SmartSerialPort(this.components); this.timerForMainBoard = new SmartX.SmartTimer(); + this.smartTimerReboot = new SmartX.SmartTimer(); this.smartGroupBox1.SuspendLayout(); this.SuspendLayout(); // @@ -105,7 +106,7 @@ this.labelMessage2.BackGroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); this.labelMessage2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(42)))), ((int)(((byte)(82))))); this.labelMessage2.BorderStyle = SmartX.SmartLabel.BorderStyles.None; - this.labelMessage2.Font = new System.Drawing.Font("새굴림", 10F, System.Drawing.FontStyle.Regular); + this.labelMessage2.Font = new System.Drawing.Font("New Gulim", 10F, System.Drawing.FontStyle.Regular); this.labelMessage2.LineSpacing = 0F; this.labelMessage2.Location = new System.Drawing.Point(43, 84); this.labelMessage2.Name = "labelMessage2"; @@ -169,7 +170,7 @@ this.labelMessage1.BackGroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); this.labelMessage1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(42)))), ((int)(((byte)(82))))); this.labelMessage1.BorderStyle = SmartX.SmartLabel.BorderStyles.None; - this.labelMessage1.Font = new System.Drawing.Font("새굴림", 10F, System.Drawing.FontStyle.Regular); + this.labelMessage1.Font = new System.Drawing.Font("New Gulim", 10F, System.Drawing.FontStyle.Regular); this.labelMessage1.LineSpacing = 0F; this.labelMessage1.Location = new System.Drawing.Point(43, 62); this.labelMessage1.Name = "labelMessage1"; @@ -234,6 +235,15 @@ this.timerForMainBoard.TimeFormStringSeparator = ":"; this.timerForMainBoard.Tick += new System.EventHandler(this.timerForMainBoard_Tick); // + // smartTimerReboot + // + this.smartTimerReboot.CounterMode = SmartX.SmartTimer.CounterModes.Up_Counter; + this.smartTimerReboot.Interval = 3000; + this.smartTimerReboot.IntervalSeries = null; + this.smartTimerReboot.TimeCount = ((long)(1000000)); + this.smartTimerReboot.TimeFormStringSeparator = ":"; + this.smartTimerReboot.Tick += new System.EventHandler(this.smartTimerReboot_Tick); + // // DialogFormProgressBar // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); @@ -262,5 +272,6 @@ private SmartX.SmartSerialPort smartSerialPort2; private SmartX.SmartButton buttonOK; private SmartX.SmartTimer timerForMainBoard; + private SmartX.SmartTimer smartTimerReboot; } } \ No newline at end of file diff --git a/INT_PT002/DialogForms/DialogFormProgressBar.cs b/INT_PT002/DialogForms/DialogFormProgressBar.cs index 2304fbd..3e7cb68 100644 --- a/INT_PT002/DialogForms/DialogFormProgressBar.cs +++ b/INT_PT002/DialogForms/DialogFormProgressBar.cs @@ -11,6 +11,7 @@ using System.Collections.ObjectModel; using SmartX; using INT_PT002.DataStore; +using INT_PT002.Forms; namespace INT_PT002.DialogForms { @@ -31,14 +32,11 @@ namespace INT_PT002.DialogForms public UpdateForMainBoard UpdateForMain; private Define.E_LanguageID m_Language; + + private FormMain m_ParentForm; #endregion #region Constructor - public DialogFormProgressBar() - { - InitializeComponent(); - } - public DialogFormProgressBar(int code, Define.E_LanguageID language) { InitializeComponent(); @@ -49,6 +47,7 @@ namespace INT_PT002.DialogForms this.Code = code; this.Language = language; + //this.ParentForm = parent; if (language == Define.E_LanguageID.Korean) { @@ -101,6 +100,7 @@ namespace INT_PT002.DialogForms this.Code = code; this.UpdateForMain = updateForMain; this.Language = language; + //this.ParentForm = parent; if (language == Define.E_LanguageID.Korean) { @@ -150,6 +150,11 @@ namespace INT_PT002.DialogForms get { return this.m_Language; } set { this.m_Language = value; } } + public FormMain ParentForm + { + get { return this.m_ParentForm; } + private set { this.m_ParentForm = value; } + } #endregion #region Method @@ -162,7 +167,7 @@ namespace INT_PT002.DialogForms this.Location = new Point(x, y); - this.Size = new Size(452, 195); + this.Size = new Size(452, 197); } private void DefaultSetting() { @@ -180,10 +185,7 @@ namespace INT_PT002.DialogForms this.UpdateFileMainboardPath = this.USBPath + "UpdateFilesMain\\"; //this.OldFilePath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + "\\"; this.OldFilePath = "SD Card\\Run\\"; - if (this.OldFilePath.StartsWith("\\F") == true) - this.RemoveFolderPath = "Flash Disk\\RemoveFile\\"; - else - this.RemoveFolderPath = "SD Card\\RemoveFile\\"; + this.RemoveFolderPath = "SD Card\\RemoveFile\\"; } #region Display Update @@ -605,6 +607,7 @@ namespace INT_PT002.DialogForms break; } this.Refresh(); + this.smartTimerReboot.Start(); } #endregion @@ -683,5 +686,11 @@ namespace INT_PT002.DialogForms this.Close(); } #endregion + + private void smartTimerReboot_Tick(object sender, EventArgs e) + { + this.smartTimerReboot.Stop(); + SmartX.SmartConfigs.ReBoot(); + } } } \ No newline at end of file diff --git a/INT_PT002/DialogForms/DialogFormProgressBar.resx b/INT_PT002/DialogForms/DialogFormProgressBar.resx index acc17d8..2664d70 100644 --- a/INT_PT002/DialogForms/DialogFormProgressBar.resx +++ b/INT_PT002/DialogForms/DialogFormProgressBar.resx @@ -129,6 +129,9 @@ 436, 17 + + 595, 17 + WEBPAD diff --git a/INT_PT002/Forms/FormMain.cs b/INT_PT002/Forms/FormMain.cs index 2cd605a..1a205e1 100644 --- a/INT_PT002/Forms/FormMain.cs +++ b/INT_PT002/Forms/FormMain.cs @@ -2513,7 +2513,7 @@ namespace INT_PT002.Forms protected override void OnLoad(EventArgs e) { base.OnLoad(e); - + // 변수 초기 셋팅 this.DefaultSetting(); // SystemConfiguration 파일 읽기