コード例 #1
0
        /// <summary>
        /// Populates the combo box.
        /// </summary>
        private void PopulateComboBox()
        {
            ColumnComboBox.RemoveAll();
            ColumnComboBox.UsesDataSource = true;
            ColumnComboBox.Completes      = false;
            ColumnComboBox.DataSource     = new ColumnsDataSource();

            OperatorComboBox.RemoveAll();
            OperatorComboBox.UsesDataSource = true;
            OperatorComboBox.Completes      = false;
            OperatorComboBox.DataSource     = new OperatorsDataSource();
        }
コード例 #2
0
        void ColumnComboBox_SelectionChanged(object sender, EventArgs e)
        {
            var rowId = ((int)ColumnComboBox.SelectedIndex);

            if (rowId > -1)
            {
                FilterColumn column         = new FilterColumn();
                var          selColumnValue = ColumnComboBox.SelectedValue as NSString;
                var          col            = (FilterColumn)column.GetByDescription(selColumnValue.ToString());
                var          operators      = GetDataSource(col);
                var          ops            = operators.Select(x => NSObject.FromObject(x)).ToArray();
                OperatorComboBox.StringValue = (NSString)string.Empty;
                OperatorComboBox.RemoveAll();
                OperatorComboBox.Add(ops);
                SetAddButtonStatus();
                SetUpdateButtonStatus();
            }
        }