Esempio n. 1
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);
            }
        }
Esempio n. 2
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);
                }
            }
        }