/// ------------------------------------------------------------------------------------ /// <summary> /// Loads a table with the properties found in the CmObject class. /// </summary> /// ------------------------------------------------------------------------------------ private static void LoadCmObjectProperties() { FDOClass clsProps = GetFDOClassProperties("CmObject"); s_cmObjectProperties = new List <string>(); foreach (FDOClassProperty prop in clsProps.Properties) { s_cmObjectProperties.Add(prop.Name); } s_cmObjectProperties.Sort((x, y) => x.CompareTo(y)); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Clones this instance. /// </summary> /// ------------------------------------------------------------------------------------ public FDOClass Clone() { // Make copies of all the class' properties. List <FDOClassProperty> props = new List <FDOClassProperty>(); foreach (FDOClassProperty clsProp in Properties) { props.Add(new FDOClassProperty { Name = clsProp.Name, Displayed = clsProp.Displayed }); } FDOClass cls = new FDOClass(m_classType); cls.Properties = props; return(cls); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Handles the SelectionChangeCommitted event of the cboClass control. /// </summary> /// ------------------------------------------------------------------------------------ private void cboClass_SelectionChangeCommitted(object sender, EventArgs e) { FDOClass clsProps = cboClass.SelectedItem as FDOClass; lblMsg.Text = string.Format(m_fmtMsg, clsProps.ClassName); gridProperties.CellValueChanged -= gridProperties_CellValueChanged; gridProperties.Rows.Clear(); foreach (FDOClassProperty prop in clsProps.Properties) { bool fIsDisplayedCmObjProp = (m_showCmObjProps || !FDOClassList.IsCmObjectProperty(prop.Name)); int i = gridProperties.Rows.Add(prop.Displayed && fIsDisplayedCmObjProp, prop.Name, prop); gridProperties.Rows[i].ReadOnly = !fIsDisplayedCmObjProp; } gridProperties.CellValueChanged += gridProperties_CellValueChanged; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Clones this instance. /// </summary> /// ------------------------------------------------------------------------------------ public FDOClass Clone() { // Make copies of all the class' properties. List<FDOClassProperty> props = new List<FDOClassProperty>(); foreach (FDOClassProperty clsProp in Properties) props.Add(new FDOClassProperty { Name = clsProp.Name, Displayed = clsProp.Displayed }); FDOClass cls = new FDOClass(m_classType); cls.Properties = props; return cls; }