Exemple #1
0
        private void btnLine_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            MPPO.UI.ConfigForm.DrawDataChooseForm configform             = new ConfigForm.DrawDataChooseForm();
            List <MPPO.Protocol.Interface.IMdiDataForm <DataRow> > forms = new List <MPPO.Protocol.Interface.IMdiDataForm <DataRow> >();

            MPPO.Protocol.Interface.IMdiDataForm <DataRow> form;
            int i;

            for (i = 0; i < this.MdiChildren.Length; ++i)
            {
                if ((form = this.MdiChildren[i] as MPPO.Protocol.Interface.IMdiDataForm <DataRow>) != null)
                {
                    forms.Add(form);
                }
            }
            configform.Init(forms);
            if (configform.ShowDialog() == DialogResult.OK)
            {
                MPPO.UI.MdiForm.MdiDataGraphForm targetform = new MdiForm.MdiDataGraphForm();
                targetform.MdiParent = this;
                targetform.MdiIndex  = this.DataFormIndex++;
                var resultlist = configform.GetCheckedList();
                for (i = 0; i < resultlist.Count; ++i)
                {
                    targetform.AddData(resultlist[i]);
                }
                targetform.Caption = "";
                targetform.Show();
            }
        }
 private void btnLine_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     MPPO.UI.ConfigForm.DrawDataChooseForm configform = new ConfigForm.DrawDataChooseForm();
     List<MPPO.Protocol.Interface.IMdiDataForm<DataRow>> forms = new List<MPPO.Protocol.Interface.IMdiDataForm<DataRow>>();
     MPPO.Protocol.Interface.IMdiDataForm<DataRow> form;
     int i;
     for(i = 0;i< this.MdiChildren.Length; ++i)
     {
         if((form = this.MdiChildren[i] as MPPO.Protocol.Interface.IMdiDataForm<DataRow>)!= null)
             forms.Add(form);
     }
     configform.Init(forms);
     if (configform.ShowDialog() == DialogResult.OK)
     {
         MPPO.UI.MdiForm.MdiDataGraphForm targetform = new MdiForm.MdiDataGraphForm();
         targetform.MdiParent = this;
         targetform.MdiIndex = this.DataFormIndex++;
         var resultlist = configform.GetCheckedList();
         for (i = 0; i < resultlist.Count; ++i)
         {
             targetform.AddData(resultlist[i]);
         }
         targetform.Caption = "";
         targetform.Show();
     }
 }