private void checkEdit2_Click(object sender, EventArgs e) { if (this.Text == "新建图形") { string message = ""; GraphicsbaseinfInfo graphicsInfo = null; //判断是否选择了图形类型 if (comboBoxType.SelectedItem == null) { DevExpress.XtraEditors.XtraMessageBox.Show("请选择对应的图形类型", "提示"); return; } if (comboBoxType.SelectedItem.ToString() == "动态图") { message = "已存在通风系统默认图形,确定要把当前图形设置为通风系统默认图形吗?"; graphicsInfo = GraphOpt.GetSystemtDefaultGraphics(0); } else if (comboBoxType.SelectedItem.ToString() == "拓扑图") { message = "已存在拓扑定义默认图形,确定要把当前图形设置为拓扑定义默认图形吗?"; graphicsInfo = GraphOpt.GetSystemtDefaultGraphics(1); } if (graphicsInfo != null && !string.IsNullOrWhiteSpace(graphicsInfo.GraphId)) { if (this.checkEdit2.Checked == true) { return; } if (DevExpress.XtraEditors.XtraMessageBox.Show(message, "提示", MessageBoxButtons.YesNo) == DialogResult.Yes) { this.SysetemDefaultGraphicsId = graphicsInfo.GraphId; this.EmergencyLinkageGraphicsId = graphicsInfo.GraphId; this.checkEdit2.Checked = true; } else { this.checkEdit1.Checked = true; } } } }