GenericWindow.showWidgetsPowerful C# (CSharp) Method

showWidgetsPowerful() public method

public showWidgetsPowerful ( ArrayList widgetArray ) : void
widgetArray ArrayList
return void
    void showWidgetsPowerful(ArrayList widgetArray)
    {
        Constants.GenericWindowShow stuff = (Constants.GenericWindowShow) widgetArray[0];
        bool editable = (bool) widgetArray[1];
        string text = (string) widgetArray[2];

        if(stuff == Constants.GenericWindowShow.ENTRY) {
            entry.Show();
            entry.IsEditable = editable;
            entry.Sensitive = editable;
            entry.Text = text;
        }
        else if(stuff == Constants.GenericWindowShow.ENTRY2) {
            hbox_entry2.Show();
            entry2.IsEditable = editable;
            entry2.Sensitive = editable;
            entry2.Text = text;
        }
        else if(stuff == Constants.GenericWindowShow.ENTRY3) {
            hbox_entry3.Show();
            entry3.IsEditable = editable;
            entry3.Sensitive = editable;
            entry3.Text = text;
        }
        else if(stuff == Constants.GenericWindowShow.SPININT) {
            hbox_spin_int.Show();
            spin_int.IsEditable = editable;
            spin_int.Sensitive = editable;
        }
        else if(stuff == Constants.GenericWindowShow.SPINDOUBLE) {
            spin_double.Show();
            spin_double.IsEditable = editable;
        }
        else if(stuff == Constants.GenericWindowShow.HBOXSPINDOUBLE2) {
            hbox_spin_double2.Show();
            spin_double2.IsEditable = editable;
            spin_double2.Sensitive = editable;
        }
        else if(stuff == Constants.GenericWindowShow.SPININT2) {
            hbox_spin_int2.Show();
            spin_int2.IsEditable = editable;
        }
        else if(stuff == Constants.GenericWindowShow.SPININT3) {
            hbox_spin_int3.Show();
            spin_int3.IsEditable = editable;
        }
        else if(stuff == Constants.GenericWindowShow.HEIGHTMETRIC) {
            hbox_height_metric.Show();
        }
        else if(stuff == Constants.GenericWindowShow.COMBO) {
            /*
            hbox_combo.Show();
            combo.Show();
            */
        }
        else if(stuff == Constants.GenericWindowShow.COMBOALLNONESELECTED) {
            //createComboCheckBoxes();
            //combo_all_none_selected.Active =
            //	UtilGtk.ComboMakeActive(comboCheckBoxesOptions, Catalog.GetString("Selected"));
            hbox_combo_all_none_selected.Show();
            hbox_all_none_selected.Show();
        }
        else if(stuff == Constants.GenericWindowShow.BUTTONMIDDLE) {
            hbuttonbox_middle.Show();
        }
        else if(stuff == Constants.GenericWindowShow.TEXTVIEW) {
            scrolled_window_textview.Show();
        }
        else { //if(stuff == Constants.GenericWindowShow.TREEVIEW)
            scrolled_window_treeview.Show();
        }
    }

Usage Example

示例#1
0
    //for an array of widgets
    static public GenericWindow Show(string title, bool showNow, string textHeader, ArrayList array)
    {
        if (GenericWindowBox == null)
        {
            GenericWindowBox = new GenericWindow(title, textHeader);
        }
        else
        {
            GenericWindowBox.setTitle(title);
            GenericWindowBox.label_header.Text = textHeader;
        }

        GenericWindowBox.Type = Types.UNDEFINED;

        GenericWindowBox.hideWidgets();

        foreach (ArrayList widgetArray in array)
        {
            GenericWindowBox.showWidgetsPowerful(widgetArray);
        }

        Pixbuf pixbuf = new Pixbuf(null, Util.GetImagePath(false) + "stock_delete.png");

        GenericWindowBox.image_delete.Pixbuf = pixbuf;

        if (showNow)
        {
            GenericWindowBox.generic_window.Show();
        }

        return(GenericWindowBox);
    }
All Usage Examples Of GenericWindow::showWidgetsPowerful