private void button_editSupervisorUserInfo_Click(object sender, EventArgs e) { CreateSupervisorDlg dlg = new CreateSupervisorDlg(); GuiUtil.AutoSetDefaultFont(dlg); if (this.LineInfo == null || (this.LineInfo.SupervisorUserName == null && this.LineInfo.SupervisorPassword == null && this.LineInfo.SupervisorRights == null) ) { dlg.UserName = "******"; dlg.Password = ""; // dlg.Rights = "this:management;children_database:management;children_directory:management;children_leaf:management;descendant_directory:management;descendant_record:management;descendant_leaf:management"; } else { Debug.Assert(this.LineInfo != null, ""); dlg.UserName = this.LineInfo.SupervisorUserName; dlg.Password = this.LineInfo.SupervisorPassword; dlg.Rights = this.LineInfo.SupervisorRights; } dlg.StartPosition = FormStartPosition.CenterScreen; dlg.ShowDialog(this); if (dlg.DialogResult != DialogResult.OK) { return; } if (this.LineInfo == null) { this.LineInfo = new LineInfo(); } this.LineInfo.SupervisorUserName = dlg.UserName; this.LineInfo.SupervisorPassword = dlg.Password; this.LineInfo.SupervisorRights = dlg.Rights; RefreshSupervisorUserInfo(); }
private void button_editSupervisorUserInfo_Click(object sender, EventArgs e) { CreateSupervisorDlg dlg = new CreateSupervisorDlg(); GuiUtil.AutoSetDefaultFont(dlg); if (this.LineInfo == null || (this.LineInfo.SupervisorUserName == null && this.LineInfo.SupervisorPassword == null && this.LineInfo.SupervisorRights == null) ) { dlg.UserName = "******"; dlg.Password = ""; // dlg.Rights = "this:management;children_database:management;children_directory:management;children_leaf:management;descendant_directory:management;descendant_record:management;descendant_leaf:management"; } else { Debug.Assert(this.LineInfo != null, ""); dlg.UserName = this.LineInfo.SupervisorUserName; dlg.Password = this.LineInfo.SupervisorPassword; dlg.Rights = this.LineInfo.SupervisorRights; } dlg.StartPosition = FormStartPosition.CenterScreen; dlg.ShowDialog(this); if (dlg.DialogResult != DialogResult.OK) return; if (this.LineInfo == null) { this.LineInfo = new LineInfo(); } this.LineInfo.SupervisorUserName = dlg.UserName; this.LineInfo.SupervisorPassword = dlg.Password; this.LineInfo.SupervisorRights = dlg.Rights; RefreshSupervisorUserInfo(); }