コード例 #1
0
        public void OnEdit()
        {
            SelTableForm frm = new SelTableForm();

            if (frm.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            SelColumnForm frm2 = new SelColumnForm();

            frm2.m_Table = frm.m_SelTable;
            if (frm2.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            string sCtrlName = ChildenForm.GetDistinctName(frm.m_SelTable.Name, (CFormControlMgr)FormControl.m_ObjectMgr);


            FormControl.TableInFormControlMgr.RemoveAll();
            string sText             = string.Format("[{0}]", frm2.m_SelColumn.Code);
            CTableInFormControl tiwc = new CTableInFormControl();

            tiwc.Ctx               = Program.Ctx;
            tiwc.FW_Table_id       = frm.m_SelTable.Id;
            tiwc.UI_FormControl_id = FormControl.Id;
            tiwc.Text              = sText;
            FormControl.TableInFormControlMgr.AddNew(tiwc);

            CaptionText = sCtrlName;
        }
コード例 #2
0
 private void tbtNew_Click(object sender, EventArgs e)
 {
     if (m_child == null || m_child.IsDisposed)
     {
         m_child = new ChildenForm();
     }
     m_child.Form = Form;
     m_child.m_AttributeToolWindow = m_AttributeToolWindow;
     m_child.m_ControlToolWindow   = m_ControlToolWindow;
     m_child.MdiParent             = this;
     m_child.Show();
     m_child.Left = 0;
     m_child.Top  = 0;
     m_child.Focus();
 }