コード例 #1
0
ファイル: DefineDelform.cs プロジェクト: github188/myitoppsp
        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();
                    psp.SvgUID = pspulic.SvgUID;
                    psp.Name   = Usename;
                    psp.Type   = "Use";
                    psp        = (PSPDEV)Services.BaseService.GetObject("SelectPSPDEVByName", psp);
                    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;
                    }
                }
            }
        }
コード例 #2
0
ファイル: DefineDelform.cs プロジェクト: github188/myitoppsp
        public DefineDelform(PSPDEV pspDEV)           //出入图层的SvgUID
        {
            InitializeComponent();
            pspulic     = pspDEV;
            pspDEV.Type = "Polyline";
            // pspDev.SvgUID = tlVectorControl1.SVGDocument.SvgdataUid;
            IList list1 = Services.BaseService.GetList("SelectPSPDEVBySvgUIDAndType", pspDEV);

            // int j = 0;
            for (int i = 0; i < list1.Count; i++)
            {
                pspDEV = (PSPDEV)list1[i];
                if (pspDEV.LineStatus != "断开")
                {
                    // psdevclass psd = new psdevclass(pspDEV.Number,pspDEV.FirstNode,pspDEV.LastNode, pspDEV.Name);

                    this.WaitLinelist.Items.Add(new psdevclass(pspDEV.Number, pspDEV.FirstNode, pspDEV.LastNode, pspDEV.Type, pspDEV.Name));
                }
            }
            pspDEV.Type = "TransformLine";
            IList list2 = Services.BaseService.GetList("SelectPSPDEVBySvgUIDAndType", pspDEV);

            for (int i = 0; i < list2.Count; i++)
            {
                pspDEV = (PSPDEV)list2[i];
                psdevclass psd = new psdevclass(pspDEV.Number, pspDEV.FirstNode, pspDEV.LastNode, pspDEV.Type, pspDEV.Name);
                this.WaitLinelist.Items.Add(psd);
            }
            //psp.Lable = "母线节点";
            pspDEV.Type = "Use";
            IList list = Services.BaseService.GetList("SelectPSPDEVBySvgUIDAndType", pspDEV);

            foreach (PSPDEV dev in list)
            {
                comboBoxEdit1.Properties.Items.Add(dev.Name);
                //comboBoxEdit2.Properties.Items.Add(dev.Name);
            }
        }
コード例 #3
0
ファイル: DefineDelform.cs プロジェクト: github188/myitoppsp
 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 == "Polyline")
         {
             linenums.Add(psd.line_num);         //将线路的编号线路线路的列表中
         }
         else if (psd.linetype == "TransformLine")
         {
             transnums.Add(psd.line_num);        //将变压器线路的编号写入变压器的容器中
         }
     }
     linenums.Sort();
     transnums.Sort();
     this.DialogResult = DialogResult.OK;
 }
コード例 #4
0
ファイル: DefineDelform.cs プロジェクト: EdgarEDT/myitoppsp
        //����ͼ���SvgUID
        public DefineDelform(PSPDEV pspDEV)
        {
            InitializeComponent();
            pspulic = pspDEV;
            pspDEV.Type = "Polyline";
               // pspDev.SvgUID = tlVectorControl1.SVGDocument.SvgdataUid;
            IList list1 = Services.BaseService.GetList("SelectPSPDEVBySvgUIDAndType", pspDEV);
               // int j = 0;
            for (int i = 0; i < list1.Count;i++ )
            {
                pspDEV = (PSPDEV)list1[i];
                if (pspDEV.LineStatus != "�Ͽ�")
                {

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

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

                }
            }
            pspDEV.Type = "TransformLine";
            IList list2 = Services.BaseService.GetList("SelectPSPDEVBySvgUIDAndType", pspDEV);
            for (int i = 0; i <list2.Count; i++)
            {
                pspDEV = (PSPDEV)list2[i];
                psdevclass psd = new psdevclass(pspDEV.Number, pspDEV.FirstNode, pspDEV.LastNode,pspDEV.Type, pspDEV.Name);
                this.WaitLinelist.Items.Add(psd);
            }
            //psp.Lable = "ĸ�߽ڵ�";
            pspDEV.Type = "Use";
            IList list = Services.BaseService.GetList("SelectPSPDEVBySvgUIDAndType", pspDEV);
            foreach (PSPDEV dev in list)
            {
                comboBoxEdit1.Properties.Items.Add(dev.Name);
                //comboBoxEdit2.Properties.Items.Add(dev.Name);
            }
        }
コード例 #5
0
ファイル: DefineDelform.cs プロジェクト: github188/myitoppsp
        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;
                    }
                }
            }
        }