로그인, 유저설정, 데이터 백업 수정
							parent
							
								
									c3b4e3b787
								
							
						
					
					
						commit
						39b79e238f
					
				|  | @ -1611,8 +1611,10 @@ namespace INT69DC_7C | |||
|         private bool m_IsADCError; | ||||
|         private bool m_IsBypassMode; | ||||
| 
 | ||||
|         private bool m_IsOPT1; | ||||
|         private bool m_IsOPT2; | ||||
|         private bool m_IsUpdate_COM3; | ||||
|         private bool m_IsUpdate_Ethernet; | ||||
|         private bool m_IsUpdate1; | ||||
|         private bool m_IsUpdate_DataBackup; | ||||
| 
 | ||||
|         private int m_ContinuousNG; | ||||
|         private bool m_IsContinuousNG; | ||||
|  | @ -1838,21 +1840,39 @@ namespace INT69DC_7C | |||
| 
 | ||||
|         /// <summary> | ||||
|         /// 스틱2모드에서 데이터 갱신이 되었으면 true, 안되었으면 false | ||||
|         /// COM3 사용 | ||||
|         /// </summary> | ||||
|         public bool IsOPT1 | ||||
|         public bool IsUpdate_COM3 | ||||
|         { | ||||
|             get { return this.m_IsOPT1; } | ||||
|             set { this.m_IsOPT1 = value; } | ||||
|             get { return this.m_IsUpdate_COM3; } | ||||
|             set { this.m_IsUpdate_COM3 = value; } | ||||
|         } | ||||
|         /// <summary> | ||||
|         /// 스틱2모드에서 데이터 갱신이 되었으면 true, 안되었으면 false | ||||
|         /// Ethernet 사용 | ||||
|         /// </summary> | ||||
|         public bool IsUpdate_Ethernet | ||||
|         { | ||||
|             get { return this.m_IsUpdate_Ethernet; } | ||||
|             set { this.m_IsUpdate_Ethernet = value; } | ||||
|         } | ||||
|         /// <summary> | ||||
|         /// 스틱2모드에서 데이터 갱신이 되었으면 true, 안되었으면 false | ||||
|         /// Alarm Total Pass Count 에서 사용  | ||||
|         /// 추후에 IsOPT1과 통합하여 코드 정리 할것 (V 10.11.0)  | ||||
|         /// </summary> | ||||
|         public bool IsOPT2 | ||||
|         public bool IsUpdate_ATPC | ||||
|         { | ||||
|             get { return this.m_IsOPT2; } | ||||
|             set { this.m_IsOPT2 = value; } | ||||
|             get { return this.m_IsUpdate1; } | ||||
|             set { this.m_IsUpdate1 = value; } | ||||
|         } | ||||
|         /// <summary> | ||||
|         /// 스틱2모드에서 데이터 갱신이 되었으면 true, 안되었으면 false | ||||
|         /// Databackup 사용 | ||||
|         /// </summary> | ||||
|         public bool IsUpdate_DataBackup | ||||
|         { | ||||
|             get { return this.m_IsUpdate_DataBackup; } | ||||
|             set { this.m_IsUpdate_DataBackup = value; } | ||||
|         } | ||||
| 
 | ||||
