Exemplo n.º 1
0
        private void barButtonItem3_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            GridColumn gc = this.ctrlSubstation_Info1.GridView.FocusedColumn;

            if (gc == null)
            {
                return;
            }

            if (gc.FieldName.Substring(0, 1) != "S")
            {
                return;
            }

            FrmNewClass frm = new FrmNewClass();

            frm.ClassName = gc.Caption;
            frm.ClassType = gc.FieldName;
            frm.Type      = type;
            frm.Flag      = flag;
            frm.Type2     = "SubstationGuiHua";
            frm.IsUpdate  = true;

            if (frm.ShowDialog() == DialogResult.OK)
            {
                //gc.Caption = frm.ClassName;
                InitValues();
            }
        }
Exemplo n.º 2
0
        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                FrmNewClass frm = new FrmNewClass();
                frm.Type  = type;
                frm.Flag  = flag;
                frm.Type2 = "SubstationGuiHua";



                if (frm.ShowDialog() == DialogResult.OK)
                {
                    InitValues();
                }

                //if (frm.ShowDialog() == DialogResult.OK)
                //{
                //    foreach (GridColumn gc in this.ctrlSubstation_Info1.GridView.Columns)
                //    {
                //        if (gc.FieldName == frm.ClassType)
                //        {
                //            gc.Caption = frm.ClassName;
                //            gc.Visible = true;
                //            gc.OptionsColumn.ShowInCustomizationForm = true;
                //        }
                //    }
                //}
            }
            catch (Exception ex) { MsgBox.Show(ex.Message); }
        }
Exemplo n.º 3
0
        private void barAdd1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                FrmNewClass frm = new FrmNewClass();
                frm.Type  = type;
                frm.Flag  = flag;
                frm.Type2 = "Substation";



                if (frm.ShowDialog() == DialogResult.OK)
                {
                    InitValues();
                }

                //if (frm.ShowDialog() == DialogResult.OK)
                //{
                //    foreach(GridColumn gc in this.ctrlSubstation_Info_LangFang1.GridView.Columns)
                //    {
                //        if (gc.FieldName == frm.ClassType)
                //        {
                //            gc.Caption = frm.ClassName;
                //            gc.Visible = true;
                //            gc.OptionsColumn.ShowInCustomizationForm = true;
                //        }
                //    }



                //if (gc.Columns[0].FieldName.Substring(0, 1) == "S")
                //{
                //    gc.Visible = false;
                //    foreach (PowerSubstationLine pss in li)
                //    {

                //        if (gc.Columns[0].FieldName == pss.ClassType)
                //        {
                //            gc.Visible = true;
                //            gc.Caption = pss.Title;
                //            gc.Columns[0].Caption = pss.Title;
                //            gc.Columns[0].Visible = true;
                //            gc.Columns[0].OptionsColumn.ShowInCustomizationForm = true;

                //        }
                //    }
                //}
                //}
            }
            catch (Exception ex) { MsgBox.Show(ex.Message); }
        }
Exemplo n.º 4
0
        private void barAdd1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                FrmNewClass frm = new FrmNewClass();
                frm.Type = type;
                frm.Flag = flag;
                frm.Type2 = "Substation";

                if (frm.ShowDialog() == DialogResult.OK)
                {
                    InitValues();
                }

                //if (frm.ShowDialog() == DialogResult.OK)
                //{
                //    foreach(GridColumn gc in this.ctrlSubstation_Info1.GridView.Columns)
                //    {
                //        if (gc.FieldName == frm.ClassType)
                //        {
                //            gc.Caption = frm.ClassName;
                //            gc.Visible = true;
                //            gc.OptionsColumn.ShowInCustomizationForm = true;
                //        }
                //    }

                    //if (gc.Columns[0].FieldName.Substring(0, 1) == "S")
                    //{
                    //    gc.Visible = false;
                    //    foreach (PowerSubstationLine pss in li)
                    //    {

                    //        if (gc.Columns[0].FieldName == pss.ClassType)
                    //        {
                    //            gc.Visible = true;
                    //            gc.Caption = pss.Title;
                    //            gc.Columns[0].Caption = pss.Title;
                    //            gc.Columns[0].Visible = true;
                    //            gc.Columns[0].OptionsColumn.ShowInCustomizationForm = true;

                    //        }
                    //    }
                    //}
                //}

            }
            catch (Exception ex) { MsgBox.Show(ex.Message); }
        }
Exemplo n.º 5
0
        private void barButtonItem3_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            GridColumn gc = this.ctrlSubstation_Info1.GridView.FocusedColumn;
            if (gc == null)
                return;

            if (gc.FieldName.Substring(0, 1) != "S")
                return;

            FrmNewClass frm = new FrmNewClass();
            frm.ClassName = gc.Caption;
            frm.ClassType = gc.FieldName;
            frm.Type = type;
            frm.Flag = flag;
            frm.Type2 = "SubstationGuiHua";
            frm.IsUpdate = true;

            if (frm.ShowDialog() == DialogResult.OK)
            {
                //gc.Caption = frm.ClassName;
                InitValues();
            }
        }
Exemplo n.º 6
0
        private void barButtonItem4_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            GridColumn gc = this.ctrlLine_Info1.GridView.FocusedColumn;
            if (gc == null)
                return;

            if (gc.FieldName.Substring(0, 1) != "S")
                return;

            FrmNewClass frm = new FrmNewClass();
            frm.ClassName = gc.Caption;
            frm.ClassType = gc.FieldName;
            frm.Type = type;
            frm.Flag = flag;
            frm.Type2 = type2;
            if (leixing != "����")
            {
                LayoutList ll = this.ctrlLayoutList1.FocusedObject;
                if (ll == null)
                    return;

                frm.Type = ll.UID; ;
            }
            frm.IsUpdate = true;

            if (frm.ShowDialog() == DialogResult.OK)
            {
                InitVisuble();
            }
        }
Exemplo n.º 7
0
        private void barButtonItem3_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                FrmNewClass frm = new FrmNewClass();
                frm.Type = type;
                frm.Flag = flag;
                frm.Type2 = type2;
                if (leixing != "����")
                {
                    LayoutList ll = this.ctrlLayoutList1.FocusedObject;
                    if (ll == null)
                        return;
                    //frm.Flag = ll.UID;
                    frm.Type=ll.UID; ;
                }
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    InitVisuble();
                    SaveLayoutToXml();
                }

            }
            catch (Exception ex) { MsgBox.Show(ex.Message); }
        }
Exemplo n.º 8
0
        private void barAdd1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                FrmNewClass frm = new FrmNewClass();
                frm.Type = type;
                frm.Flag = flag;
                frm.Type2 = type2;

                if (frm.ShowDialog() == DialogResult.OK)
                {
                    //foreach (GridColumn gc in this.ctrlLine_Info1.GridView.Columns)
                    //{
                    //    if (gc.FieldName == frm.ClassType)
                    //    {
                    //        gc.Caption = frm.ClassName;
                    //        gc.Visible = true;
                    //        gc.OptionsColumn.ShowInCustomizationForm = true;
                    //    }
                    //}
                    InitVisuble();
                }

            }
            catch (Exception ex) { MsgBox.Show(ex.Message); }
        }
Exemplo n.º 9
0
        private void barButtonItem3_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                FrmNewClass frm = new FrmNewClass();
                frm.Type = type;
                frm.Flag = flag;
                frm.Type2 = type2;

                if (frm.ShowDialog() == DialogResult.OK)
                {
                    InitVisuble();
                }

            }
            catch (Exception ex) { MsgBox.Show(ex.Message); }
        }