コード例 #1
0
        public void FillComboBox(ComboBox _comboBox, ComboBoxTypes _type)
        {
            if (_comboBox != null)
            {
                if (_comboBox.Items.Count > 0)
                {
                    _comboBox.Items.Clear();
                }

                object[] _Items = null;

                if (_type == ComboBoxTypes.Search)
                {
                    _Items = SearchTypesItmes;
                }
                if (_type == ComboBoxTypes.NameMatch)
                {
                    _Items = NameMatchItems;
                }

                if (_Items != null)
                {
                    foreach (var _item in _Items)
                    {
                        _comboBox.Items.Add(_item);
                    }
                    _comboBox.SelectedIndex = 0;
                }
            }
        }
コード例 #2
0
ファイル: Control.cs プロジェクト: robsonfelix/ExpressCraft
        public static HTMLSelectElement ComboBox(string cn, ComboBoxTypes ct, bool ac = true)
        {
            var combo = new HTMLSelectElement()
            {
                className = cn + BaseClass(true, ac)
            };

            if (ct == ComboBoxTypes.Default)
            {
            }
            return(combo);
        }
コード例 #3
0
ファイル: Control.cs プロジェクト: robsonfelix/ExpressCraft
 public Control(string cn, ComboBoxTypes ct, bool ac = true)
 {
     Content = ComboBox(cn, ct, ac);
 }
コード例 #4
0
ファイル: TextInput.cs プロジェクト: robsonfelix/ExpressCraft
 public TextInput(string cn, ComboBoxTypes ct, bool ac = true) : base(cn, ct, ac)
 {
 }