コード例 #1
0
        private void RelcheckItem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            ElectricRelcheck elc = new ElectricRelcheck();

            //TreeListNode node = treeList1.FocusedNode;
            if (string.IsNullOrEmpty(strID))
            {
                MessageBox.Show("请先选择电气计算方案!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            //strID = node["ID"].ToString();
            RelFormdialog reldialog = new RelFormdialog();

            // reldialog.Parent = this;
            reldialog.ShowDialog();
            if (reldialog.DialogResult == DialogResult.OK)
            {
                WaitDialogForm wait = null;
                try {
                    wait = new WaitDialogForm("", "正在处理数据, 请稍候...");
                    wait.Close();
                    elc.WebCalAndPrint(strID, this.ProjectUID, 100);
                } catch (Exception exc) {
                    Debug.Fail(exc.Message);
                    Itop.Client.Common.HandleException.TryCatch(exc);
                    wait.Close();
                    return;
                }
            }
            else if (reldialog.DialogResult == DialogResult.Ignore)
            {
                if (this.Owner != null)
                {
                    this.Visible = false;
                }
                //进行变压器检验
                FrmLayoutSubstationInfo layoutSubstation = new FrmLayoutSubstationInfo();
                layoutSubstation.Biandianzhan();
            }
            else if (reldialog.DialogResult == DialogResult.Cancel)
            {
                if (this.Owner != null)
                {
                    this.Visible = false;
                }
            }
        }
コード例 #2
0
        public void RelStart()
        {
            this.Show();
            LoadShape("symbol20.xml");
            RelFormdialog reldialog = new RelFormdialog();
            // reldialog.Parent = this;
            reldialog.ShowDialog();
            Relaflag = true;

            if (reldialog.DialogResult == DialogResult.OK) {
                NewFile(fileType, DialogResult.Ignore);
                tlVectorControl1.PropertyGrid = propertyGrid;
                tlVectorControl1.ContextMenuStrip = contextMenuStrip1;
            } else if (reldialog.DialogResult == DialogResult.Ignore) {
                this.Visible = false;
                //进行变压器检验

                FrmLayoutSubstationInfo layoutSubstation = new FrmLayoutSubstationInfo();
                layoutSubstation.Biandianzhan();

            } else if (reldialog.DialogResult == DialogResult.Yes) {
                this.Visible = false;
                //配电可靠性窗体
                //XtraPDrelfrm xf = new XtraPDrelfrm();
                //xf.init();
                //xf.ShowDialog();
                //更换为元件可靠性
                Itop.TLPSP.DEVICE.FrmpdrelProject xf = new Itop.TLPSP.DEVICE.FrmpdrelProject();
                xf.init();
                xf.ShowDialog();
            } else if (reldialog.DialogResult == DialogResult.Cancel) {
                this.Visible = false;

            }
        }
コード例 #3
0
        private void RelcheckItem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            ElectricRelcheck elc = new ElectricRelcheck();
            //TreeListNode node = treeList1.FocusedNode;
            if (string.IsNullOrEmpty(strID)) {
                MessageBox.Show("����ѡ��������㷽����", "��ʾ", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            //strID = node["ID"].ToString();
            RelFormdialog reldialog = new RelFormdialog();
            // reldialog.Parent = this;
            reldialog.ShowDialog();
            if (reldialog.DialogResult == DialogResult.OK) {
                WaitDialogForm wait = null;
                try {
                    wait = new WaitDialogForm("", "���ڴ�������, ���Ժ�...");
                    wait.Close();
                    elc.WebCalAndPrint(strID, this.ProjectUID, 100);

                } catch (Exception exc) {
                    Debug.Fail(exc.Message);
                    Itop.Client.Common.HandleException.TryCatch(exc);
                    wait.Close();
                    return;

                }
            } else if (reldialog.DialogResult == DialogResult.Ignore) {
                if (this.Owner != null)
                    this.Visible = false;
                //���б�ѹ������
                FrmLayoutSubstationInfo layoutSubstation = new FrmLayoutSubstationInfo();
                layoutSubstation.Biandianzhan();

            } else if (reldialog.DialogResult == DialogResult.Cancel) {
                if (this.Owner != null)
                    this.Visible = false;
            }
        }