public static string GridColumnPrompt(IAttributesItem item) { if (item is AttributeElement) return GridAttributePrompt((AttributeElement)item); if (item is VariableElement) return GridVariablePrompt((VariableElement)item); throw new TemplateException("Unexpected attributes item: not an attribute or variable"); }
private static void GetControlInfo(IAttributesItem item, Dictionary<string, object> properties) { ITypedObject typeInfo = item.TypeInfo; if (typeInfo != null && typeInfo is Artech.Common.Properties.PropertiesObject) { Artech.Common.Properties.PropertiesObject props = (Artech.Common.Properties.PropertiesObject)typeInfo; int controlType = props.GetPropertyValue<int>(Properties.ATT.ControlType); int editSuggest = props.GetPropertyValue<int>(Properties.ATT.Suggest); int editInputType = props.GetPropertyValue<int>(Properties.ATT.InputType); if ((controlType == Properties.ATT.ControlType_Values.DynamicComboBox) || (controlType == Properties.ATT.ControlType_Values.DynamicListBox) || (controlType == Properties.ATT.ControlType_Values.Edit && (editInputType == Properties.ATT.InputType_Values.Descriptions || editSuggest != Properties.ATT.Suggest_Values.No))) { properties[Properties.ATT.ControlType] = Properties.ATT.ControlType_Values.Edit; properties[Properties.ATT.InputType] = Properties.ATT.InputType_Values.Values; } } }
private static string GetThemeClass(IAttributesItem item, string defaultClass) { if (!String.IsNullOrEmpty(item.ThemeClass)) return item.ThemeClass; if (!String.IsNullOrEmpty(defaultClass)) return defaultClass; return null; }
public static void GetControlInfo(IAttributesItem item, Dictionary<string, object> properties, bool AllCombo) { GetControlInfo(item, properties, AllCombo,false); }
public static string Item(IAttributesItem item) { if (item is AttributeElement) return Attribute((AttributeElement)item); if (item is VariableElement) return Variable((VariableElement)item); throw new TemplateException("Unexpected attributes item: not an attribute or variable"); }
internal static void GetControlSize(IAttributesItem item, Dictionary<string, object> properties) { GetControlSize(item.InGrid, item.Width, item.Height, properties); }
private static string GridColumnPrompt(IAttributesItem item) { return GridColumnPrompt(item, true); }
private static string GridColumnBC(IAttributesItem item) { if (item is AttributeElement) { return GridVariableBC((AttributeElement)item); } if (item is VariableElement) return GridVariable((VariableElement)item); throw new TemplateException("Unexpected attributes item: not an attribute or variable"); }
private static void GetControlInfo(IAttributesItem item, Dictionary<string, object> properties,bool AllCombo,bool EhGrid) { GetControlSize(item, properties); ITypedObject typeInfo = item.TypeInfo; if (typeInfo != null && typeInfo is Artech.Common.Properties.PropertiesObject) { Artech.Common.Properties.PropertiesObject props = (Artech.Common.Properties.PropertiesObject)typeInfo; int controlType = props.GetPropertyValue<int>(Properties.ATT.ControlType); int editSuggest = props.GetPropertyValue<int>(Properties.ATT.Suggest); int editInputType = props.GetPropertyValue<int>(Properties.ATT.InputType); if ((controlType == Properties.ATT.ControlType_Values.DynamicComboBox) || (controlType == Properties.ATT.ControlType_Values.DynamicListBox) || (controlType == Properties.ATT.ControlType_Values.Edit && (editInputType == Properties.ATT.InputType_Values.Descriptions || editSuggest != Properties.ATT.Suggest_Values.No))) { properties[Properties.ATT.ControlType] = Properties.ATT.ControlType_Values.Edit; properties[Properties.ATT.InputType] = Properties.ATT.InputType_Values.Values; } else { if (EhGrid) { if (sett.Grid.ChangeRadioTocombo) { if (controlType == Properties.ATT.ControlType_Values.RadioButton) { controlType = Properties.ATT.ControlType_Values.ComboBox; } } } if (controlType == Properties.ATT.ControlType_Values.CheckBox || controlType == Properties.ATT.ControlType_Values.ComboBox || controlType == Properties.ATT.ControlType_Values.RadioButton || controlType == Properties.ATT.ControlType_Values.ListBox) { properties[Properties.ATT.ControlType] = controlType; switch (controlType) { case Properties.ATT.ControlType_Values.CheckBox: string vCT = props.GetPropertyValue<string>(Properties.ATT.ControlTitle); if (String.IsNullOrEmpty(vCT)) vCT = String.Empty; properties[Properties.ATT.ControlTitle] = vCT; properties[Properties.ATT.CheckedValue] = props.GetPropertyValue<string>(Properties.ATT.CheckedValue); properties[Properties.ATT.UncheckedValue] = props.GetPropertyValue<string>(Properties.ATT.UncheckedValue); break; case Properties.ATT.ControlType_Values.RadioButton: properties[Properties.ATT.Values] = GetValues(props.GetPropertyValue<CT_GXTXVAL_type>(Properties.ATT.Values).Data); properties[Properties.ATT.RadioDirection] = props.GetPropertyValue<Int32>(Properties.ATT.RadioDirection); break; default: if (controlType == Properties.ATT.ControlType_Values.ComboBox && AllCombo) { bool number = false; if (typeInfo.Type == eDBType.NUMERIC) number = true; properties[Properties.ATT.Values] = GetValues(props.GetPropertyValue<CT_GXTXVAL_type>(Properties.ATT.Values).Data,true,number); } else { properties[Properties.ATT.Values] = GetValues(props.GetPropertyValue<CT_GXTXVAL_type>(Properties.ATT.Values).Data); } break; } } } } }
private static void GetControlInfo(IAttributesItem item, Dictionary<string, object> properties) { GetControlInfo(item, properties, false,false); }