|         /// <summary> | ||||
|  | @ -1899,8 +1919,10 @@ namespace INT69DC_7C | |||
|             this.WeightString = "0"; | ||||
|             this.IsADCError = false; | ||||
|             this.IsBypassMode = false; | ||||
|             this.IsOPT1 = false; | ||||
|             this.IsOPT2 = false; | ||||
|             this.IsUpdate_COM3 = false; | ||||
|             this.IsUpdate_Ethernet = false; | ||||
|             this.IsUpdate_ATPC = false; | ||||
|             this.IsUpdate_DataBackup = false; | ||||
|             this.IsContinuousNG = false; | ||||
|             this.ContinuousNG = 0; | ||||
|             this.UpdateCount = 0; | ||||
|  | @ -4119,7 +4141,7 @@ namespace INT69DC_7C | |||
|              | ||||
|             for (int i = 0; i < datas.Count; i++) | ||||
|             { | ||||
|                 if (datas[i].IsOPT2 == true) | ||||
|                 if (datas[i].IsUpdate_ATPC == true) | ||||
|                 { | ||||
|                     if (datas[i].JudgmentStatus == DataStore.JudgmentStatus.Pass) | ||||
|                         this.CurrentTotalPass++; | ||||
|  |  | |||
|  | @ -40,6 +40,9 @@ | |||
|             this.smartButtonIUser11 = new SmartX.SmartButton(); | ||||
|             this.smartButtonUser22 = new SmartX.SmartButton(); | ||||
|             this.smartButtonUser33 = new SmartX.SmartButton(); | ||||
|             this.labelTitle2 = new SmartX.SmartLabel(); | ||||
|             this.labelTitle3 = new SmartX.SmartLabel(); | ||||
|             this.labelTitle1 = new SmartX.SmartLabel(); | ||||
|             ((System.ComponentModel.ISupportInitialize)(this.smartForm1)).BeginInit(); | ||||
|             this.SuspendLayout(); | ||||
|             //  | ||||
|  | @ -95,7 +98,7 @@ | |||
|             // textBoxID | ||||
|             //  | ||||
|             this.textBoxID.Font = new System.Drawing.Font("Arial", 20F, System.Drawing.FontStyle.Regular); | ||||
|             this.textBoxID.Location = new System.Drawing.Point(277, 76); | ||||
|             this.textBoxID.Location = new System.Drawing.Point(287, 76); | ||||
|             this.textBoxID.MaxLength = 20; | ||||
|             this.textBoxID.Name = "textBoxID"; | ||||
|             this.textBoxID.Size = new System.Drawing.Size(218, 37); | ||||
|  | @ -106,7 +109,7 @@ | |||
|             // textBoxPassword | ||||
|             //  | ||||
|             this.textBoxPassword.Font = new System.Drawing.Font("Arial", 20F, System.Drawing.FontStyle.Regular); | ||||
|             this.textBoxPassword.Location = new System.Drawing.Point(277, 121); | ||||
|             this.textBoxPassword.Location = new System.Drawing.Point(287, 121); | ||||
|             this.textBoxPassword.MaxLength = 20; | ||||
|             this.textBoxPassword.Name = "textBoxPassword"; | ||||
|             this.textBoxPassword.PasswordChar = '*'; | ||||
|  | @ -189,7 +192,7 @@ | |||
|             this.smartButton1.DownImage = null; | ||||
|             this.smartButton1.GroupID = 0; | ||||
|             this.smartButton1.InitVisible = true; | ||||
|             this.smartButton1.Location = new System.Drawing.Point(512, 30); | ||||
|             this.smartButton1.Location = new System.Drawing.Point(516, 160); | ||||
|             this.smartButton1.Mode = SmartX.SmartButton.BUTTONMODE.NORMAL; | ||||
|             this.smartButton1.Name = "smartButton1"; | ||||
|             this.smartButton1.NestedClickEventPrevent = false; | ||||
|  | @ -221,7 +224,7 @@ | |||
|             this.smartButtonAdmin.DownImage = null; | ||||
|             this.smartButtonAdmin.GroupID = 0; | ||||
|             this.smartButtonAdmin.InitVisible = true; | ||||
|             this.smartButtonAdmin.Location = new System.Drawing.Point(593, 30); | ||||
|             this.smartButtonAdmin.Location = new System.Drawing.Point(597, 160); | ||||
|             this.smartButtonAdmin.Mode = SmartX.SmartButton.BUTTONMODE.NORMAL; | ||||
|             this.smartButtonAdmin.Name = "smartButtonAdmin"; | ||||
|             this.smartButtonAdmin.NestedClickEventPrevent = false; | ||||
|  | @ -253,7 +256,7 @@ | |||
|             this.smartButtonIUser11.DownImage = null; | ||||
|             this.smartButtonIUser11.GroupID = 0; | ||||
|             this.smartButtonIUser11.InitVisible = true; | ||||
|             this.smartButtonIUser11.Location = new System.Drawing.Point(173, 30); | ||||
|             this.smartButtonIUser11.Location = new System.Drawing.Point(177, 160); | ||||
|             this.smartButtonIUser11.Mode = SmartX.SmartButton.BUTTONMODE.NORMAL; | ||||
|             this.smartButtonIUser11.Name = "smartButtonIUser11"; | ||||
|             this.smartButtonIUser11.NestedClickEventPrevent = false; | ||||
|  | @ -285,7 +288,7 @@ | |||
|             this.smartButtonUser22.DownImage = null; | ||||
|             this.smartButtonUser22.GroupID = 0; | ||||
|             this.smartButtonUser22.InitVisible = true; | ||||
|             this.smartButtonUser22.Location = new System.Drawing.Point(254, 30); | ||||
|             this.smartButtonUser22.Location = new System.Drawing.Point(258, 160); | ||||
|             this.smartButtonUser22.Mode = SmartX.SmartButton.BUTTONMODE.NORMAL; | ||||
|             this.smartButtonUser22.Name = "smartButtonUser22"; | ||||
|             this.smartButtonUser22.NestedClickEventPrevent = false; | ||||
|  | @ -317,7 +320,7 @@ | |||
|             this.smartButtonUser33.DownImage = null; | ||||
|             this.smartButtonUser33.GroupID = 0; | ||||
|             this.smartButtonUser33.InitVisible = true; | ||||
|             this.smartButtonUser33.Location = new System.Drawing.Point(335, 30); | ||||
|             this.smartButtonUser33.Location = new System.Drawing.Point(339, 160); | ||||
|             this.smartButtonUser33.Mode = SmartX.SmartButton.BUTTONMODE.NORMAL; | ||||
|             this.smartButtonUser33.Name = "smartButtonUser33"; | ||||
|             this.smartButtonUser33.NestedClickEventPrevent = false; | ||||
|  | @ -337,12 +340,78 @@ | |||
|             this.smartButtonUser33.UpImage = null; | ||||
|             this.smartButtonUser33.Click += new System.EventHandler(this.smartButtonUser33_Click); | ||||
|             //  | ||||
|             // labelTitle2 | ||||
|             //  | ||||
|             this.labelTitle2.BackColor = System.Drawing.Color.White; | ||||
|             this.labelTitle2.BackPictureBox = null; | ||||
|             this.labelTitle2.BackPictureBox1 = null; | ||||
|             this.labelTitle2.BackPictureBox2 = null; | ||||
|             this.labelTitle2.BorderColor = System.Drawing.Color.Black; | ||||
|             this.labelTitle2.BorderStyle = System.Windows.Forms.BorderStyle.None; | ||||
|             this.labelTitle2.Font = new System.Drawing.Font("Arial", 16F, System.Drawing.FontStyle.Bold); | ||||
|             this.labelTitle2.ForeColor = System.Drawing.SystemColors.Control; | ||||
|             this.labelTitle2.InitVisible = true; | ||||
|             this.labelTitle2.LineSpacing = 0F; | ||||
|             this.labelTitle2.Location = new System.Drawing.Point(131, 76); | ||||
|             this.labelTitle2.Name = "labelTitle2"; | ||||
|             this.labelTitle2.Size = new System.Drawing.Size(150, 37); | ||||
|             this.labelTitle2.TabIndex = 19; | ||||
|             this.labelTitle2.Text = "ID"; | ||||
|             this.labelTitle2.TextHAlign = SmartX.SmartLabel.TextHorAlign.Middle; | ||||
|             this.labelTitle2.TextVAlign = SmartX.SmartLabel.TextVerAlign.Middle; | ||||
|             this.labelTitle2.Wordwrap = false; | ||||
|             //  | ||||
|             // labelTitle3 | ||||
|             //  | ||||
|             this.labelTitle3.BackColor = System.Drawing.Color.White; | ||||
|             this.labelTitle3.BackPictureBox = null; | ||||
|             this.labelTitle3.BackPictureBox1 = null; | ||||
|             this.labelTitle3.BackPictureBox2 = null; | ||||
|             this.labelTitle3.BorderColor = System.Drawing.Color.Black; | ||||
|             this.labelTitle3.BorderStyle = System.Windows.Forms.BorderStyle.None; | ||||
|             this.labelTitle3.Font = new System.Drawing.Font("Arial", 16F, System.Drawing.FontStyle.Bold); | ||||
|             this.labelTitle3.ForeColor = System.Drawing.SystemColors.Control; | ||||
|             this.labelTitle3.InitVisible = true; | ||||
|             this.labelTitle3.LineSpacing = 0F; | ||||
|             this.labelTitle3.Location = new System.Drawing.Point(131, 121); | ||||
|             this.labelTitle3.Name = "labelTitle3"; | ||||
|             this.labelTitle3.Size = new System.Drawing.Size(150, 37); | ||||
|             this.labelTitle3.TabIndex = 20; | ||||
|             this.labelTitle3.Text = "Confirmation"; | ||||
|             this.labelTitle3.TextHAlign = SmartX.SmartLabel.TextHorAlign.Middle; | ||||
|             this.labelTitle3.TextVAlign = SmartX.SmartLabel.TextVerAlign.Middle; | ||||
|             this.labelTitle3.Wordwrap = false; | ||||
|             //  | ||||
|             // labelTitle1 | ||||
|             //  | ||||
|             this.labelTitle1.BackColor = System.Drawing.Color.White; | ||||
|             this.labelTitle1.BackPictureBox = null; | ||||
|             this.labelTitle1.BackPictureBox1 = null; | ||||
|             this.labelTitle1.BackPictureBox2 = null; | ||||
|             this.labelTitle1.BorderColor = System.Drawing.Color.Black; | ||||
|             this.labelTitle1.BorderStyle = System.Windows.Forms.BorderStyle.None; | ||||
|             this.labelTitle1.Font = new System.Drawing.Font("Arial", 20F, System.Drawing.FontStyle.Bold); | ||||
|             this.labelTitle1.ForeColor = System.Drawing.SystemColors.Control; | ||||
|             this.labelTitle1.InitVisible = true; | ||||
|             this.labelTitle1.LineSpacing = 0F; | ||||
|             this.labelTitle1.Location = new System.Drawing.Point(131, 33); | ||||
|             this.labelTitle1.Name = "labelTitle1"; | ||||
|             this.labelTitle1.Size = new System.Drawing.Size(500, 37); | ||||
|             this.labelTitle1.TabIndex = 21; | ||||
|             this.labelTitle1.Text = "User Login"; | ||||
|             this.labelTitle1.TextHAlign = SmartX.SmartLabel.TextHorAlign.Middle; | ||||
|             this.labelTitle1.TextVAlign = SmartX.SmartLabel.TextVerAlign.Middle; | ||||
|             this.labelTitle1.Wordwrap = false; | ||||
|             //  | ||||
|             // DialogFormLogOn | ||||
|             //  | ||||
|             this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); | ||||
|             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; | ||||
|             this.ClientSize = new System.Drawing.Size(710, 470); | ||||
|             this.ControlBox = false; | ||||
|             this.Controls.Add(this.labelTitle1); | ||||
|             this.Controls.Add(this.labelTitle3); | ||||
|             this.Controls.Add(this.labelTitle2); | ||||
|             this.Controls.Add(this.smartButtonUser33); | ||||
|             this.Controls.Add(this.smartButtonUser22); | ||||
|             this.Controls.Add(this.smartButtonIUser11); | ||||
|  | @ -375,5 +444,8 @@ | |||
|         private SmartX.SmartButton smartButtonIUser11; | ||||
|         private SmartX.SmartButton smartButtonUser22; | ||||
|         private SmartX.SmartButton smartButtonUser33; | ||||
|         private SmartX.SmartLabel labelTitle2; | ||||
|         private SmartX.SmartLabel labelTitle3; | ||||
|         private SmartX.SmartLabel labelTitle1; | ||||
|     } | ||||
| } | ||||
|  | @ -17,14 +17,18 @@ namespace INT69DC_7C.DialogForms | |||
|     { | ||||
|         #region Field | ||||
|         private FormMain m_ParentForm; | ||||
|         private bool IsLoginMode; | ||||
|         private bool IsChangePassword; | ||||
|         #endregion | ||||
| 
 | ||||
|         #region Constructor | ||||
|         public DialogFormLogOn(FormMain parent) | ||||
|         public DialogFormLogOn(FormMain parent, bool login, bool changePass) | ||||
|         { | ||||
|             InitializeComponent(); | ||||
| 
 | ||||
|             this.ParentForm = parent; | ||||
|             this.IsLoginMode = login; | ||||
|             this.IsChangePassword = changePass; | ||||
| 
 | ||||
|             this.InitializeDesign(); | ||||
|             this.InitializeControl(); | ||||
|  | @ -90,6 +94,19 @@ namespace INT69DC_7C.DialogForms | |||
|         } | ||||
|         private void InitializeControl() | ||||
|         { | ||||
|             if (this.IsChangePassword == false) | ||||
|             { | ||||
|                 this.labelTitle1.Text = "User Loigin"; | ||||
|                 this.labelTitle2.Text = "ID"; | ||||
|                 this.labelTitle3.Text = "Password"; | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 this.labelTitle1.Text = "Change Password"; | ||||
|                 this.labelTitle2.Text = "New PW"; | ||||
|                 this.labelTitle3.Text = "Confirmation"; | ||||
|             } | ||||
| 
 | ||||
|             this.textBoxID.Text = ""; | ||||
|             this.textBoxPassword.Text = ""; | ||||
| 
 | ||||
|  | @ -104,14 +121,9 @@ namespace INT69DC_7C.DialogForms | |||
|         { | ||||
| 
 | ||||
|         } | ||||
|         #endregion | ||||
| 
 | ||||
|         #region Event Handler | ||||
|         private void buttonLogOn_Click(object sender, EventArgs e) | ||||
|         private void LogOn() | ||||
|         { | ||||
|             // Automatic Logout Reset | ||||
|             this.ParentForm.ChildFormMainDisplay.Part11AutomaticLogoutReset(); | ||||
| 
 | ||||
|             UserManager.UserMgr_user_info_t userInfo = new UserManager.UserMgr_user_info_t(); | ||||
| 
 | ||||
|             if (this.textBoxID.Text == "") | ||||
|  | @ -159,26 +171,14 @@ namespace INT69DC_7C.DialogForms | |||
|                 this.ParentForm.SystemConfig.CurrentUser.DateRegister = time; | ||||
|                 time = DateTime.ParseExact(userInfo.login_date.GetDateTime(), "yyyyMMddHHmmss", null); | ||||
|                 this.ParentForm.SystemConfig.CurrentUser.DateLogin = time; | ||||
| 
 | ||||
|                 if (this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Admin | ||||
|                     || this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Developer) | ||||
|                 { | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.DateExpireRegister = DateTime.Now; | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.DateExpireLogin = DateTime.Now; | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                 time = DateTime.ParseExact(userInfo.expire_account_date.GetDateTime(), "yyyyMMddHHmmss", null); | ||||
|                 this.ParentForm.SystemConfig.CurrentUser.DateExpireRegister = time; | ||||
|                 time = DateTime.ParseExact(userInfo.expire_register_date.GetDateTime(), "yyyyMMddHHmmss", null); | ||||
|                 this.ParentForm.SystemConfig.CurrentUser.DateExpireLogin = time; | ||||
|                 } | ||||
| 
 | ||||
|                 this.ParentForm.SystemConfig.CurrentUser.IsLockAccount = userInfo.flock_status_account == 0 ? false : true; | ||||
|                 this.ParentForm.SystemConfig.CurrentUser.IsLockPassword = userInfo.flock_status_password == 0 ? false : true; | ||||
| 
 | ||||
|                 this.ParentForm.SystemConfig.CurrentUser.IsAdmin = userInfo.fadmin == 0 ? false : true; | ||||
| 
 | ||||
|                 this.ParentForm.SystemConfig.CurrentUser.ActiveLevel = userInfo.active_level; | ||||
|                 #endregion | ||||
| 
 | ||||
|  | @ -193,11 +193,129 @@ namespace INT69DC_7C.DialogForms | |||
|                 // 비밀번호 만료 시 | ||||
|                 if (userInfo.status == 15) | ||||
|                 { | ||||
|                     this.ParentForm.ChildFormMainDisplay.ChangeID = this.textBoxID.Text; | ||||
|                     this.DialogResult = DialogResult.Abort; | ||||
|                     this.Close(); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         private void ChangePassword() | ||||
|         { | ||||
|             int ret = 0; | ||||
|             string id = "", pass = ""; | ||||
|             UserManager.UserMgr_user_info_t userInfo = new UserManager.UserMgr_user_info_t(); | ||||
| 
 | ||||
|             if (this.textBoxID.Text == "") | ||||
|             { | ||||
|                 // New Password : 6~20자 입력 하세요 | ||||
|                 DialogFormMessage myMsg = new DialogFormMessage(null, 9, this.ParentForm.SystemConfig.Language); | ||||
|                 myMsg.ShowDialog(); | ||||
| 
 | ||||
|                 return; | ||||
|             } | ||||
|             if (this.textBoxPassword.Text == "") | ||||
|             { | ||||
|                 // New Password Confirmation : 6~20자 입력 하세요 | ||||
|                 DialogFormMessage myMsg = new DialogFormMessage(null, 9, this.ParentForm.SystemConfig.Language); | ||||
|                 myMsg.ShowDialog(); | ||||
| 
 | ||||
|                 return; | ||||
|             } | ||||
|             if (this.textBoxID.Text.Equals(this.textBoxPassword.Text) == false) | ||||
|             {  | ||||
|                 // 비밀번호를 확인하세요 | ||||
|                 DialogFormMessage myMsg = new DialogFormMessage(null, 14, this.ParentForm.SystemConfig.Language); | ||||
|                 myMsg.ShowDialog(); | ||||
| 
 | ||||
|                 return; | ||||
|             } | ||||
| 
 | ||||
|             if (this.IsLoginMode == true) | ||||
|             { | ||||
|                 id = this.ParentForm.SystemConfig.CurrentUser.ID; | ||||
|                 pass = this.textBoxID.Text; | ||||
| 
 | ||||
|                 Console.WriteLine(string.Format("UserManager_UserModifyPW : {0}, {1}", id, pass)); | ||||
|                 ret = UserManager.UserManager_UserModifyPWDirect(id, pass); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 id = this.ParentForm.ChildFormMainDisplay.ChangeID; | ||||
|                 pass = this.textBoxID.Text; | ||||
| 
 | ||||
|                 Console.WriteLine(string.Format("UserManager_UserModifyPW : {0}, {1}", id, pass)); | ||||
|                 ret = UserManager.UserManager_UserModifyPWDirect(id, pass); | ||||
|             } | ||||
| 
 | ||||
|             // 비밀번호 변경이 완료 되면 로그인 시도 | ||||
|             if (ret == 0) | ||||
|             { | ||||
|                 UserManager.UserManager_UserLoginDirect(id, pass, ref userInfo); | ||||
| 
 | ||||
|                 if (userInfo.status == 0) | ||||
|                 { | ||||
|                     //MessageBox.Show("로그인 성공"); | ||||
| 
 | ||||
|                     #region 로그인 성공 | ||||
|                     if (userInfo.active_level == 1) | ||||
|                         this.ParentForm.SystemConfig.CurrentUser.Group = DataStore.UserGroup.Level1; | ||||
|                     else if (userInfo.active_level == 2) | ||||
|                         this.ParentForm.SystemConfig.CurrentUser.Group = DataStore.UserGroup.Level2; | ||||
|                     else if (userInfo.active_level == 3) | ||||
|                         this.ParentForm.SystemConfig.CurrentUser.Group = DataStore.UserGroup.Level3; | ||||
|                     else if (userInfo.active_level == 9) | ||||
|                         this.ParentForm.SystemConfig.CurrentUser.Group = DataStore.UserGroup.Admin; | ||||
|                     else if (userInfo.active_level == 10) | ||||
|                         this.ParentForm.SystemConfig.CurrentUser.Group = DataStore.UserGroup.Developer; | ||||
| 
 | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.ID = userInfo.user_id; | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.Password = userInfo.user_pw; | ||||
| 
 | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.ExpireAccount = userInfo.expire_period_account; | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.ExpirePassword = userInfo.expire_period_pw; | ||||
| 
 | ||||
|                     DateTime time = DateTime.ParseExact(userInfo.register_date.GetDateTime(), "yyyyMMddHHmmss", null); | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.DateRegister = time; | ||||
|                     time = DateTime.ParseExact(userInfo.login_date.GetDateTime(), "yyyyMMddHHmmss", null); | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.DateLogin = time; | ||||
|                     time = DateTime.ParseExact(userInfo.expire_account_date.GetDateTime(), "yyyyMMddHHmmss", null); | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.DateExpireRegister = time; | ||||
|                     time = DateTime.ParseExact(userInfo.expire_register_date.GetDateTime(), "yyyyMMddHHmmss", null); | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.DateExpireLogin = time; | ||||
| 
 | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.IsLockAccount = userInfo.flock_status_account == 0 ? false : true; | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.IsLockPassword = userInfo.flock_status_password == 0 ? false : true; | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.IsAdmin = userInfo.fadmin == 0 ? false : true; | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.ActiveLevel = userInfo.active_level; | ||||
|                     #endregion | ||||
| 
 | ||||
|                     this.DialogResult = DialogResult.OK; | ||||
|                     this.Close(); | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                     DialogFormMessage myMsg = new DialogFormMessage(null, ret, this.ParentForm.SystemConfig.Language); | ||||
|                     myMsg.ShowDialog(); | ||||
|                 } | ||||
|             } | ||||
|             else | ||||
|             {  | ||||
|                 // 비밀번호 변경 실패 시 메시지?? | ||||
|             } | ||||
|         } | ||||
|         #endregion | ||||
| 
 | ||||
|         #region Event Handler | ||||
|         private void buttonLogOn_Click(object sender, EventArgs e) | ||||
|         { | ||||
|             // Automatic Logout Reset | ||||
|             this.ParentForm.ChildFormMainDisplay.Part11AutomaticLogoutReset(); | ||||
| 
 | ||||
|             if (this.IsChangePassword == false) | ||||
|                 this.LogOn(); | ||||
|             else | ||||
|                 this.ChangePassword(); | ||||
|         } | ||||
|         private void buttonCancel_Click(object sender, EventArgs e) | ||||
|         { | ||||
|             this.DialogResult = DialogResult.Cancel; | ||||
|  |  | |||
|  | @ -165,7 +165,7 @@ namespace INT69DC_7C.DialogForms | |||
| 
 | ||||
|                     this.SuccessLogin(this.UserInfo); | ||||
| 
 | ||||
|                     sValue = this.ParentForm.ChildFormMainDisplay.DisplayExpireOfPassword(this.ParentForm.SystemConfig.CurrentUser.Group); | ||||
|                     //sValue = this.ParentForm.ChildFormMainDisplay.DisplayExpireOfPassword(this.ParentForm.SystemConfig.CurrentUser.Group); | ||||
|                     if (sValue != "-") | ||||
|                     { | ||||
|                         int intExpireDate = int.Parse(sValue); | ||||
|  |  | |||
|  | @ -1086,11 +1086,11 @@ namespace INT69DC_7C.DialogForms | |||
|                             break; | ||||
|                         case 16: | ||||
|                             this.labelErrorCode.Text = "Error 04_16"; | ||||
|                             this.labelMessage1.Text = "접근 권한을 설정해 주십시오"; | ||||
|                             this.labelMessage1.Text = ""; | ||||
|                             break; | ||||
|                         case 17: | ||||
|                             this.labelErrorCode.Text = "Error 04_17"; | ||||
|                             this.labelMessage1.Text = "비밀번호가 동일하지 않습니다"; | ||||
|                             this.labelMessage1.Text = ""; | ||||
|                             break; | ||||
|                         case 18: | ||||
|                             this.labelErrorCode.Text = "Error 04_18"; | ||||
|  | @ -1173,11 +1173,11 @@ namespace INT69DC_7C.DialogForms | |||
|                             break; | ||||
|                         case 16: | ||||
|                             this.labelErrorCode.Text = "Error 04_16"; | ||||
|                             this.labelMessage1.Text = "Please set the access right"; | ||||
|                             this.labelMessage1.Text = ""; | ||||
|                             break; | ||||
|                         case 17: | ||||
|                             this.labelErrorCode.Text = "Error 04_17"; | ||||
|                             this.labelMessage1.Text = "Passwords are not the same"; | ||||
|                             this.labelMessage1.Text = ""; | ||||
|                             break; | ||||
|                         case 18: | ||||
|                             this.labelErrorCode.Text = "Error 04_18"; | ||||
|  | @ -1262,11 +1262,11 @@ namespace INT69DC_7C.DialogForms | |||
|                             break; | ||||
|                         case 16: | ||||
|                             this.labelErrorCode.Text = "错误 04_16"; | ||||
|                             this.labelMessage1.Text = "请设置访问权限"; | ||||
|                             this.labelMessage1.Text = ""; | ||||
|                             break; | ||||
|                         case 17: | ||||
|                             this.labelErrorCode.Text = "错误 04_17"; | ||||
|                             this.labelMessage1.Text = "密码不一样"; | ||||
|                             this.labelMessage1.Text = ""; | ||||
|                             break; | ||||
|                         case 18: | ||||
|                             this.labelErrorCode.Text = "错误 04_18"; | ||||
|  | @ -1435,11 +1435,11 @@ namespace INT69DC_7C.DialogForms | |||
|                             break; | ||||
|                         case 16: | ||||
|                             this.labelErrorCode.Text = "Fehler 04_16"; | ||||
|                             this.labelMessage1.Text = "Bitte legen Sie Zugriffsrechte fest"; | ||||
|                             this.labelMessage1.Text = ""; | ||||
|                             break; | ||||
|                         case 17: | ||||
|                             this.labelErrorCode.Text = "Fehler 04_17"; | ||||
|                             this.labelMessage1.Text = "Passwörter sind nicht gleich"; | ||||
|                             this.labelMessage1.Text = ""; | ||||
|                             break; | ||||
|                         case 18: | ||||
|                             this.labelErrorCode.Text = "Fehler 04_18"; | ||||
|  |  | |||
|  | @ -409,9 +409,9 @@ namespace INT69DC_7C.DialogForms | |||
|                     switch (ok) | ||||
|                     { | ||||
|                         case 2: | ||||
|                             this.labelErrorCode.Text = "비밀번호 만료"; | ||||
|                             this.labelErrorCode.Text = "로그인"; | ||||
|                             if (int.Parse(msg) == 0) | ||||
|                                 this.labelMessage1.Text = "비밀번호 만료일입니다."; | ||||
|                                 this.labelMessage1.Text = "비밀번호가 만료되었습니다."; | ||||
|                             else | ||||
|                                 this.labelMessage1.Text = string.Format("비밀번호 만료 {0}일 전입니다.", msg); | ||||
|                             this.labelMessage2.Text = "비밀번호를 변경하시겠습니까?"; | ||||
|  | @ -428,11 +428,11 @@ namespace INT69DC_7C.DialogForms | |||
|                     switch (ok) | ||||
|                     { | ||||
|                         case 2: | ||||
|                             this.labelErrorCode.Text = "Password expiration"; | ||||
|                             this.labelErrorCode.Text = "Login"; | ||||
|                             if (int.Parse(msg) == 0) | ||||
|                                 this.labelMessage1.Text = "Today is the password expiration date."; | ||||
|                                 this.labelMessage1.Text = "Password has expired."; | ||||
|                             else | ||||
|                                 this.labelMessage1.Text = string.Format("{0} days before password expires", msg); | ||||
|                                 this.labelMessage1.Text = string.Format("{0} days before password expiration.", msg); | ||||
|                             this.labelMessage2.Text = "Do you want to change the password?"; | ||||
|                             break; | ||||
|                         case 31: | ||||
|  | @ -443,14 +443,13 @@ namespace INT69DC_7C.DialogForms | |||
|                             break; | ||||
|                     } | ||||
|                     break; | ||||
|                     break; | ||||
|                 case DataStore.LanguageID.Chinese: | ||||
|                     switch (ok) | ||||
|                     { | ||||
|                         case 2: | ||||
|                             this.labelErrorCode.Text = "密码过期"; | ||||
|                             this.labelErrorCode.Text = "登录"; | ||||
|                             if (int.Parse(msg) == 0) | ||||
|                                 this.labelMessage1.Text = "今天是密码过期日期."; | ||||
|                                 this.labelMessage1.Text = "密码已过期."; | ||||
|                             else | ||||
|                                 this.labelMessage1.Text = string.Format("密码过期前{0}天", msg); | ||||
|                             this.labelMessage2.Text = "您要更改密码吗?"; | ||||
|  |  | |||
|  | @ -35,13 +35,13 @@ | |||
|             this.labelTitle = new SmartX.SmartLabel(); | ||||
|             this.labelStaticSaveFile = new SmartX.SmartLabel(); | ||||
|             this.labelStaticBackupEnable = new SmartX.SmartLabel(); | ||||
|             this.buttonUSBID = new SmartX.SmartButton(); | ||||
|             this.listBoxDataList = new System.Windows.Forms.ListBox(); | ||||
|             this.labelFileCount = new SmartX.SmartLabel(); | ||||
|             this.labelStaticWarning1 = new SmartX.SmartLabel(); | ||||
|             this.labelStaticWarning2 = new SmartX.SmartLabel(); | ||||
|             this.radioButtonDisable = new System.Windows.Forms.RadioButton(); | ||||
|             this.radioButtonEnable = new System.Windows.Forms.RadioButton(); | ||||
|             this.buttonUSBID = new SmartX.SmartButton(); | ||||
|             ((System.ComponentModel.ISupportInitialize)(this.smartForm1)).BeginInit(); | ||||
|             this.SuspendLayout(); | ||||
|             //  | ||||
|  | @ -129,7 +129,7 @@ | |||
|             this.labelTitle.BackPictureBox2 = null; | ||||
|             this.labelTitle.BorderColor = System.Drawing.Color.Black; | ||||
|             this.labelTitle.BorderStyle = System.Windows.Forms.BorderStyle.None; | ||||
|             this.labelTitle.Font = new System.Drawing.Font("새굴림", 35F, System.Drawing.FontStyle.Bold); | ||||
|             this.labelTitle.Font = new System.Drawing.Font("New Gulim", 35F, System.Drawing.FontStyle.Bold); | ||||
|             this.labelTitle.InitVisible = true; | ||||
|             this.labelTitle.LineSpacing = 0F; | ||||
|             this.labelTitle.Location = new System.Drawing.Point(199, 7); | ||||
|  | @ -148,7 +148,7 @@ | |||
|             this.labelStaticSaveFile.BackPictureBox2 = null; | ||||
|             this.labelStaticSaveFile.BorderColor = System.Drawing.Color.Black; | ||||
|             this.labelStaticSaveFile.BorderStyle = System.Windows.Forms.BorderStyle.None; | ||||
|             this.labelStaticSaveFile.Font = new System.Drawing.Font("새굴림", 20F, System.Drawing.FontStyle.Bold); | ||||
|             this.labelStaticSaveFile.Font = new System.Drawing.Font("New Gulim", 20F, System.Drawing.FontStyle.Bold); | ||||
|             this.labelStaticSaveFile.InitVisible = true; | ||||
|             this.labelStaticSaveFile.LineSpacing = 0F; | ||||
|             this.labelStaticSaveFile.Location = new System.Drawing.Point(151, 306); | ||||
|  | @ -167,7 +167,7 @@ | |||
|             this.labelStaticBackupEnable.BackPictureBox2 = null; | ||||
|             this.labelStaticBackupEnable.BorderColor = System.Drawing.Color.Black; | ||||
|             this.labelStaticBackupEnable.BorderStyle = System.Windows.Forms.BorderStyle.None; | ||||
|             this.labelStaticBackupEnable.Font = new System.Drawing.Font("새굴림", 20F, System.Drawing.FontStyle.Bold); | ||||
|             this.labelStaticBackupEnable.Font = new System.Drawing.Font("New Gulim", 20F, System.Drawing.FontStyle.Bold); | ||||
|             this.labelStaticBackupEnable.InitVisible = true; | ||||
|             this.labelStaticBackupEnable.LineSpacing = 0F; | ||||
|             this.labelStaticBackupEnable.Location = new System.Drawing.Point(151, 213); | ||||
|  | @ -179,39 +179,6 @@ | |||
|             this.labelStaticBackupEnable.TextVAlign = SmartX.SmartLabel.TextVerAlign.Middle; | ||||
|             this.labelStaticBackupEnable.Wordwrap = false; | ||||
|             //  | ||||
|             // buttonUSBID | ||||
|             //  | ||||
|             this.buttonUSBID.BackPictureBox = null; | ||||
|             this.buttonUSBID.BackPictureBox1 = null; | ||||
|             this.buttonUSBID.BackPictureBox2 = null; | ||||
|             this.buttonUSBID.ButtonColor = System.Drawing.Color.Gray; | ||||
|             this.buttonUSBID.ButtonImageAutoSize = true; | ||||
|             this.buttonUSBID.ColorKeySamplePosition = new System.Drawing.Point(0, 0); | ||||
|             this.buttonUSBID.DisableImage = null; | ||||
|             this.buttonUSBID.DownImage = ((System.Drawing.Image)(resources.GetObject("buttonUSBID.DownImage"))); | ||||
|             this.buttonUSBID.Font = new System.Drawing.Font("Arial", 25F, System.Drawing.FontStyle.Bold); | ||||
|             this.buttonUSBID.GroupID = 0; | ||||
|             this.buttonUSBID.InitVisible = true; | ||||
|             this.buttonUSBID.Location = new System.Drawing.Point(125, 117); | ||||
|             this.buttonUSBID.Mode = SmartX.SmartButton.BUTTONMODE.NORMAL; | ||||
|             this.buttonUSBID.Name = "buttonUSBID"; | ||||
|             this.buttonUSBID.NestedClickEventPrevent = false; | ||||
|             this.buttonUSBID.OutlinePixel = 1; | ||||
|             this.buttonUSBID.RepeatInterval = 200; | ||||
|             this.buttonUSBID.RepeatIntervalAccelerate = null; | ||||
|             this.buttonUSBID.SafeInterval = 200; | ||||
|             this.buttonUSBID.Size = new System.Drawing.Size(326, 73); | ||||
|             this.buttonUSBID.SpecialFunction = SmartX.SmartButton.SPECIALFUNC.NONE; | ||||
|             this.buttonUSBID.TabIndex = 23; | ||||
|             this.buttonUSBID.Text = "1"; | ||||
|             this.buttonUSBID.TextColor = System.Drawing.Color.Black; | ||||
|             this.buttonUSBID.TextDownColor = System.Drawing.Color.White; | ||||
|             this.buttonUSBID.TextHAlign = SmartX.SmartButton.TextHorAlign.Right; | ||||
|             this.buttonUSBID.TextLocation = new System.Drawing.Point(-60, 0); | ||||
|             this.buttonUSBID.TextVAlign = SmartX.SmartButton.TextVerAlign.Middle; | ||||
|             this.buttonUSBID.UpImage = ((System.Drawing.Image)(resources.GetObject("buttonUSBID.UpImage"))); | ||||
|             this.buttonUSBID.Click += new System.EventHandler(this.buttonUSBID_Click); | ||||
|             //  | ||||
|             // listBoxDataList | ||||
|             //  | ||||
|             this.listBoxDataList.Font = new System.Drawing.Font("Tahoma", 15F, System.Drawing.FontStyle.Regular); | ||||
|  | @ -246,7 +213,7 @@ | |||
|             this.labelStaticWarning1.BackPictureBox2 = null; | ||||
|             this.labelStaticWarning1.BorderColor = System.Drawing.Color.Black; | ||||
|             this.labelStaticWarning1.BorderStyle = System.Windows.Forms.BorderStyle.None; | ||||
|             this.labelStaticWarning1.Font = new System.Drawing.Font("새굴림", 18F, System.Drawing.FontStyle.Bold); | ||||
|             this.labelStaticWarning1.Font = new System.Drawing.Font("New Gulim", 18F, System.Drawing.FontStyle.Bold); | ||||
|             this.labelStaticWarning1.ForeColor = System.Drawing.Color.Red; | ||||
|             this.labelStaticWarning1.InitVisible = true; | ||||
|             this.labelStaticWarning1.LineSpacing = 0F; | ||||
|  | @ -266,7 +233,7 @@ | |||
|             this.labelStaticWarning2.BackPictureBox2 = null; | ||||
|             this.labelStaticWarning2.BorderColor = System.Drawing.Color.Black; | ||||
|             this.labelStaticWarning2.BorderStyle = System.Windows.Forms.BorderStyle.None; | ||||
|             this.labelStaticWarning2.Font = new System.Drawing.Font("새굴림", 13F, System.Drawing.FontStyle.Bold); | ||||
|             this.labelStaticWarning2.Font = new System.Drawing.Font("New Gulim", 13F, System.Drawing.FontStyle.Bold); | ||||
|             this.labelStaticWarning2.InitVisible = true; | ||||
|             this.labelStaticWarning2.LineSpacing = 0F; | ||||
|             this.labelStaticWarning2.Location = new System.Drawing.Point(151, 465); | ||||
|  | @ -281,7 +248,7 @@ | |||
|             // radioButtonDisable | ||||
|             //  | ||||
|             this.radioButtonDisable.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(208)))), ((int)(((byte)(208))))); | ||||
|             this.radioButtonDisable.Font = new System.Drawing.Font("새굴림", 20F, System.Drawing.FontStyle.Bold); | ||||
|             this.radioButtonDisable.Font = new System.Drawing.Font("New Gulim", 20F, System.Drawing.FontStyle.Bold); | ||||
|             this.radioButtonDisable.Location = new System.Drawing.Point(715, 213); | ||||
|             this.radioButtonDisable.Name = "radioButtonDisable"; | ||||
|             this.radioButtonDisable.Size = new System.Drawing.Size(150, 50); | ||||
|  | @ -292,7 +259,7 @@ | |||
|             // radioButtonEnable | ||||
|             //  | ||||
|             this.radioButtonEnable.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(208)))), ((int)(((byte)(208))))); | ||||
|             this.radioButtonEnable.Font = new System.Drawing.Font("새굴림", 20F, System.Drawing.FontStyle.Bold); | ||||
|             this.radioButtonEnable.Font = new System.Drawing.Font("New Gulim", 20F, System.Drawing.FontStyle.Bold); | ||||
|             this.radioButtonEnable.Location = new System.Drawing.Point(510, 213); | ||||
|             this.radioButtonEnable.Name = "radioButtonEnable"; | ||||
|             this.radioButtonEnable.Size = new System.Drawing.Size(150, 50); | ||||
|  | @ -300,6 +267,39 @@ | |||
|             this.radioButtonEnable.Text = "Enable"; | ||||
|             this.radioButtonEnable.Click += new System.EventHandler(this.radioButtonEnable_Click); | ||||
|             //  | ||||
|             // buttonUSBID | ||||
|             //  | ||||
|             this.buttonUSBID.BackPictureBox = null; | ||||
|             this.buttonUSBID.BackPictureBox1 = null; | ||||
|             this.buttonUSBID.BackPictureBox2 = null; | ||||
|             this.buttonUSBID.ButtonColor = System.Drawing.Color.Gray; | ||||
|             this.buttonUSBID.ButtonImageAutoSize = true; | ||||
|             this.buttonUSBID.ColorKeySamplePosition = new System.Drawing.Point(0, 0); | ||||
|             this.buttonUSBID.DisableImage = null; | ||||
|             this.buttonUSBID.DownImage = ((System.Drawing.Image)(resources.GetObject("buttonUSBID.DownImage"))); | ||||
|             this.buttonUSBID.Font = new System.Drawing.Font("Arial", 25F, System.Drawing.FontStyle.Bold); | ||||
|             this.buttonUSBID.GroupID = 0; | ||||
|             this.buttonUSBID.InitVisible = true; | ||||
|             this.buttonUSBID.Location = new System.Drawing.Point(125, 117); | ||||
|             this.buttonUSBID.Mode = SmartX.SmartButton.BUTTONMODE.NORMAL; | ||||
|             this.buttonUSBID.Name = "buttonUSBID"; | ||||
|             this.buttonUSBID.NestedClickEventPrevent = false; | ||||
|             this.buttonUSBID.OutlinePixel = 1; | ||||
|             this.buttonUSBID.RepeatInterval = 200; | ||||
|             this.buttonUSBID.RepeatIntervalAccelerate = null; | ||||
|             this.buttonUSBID.SafeInterval = 200; | ||||
|             this.buttonUSBID.Size = new System.Drawing.Size(326, 73); | ||||
|             this.buttonUSBID.SpecialFunction = SmartX.SmartButton.SPECIALFUNC.NONE; | ||||
|             this.buttonUSBID.TabIndex = 23; | ||||
|             this.buttonUSBID.Text = "1"; | ||||
|             this.buttonUSBID.TextColor = System.Drawing.Color.Black; | ||||
|             this.buttonUSBID.TextDownColor = System.Drawing.Color.White; | ||||
|             this.buttonUSBID.TextHAlign = SmartX.SmartButton.TextHorAlign.Right; | ||||
|             this.buttonUSBID.TextLocation = new System.Drawing.Point(-60, 0); | ||||
|             this.buttonUSBID.TextVAlign = SmartX.SmartButton.TextVerAlign.Middle; | ||||
|             this.buttonUSBID.UpImage = ((System.Drawing.Image)(resources.GetObject("buttonUSBID.UpImage"))); | ||||
|             this.buttonUSBID.Click += new System.EventHandler(this.buttonUSBID_Click); | ||||
|             //  | ||||
|             // FormDataBackup | ||||
|             //  | ||||
|             this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); | ||||
|  | @ -334,12 +334,12 @@ | |||
|         private SmartX.SmartLabel labelTitle; | ||||
|         private SmartX.SmartLabel labelStaticSaveFile; | ||||
|         private SmartX.SmartLabel labelStaticBackupEnable; | ||||
|         public SmartX.SmartButton buttonUSBID; | ||||
|         private System.Windows.Forms.ListBox listBoxDataList; | ||||
|         private SmartX.SmartLabel labelFileCount; | ||||
|         private SmartX.SmartLabel labelStaticWarning1; | ||||
|         private SmartX.SmartLabel labelStaticWarning2; | ||||
|         private System.Windows.Forms.RadioButton radioButtonDisable; | ||||
|         private System.Windows.Forms.RadioButton radioButtonEnable; | ||||
|         public SmartX.SmartButton buttonUSBID; | ||||
|     } | ||||
| } | ||||
											
												
													File diff suppressed because it is too large
													Load Diff
												
											
										
									
								|  | @ -165,6 +165,7 @@ | |||
