コード例 #1
0
        public Dictionary <string, IUIItem> CreateComboBoxDictionary(UIItemCollection items)
        {
            List <IUIItem> comboBoxes = items.Where(x => x.GetType() == typeof(WinFormComboBox) || x.GetType() == typeof(ComboBox)).ToList();
            Dictionary <string, IUIItem> ComboBoxesDictionary = new Dictionary <string, IUIItem>();

            foreach (IUIItem x in comboBoxes)
            {
                ComboBoxesDictionary.Add(x.Id, x);
            }
            return(ComboBoxesDictionary);
        }
コード例 #2
0
        public Dictionary <string, IUIItem> CreateDatePickerDictionary(UIItemCollection items)
        {
            List <IUIItem> datePicker = items.Where(x => x.GetType() == typeof(DateTimePicker)).ToList();
            Dictionary <string, IUIItem> DatePickerDictionary = new Dictionary <string, IUIItem>();

            foreach (IUIItem x in datePicker)
            {
                DatePickerDictionary.Add(x.Id, x);
            }
            return(DatePickerDictionary);
        }
コード例 #3
0
        public Dictionary <string, IUIItem> CreateTextBoxDictionary(UIItemCollection items)
        {
            List <IUIItem> textBoxes = items.Where(x => x.GetType() == typeof(WinFormTextBox) || x.GetType() == typeof(TextBox)).ToList();
            Dictionary <string, IUIItem> TextBoxes = new Dictionary <string, IUIItem>();

            foreach (IUIItem x in textBoxes)
            {
                TextBoxes.Add(x.Id, x);
            }
            return(TextBoxes);
        }