Beispiel #1
0
        void createCritRow(string attr, string op, string val)
        {
            _numCriteria++;

            HBox hbox = new HBox(false, 0);

            critVbox.PackStart(hbox, true, true, 0);

            Gtk.Entry attrEntry = new Gtk.Entry();
            attrEntry.Text = attr;
            attrEntry.Show();
            hbox.PackStart(attrEntry, true, true, 5);

            VBox vbox75 = new VBox(false, 0);

            vbox75.Show();
            hbox.PackStart(vbox75, true, true, 5);

            ComboBox critCombo = createCombo(ops);

            comboSetActive(critCombo, ops, op);
            vbox75.PackStart(critCombo, false, true, 16);

            Gtk.Entry valEntry = new Gtk.Entry();
            valEntry.Text = val;
            valEntry.Show();
            hbox.PackStart(valEntry, true, true, 5);

            VBox vbox76 = new VBox(false, 0);

            vbox76.Show();
            hbox.PackStart(vbox76, true, true, 5);

            ComboBox boolCombo = createCombo(boolOps);

            boolCombo.Sensitive = false;
            vbox76.PackStart(boolCombo, false, true, 16);

            if (_numCriteria == 1)
            {
                firstCritCombo          = boolCombo;
                firstCritCombo.Changed += new EventHandler(OnBoolChanged);
            }
            else if (_numCriteria > 1)
            {
                _allCombos.Add(boolCombo);
            }

            SearchCriteria sc = new SearchCriteria(
                hbox, attrEntry, critCombo, valEntry, boolCombo);

            string key = "row" + _numCriteria.ToString();

            _critTable.Add(key, sc);

            if (_numCriteria > 1)
            {
                toggleBoolCombo(_numCriteria);
            }

            critVbox.ShowAll();
        }
Beispiel #2
0
        void createCritRow(string attr, string op, string val)
        {
            _numCriteria++;

            HBox hbox = new HBox (false, 0);
            critVbox.PackStart (hbox, true, true, 0);

            Gtk.Entry attrEntry = new Gtk.Entry ();
            attrEntry.Text = attr;
            attrEntry.Show ();
            hbox.PackStart (attrEntry, true, true, 5);

            VBox vbox75 = new VBox (false, 0);
            vbox75.Show ();
            hbox.PackStart (vbox75, true, true, 5);

            ComboBox critCombo = createCombo (ops);
            comboSetActive (critCombo, ops, op);
            vbox75.PackStart (critCombo, false, true, 16);

            Gtk.Entry valEntry = new Gtk.Entry ();
            valEntry.Text = val;
            valEntry.Show ();
            hbox.PackStart (valEntry, true, true, 5);

            VBox vbox76 = new VBox (false, 0);
            vbox76.Show ();
            hbox.PackStart (vbox76, true, true, 5);

            ComboBox boolCombo = createCombo (boolOps);
            boolCombo.Sensitive = false;
            vbox76.PackStart (boolCombo, false, true, 16);

            if (_numCriteria == 1) {
                firstCritCombo = boolCombo;
                firstCritCombo.Changed += new EventHandler (OnBoolChanged);
            } else if (_numCriteria > 1) {
                _allCombos.Add (boolCombo);
            }

            SearchCriteria sc = new SearchCriteria (
                hbox, attrEntry, critCombo, valEntry, boolCombo);

            string key = "row" + _numCriteria.ToString ();

            _critTable.Add (key, sc);

            if (_numCriteria > 1)
                toggleBoolCombo (_numCriteria);

            critVbox.ShowAll ();
        }