Beispiel #1
0
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            SelectionItem <StationSummarySheetType> sheetType = (SelectionItem <StationSummarySheetType>)value;

            if (sheetType != null)
            {
                string returnVal = Enum.GetName(typeof(StationSummarySheetType), sheetType.SelectedItem);
                return(returnVal);
            }
            return(null);
        }
        private static IEnumerable <SelectionItem <T> > toSelectionItemEnumerable(IEnumerable <T> items)
        {
            List <SelectionItem <T> > list = new List <SelectionItem <T> >();

            foreach (T item in items)
            {
                SelectionItem <T> selectionItem = new SelectionItem <T>(item);
                list.Add(selectionItem);
            }
            return(list);
        }