private void button_editRootUserInfo_Click(object sender, EventArgs e) { RootUserDlg dlg = new RootUserDlg(); GuiUtil.AutoSetDefaultFont(dlg); if (this.LineInfo == null || (this.LineInfo.RootUserName == null && this.LineInfo.RootPassword == null && this.LineInfo.RootUserRights == 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.RootUserName; dlg.Password = this.LineInfo.RootPassword; dlg.Rights = this.LineInfo.RootUserRights; } dlg.StartPosition = FormStartPosition.CenterScreen; dlg.ShowDialog(this); if (dlg.DialogResult != DialogResult.OK) { return; } if (this.LineInfo == null) { this.LineInfo = new DigitalPlatform.rms.LineInfo(); } this.LineInfo.RootUserName = dlg.UserName; this.LineInfo.RootPassword = dlg.Password; this.LineInfo.RootUserRights = dlg.Rights; RefreshRootUserInfo(); }
private void button_editRootUserInfo_Click(object sender, EventArgs e) { RootUserDlg dlg = new RootUserDlg(); GuiUtil.AutoSetDefaultFont(dlg); if (this.LineInfo == null || (this.LineInfo.RootUserName == null && this.LineInfo.RootPassword == null && this.LineInfo.RootUserRights == 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.RootUserName; dlg.Password = this.LineInfo.RootPassword; dlg.Rights = this.LineInfo.RootUserRights; } dlg.StartPosition = FormStartPosition.CenterScreen; dlg.ShowDialog(this); if (dlg.DialogResult != DialogResult.OK) return; if (this.LineInfo == null) { this.LineInfo = new DigitalPlatform.rms.LineInfo(); } this.LineInfo.RootUserName = dlg.UserName; this.LineInfo.RootPassword = dlg.Password; this.LineInfo.RootUserRights = dlg.Rights; RefreshRootUserInfo(); }