// 编辑权限 private void button_editUserRights_Click(object sender, EventArgs e) { bool bControl = Control.ModifierKeys == Keys.Control; string strRightsCfgFileName = Path.Combine(Program.MainForm.UserDir, "objectrights.xml"); DigitalPlatform.CommonControl.PropertyDlg dlg = new DigitalPlatform.CommonControl.PropertyDlg(); MainForm.SetControlFont(dlg, this.Font, false); dlg.StartPosition = FormStartPosition.CenterScreen; dlg.Text = "用户 '" + this.textBox_userName.Text + "' 的权限"; dlg.PropertyString = this.textBox_userRights.Text; dlg.CfgFileName = Program.MainForm.DataDir + "\\userrightsdef.xml"; if (bControl) { if (File.Exists(strRightsCfgFileName) == true) { dlg.CfgFileName += "," + strRightsCfgFileName; } } dlg.ShowDialog(this); if (dlg.DialogResult != DialogResult.OK) { return; } this.textBox_userRights.Text = dlg.PropertyString; }
private void button_editObjectRights_Click(object sender, EventArgs e) { DigitalPlatform.CommonControl.PropertyDlg dlg = new DigitalPlatform.CommonControl.PropertyDlg(); GuiUtil.AutoSetDefaultFont(dlg); dlg.StartPosition = FormStartPosition.CenterScreen; dlg.Text = "对象的权限"; dlg.PropertyString = this.textBox_objectRights.Text; dlg.CfgFileName = RightsCfgFileName; dlg.ShowDialog(this); if (dlg.DialogResult != DialogResult.OK) { return; } this.textBox_objectRights.Text = dlg.PropertyString; }
private void button_editRights_Click(object sender, EventArgs e) { DigitalPlatform.CommonControl.PropertyDlg dlg = new DigitalPlatform.CommonControl.PropertyDlg(); GuiUtil.AutoSetDefaultFont(dlg); dlg.StartPosition = FormStartPosition.CenterScreen; dlg.Text = "对象的权限"; dlg.PropertyString = this.textBox_rights.Text; dlg.CfgFileName = RightsCfgFileName; dlg.ShowDialog(this); if (dlg.DialogResult != DialogResult.OK) return; this.textBox_rights.Text = dlg.PropertyString; }