Example #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 = ChildenWindow.GetDistinctName(frm.m_SelTable.Name, (CWindowControlMgr)WindowControl.m_ObjectMgr);


            WindowControl.TableInWindowControlMgr.RemoveAll();
            string sText = string.Format("[{0}]", frm2.m_SelColumn.Code);
            CTableInWindowControl tiwc = new CTableInWindowControl();

            tiwc.Ctx                 = Program.Ctx;
            tiwc.FW_Table_id         = frm.m_SelTable.Id;
            tiwc.UI_WindowControl_id = WindowControl.Id;
            tiwc.Text                = sText;
            WindowControl.TableInWindowControlMgr.AddNew(tiwc);

            CaptionText = sCtrlName;
        }
 private void tbtNew_Click(object sender, EventArgs e)
 {
     if (m_child == null || m_child.IsDisposed)
     {
         m_child = new ChildenWindow();
     }
     m_child.Window = Window;
     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();
 }