Example #1
0
        public DefineDelform(PSPDEV pspDEV)           //出入图层的SvgUID
        {
            InitializeComponent();
            pspulic = pspDEV;
            string strCon2 = null;
            string strCon1 = ",PSP_ELCDEVICE WHERE PSPDEV.SUID = PSP_ELCDEVICE.DeviceSUID AND PSP_ELCDEVICE.ProjectSUID = '" + pspulic.SvgUID + "'";

            strCon2 = " AND Type = '01'";
            string strCon = strCon1 + strCon2;
            IList  listMX = UCDeviceBase.DataService.GetList("SelectPSPDEVByCondition", strCon);

            strCon2 = " AND Type = '05'";
            strCon  = strCon1 + strCon2;
            IList listXL = UCDeviceBase.DataService.GetList("SelectPSPDEVByCondition", strCon);

            strCon2 = " AND Type = '02'";
            strCon  = strCon1 + strCon2;
            IList listBYQ2 = UCDeviceBase.DataService.GetList("SelectPSPDEVByCondition", strCon);

            strCon2 = " AND Type = '03'";
            strCon  = strCon1 + strCon2;
            IList listBYQ3 = UCDeviceBase.DataService.GetList("SelectPSPDEVByCondition", strCon);

            int linecount = listXL.Count;

            for (int i = 0; i < listXL.Count; i++)
            {
                pspDEV = (PSPDEV)listXL[i];
                if (pspDEV.KSwitchStatus == "0")
                {
                    // psdevclass psd = new psdevclass(pspDEV.Number,pspDEV.FirstNode,pspDEV.LastNode, pspDEV.Name);

                    this.WaitLinelist.Items.Add(new psdevclass(i + 1, pspDEV.FirstNode, pspDEV.LastNode, pspDEV.Type, pspDEV.Name));
                }
            }
            int trans2count = listBYQ2.Count;

            for (int i = 0; i < listBYQ2.Count; i++)
            {
                pspDEV = (PSPDEV)listBYQ2[i];
                psdevclass psd = new psdevclass(linecount + i + 1, pspDEV.FirstNode, pspDEV.LastNode, pspDEV.Type, pspDEV.Name);
                this.WaitLinelist.Items.Add(psd);
            }
            //psp.Lable = "母线节点";
            for (int i = 0; i < listBYQ3.Count; i++)
            {
                pspDEV = (PSPDEV)listBYQ3[i];
                psdevclass psdi = new psdevclass(linecount + trans2count + i + 1, pspDEV.FirstNode, pspDEV.LastNode, pspDEV.Type, pspDEV.Name + "i");
                psdevclass psdj = new psdevclass(linecount + trans2count + i + 2, pspDEV.FirstNode, pspDEV.Flag, pspDEV.Type, pspDEV.Name + "j");
                psdevclass psdk = new psdevclass(linecount + trans2count + i + 3, pspDEV.LastNode, pspDEV.Flag, pspDEV.Type, pspDEV.Name + "k");
                this.WaitLinelist.Items.Add(psdi);
                this.WaitLinelist.Items.Add(psdj);
                this.WaitLinelist.Items.Add(psdk);
            }
            foreach (PSPDEV dev in listMX)
            {
                comboBoxEdit1.Properties.Items.Add(dev.Name);
                //comboBoxEdit2.Properties.Items.Add(dev.Name);
            }
        }