|             this.smartForm1.Size = new System.Drawing.Size(1024, 768); | ||||
|             this.smartForm1.SpecialFunctionClickPointSize = 100; | ||||
|             this.smartForm1.SuspendLayoutInterval = 0; | ||||
|             this.smartForm1.Click += new System.EventHandler(this.smartForm1_Click); | ||||
|             //  | ||||
|             // buttonProductNo | ||||
|             //  | ||||
|  |  | |||
|  | @ -23,6 +23,7 @@ namespace INT69DC_7C.Forms | |||
|         #region Field | ||||
|         private int FlagTimeoutCount; | ||||
|         private int SubmenuIndex; | ||||
|         public string ChangeID; | ||||
| 
 | ||||
|         private FormMain m_ParentForm; | ||||
| 
 | ||||
|  | @ -595,6 +596,7 @@ namespace INT69DC_7C.Forms | |||
| 
 | ||||
|             this.FlagTimeoutCount = 0; | ||||
|             this.SubmenuIndex = 0; | ||||
|             this.ChangeID = ""; | ||||
| 
 | ||||
|             this.ColorButtonAccessTrue = Color.Black; | ||||
|             this.ColorButtonAccessFalse = Color.DimGray; | ||||
|  | @ -882,9 +884,173 @@ namespace INT69DC_7C.Forms | |||
|             else | ||||
|                 this.buttonFeedback.ButtonUp(); | ||||
|         } | ||||
|         private bool UI_Invoke(ThreadStart invoker) | ||||
|         { | ||||
|             try | ||||
|             { | ||||
|                 if (this.InvokeRequired) | ||||
|                 { | ||||
|                     if (this.IsDisposed) | ||||
|                         return true; | ||||
| 
 | ||||
|                     this.Invoke(invoker); | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                     invoker(); | ||||
|                 } | ||||
| 
 | ||||
|                 return true; | ||||
| 
 | ||||
|             } | ||||
|             catch (Exception e) | ||||
|             { | ||||
|                 return false; | ||||
|             } | ||||
| 
 | ||||
|         } | ||||
|         private void PasswordExpirationCheck(UserItem user) | ||||
|         { | ||||
|             int expiryDay = 0; | ||||
| 
 | ||||
|             // 만료일 -10 일때 메시지 띄우기 | ||||
|             expiryDay = user.GetPasswordExpiryDday(); | ||||
|             if (expiryDay >= -10) | ||||
|             { | ||||
|                 Console.WriteLine("password : " + expiryDay.ToString()); | ||||
|                 DialogFormYesNo myDlg = new DialogFormYesNo(this.ParentForm.SystemConfig.Language, 2, expiryDay.ToString()); | ||||
|                 if (myDlg.ShowDialog() == DialogResult.Yes) | ||||
|                 { | ||||
|                     // 비밀 번호 변경 띄우기 | ||||
|                     DialogFormLogOn logOn = new DialogFormLogOn(this.ParentForm, true, true); | ||||
|                     if (logOn.ShowDialog() == DialogResult.OK) | ||||
|                     {  | ||||
|                          | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         private void DirectLogin(string id, string pass) | ||||
|         { | ||||
|             UserManager.UserMgr_user_info_t userInfo = new UserManager.UserMgr_user_info_t(); | ||||
| 
 | ||||
|             UserManager.UserManager_UserLoginDirect(id, pass, ref userInfo); | ||||
|             Console.WriteLine(string.Format("status : {0}", userInfo.status)); | ||||
|             Console.WriteLine("ID : " + id); | ||||
|             Console.WriteLine("pass : " + pass); | ||||
| 
 | ||||
|             if (userInfo.status == 0) | ||||
|             { | ||||
|                 #region 로그인 성공 | ||||
|                 if (userInfo.active_level == 1) | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.Group = DataStore.UserGroup.Level1; | ||||
|                 else if (userInfo.active_level == 2) | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.Group = DataStore.UserGroup.Level2; | ||||
|                 else if (userInfo.active_level == 3) | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.Group = DataStore.UserGroup.Level3; | ||||
|                 else if (userInfo.active_level == 9) | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.Group = DataStore.UserGroup.Admin; | ||||
|                 else if (userInfo.active_level == 10) | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.Group = DataStore.UserGroup.Developer; | ||||
| 
 | ||||
|                 this.ParentForm.SystemConfig.CurrentUser.ID = userInfo.user_id; | ||||
|                 this.ParentForm.SystemConfig.CurrentUser.Password = userInfo.user_pw; | ||||
| 
 | ||||
|                 this.ParentForm.SystemConfig.CurrentUser.ExpireAccount = userInfo.expire_period_account; | ||||
|                 this.ParentForm.SystemConfig.CurrentUser.ExpirePassword = userInfo.expire_period_pw; | ||||
| 
 | ||||
|                 Console.WriteLine(userInfo.register_date.GetDateTime()); | ||||
|                 Console.WriteLine(userInfo.login_date.GetDateTime()); | ||||
|                 Console.WriteLine(userInfo.expire_account_date.GetDateTime()); | ||||
|                 Console.WriteLine(userInfo.expire_register_date.GetDateTime()); | ||||
| 
 | ||||
|                 DateTime time = DateTime.ParseExact(userInfo.register_date.GetDateTime(), "yyyyMMddHHmmss", null); | ||||
|                 this.ParentForm.SystemConfig.CurrentUser.DateRegister = time; | ||||
|                 time = DateTime.ParseExact(userInfo.login_date.GetDateTime(), "yyyyMMddHHmmss", null); | ||||
|                 this.ParentForm.SystemConfig.CurrentUser.DateLogin = time; | ||||
|                 time = DateTime.ParseExact(userInfo.expire_account_date.GetDateTime(), "yyyyMMddHHmmss", null); | ||||
|                 this.ParentForm.SystemConfig.CurrentUser.DateExpireRegister = time; | ||||
|                 time = DateTime.ParseExact(userInfo.expire_register_date.GetDateTime(), "yyyyMMddHHmmss", null); | ||||
|                 this.ParentForm.SystemConfig.CurrentUser.DateExpireLogin = time; | ||||
| 
 | ||||
|                 this.ParentForm.SystemConfig.CurrentUser.IsLockAccount = userInfo.flock_status_account == 0 ? false : true; | ||||
|                 this.ParentForm.SystemConfig.CurrentUser.IsLockPassword = userInfo.flock_status_password == 0 ? false : true; | ||||
| 
 | ||||
|                 this.ParentForm.SystemConfig.CurrentUser.IsAdmin = userInfo.fadmin == 0 ? false : true; | ||||
| 
 | ||||
|                 this.ParentForm.SystemConfig.CurrentUser.ActiveLevel = userInfo.active_level; | ||||
|                 #endregion | ||||
| 
 | ||||
|                 this.UI_Invoke(delegate | ||||
|                 { | ||||
|                    this.UpdateDisplayUser(this.ParentForm.SystemConfig.CurrentUser); | ||||
|                 }); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         private void Login() | ||||
|         { | ||||
|             DialogResult result; | ||||
| 
 | ||||
|             DialogFormLogOn logOn = new DialogFormLogOn(this.ParentForm, false, false); | ||||
|             result = logOn.ShowDialog(); | ||||
| 
 | ||||
|             if (result == DialogResult.OK) | ||||
|             { | ||||
|                 if (this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Level1 || | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Level2 || | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Level3) | ||||
|                 { | ||||
|                     // 비밀번호 만료일 10일 미만 체크 후 비밀번호 변경 | ||||
|                     this.PasswordExpirationCheck(this.ParentForm.SystemConfig.CurrentUser); | ||||
|                 } | ||||
| 
 | ||||
|                 this.buttonUser.ButtonDown(); | ||||
|                 this.UpdateDisplayUser(this.ParentForm.SystemConfig.CurrentUser); | ||||
| 
 | ||||
|                 // Part 11 | ||||
|                 if (this.ParentForm.SystemConfig.IsPart11 == true) | ||||
|                     this.ParentForm.SetTrackingHistoryData(DataStore.TrackingOperation.Login, ""); | ||||
|             } | ||||
|             else if (result == DialogResult.Abort) | ||||
|             { | ||||
| 
 | ||||
|                 // 비밀 번호 변경 띄우기 | ||||
|                 DialogFormLogOn logOn1 = new DialogFormLogOn(this.ParentForm, false, true); | ||||
|                 if (logOn1.ShowDialog() == DialogResult.OK) | ||||
|                 { | ||||
|                     this.buttonUser.ButtonDown(); | ||||
|                     this.UpdateDisplayUser(this.ParentForm.SystemConfig.CurrentUser); | ||||
|                 } | ||||
|                 else | ||||
|                     this.buttonUser.ButtonUp(); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 this.buttonUser.ButtonUp(); | ||||
|             } | ||||
|         } | ||||
|         public void Logout() | ||||
|         { | ||||
|             this.ParentForm.SystemConfig.CurrentUser.Group = DataStore.UserGroup.LogOut; | ||||
|             this.buttonUser.ButtonUp(); | ||||
|             this.DisplayRefresh(); | ||||
|             this.ChangeID = ""; | ||||
| 
 | ||||
|             // Part 11 | ||||
|             if (this.ParentForm.SystemConfig.IsPart11 == true) | ||||
|                 this.ParentForm.SetTrackingHistoryData(DataStore.TrackingOperation.Logout, ""); | ||||
|         } | ||||
|         public void Part11AutomaticLogoutReset() | ||||
|         { | ||||
|             UserManager.UserManager_AutoLogoutTimeoutReset(); | ||||
|         } | ||||
| 
 | ||||
|         public void UpdateDisplayUser(UserItem user) | ||||
|         { | ||||
|             string id = "", group = "", expireDate = ""; | ||||
|             string id = "", group = "", expirePW = ""; | ||||
|             int expireDate = 0; | ||||
|             Color colorExpirePW = this.ParentForm.ColorLogOff; | ||||
| 
 | ||||
|             switch (user.Group) | ||||
|             { | ||||
|  | @ -1061,45 +1227,35 @@ namespace INT69DC_7C.Forms | |||
|             { | ||||
|                 if (this.ParentForm.SystemConfig.IsPart11 == true) | ||||
|                 { | ||||
|                     expireDate = this.DisplayExpireOfPassword(user.Group); | ||||
|                     if (expireDate != "-") | ||||
|                     { | ||||
|                         int intExpireDate = int.Parse(expireDate); | ||||
| 
 | ||||
|                         if (intExpireDate == 0) | ||||
|                         { | ||||
|                             this.labelExpireOfPassword.ForeColor = this.ParentForm.ColorLogOff; | ||||
|                             this.labelExpireOfPassword.Text = "D-0"; | ||||
|                         } | ||||
|                         else if (intExpireDate < 0) | ||||
|                         { | ||||
|                             if (intExpireDate * -1 > this.ParentForm.SystemConfig.CurrentUser.ExpirePassword) | ||||
|                                 expireDate = "-" + (this.ParentForm.SystemConfig.CurrentUser.ExpirePassword - 1).ToString(); | ||||
| 
 | ||||
|                             this.labelExpireOfPassword.Text = "D" + expireDate; | ||||
|                             if (intExpireDate >= -10) | ||||
|                                 this.labelExpireOfPassword.ForeColor = this.ParentForm.ColorLogOff; | ||||
|                             else | ||||
|                                 this.labelExpireOfPassword.ForeColor = this.ParentForm.ColorLogOn; | ||||
|                         } | ||||
|                         else | ||||
|                         { | ||||
|                             this.labelExpireOfPassword.ForeColor = this.ParentForm.ColorLogOn; | ||||
|                             this.labelExpireOfPassword.Text = "D+" + expireDate; | ||||
|                         } | ||||
|                     } | ||||
|                     else | ||||
|                     expireDate = user.GetPasswordExpiryDday(); | ||||
|                     if (expireDate == 9999) | ||||
|                     { | ||||
|                         // Administrator or Developer | ||||
|                         this.labelExpireOfPassword.ForeColor = this.ParentForm.ColorLogOn; | ||||
|                         this.labelExpireOfPassword.Text = "-"; | ||||
|                         colorExpirePW = this.ParentForm.ColorLogOn; | ||||
|                         expirePW = "-"; | ||||
|                     } | ||||
|                     else | ||||
|                     { | ||||
|                         if (expireDate >= -10) | ||||
|                         { | ||||
|                             colorExpirePW = this.ParentForm.ColorLogOff; | ||||
|                             if (expireDate > 0) | ||||
|                                 expirePW = string.Format("D+{0}", expireDate); | ||||
|                             else | ||||
|                                 expirePW = string.Format("D{0}", expireDate); | ||||
|                         } | ||||
|                         else | ||||
|                         { | ||||
|                             colorExpirePW = this.ParentForm.ColorLogOn; | ||||
|                             expirePW = string.Format("D{0}", expireDate); | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                     // Part11 미사용 | ||||
|                     this.labelExpireOfPassword.ForeColor = this.ParentForm.ColorLogOn; | ||||
|                     this.labelExpireOfPassword.Text = "-"; | ||||
|                     colorExpirePW = this.ParentForm.ColorLogOn; | ||||
|                     expirePW = "-"; | ||||
|                 } | ||||
|             } | ||||
| 
 | ||||
|  | @ -1107,93 +1263,11 @@ namespace INT69DC_7C.Forms | |||
|                 this.labelUserLevel.Text = group; | ||||
|             if (this.labelUserID.Text != id) | ||||
|                 this.labelUserID.Text = id; | ||||
|             if (this.labelExpireOfPassword.ForeColor != colorExpirePW) | ||||
|                 this.labelExpireOfPassword.ForeColor = colorExpirePW; | ||||
|             if (this.labelExpireOfPassword.Text != expirePW) | ||||
|                 this.labelExpireOfPassword.Text = expirePW; | ||||
|         } | ||||
| 
 | ||||
|         private void Login() | ||||
|         { | ||||
|             DialogResult result; | ||||
|     | ||||
|             DialogFormLogOn logOn = new DialogFormLogOn(this.ParentForm); | ||||
|             result = logOn.ShowDialog(); | ||||
| 
 | ||||
|             if (result == DialogResult.OK) | ||||
|             { | ||||
|                 this.UpdateDisplayUser(this.ParentForm.SystemConfig.CurrentUser); | ||||
|                 //this.DisplayRefresh(); | ||||
|                 this.buttonUser.ButtonDown(); | ||||
|                 //this.ParentForm.TimerAutomaticLogout(true, this.ParentForm.SystemConfig.AutomaticLogout); | ||||
| 
 | ||||
|                 // Part 11 | ||||
|                 if (this.ParentForm.SystemConfig.IsPart11 == true) | ||||
|                     this.ParentForm.SetTrackingHistoryData(DataStore.TrackingOperation.Login, ""); | ||||
| 
 | ||||
|                 // 만료일 -10 일때 메시지 띄우기 | ||||
|             } | ||||
|             else if (result == DialogResult.Abort) | ||||
|             { | ||||
|                 // 비밀 번호 변경 띄우기 | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 this.buttonUser.ButtonUp(); | ||||
|             } | ||||
|         } | ||||
|         public void Logout() | ||||
|         { | ||||
|             this.ParentForm.SystemConfig.CurrentUser.Group = DataStore.UserGroup.LogOut; | ||||
|             this.buttonUser.ButtonUp(); | ||||
|             this.DisplayRefresh(); | ||||
| 
 | ||||
|             // Part 11 | ||||
|             if (this.ParentForm.SystemConfig.IsPart11 == true) | ||||
|                 this.ParentForm.SetTrackingHistoryData(DataStore.TrackingOperation.Logout, ""); | ||||
|         } | ||||
|         public void Part11AutomaticLogoutReset() | ||||
|         { | ||||
|             UserManager.UserManager_AutoLogoutTimeoutReset(); | ||||
|         } | ||||
|         public string DisplayExpireOfPassword(DataStore.UserGroup group) | ||||
|         { | ||||
|             string ret = ""; | ||||
| 
 | ||||
|             if (group == DataStore.UserGroup.Admin || group == DataStore.UserGroup.Developer) | ||||
|                 ret = "-"; | ||||
|             else | ||||
|             { | ||||
|                 //TimeSpan resultTime = DateTime.Now - this.ParentForm.CurrentSystemStatus.CurrentUser.DateExpireRegister; | ||||
|                 TimeSpan dayDiff = DateTime.Now.Date - this.ParentForm.SystemConfig.CurrentUser.DateExpireRegister.Date; | ||||
|                 ret = dayDiff.Days.ToString(); | ||||
|             } | ||||
| 
 | ||||
|             return ret; | ||||
|         } | ||||
| 
 | ||||
|         private bool UI_Invoke(ThreadStart invoker) | ||||
|         { | ||||
|             try | ||||
|             { | ||||
|                 if (this.InvokeRequired) | ||||
|                 { | ||||
|                     if (this.IsDisposed) | ||||
|                         return true; | ||||
| 
 | ||||
|                     this.Invoke(invoker); | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                     invoker(); | ||||
|                 } | ||||
| 
 | ||||
|                 return true; | ||||
| 
 | ||||
|             } | ||||
|             catch (Exception e) | ||||
|             { | ||||
|                 return false; | ||||
|             } | ||||
| 
 | ||||
|         } | ||||
| 
 | ||||
|         public void UpdateCurrentProductDisplay(DataStore.EquipmentStatus status, ProductItem pItem,JudgmentSetItem jItem, Collection<WeightData> weightDatas) | ||||
|         { | ||||
|             string value = ""; | ||||
|  | @ -2310,6 +2384,56 @@ namespace INT69DC_7C.Forms | |||
|                 }); | ||||
|             } | ||||
|         } | ||||
|         public void CallBackUserListModifyInfoDataEvent(UserManager.UserMgr_user_info_t userInfo) | ||||
|         { | ||||
|             Console.WriteLine("status : " + userInfo.status.ToString()); | ||||
|             Console.WriteLine("ID : " + userInfo.user_id); | ||||
|             Console.WriteLine("pass : " + userInfo.user_pw); | ||||
|             if (userInfo.status == 0) | ||||
|             { | ||||
|                 Console.WriteLine("Group : " + this.ParentForm.SystemConfig.CurrentUser.Group.ToString()); | ||||
|                 if (this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.LogOut) | ||||
|                 { | ||||
|                     Console.WriteLine("DirectLogin"); | ||||
|                     this.DirectLogin(userInfo.user_id, userInfo.user_pw); | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                     if (userInfo.active_level == 1) | ||||
|                         this.ParentForm.SystemConfig.CurrentUser.Group = DataStore.UserGroup.Level1; | ||||
|                     else if (userInfo.active_level == 2) | ||||
|                         this.ParentForm.SystemConfig.CurrentUser.Group = DataStore.UserGroup.Level2; | ||||
|                     else if (userInfo.active_level == 3) | ||||
|                         this.ParentForm.SystemConfig.CurrentUser.Group = DataStore.UserGroup.Level3; | ||||
|                     else if (userInfo.active_level == 9) | ||||
|                         this.ParentForm.SystemConfig.CurrentUser.Group = DataStore.UserGroup.Admin; | ||||
|                     else if (userInfo.active_level == 10) | ||||
|                         this.ParentForm.SystemConfig.CurrentUser.Group = DataStore.UserGroup.Developer; | ||||
| 
 | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.ID = userInfo.user_id; | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.Password = userInfo.user_pw; | ||||
| 
 | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.ExpireAccount = userInfo.expire_period_account; | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.ExpirePassword = userInfo.expire_period_pw; | ||||
| 
 | ||||
|                     DateTime time = DateTime.ParseExact(userInfo.register_date.GetDateTime(), "yyyyMMddHHmmss", null); | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.DateRegister = time; | ||||
|                     time = DateTime.ParseExact(userInfo.login_date.GetDateTime(), "yyyyMMddHHmmss", null); | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.DateLogin = time; | ||||
|                     time = DateTime.ParseExact(userInfo.expire_account_date.GetDateTime(), "yyyyMMddHHmmss", null); | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.DateExpireRegister = time; | ||||
|                     time = DateTime.ParseExact(userInfo.expire_register_date.GetDateTime(), "yyyyMMddHHmmss", null); | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.DateExpireLogin = time; | ||||
| 
 | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.IsLockAccount = userInfo.flock_status_account == 0 ? false : true; | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.IsLockPassword = userInfo.flock_status_password == 0 ? false : true; | ||||
| 
 | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.IsAdmin = userInfo.fadmin == 0 ? false : true; | ||||
| 
 | ||||
|                     this.ParentForm.SystemConfig.CurrentUser.ActiveLevel = userInfo.active_level; | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         public void DisplayRefresh() | ||||
|         { | ||||
|  | @ -2973,12 +3097,6 @@ namespace INT69DC_7C.Forms | |||
|             if (this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.LogOut) | ||||
|             { | ||||
|                 this.Login();  | ||||
| 
 | ||||
|                 //10 전 | ||||
|                 // 메시지 띄우기 (변경할래?) yes no | ||||
| 
 | ||||
|                 // 만료 | ||||
|                 // 비밀번호 창 띄우기  | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|  | @ -3849,5 +3967,10 @@ namespace INT69DC_7C.Forms | |||
|             this.ParentForm.Dispose(); | ||||
|             this.ParentForm.Close(); | ||||
|         } | ||||
| 
 | ||||
|         private void smartForm1_Click(object sender, EventArgs e) | ||||
|         { | ||||
| 
 | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | @ -292,7 +292,9 @@ namespace INT69DC_7C.Forms | |||
| 
 | ||||
|         public void UpdateDisplayUser(UserItem user) | ||||
|         { | ||||
|             string id = "", group = "", expireDate = ""; | ||||
|             string id = "", group = "", expirePW = ""; | ||||
|             int expireDate = 0; | ||||
|             Color colorExpirePW = this.ParentForm.ColorLogOff; | ||||
| 
 | ||||
|             switch (user.Group) | ||||
|             { | ||||
|  | @ -514,45 +516,36 @@ namespace INT69DC_7C.Forms | |||
|             { | ||||
|                 if (this.ParentForm.SystemConfig.IsPart11 == true) | ||||
|                 { | ||||
|                     expireDate = this.ParentForm.ChildFormMainDisplay.DisplayExpireOfPassword(user.Group); | ||||
|                     if (expireDate != "-") | ||||
|                     { | ||||
|                         int intExpireDate = int.Parse(expireDate); | ||||
| 
 | ||||
|                         if (intExpireDate == 0) | ||||
|                         { | ||||
|                             this.labelExpireOfPassword.ForeColor = this.ParentForm.ColorLogOff; | ||||
|                             this.labelExpireOfPassword.Text = "D-0"; | ||||
|                         } | ||||
|                         else if (intExpireDate < 0) | ||||
|                         { | ||||
|                             if (intExpireDate * -1 > this.ParentForm.SystemConfig.CurrentUser.ExpirePassword) | ||||
|                                 expireDate = "-" + (this.ParentForm.SystemConfig.CurrentUser.ExpirePassword - 1).ToString(); | ||||
| 
 | ||||
|                             this.labelExpireOfPassword.Text = "D" + expireDate; | ||||
|                             if (intExpireDate >= -10) | ||||
|                                 this.labelExpireOfPassword.ForeColor = this.ParentForm.ColorLogOff; | ||||
|                             else | ||||
|                                 this.labelExpireOfPassword.ForeColor = this.ParentForm.ColorLogOn; | ||||
|                         } | ||||
|                         else | ||||
|                         { | ||||
|                             this.labelExpireOfPassword.ForeColor = this.ParentForm.ColorLogOn; | ||||
|                             this.labelExpireOfPassword.Text = "D+" + expireDate; | ||||
|                         } | ||||
|                     } | ||||
|                     else | ||||
|                     expireDate = user.GetPasswordExpiryDday(); | ||||
|                     if (expireDate == 9999) | ||||
|                     { | ||||
|                         // Administrator or Developer | ||||
|                         this.labelExpireOfPassword.ForeColor = this.ParentForm.ColorLogOn; | ||||
|                         this.labelExpireOfPassword.Text = "-"; | ||||
|                         colorExpirePW = this.ParentForm.ColorLogOn; | ||||
|                         expirePW = "-"; | ||||
|                          | ||||
|                     } | ||||
|                     else | ||||
|                     { | ||||
|                         if (expireDate >=  -10) | ||||
|                         { | ||||
|                             colorExpirePW = this.ParentForm.ColorLogOff; | ||||
|                             if (expireDate > 0) | ||||
|                                 expirePW = string.Format("D+{0}", expireDate); | ||||
|                             else | ||||
|                                 expirePW = string.Format("D{0}", expireDate); | ||||
|                         } | ||||
|                         else | ||||
|                         { | ||||
|                             colorExpirePW = this.ParentForm.ColorLogOn; | ||||
|                             expirePW = string.Format("D{0}", expireDate); | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                     // Part11 미사용 | ||||
|                     this.labelExpireOfPassword.ForeColor = this.ParentForm.ColorLogOn; | ||||
|                     this.labelExpireOfPassword.Text = "-"; | ||||
|                     colorExpirePW = this.ParentForm.ColorLogOn; | ||||
|                     expirePW = "-"; | ||||
|                 } | ||||
|             } | ||||
| 
 | ||||
|  | @ -560,6 +553,10 @@ namespace INT69DC_7C.Forms | |||
|                 this.labelUserID.Text = id; | ||||
|             if (this.labelUserLevel.Text != group) | ||||
|                 this.labelUserLevel.Text = group; | ||||
|             if (this.labelExpireOfPassword.ForeColor != colorExpirePW) | ||||
|                 this.labelExpireOfPassword.ForeColor = colorExpirePW; | ||||
|             if (this.labelExpireOfPassword.Text != expirePW) | ||||
|                 this.labelExpireOfPassword.Text = expirePW; | ||||
|         } | ||||
| 
 | ||||
|         public void DisplayRefresh() | ||||
|  |  | |||
|  | @ -173,11 +173,13 @@ namespace INT69DC_7C.Forms | |||
|             { | ||||
|                 this.ParentForm.SystemConfig.IsPart11 = true; | ||||
|                 this.ParentForm.SystemConfig.IsLogin = true; | ||||
|                 this.ParentForm.SystemConfig.IsDataBackup = true; | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 this.ParentForm.SystemConfig.IsPart11 = false; | ||||
|                 this.ParentForm.SystemConfig.IsLogin = false; | ||||
|                 this.ParentForm.SystemConfig.IsDataBackup = false; | ||||
|             } | ||||
| 
 | ||||
|             this.ParentForm.SaveSystemConfigurationFile(this.ParentForm.SystemConfig); | ||||
|  |  | |||
|  | @ -261,26 +261,10 @@ namespace INT69DC_7C.Forms | |||
|                     msg.ShowDialog(); | ||||
|                     return; | ||||
|                 } | ||||
| 
 | ||||
|                 if (this.labelExpiryDateOfAccount.Text == "000") | ||||
|                 { | ||||
|                     DialogFormMessage msg = new DialogFormMessage(null, 16, this.ParentForm.SystemConfig.Language); | ||||
|                     msg.ShowDialog(); | ||||
| 
 | ||||
|                     return; | ||||
|                 } | ||||
| 
 | ||||
|                 if (this.labelExpiryDateOfPassword.Text == "00") | ||||
|                 { | ||||
|                     DialogFormMessage msg = new DialogFormMessage(null, 16, this.ParentForm.SystemConfig.Language); | ||||
|                     msg.ShowDialog(); | ||||
| 
 | ||||
|                     return; | ||||
|                 } | ||||
|                 #endregion | ||||
| 
 | ||||
|                 item.ID = this.labelID.Text; | ||||
|                 item.SetPassword(this.labelPassword.Text); | ||||
|                 item.Password = this.labelPassword.Text; | ||||
|                 item.ExpireAccount = int.Parse(this.labelExpiryDateOfAccount.Text); | ||||
|                 item.ExpirePassword = int.Parse(this.labelExpiryDateOfPassword.Text); | ||||
| 
 | ||||
|  | @ -551,6 +535,11 @@ namespace INT69DC_7C.Forms | |||
|             if (this.SelectedUserItem.Group == DataStore.UserGroup.Admin | ||||
|                   || this.SelectedUserItem.Group == DataStore.UserGroup.Developer) | ||||
|             { | ||||
|                 Console.WriteLine(item.register_date.GetDateTime()); | ||||
|                 Console.WriteLine(item.login_date.GetDateTime()); | ||||
|                 Console.WriteLine(item.expire_account_date.GetDateTime()); | ||||
|                 Console.WriteLine(item.expire_register_date.GetDateTime()); | ||||
| 
 | ||||
|                 this.SelectedUserItem.DateRegister = DateTime.Now; | ||||
|                 this.SelectedUserItem.DateLogin = DateTime.Now; | ||||
|                 this.SelectedUserItem.DateExpireRegister = DateTime.Now; | ||||
|  | @ -597,6 +586,12 @@ namespace INT69DC_7C.Forms | |||
|             if (this.SelectedUserItem.Group == DataStore.UserGroup.Admin | ||||
|                   || this.SelectedUserItem.Group == DataStore.UserGroup.Developer) | ||||
|             { | ||||
|                 Console.WriteLine(item.register_date.GetDateTime()); | ||||
|                 Console.WriteLine(item.login_date.GetDateTime()); | ||||
|                 Console.WriteLine(item.expire_account_date.GetDateTime()); | ||||
|                 Console.WriteLine(item.expire_register_date.GetDateTime()); | ||||
| 
 | ||||
| 
 | ||||
|                 this.SelectedUserItem.DateRegister = DateTime.Now; | ||||
|                 this.SelectedUserItem.DateLogin = DateTime.Now; | ||||
|                 this.SelectedUserItem.DateExpireRegister = DateTime.Now; | ||||
|  | @ -652,8 +647,8 @@ namespace INT69DC_7C.Forms | |||
|             { | ||||
|                 this.labelExpiryDateOfAccount.Text = item.ExpireAccount.ToString(); | ||||
|                 this.labelExpiryDateOfPassword.Text = item.ExpirePassword.ToString(); | ||||
|                 this.labelExpiryDateOfAccount2.Text = string.Format("{0:yyyy/MM/dd} ~ {1:yyyy/MM/dd}", item.DateRegister, item.DateExpireRegister); | ||||
|                 this.labelExpiryDateOfPassword2.Text = string.Format("{0:yyyy/MM/dd} ~ {1:yyyy/MM/dd}", item.DateLogin, item.DateExpireLogin); | ||||
|                 this.labelExpiryDateOfAccount2.Text = string.Format("{0:yyyy/MM/dd} ~ {1:yyyy/MM/dd}", item.DateLogin, item.DateExpireRegister); | ||||
|                 this.labelExpiryDateOfPassword2.Text = string.Format("{0:yyyy/MM/dd} ~ {1:yyyy/MM/dd}", item.DateRegister, item.DateExpireLogin); | ||||
| 
 | ||||
|                 this.labelStatusExpiryAccount.Visible = item.IsLockAccount; | ||||
|                 this.labelStatusExpiryPassword.Visible = item.IsLockPassword; | ||||
|  |  | |||
|  | @ -1053,6 +1053,7 @@ | |||
|             this.buttonNew.Size = new System.Drawing.Size(100, 50); | ||||
|             this.buttonNew.SpecialFunction = SmartX.SmartButton.SPECIALFUNC.NONE; | ||||
|             this.buttonNew.TabIndex = 188; | ||||
|             this.buttonNew.Text = "!"; | ||||
|             this.buttonNew.TextColor = System.Drawing.Color.Black; | ||||
|             this.buttonNew.TextDownColor = System.Drawing.Color.White; | ||||
|             this.buttonNew.TextHAlign = SmartX.SmartButton.TextHorAlign.Middle; | ||||
|  |  | |||
|  | @ -12,9 +12,6 @@ namespace INT69DC_7C.Part11_UserManager | |||
|         #region Field | ||||
|         private string m_ID; | ||||
|         private string m_Password; | ||||
|         private string m_PreviousPassword1; | ||||
|         private string m_PreviousPassword2; | ||||
|         private string m_PreviousPassword3; | ||||
| 
 | ||||
|         private int m_ExpireAccount; | ||||
|         private int m_ExpirePassword; | ||||
|  | @ -52,21 +49,6 @@ namespace INT69DC_7C.Part11_UserManager | |||
|             get { return this.m_Password; } | ||||
|             set { this.m_Password = value; } | ||||
|         } | ||||
|         public string PreviousPassword1 | ||||
|         { | ||||
|             get { return this.m_PreviousPassword1; } | ||||
|             set { this.m_PreviousPassword1 = value; } | ||||
|         } | ||||
|         public string PreviousPassword2 | ||||
|         { | ||||
|             get { return this.m_PreviousPassword2; } | ||||
|             set { this.m_PreviousPassword2 = value; } | ||||
|         } | ||||
|         public string PreviousPassword3 | ||||
|         { | ||||
|             get { return this.m_PreviousPassword3; } | ||||
|             set { this.m_PreviousPassword3 = value; } | ||||
|         } | ||||
| 
 | ||||
|         public int ExpireAccount | ||||
|         { | ||||
|  | @ -136,10 +118,6 @@ namespace INT69DC_7C.Part11_UserManager | |||
|             this.ID = "-"; | ||||
|             this.Password = "-"; | ||||
| 
 | ||||
|             this.PreviousPassword1 = "-"; | ||||
|             this.PreviousPassword2 = "-"; | ||||
|             this.PreviousPassword3 = "-"; | ||||
| 
 | ||||
|             this.ExpireAccount = 0; | ||||
|             this.ExpirePassword = 0; | ||||
| 
 | ||||
|  | @ -155,12 +133,21 @@ namespace INT69DC_7C.Part11_UserManager | |||
|             this.ActiveLevel = 1; | ||||
|         } | ||||
| 
 | ||||
|         public void SetPassword(string pass) | ||||
|         public int GetPasswordExpiryDday() | ||||
|         { | ||||
|             this.PreviousPassword3 = this.PreviousPassword2; | ||||
|             this.PreviousPassword2 = this.PreviousPassword1; | ||||
|             this.PreviousPassword1 = pass; | ||||
|             this.Password = pass; | ||||
|             int ret = 0; | ||||
|             DateTime timeNow = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day); | ||||
|             TimeSpan dayDiff; | ||||
| 
 | ||||
|             if (this.Group == DataStore.UserGroup.Admin || this.Group == DataStore.UserGroup.Developer) | ||||
|                 ret = 9999; | ||||
|             else | ||||
|             { | ||||
|                 dayDiff = timeNow.Date - this.DateExpireLogin.Date; | ||||
|                 ret = dayDiff.Days; | ||||
|             } | ||||
| 
 | ||||
|             return ret; | ||||
|         } | ||||
|         #endregion | ||||
|     } | ||||
|  |  | |||
|  | @ -125,6 +125,9 @@ namespace INT69DC_7C.Part11_UserManager | |||
|         [DllImport(PathDll, CallingConvention = CallingConvention.Winapi)] | ||||
|         private static extern int DLL_UserMgr_UserModifyPW(IntPtr user_id, IntPtr user_pw); | ||||
| 
 | ||||
|         [DllImport(PathDll, CallingConvention = CallingConvention.Winapi)] | ||||
|         private static extern int DLL_UserMgr_UserModifyPWDirect(IntPtr user_id, IntPtr user_pw); | ||||
| 
 | ||||
|         [DllImport(PathDll, CallingConvention = CallingConvention.Winapi)] | ||||
|         private static extern int DLL_UserMgr_UserModifyID(IntPtr user_org_id, IntPtr user_new_id); | ||||
| 
 | ||||
|  |  | |||
|  | @ -136,6 +136,18 @@ namespace INT69DC_7C.Part11_UserManager | |||
| 
 | ||||
|             DLL_UserMgr_UserModifyPW(pID, pPW); | ||||
|         } | ||||
|         public static int UserManager_UserModifyPWDirect(String sID, String sNewPW) | ||||
|         { | ||||
|             int ret = 0; | ||||
| 
 | ||||
|             IntPtr pID = Marshal.StringToBSTR(sID.ToString()); | ||||
|             IntPtr pPW = Marshal.StringToBSTR(sNewPW.ToString()); | ||||
| 
 | ||||
|             ret = DLL_UserMgr_UserModifyPWDirect(pID, pPW); | ||||
| 
 | ||||
|             return ret; | ||||
|         } | ||||
| 
 | ||||
|         public static void UserManager_UserModifyID(String sID, String sNewID) | ||||
|         { | ||||
|             IntPtr pID = Marshal.StringToBSTR(sID.ToString()); | ||||
|  |  | |||
|  | @ -21,6 +21,7 @@ | |||
| 	- Framework : SmartX Framework V3.1.1(update: 2019.03.21) | ||||
| 	- Part 11 적용 | ||||
| 	  INT99DC_7C V3.0.2 참조 | ||||
| 	  데이터 백업 스틱 2모드에서 통합 저장 방식으로 변경함 | ||||
| 	   | ||||
| @ Ver 10.13.0 by LSJ | ||||
| 	- 2023.08.07 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue