public QueryBuilderMatchRow(QueryBuilderModel model) : base()
        {
            this.model = model;

            Spacing = 5;

            fieldBox          = ComboBox.NewText();
            fieldBox.Changed += OnFieldComboBoxChanged;
            PackStart(fieldBox, false, false, 0);
            fieldBox.Show();

            opBox          = ComboBox.NewText();
            opBox.Changed += OnOpComboBoxChanged;
            PackStart(opBox, false, false, 0);
            opBox.Show();

            widgetBox = new VBox();
            widgetBox.Show();
            PackStart(widgetBox, true, true, 0);

            foreach (string fieldName in model)
            {
                fieldBox.AppendText(fieldName);
            }

            Select(0);

            Image imageRemove = new Image("gtk-remove", IconSize.Button);

            buttonRemove = new Button(imageRemove);
            buttonRemove.Show();
            buttonRemove.Clicked += OnButtonRemoveClicked;
            imageRemove.Show();
            PackStart(buttonRemove, false, false, 0);

            Image imageAdd = new Image("gtk-add", IconSize.Button);

            buttonAdd = new Button(imageAdd);
            buttonAdd.Show();
            buttonAdd.Clicked += OnButtonAddClicked;
            imageAdd.Show();
            PackStart(buttonAdd, false, false, 0);

            canDelete = true;
        }
        public QueryBuilder(QueryBuilderModel model)
            : base()
        {
            this.model = model;

            matchesBox = new QueryBuilderMatches(model);
            matchesBox.Spacing = 5;
            matchesBox.Show();

            Alignment matchesAlignment = new Alignment(0.0f, 0.0f, 1.0f, 1.0f);
            matchesAlignment.Show();
            matchesAlignment.SetPadding(10, 10, 10, 10);
            matchesAlignment.Add(matchesBox);

            Frame matchesFrame = new Frame(null);
            matchesFrame.Show();
            matchesFrame.Add(matchesAlignment);

            matchesFrame.LabelWidget = BuildMatchHeader();

            PackStart(matchesFrame, true, true, 0);
            PackStart(BuildLimitFooter(), false, false, 0);
        }
        public QueryBuilder(QueryBuilderModel model) : base()
        {
            this.model = model;

            matchesBox         = new QueryBuilderMatches(model);
            matchesBox.Spacing = 5;
            matchesBox.Show();

            Alignment matchesAlignment = new Alignment(0.0f, 0.0f, 1.0f, 1.0f);

            matchesAlignment.Show();
            matchesAlignment.SetPadding(10, 10, 10, 10);
            matchesAlignment.Add(matchesBox);

            Frame matchesFrame = new Frame(null);

            matchesFrame.Show();
            matchesFrame.Add(matchesAlignment);

            matchesFrame.LabelWidget = BuildMatchHeader();

            PackStart(matchesFrame, true, true, 0);
            PackStart(BuildLimitFooter(), false, false, 0);
        }
 public QueryBuilderMatches(QueryBuilderModel model) : base()
 {
     this.model = model;
     CreateRow(false);
 }
        public QueryBuilderMatchRow(QueryBuilderModel model)
            : base()
        {
            this.model = model;

            Spacing = 5;

            fieldBox = ComboBox.NewText();
            fieldBox.Changed += OnFieldComboBoxChanged;
            PackStart(fieldBox, false, false, 0);
            fieldBox.Show();

            opBox = ComboBox.NewText();
            opBox.Changed += OnOpComboBoxChanged;
            PackStart(opBox, false, false, 0);
            opBox.Show();

            widgetBox = new VBox();
            widgetBox.Show();
            PackStart(widgetBox, true, true, 0);

            foreach(string fieldName in model) {
                fieldBox.AppendText(fieldName);
            }

            Select(0);

            Image imageRemove = new Image("gtk-remove", IconSize.Button);
            buttonRemove = new Button(imageRemove);
            buttonRemove.Show();
            buttonRemove.Clicked += OnButtonRemoveClicked;
            imageRemove.Show();
            PackStart(buttonRemove, false, false, 0);

            Image imageAdd = new Image("gtk-add", IconSize.Button);
            buttonAdd = new Button(imageAdd);
            buttonAdd.Show();
            buttonAdd.Clicked += OnButtonAddClicked;
            imageAdd.Show();
            PackStart(buttonAdd, false, false, 0);

            canDelete = true;
        }
 public QueryBuilderMatches(QueryBuilderModel model)
     : base()
 {
     this.model = model;
     CreateRow(false);
 }