Example #2
0
        //����ͼ���SvgUID
        public DefineDelform(PSPDEV pspDEV)
        {
            InitializeComponent();
            pspulic = pspDEV;
            string strCon2 = null;
            string strCon1 = ",PSP_ELCDEVICE WHERE PSPDEV.SUID = PSP_ELCDEVICE.DeviceSUID AND PSP_ELCDEVICE.ProjectSUID = '" + pspulic.SvgUID + "'";
            strCon2 = " AND Type = '01'";
            string strCon = strCon1 + strCon2;
            IList listMX = UCDeviceBase.DataService.GetList("SelectPSPDEVByCondition", strCon);
            strCon2 = " AND Type = '05'";
            strCon = strCon1 + strCon2;
            IList listXL = UCDeviceBase.DataService.GetList("SelectPSPDEVByCondition", strCon);
            strCon2 = " AND Type = '02'";
            strCon = strCon1 + strCon2;
            IList listBYQ2 = UCDeviceBase.DataService.GetList("SelectPSPDEVByCondition", strCon);
            strCon2 = " AND Type = '03'";
            strCon = strCon1 + strCon2;
            IList listBYQ3 = UCDeviceBase.DataService.GetList("SelectPSPDEVByCondition", strCon);

              int linecount=listXL.Count;
            for (int i = 0; i < listXL.Count; i++)
            {
                pspDEV = (PSPDEV)listXL[i];
                if (pspDEV.KSwitchStatus == "0")
                {

                   // psdevclass psd = new psdevclass(pspDEV.Number,pspDEV.FirstNode,pspDEV.LastNode, pspDEV.Name);

                    this.WaitLinelist.Items.Add(new psdevclass(i+1, pspDEV.FirstNode, pspDEV.LastNode,pspDEV.Type, pspDEV.Name));

                }
            }
            int trans2count=listBYQ2.Count;
            for (int i = 0; i <listBYQ2.Count; i++)
            {
                pspDEV = (PSPDEV)listBYQ2[i];
                psdevclass psd = new psdevclass(linecount+i+1, pspDEV.FirstNode, pspDEV.LastNode,pspDEV.Type, pspDEV.Name);
                this.WaitLinelist.Items.Add(psd);
            }
            //psp.Lable = "ĸ�߽ڵ�";
            for (int i = 0; i < listBYQ3.Count; i++)
            {
                pspDEV = (PSPDEV)listBYQ3[i];
                psdevclass psdi = new psdevclass(linecount+trans2count+i+1, pspDEV.FirstNode, pspDEV.LastNode, pspDEV.Type, pspDEV.Name+"i");
                psdevclass psdj = new psdevclass(linecount + trans2count + i + 2, pspDEV.FirstNode, pspDEV.Flag, pspDEV.Type, pspDEV.Name + "j");
                psdevclass psdk = new psdevclass(linecount + trans2count + i + 3, pspDEV.LastNode, pspDEV.Flag, pspDEV.Type, pspDEV.Name + "k");
                this.WaitLinelist.Items.Add(psdi);
                this.WaitLinelist.Items.Add(psdj);
                this.WaitLinelist.Items.Add(psdk);
            }
            foreach (PSPDEV dev in listMX)
            {
                comboBoxEdit1.Properties.Items.Add(dev.Name);
                //comboBoxEdit2.Properties.Items.Add(dev.Name);
            }
        }
Example #3
0
        private void NodeNumfind_Click(object sender, EventArgs e)
        {
            if (Nodepanel.Visible == false)
            {
                Nodepanel.Visible     = true;
                LineNamepanel.Visible = false;
                return;
            }
            else
            {
                if (Usename == "")
                {
                    MessageBox.Show("请选择母线名!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
                else
                {
                    WaitLinelist.ClearSelected();
                    //int firstnum = Convert.ToInt32(FirstNd.Text);
                    //int lastnum = Convert.ToInt32(LastNode.Text);
                    //pspulic.Type = "Polyline";
                    PSPDEV psp = new PSPDEV();
                    string con = " WHERE Name='" + Usename + "' AND ProjectID = '" + pspulic.ProjectID + "'" + "AND Type='01'";
                    psp = (PSPDEV)UCDeviceBase.DataService.GetObject("SelectPSPDEVByCondition", con);
                    if (psp == null)
                    {
                        MessageBox.Show("你所选的母线不存在!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }
                    bool flag = false;
                    for (int i = 0; i < WaitLinelist.Items.Count; i++)
                    {
                        psdevclass psd = (psdevclass)WaitLinelist.Items[i];
                        if (psp.Number == psd.firstnum || psp.Number == psd.lastnum)
                        {
                            WaitLinelist.SelectedIndex = i;
                            flag = true;
                        }
                    }

                    if (!flag)
                    {
                        MessageBox.Show("没有找到相应的线路,请重新输入或者尝试另外的查询方式!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }
                }
            }
        }
Example #4
0
 private void OKbutn_Click(object sender, EventArgs e)
 {
     if (Selectlinelist.Items.Count == 0)
     {
         MessageBox.Show("请选择要切除的线路再做下面的操作", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     for (int i = 0; i < Selectlinelist.Items.Count; i++)
     {
         psdevclass psd = (psdevclass)Selectlinelist.Items[i];
         if (psd.linetype == "05")
         {
             linenums.Add(psd.line_num);         //将线路的编号线路线路的列表中
         }
         else if (psd.linetype == "02" || psd.linetype == "03")
         {
             transnums.Add(psd.line_num);        //将变压器线路的编号写入变压器的容器中
         }
     }
     linenums.Sort();
     transnums.Sort();
     this.DialogResult = DialogResult.OK;
 }
Example #5
0
        private void NodeName_Click(object sender, EventArgs e)
        {
            if (LineNamepanel.Visible == false)
            {
                Nodepanel.Visible     = false;
                LineNamepanel.Visible = true;
            }
            else
            {
                if (LinenametextBox.Text == "")
                {
                    MessageBox.Show("请输入线路名称!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
                else
                {
                    WaitLinelist.ClearSelected();
                    string linename = LinenametextBox.Text;
                    bool   flag     = false;
                    for (int i = 0; i < WaitLinelist.Items.Count; i++)
                    {
                        psdevclass psd = (psdevclass)WaitLinelist.Items[i];
                        if (psd.linename.Contains(linename))
                        {
                            WaitLinelist.SelectedIndex = i;
                            flag = true;
                        }
                    }

                    if (!flag)
                    {
                        MessageBox.Show("没有找到相应的线路,请重新输入或者尝试另外的查询方式!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }
                }
            }
        }