Main 업데이트부분 완료
							parent
							
								
									e0db61600d
								
							
						
					
					
						commit
						e4ec44441f
					
				|  | @ -45,7 +45,7 @@ | |||
|             // buttonOK | ||||
|             //  | ||||
|             this.buttonOK.BackGround = null; | ||||
|             this.buttonOK.BackGroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(58)))), ((int)(((byte)(110)))), ((int)(((byte)(165))))); | ||||
|             this.buttonOK.BackGroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); | ||||
|             this.buttonOK.ButtonColor = System.Drawing.Color.Silver; | ||||
|             this.buttonOK.ButtonDownColor = System.Drawing.Color.Silver; | ||||
|             this.buttonOK.ButtonImageAutoSize = true; | ||||
|  | @ -56,7 +56,7 @@ | |||
|             this.buttonOK.ImageDisable = null; | ||||
|             this.buttonOK.ImageDown = null; | ||||
|             this.buttonOK.ImageUp = null; | ||||
|             this.buttonOK.Location = new System.Drawing.Point(345, 126); | ||||
|             this.buttonOK.Location = new System.Drawing.Point(345, 122); | ||||
|             this.buttonOK.Mode = SmartX.SmartButton.BUTTONMODE.NORMAL; | ||||
|             this.buttonOK.Name = "buttonOK"; | ||||
|             this.buttonOK.NestedClickEventPrevent = false; | ||||
|  | @ -83,7 +83,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("New Gulim", 10F, System.Drawing.FontStyle.Regular); | ||||
|             this.labelMessage1.Font = new System.Drawing.Font("새굴림", 10F, System.Drawing.FontStyle.Regular); | ||||
|             this.labelMessage1.LineSpacing = 0F; | ||||
|             this.labelMessage1.Location = new System.Drawing.Point(76, 61); | ||||
|             this.labelMessage1.Name = "labelMessage1"; | ||||
|  | @ -106,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("New Gulim", 10F, System.Drawing.FontStyle.Regular); | ||||
|             this.labelMessage2.Font = new System.Drawing.Font("새굴림", 10F, System.Drawing.FontStyle.Regular); | ||||
|             this.labelMessage2.LineSpacing = 0F; | ||||
|             this.labelMessage2.Location = new System.Drawing.Point(76, 87); | ||||
|             this.labelMessage2.Name = "labelMessage2"; | ||||
|  |  | |||
|  | @ -30,7 +30,7 @@ | |||
|         { | ||||
|             this.components = new System.ComponentModel.Container(); | ||||
|             this.smartGroupBox1 = new SmartX.SmartGroupBox(); | ||||
|             this.buttonOK = new SmartX.SmartButton(); | ||||
|             this.buttonCancel = new SmartX.SmartButton(); | ||||
|             this.labelMessage2 = new SmartX.SmartLabel(); | ||||
|             this.progressBarUpdate = new SmartX.SmartProgressBar(); | ||||
|             this.labelMessage1 = new SmartX.SmartLabel(); | ||||
|  | @ -48,7 +48,7 @@ | |||
|             this.smartGroupBox1.BackGround = null; | ||||
|             this.smartGroupBox1.BackGroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); | ||||
|             this.smartGroupBox1.BackImage = null; | ||||
|             this.smartGroupBox1.Controls.Add(this.buttonOK); | ||||
|             this.smartGroupBox1.Controls.Add(this.buttonCancel); | ||||
|             this.smartGroupBox1.Controls.Add(this.labelMessage2); | ||||
|             this.smartGroupBox1.Controls.Add(this.progressBarUpdate); | ||||
|             this.smartGroupBox1.Controls.Add(this.labelMessage1); | ||||
|  | @ -65,41 +65,40 @@ | |||
|             this.smartGroupBox1.Text = "Update"; | ||||
|             this.smartGroupBox1.TextColor = System.Drawing.Color.White; | ||||
|             //  | ||||
|             // buttonOK | ||||
|             // buttonCancel | ||||
|             //  | ||||
|             this.buttonOK.BackGround = null; | ||||
|             this.buttonOK.BackGroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(58)))), ((int)(((byte)(110)))), ((int)(((byte)(165))))); | ||||
|             this.buttonOK.ButtonColor = System.Drawing.Color.Silver; | ||||
|             this.buttonOK.ButtonDownColor = System.Drawing.Color.Silver; | ||||
|             this.buttonOK.ButtonImageAutoSize = true; | ||||
|             this.buttonOK.ButtonStyle = SmartX.SmartButton.ButtonStyles.Round3D; | ||||
|             this.buttonOK.ButtonText = "OK"; | ||||
|             this.buttonOK.ColorKeySamplePosition = new System.Drawing.Point(0, 0); | ||||
|             this.buttonOK.GroupID = 0; | ||||
|             this.buttonOK.ImageDisable = null; | ||||
|             this.buttonOK.ImageDown = null; | ||||
|             this.buttonOK.ImageUp = null; | ||||
|             this.buttonOK.Location = new System.Drawing.Point(179, 158); | ||||
|             this.buttonOK.Mode = SmartX.SmartButton.BUTTONMODE.NORMAL; | ||||
|             this.buttonOK.Name = "buttonOK"; | ||||
|             this.buttonOK.NestedClickEventPrevent = false; | ||||
|             this.buttonOK.OutlinePixel = 2; | ||||
|             this.buttonOK.OverlapOptimize = true; | ||||
|             this.buttonOK.RepeatInterval = 200; | ||||
|             this.buttonOK.RepeatIntervalAccelerate = null; | ||||
|             this.buttonOK.RoundSize = 10; | ||||
|             this.buttonOK.SafeInterval = 200; | ||||
|             this.buttonOK.Size = new System.Drawing.Size(90, 25); | ||||
|             this.buttonOK.SpecialFunction = SmartX.SmartButton.SPECIALFUNC.NONE; | ||||
|             this.buttonOK.TabIndex = 7; | ||||
|             this.buttonOK.Text = null; | ||||
|             this.buttonOK.TextColor = System.Drawing.Color.Black; | ||||
|             this.buttonOK.TextColorDisable = System.Drawing.Color.Gray; | ||||
|             this.buttonOK.TextDownColor = System.Drawing.Color.FromArgb(((int)(((byte)(233)))), ((int)(((byte)(238)))), ((int)(((byte)(255))))); | ||||
|             this.buttonOK.TextHAlign = SmartX.SmartButton.TextHorAlign.Middle; | ||||
|             this.buttonOK.TextVAlign = SmartX.SmartButton.TextVerAlign.Middle; | ||||
|             this.buttonOK.Visible = false; | ||||
|             this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); | ||||
|             this.buttonCancel.BackGround = null; | ||||
|             this.buttonCancel.BackGroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); | ||||
|             this.buttonCancel.ButtonColor = System.Drawing.Color.Silver; | ||||
|             this.buttonCancel.ButtonDownColor = System.Drawing.Color.Silver; | ||||
|             this.buttonCancel.ButtonImageAutoSize = true; | ||||
|             this.buttonCancel.ButtonStyle = SmartX.SmartButton.ButtonStyles.Round3D; | ||||
|             this.buttonCancel.ButtonText = "Cancel"; | ||||
|             this.buttonCancel.ColorKeySamplePosition = new System.Drawing.Point(0, 0); | ||||
|             this.buttonCancel.GroupID = 0; | ||||
|             this.buttonCancel.ImageDisable = null; | ||||
|             this.buttonCancel.ImageDown = null; | ||||
|             this.buttonCancel.ImageUp = null; | ||||
|             this.buttonCancel.Location = new System.Drawing.Point(179, 158); | ||||
|             this.buttonCancel.Mode = SmartX.SmartButton.BUTTONMODE.NORMAL; | ||||
|             this.buttonCancel.Name = "buttonCancel"; | ||||
|             this.buttonCancel.NestedClickEventPrevent = false; | ||||
|             this.buttonCancel.OutlinePixel = 2; | ||||
|             this.buttonCancel.OverlapOptimize = true; | ||||
|             this.buttonCancel.RepeatInterval = 200; | ||||
|             this.buttonCancel.RepeatIntervalAccelerate = null; | ||||
|             this.buttonCancel.RoundSize = 10; | ||||
|             this.buttonCancel.SafeInterval = 200; | ||||
|             this.buttonCancel.Size = new System.Drawing.Size(90, 25); | ||||
|             this.buttonCancel.SpecialFunction = SmartX.SmartButton.SPECIALFUNC.NONE; | ||||
|             this.buttonCancel.TabIndex = 7; | ||||
|             this.buttonCancel.Text = null; | ||||
|             this.buttonCancel.TextColor = System.Drawing.Color.Black; | ||||
|             this.buttonCancel.TextColorDisable = System.Drawing.Color.Gray; | ||||
|             this.buttonCancel.TextDownColor = System.Drawing.Color.FromArgb(((int)(((byte)(233)))), ((int)(((byte)(238)))), ((int)(((byte)(255))))); | ||||
|             this.buttonCancel.TextHAlign = SmartX.SmartButton.TextHorAlign.Middle; | ||||
|             this.buttonCancel.TextVAlign = SmartX.SmartButton.TextVerAlign.Middle; | ||||
|             this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); | ||||
|             //  | ||||
|             // labelMessage2 | ||||
|             //  | ||||
|  | @ -136,7 +135,7 @@ | |||
|             this.progressBarUpdate.BarStyle = SmartX.SmartProgressBar.BARTYPE.Normal; | ||||
|             this.progressBarUpdate.Direction = SmartX.SmartProgressBar.DIR.Horizontal; | ||||
|             this.progressBarUpdate.FormatString = ""; | ||||
|             this.progressBarUpdate.Location = new System.Drawing.Point(25, 123); | ||||
|             this.progressBarUpdate.Location = new System.Drawing.Point(25, 119); | ||||
|             this.progressBarUpdate.Maximum = new decimal(new int[] { | ||||
|             100, | ||||
|             0, | ||||
|  | @ -275,7 +274,7 @@ | |||
|         private SmartX.SmartTimer timerUpdate; | ||||
|         private SmartX.SmartTimer smartTimerUpdate; | ||||
|         private SmartX.SmartSerialPort smartSerialPort2; | ||||
|         private SmartX.SmartButton buttonOK; | ||||
|         private SmartX.SmartButton buttonCancel; | ||||
|         private SmartX.SmartTimer timerForMainBoard; | ||||
|         private SmartX.SmartTimer smartTimerReboot; | ||||
|         private SmartX.SmartFile smartFileCommunicationLog; | ||||
|  |  | |||
|  | @ -242,9 +242,13 @@ namespace INT_PT002.DialogForms | |||
|             { | ||||
|             } | ||||
| 
 | ||||
|             fullPath = "SD Card\\DataBackup\\Communicationlog.txt"; | ||||
|             this.smartFileCommunicationLog.FilePathName = fullPath; | ||||
|             this.smartFileCommunicationLog.Open(); | ||||
|         } | ||||
|         public void CloseSerialPort2() | ||||
|         { | ||||
|             this.smartFileCommunicationLog.Close(); | ||||
|             this.smartSerialPort2.Close(); | ||||
|         } | ||||
|          | ||||
|  | @ -465,7 +469,7 @@ namespace INT_PT002.DialogForms | |||
|         public void UpdateMainBoardFail(Define.E_LanguageID language) | ||||
|         { | ||||
|             this.progressBarUpdate.Visible = false; | ||||
|             this.buttonOK.Visible = true; | ||||
|             this.buttonCancel.Visible = true; | ||||
| 
 | ||||
|             switch (language) | ||||
|             { | ||||
|  | @ -522,7 +526,7 @@ namespace INT_PT002.DialogForms | |||
|             int ret = 0, index = 0; | ||||
|             byte[] beforeData; | ||||
|             string ack = "", data = ""; | ||||
|             string cmd = "", address = "", lane = "", receiveData = ""; | ||||
|             string cmd = "", address = "", lane = "", receiveData = "", error = ""; | ||||
|             string strTemp = ""; | ||||
|             byte[] readByte; | ||||
|             Define.E_ResponseData response = Define.E_ResponseData.NAK; | ||||
|  | @ -545,25 +549,41 @@ namespace INT_PT002.DialogForms | |||
|             } | ||||
| 
 | ||||
|             cmd = strTemp.Substring(0, 3); | ||||
|             lane = strTemp.Substring(5, 1); | ||||
|             address = strTemp.Substring(10, 4); | ||||
|             receiveData = strTemp.Substring(14, strTemp.Length - 16); | ||||
| 
 | ||||
|             try | ||||
|             { | ||||
|                 switch (strTemp[0]) | ||||
|                 { | ||||
|                     case 'C': | ||||
|                         error = strTemp.Substring(4, 1); | ||||
| 
 | ||||
|                         // 로그 | ||||
|                         //if (this.IsCommunicationLogOpen == true) | ||||
|                         this.smartFileCommunicationLog.StringType.Write(string.Format("Update Receive ({0:yyyy-MM-dd HH:mm:ss}): {1}", DateTime.Now, strTemp)); | ||||
| 
 | ||||
|                         switch (cmd) | ||||
|                         { | ||||
|                             case "CBU": | ||||
|                                 if (error == "1") | ||||
|                                     this.UpdateMainBoardFail(Language); | ||||
|                                 else | ||||
|                                 { | ||||
|                                     this.CloseSerialPort2(); | ||||
|                                     this.progressBarUpdate.Value += 100; | ||||
|                                     this.UpdateMainBoardFinish(Language); | ||||
|                                 } | ||||
|                                 break; | ||||
|                             default: | ||||
|                                 break; | ||||
|                         } | ||||
|                         break; | ||||
|                     case 'P': | ||||
|                         lane = strTemp.Substring(5, 1); | ||||
|                         address = strTemp.Substring(10, 4); | ||||
|                         receiveData = strTemp.Substring(14, strTemp.Length - 16); | ||||
| 
 | ||||
|                         this.smartFileCommunicationLog.StringType.Write(string.Format("Update Receive ({0:yyyy-MM-dd HH:mm:ss}): {1}", DateTime.Now, strTemp.Substring(0, 14))); | ||||
| 
 | ||||
|                         switch (address) | ||||
|                         { | ||||
|                             case "1651": | ||||
|  | @ -605,7 +625,7 @@ namespace INT_PT002.DialogForms | |||
|                                         } | ||||
|                                         else | ||||
|                                         { | ||||
|                                             this.progressBarUpdate.Value += 5; | ||||
|                                             this.progressBarUpdate.Value += 10; | ||||
|                                         } | ||||
|                                     } | ||||
|                                     else | ||||
|  | @ -694,9 +714,9 @@ namespace INT_PT002.DialogForms | |||
|             SmartX.SmartConfigs.ReBoot(); | ||||
|         } | ||||
| 
 | ||||
|         private void buttonOK_Click(object sender, EventArgs e) | ||||
|         private void buttonCancel_Click(object sender, EventArgs e) | ||||
|         { | ||||
|             this.DialogResult = DialogResult.OK; | ||||
|             this.DialogResult = DialogResult.Cancel; | ||||
|             this.CloseSerialPort2(); | ||||
|             this.Close();  | ||||
|         } | ||||
|  |  | |||
|  | @ -44,7 +44,7 @@ | |||
|             // buttonYes | ||||
|             //  | ||||
|             this.buttonYes.BackGround = null; | ||||
|             this.buttonYes.BackGroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(58)))), ((int)(((byte)(110)))), ((int)(((byte)(165))))); | ||||
|             this.buttonYes.BackGroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); | ||||
|             this.buttonYes.ButtonColor = System.Drawing.Color.Silver; | ||||
|             this.buttonYes.ButtonDownColor = System.Drawing.Color.Silver; | ||||
|             this.buttonYes.ButtonImageAutoSize = true; | ||||
|  | @ -79,7 +79,7 @@ | |||
|             // buttonNo | ||||
|             //  | ||||
|             this.buttonNo.BackGround = null; | ||||
|             this.buttonNo.BackGroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(58)))), ((int)(((byte)(110)))), ((int)(((byte)(165))))); | ||||
|             this.buttonNo.BackGroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); | ||||
|             this.buttonNo.ButtonColor = System.Drawing.Color.Silver; | ||||
|             this.buttonNo.ButtonDownColor = System.Drawing.Color.Silver; | ||||
|             this.buttonNo.ButtonImageAutoSize = true; | ||||
|  | @ -132,7 +132,7 @@ | |||
|             this.smartGroupBox1.Location = new System.Drawing.Point(0, 0); | ||||
|             this.smartGroupBox1.Name = "smartGroupBox1"; | ||||
|             this.smartGroupBox1.RoundRadius = 5; | ||||
|             this.smartGroupBox1.Size = new System.Drawing.Size(450, 160); | ||||
|             this.smartGroupBox1.Size = new System.Drawing.Size(450, 155); | ||||
|             this.smartGroupBox1.TabIndex = 7; | ||||
|             this.smartGroupBox1.Text = "ErrorCode"; | ||||
|             this.smartGroupBox1.TextColor = System.Drawing.Color.White; | ||||
|  | @ -217,7 +217,7 @@ | |||
|             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; | ||||
|             this.AutoScroll = true; | ||||
|             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(58)))), ((int)(((byte)(110)))), ((int)(((byte)(165))))); | ||||
|             this.ClientSize = new System.Drawing.Size(450, 160); | ||||
|             this.ClientSize = new System.Drawing.Size(450, 155); | ||||
|             this.ControlBox = false; | ||||
|             this.Controls.Add(this.smartGroupBox1); | ||||
|             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; | ||||
|  |  | |||
|  | @ -671,6 +671,8 @@ namespace INT_PT002.Forms | |||
|         } | ||||
|         public void CloseSmartUartLink() | ||||
|         { | ||||
|             this.IsCommunicationLogOpen = false; | ||||
|             this.smartFileCommunicationLog.Close(); | ||||
|             this.smartSerialPortLink.Close(); | ||||
|         } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue