유저설정 테스트 및 코드 정리 완료

master V11.4.0
DESKTOP-999R8N3\CJY 2024-08-22 09:20:00 +09:00
parent 0bfb6919f0
commit 1871a66657
2 changed files with 21 additions and 15 deletions

View File

@ -366,6 +366,15 @@ namespace INT69DC_7C.Forms
else else
return Color.Silver; return Color.Silver;
} }
private string PasswordToAsterisk(string sValue)
{
string temp = "";
for (int i = 0; i < sValue.Length; i++)
temp += "*";
return temp;
}
private void CheckBoxCheckedAsLevel(DataStore.UserGroup level) private void CheckBoxCheckedAsLevel(DataStore.UserGroup level)
{ {
switch (level) switch (level)
@ -503,6 +512,7 @@ namespace INT69DC_7C.Forms
this.labelExpiryDateOfPassword2.Text = "yyyy.mm.DD"; this.labelExpiryDateOfPassword2.Text = "yyyy.mm.DD";
this.comboBoxAccessRight.Visible = true; this.comboBoxAccessRight.Visible = true;
this.comboBoxAccessRight.Enabled = true;
this.comboBoxAccessRight.BringToFront(); this.comboBoxAccessRight.BringToFront();
this.UpdateAccessRightComboBoxDisplay(); this.UpdateAccessRightComboBoxDisplay();
this.comboBoxAccessRight.SelectedIndexChanged -= new EventHandler(this.comboBoxAccessRight_SelectedIndexChanged); this.comboBoxAccessRight.SelectedIndexChanged -= new EventHandler(this.comboBoxAccessRight_SelectedIndexChanged);
@ -613,21 +623,15 @@ namespace INT69DC_7C.Forms
} }
private void UpdateSelectUserDisplay(UserItem item) private void UpdateSelectUserDisplay(UserItem item)
{ {
string pass = "";
this.SetEnableID(false); this.SetEnableID(false);
// ID // ID
this.labelID.Text = item.ID; this.labelID.Text = item.ID;
// Password // Password
if (this.SelectedUserItem.IsFirstPassword == 1) if (item.Password == this.SelectedUserItem.ResetPW)
this.labelPassword.Text = item.Password; this.labelPassword.Text = item.Password;
else else
{ this.labelPassword.Text = this.PasswordToAsterisk(item.Password);
for (int i = 0; i < item.Password.Length; i++)
pass = pass + '*';
this.labelPassword.Text = pass;
}
this.UpdateAccessRightDisplay(item.ActiveLevel); this.UpdateAccessRightDisplay(item.ActiveLevel);
this.buttonSave.Visible = false; this.buttonSave.Visible = false;
@ -1074,10 +1078,13 @@ namespace INT69DC_7C.Forms
this.labelPassword.Text = value; this.labelPassword.Text = value;
if (this.labelPassword.Text != "")
{
if (this.buttonSave.Visible == false) if (this.buttonSave.Visible == false)
this.buttonSave.Visible = true; this.buttonSave.Visible = true;
} }
} }
}
private void labelExpireAccount_Click(object sender, EventArgs e) private void labelExpireAccount_Click(object sender, EventArgs e)
{ {
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelExpiryDateOfAccount.Text, 3, 0, false, this.ParentForm.SystemConfig.Language); DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelExpiryDateOfAccount.Text, 3, 0, false, this.ParentForm.SystemConfig.Language);
@ -1264,8 +1271,6 @@ namespace INT69DC_7C.Forms
if (index == 0) if (index == 0)
{ {
this.SetEnablePassword(true);
UserManager.UserManager_GetUserListID(this.listBoxUserList.SelectedItem.ToString()); UserManager.UserManager_GetUserListID(this.listBoxUserList.SelectedItem.ToString());
} }
else if (index > 0) else if (index > 0)
@ -1274,13 +1279,11 @@ namespace INT69DC_7C.Forms
if (this.ParentForm.SystemConfig.CurrentUser.ID == this.listBoxUserList.Items[index].ToString()) if (this.ParentForm.SystemConfig.CurrentUser.ID == this.listBoxUserList.Items[index].ToString())
{ {
this.SetEnablePassword(true); this.SetEnablePassword(true);
this.buttonDelete.Visible = false;
this.buttonResetPW.Visible = false; this.buttonResetPW.Visible = false;
} }
else else
{ {
this.SetEnablePassword(false); this.SetEnablePassword(false);
this.buttonDelete.Visible = true;
this.buttonResetPW.Visible = true; this.buttonResetPW.Visible = true;
} }

View File

@ -22,6 +22,9 @@
- FormMenu - FormMenu
UpdateDisplayMenuAccess() UpdateDisplayMenuAccess()
NotLogin 수정 NotLogin 수정
- 유저설정
Level3 본인에 한해서 비밀번호 변경 가능하도록 수정
admin을 제외한 다른 유저는 Reset만 가능
@ Ver 11.3.0 by LSJ @ Ver 11.3.0 by LSJ
- 2024.08.14 - 2024.08.14