Пример #1
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();
            }
        }
Пример #2
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); }
        }