Ejemplo n.º 1
0
        //-----------------------------------------------------------------------
        public static bool EditeSmartFieldAndCommit(CSmartField field)
        {
            CFormEditeSmartField form = new CFormEditeSmartField();

            form.m_smartField = field;
            bool bResult = form.ShowDialog() == DialogResult.OK;

            form.Dispose();
            return(bResult);
        }
Ejemplo n.º 2
0
        //-----------------------------------------------------------------------
        private static void itemCreateSmartField_Click(object sender, EventArgs e)
        {
            ToolStripMenuItem item = sender as ToolStripMenuItem;
            CTagMenu          tag  = item != null ? item.Tag as CTagMenu : null;

            if (tag != null)
            {
                CSmartField smartField = new CSmartField(CSc2iWin32DataClient.ContexteCourant);
                smartField.CreateNew();
                smartField.TypeCible  = tag.TypeSource;
                smartField.Definition = tag.DefProp;
                CFormEditeSmartField.EditeSmartFieldAndCommit(smartField);
            }
        }
Ejemplo n.º 3
0
        //-----------------------------------------------------------------------
        private static void itemEditSmartField_Click(object sender, EventArgs e)
        {
            ToolStripMenuItem item = sender as ToolStripMenuItem;
            CTagMenu          tag  = item != null ? item.Tag as CTagMenu : null;

            if (tag != null && tag.SmartField != null)
            {
                CSmartField smartField = tag.SmartField.GetObjetInContexte(CSc2iWin32DataClient.ContexteCourant) as CSmartField;
                smartField.BeginEdit();
                if (smartField != null)
                {
                    CFormEditeSmartField.EditeSmartFieldAndCommit(smartField);
                }
            }
        }