private void LoadDataSource() { var resourceTypeBindingSource = new BindingSource(); resourceTypeBindingSource.DataSource = DataProviders.GetEnumDictinorary(typeof(ActionType)); cbActionType.DataSource = resourceTypeBindingSource; cbActionType.DisplayMember = "Key"; cbActionType.ValueMember = "Value"; }
private void LoadAllEnumDictionary() { opDictionary = DataProviders.GetEnumDictinorary(typeof(ArithmeticOpType)); foreach (var val in DataProviders.GetEnumDictinorary(typeof(RelationalOpType))) { opDictionary.Add(val.Key, val.Value); } withDictionary = DataProviders.GetEnumDictinorary(typeof(LogicalOpType)); linkTypeDictionary = new Dictionary <string, int>(); linkTypeDictionary.Add("NONE", -1); foreach (var val in DataProviders.GetEnumDictinorary(typeof(LinkType))) { linkTypeDictionary.Add(val.Key, (int)val.Value); } }