Example #1
0
        public SmartPlaylistQueryValueEntry() : base()
        {
            combo = ComboBox.NewText();
            combo.WidthRequest = DefaultWidth;

            int count = 0;
            SmartPlaylistSource playlist;

            foreach (Source child in ServiceManager.SourceManager.DefaultSource.Children)
            {
                playlist = child as SmartPlaylistSource;
                if (playlist != null && playlist.DbId != null)
                {
                    if (Editor.CurrentlyEditing == null || (Editor.CurrentlyEditing != playlist && !playlist.DependsOn(Editor.CurrentlyEditing)))
                    {
                        combo.AppendText(playlist.Name);
                        playlist_id_combo_map [(int)playlist.DbId] = count;
                        combo_playlist_id_map [count++]            = (int)playlist.DbId;
                    }
                }
            }

            Add(combo);
            combo.Active = 0;

            combo.Changed += HandleValueChanged;
        }
Example #2
0
        public GtkFeatureWidget(DotNetProject project)
        {
            Spacing = 6;

            versionCombo = Gtk.ComboBox.NewText();
            ReferenceManager refmgr = new ReferenceManager(project);

            foreach (string v in refmgr.SupportedGtkVersions)
            {
                versionCombo.AppendText(v);
            }
            versionCombo.Active = 0;
            refmgr.Dispose();

            // GTK# version selector
            HBox box = new HBox(false, 6);

            Gtk.Label vlab = new Label(GettextCatalog.GetString("Target GTK# version:"));
            box.PackStart(vlab, false, false, 0);
            box.PackStart(versionCombo, false, false, 0);
            box.PackStart(new Label(GettextCatalog.GetString("(or upper)")), false, false, 0);
            PackStart(box, false, false, 0);

            ShowAll();
        }
Example #3
0
        void PopulateBox(ComboBox box, string category, List <Type> types)
        {
            var mapping = Options.CollectionMappings.FirstOrDefault(m => m.Category == category);

            Type current = null;

            if (mapping != null)
            {
                current = GetType(mapping.TypeName);
            }
            if (current == null)
            {
                current = types [0];
            }

            if (!types.Contains(current))
            {
                types.Add(current);
            }

            foreach (var type in types)
            {
                box.AppendText(GetTypeName(type));
            }

            box.Active = types.IndexOf(current);
        }
Example #4
0
        private void OnResetPasswordLoad(object o, EventArgs args)
        {
            DomainController domainController = DomainController.GetDomainController();

            domains = domainController.GetLoggedInDomains();
            if (domains == null)
            {
                this.Respond(ResponseType.DeleteEvent);
                return;
            }
            string defaultDomainID = simws.GetDefaultDomainID();
            int    defaultDomain   = 0;

            for (int x = 0; x < domains.Length; x++)
            {
                domainComboBox.AppendText(domains[x].Name + "-" + domains[x].Host);
                if (defaultDomainID != null && defaultDomainID == domains[x].ID)
                {
                    defaultDomain = x;
                }
            }
            if (domains.Length > 0)
            {
                domainComboBox.Active = defaultDomain;
            }
            oldPassword.Sensitive = newPassword.Sensitive = confirmPassword.Sensitive = savePassword.Sensitive = true;
        }
Example #5
0
        public TasksPanelWidget()
        {
            Build();

            comboPriority = ComboBox.NewText();
            foreach (TaskPriority priority in Enum.GetValues(typeof(TaskPriority)))
            {
                comboPriority.AppendText(Enum.GetName(typeof(TaskPriority), priority));
            }
            comboPriority.Changed += new EventHandler(Validate);
            comboPriority.Show();
            vboxPriority.PackEnd(comboPriority, false, false, 0);

            tokensStore = new ListStore(typeof(string), typeof(int));
            tokensTreeView.AppendColumn(String.Empty, new CellRendererText(), "text", 0);
            tokensTreeView.Selection.Changed += new EventHandler(OnTokenSelectionChanged);
            tokensTreeView.Model              = tokensStore;

            OnTokenSelectionChanged(null, null);

            buttonAdd.Clicked    += new EventHandler(AddToken);
            buttonChange.Clicked += new EventHandler(ChangeToken);
            buttonRemove.Clicked += new EventHandler(RemoveToken);
            entryToken.Changed   += new EventHandler(Validate);
        }
Example #6
0
    protected void OnOK(object sender, EventArgs e)
    {
        // Clear media player list
        for (int j = 0; j != mediaPlayerCombo.Model.IterNChildren();)
        {
            Console.WriteLine("Removing a line");
            mediaPlayerCombo.RemoveText(0);
        }

        // Add media players to list
        for (int i = 0; i < store.IterNChildren(); i++)
        {
            TreeIter iter;
            string   playerValue;
            // Get strings from list
            store.GetIterFromString(out iter, i.ToString());
            playerValue = store.GetValue(iter, 0).ToString();

            // Append strings to combo box
            Console.WriteLine("Adding " + playerValue);
            mediaPlayerCombo.AppendText(playerValue);

            // Select first player in combo box
            TreeIter newSelect;
            mediaPlayerCombo.Model.GetIterFirst(out newSelect);
            mediaPlayerCombo.SetActiveIter(newSelect);
        }
        this.Destroy();
    }
        private void BuildInterface()
        {
            field_chooser          = ComboBox.NewText();
            field_chooser.Changed += HandleFieldChanged;

            op_chooser = ComboBox.NewText();
            op_chooser.RowSeparatorFunc = IsRowSeparator;
            op_chooser.Changed         += HandleOperatorChanged;

            value_box = new HBox();

            remove_button          = new Button(new Image("gtk-remove", IconSize.Button));
            remove_button.Relief   = ReliefStyle.None;
            remove_button.Clicked += OnButtonRemoveClicked;

            add_button          = new Button(new Image("gtk-add", IconSize.Button));
            add_button.Relief   = ReliefStyle.None;
            add_button.Clicked += OnButtonAddClicked;

            button_box = new HBox();
            button_box.PackStart(remove_button, false, false, 0);
            button_box.PackStart(add_button, false, false, 0);

            foreach (QueryField field in sorted_fields)
            {
                field_chooser.AppendText(field.Label);
            }

            Show();
            field_chooser.Active = 0;
        }
Example #8
0
        public ProfileSetupDialog(Gtk.Window parent) : base("Profile Options", parent, DialogFlags.DestroyWithParent, Stock.Cancel, ResponseType.Cancel, Stock.Execute, ResponseType.Accept)
        {
            config = new ProfileConfiguration();
            HBox box = new HBox(false, 6);

            box.PackStart(new Label("Assembly:"), false, false, 0);
            FileChooserButton assembly_button = new FileChooserButton("Select Assembly", FileChooserAction.Open);
            FileFilter        filter          = new FileFilter();

            filter.AddPattern("*.exe");
            assembly_button.Filter            = filter;
            assembly_button.SelectionChanged += delegate
            {
                config.AssemblyPath = assembly_button.Filename;
                SetResponseSensitive(ResponseType.Accept, !String.IsNullOrEmpty(assembly_button.Filename));
            };
            box.PackStart(assembly_button, true, true, 0);
            box.ShowAll();
            VBox.PackStart(box, false, false, 3);
            box = new HBox(false, 6);
            box.PackStart(new Label("Type:"), false, false, 0);
            ComboBox type_combo = ComboBox.NewText();

            type_combo.AppendText("Allocations");
            type_combo.AppendText("Calls/Instrumented");
            type_combo.AppendText("Statistical");
            type_combo.Active   = 2;
            type_combo.Changed += delegate
            {
                config.Mode = (ProfileMode)(1 << type_combo.Active);
            };
            box.PackStart(type_combo, false, false, 0);
            box.ShowAll();
            VBox.PackStart(box, false, false, 3);
            box = new HBox(false, 6);
            CheckButton start_enabled_chkbtn = new CheckButton("Enabled at Startup");

            start_enabled_chkbtn.Active   = true;
            start_enabled_chkbtn.Toggled += delegate
            {
                config.StartEnabled = start_enabled_chkbtn.Active;
            };
            box.PackStart(start_enabled_chkbtn, false, false, 0);
            box.ShowAll();
            VBox.PackStart(box, false, false, 3);
            SetResponseSensitive(ResponseType.Accept, false);
        }
Example #9
0
        public XspOptionsPanelWidget(AspNetAppProjectFlavor project)
        {
            Build();

            XspParameters xPar = project.XspParameters;

            //index should be equivalent to XspSslMode enum
            ((ListStore)sslMode.Model).Clear();
            sslMode.AppendText(GettextCatalog.GetString("None"));
            sslMode.AppendText(GettextCatalog.GetString("Enabled"));
            sslMode.AppendText(GettextCatalog.GetString("Accept Client Certificates"));
            sslMode.AppendText(GettextCatalog.GetString("Require Client Certificates"));

            //index should be equivalent to XspSslProtocol enum
            ((ListStore)sslProtocol.Model).Clear();
            sslProtocol.AppendText(GettextCatalog.GetString("Default"));
#pragma warning disable MD0005
            sslProtocol.AppendText("TLS");
            sslProtocol.AppendText("SSL 2");
            sslProtocol.AppendText("SSL 3");
#pragma warning restore MD0005

            ((ListStore)keyType.Model).Clear();
            keyType.AppendText(GettextCatalog.GetString("None"));
#pragma warning disable MD0005
            keyType.AppendText("Pkcs12");
            keyType.AppendText("PVK");
#pragma warning restore MD0005

            ((ListStore)passwordOptions.Model).Clear();
            passwordOptions.AppendText(GettextCatalog.GetString("None"));
            passwordOptions.AppendText(GettextCatalog.GetString("Ask"));
            passwordOptions.AppendText(GettextCatalog.GetString("Store (insecure)"));

            //load all options
            ipAddress.Text         = xPar.Address;
            portNumber.Value       = xPar.Port;
            verboseCheck.Active    = xPar.Verbose;
            sslMode.Active         = (int)xPar.SslMode;
            sslProtocol.Active     = (int)xPar.SslProtocol;
            keyType.Active         = (int)xPar.KeyType;
            keyLocation.Path       = xPar.PrivateKeyFile;
            certLocation.Path      = xPar.CertificateFile;
            passwordOptions.Active = (int)xPar.PasswordOptions;
            passwordEntry.Text     = xPar.PrivateKeyPassword;
        }
Example #10
0
    //when only one value has to be displayed
    public static void ComboUpdate(ComboBox myCombo, string myData)
    {
        //1stdelete combo values
        comboDelAll(myCombo);

        //2nd put new values
        myCombo.AppendText(myData);
    }
Example #11
0
        void PopulateTargetFrameworks()
        {
            foreach (TargetFramework framework in wizardPage.TargetFrameworks)
            {
                targetFrameworkComboBox.AppendText(framework.GetDisplayName());
            }

            targetFrameworkComboBox.Active = wizardPage.SelectedTargetFrameworkIndex;
        }
Example #12
0
        public void LoadProviderCombo()
        {
            for (int i = 0; i < providers.Length; i++)
            {
                providerCombo.AppendText(providers[i].Name);
            }

            providerCombo.Changed += new EventHandler(OnProviderChanged);
        }
Example #13
0
    private void LoadComboBox(ComboBox cmb, IList <string> names)
    {
        foreach (var c in names)
        {
            cmb.AppendText(c);
        }

        cmb.Active = 0;
    }
Example #14
0
 public static void generirajKategorije(ComboBox cb)
 {
     foreach (var s in Kategorija.kategorije)
     {
         cb.AppendText(s.Naziv);
     }
     cb.Active = 0;
     combo.Add(cb);
 }
 public void Render(HBox browseBtnBox, ComboBox subscribedBox)
 {
     foreach (SubReddit subreddit in subReddits)
     {
         Label labelObj = new Label(subreddit.name);
         subscribedBox.AppendText(subreddit.name);
         GenerateButton(browseBtnBox, labelObj);
     }
 }
Example #16
0
        void PopulateAuthentications()
        {
            foreach (var authentication in wizardPage.SupportedAuthentications)
            {
                authenticationComboBox.AppendText(authentication.Description);
            }

            authenticationComboBox.Active            = wizardPage.SelectedAuthenticationIndex;
            authenticationInformationLabel.LabelProp = wizardPage.SupportedAuthentications [wizardPage.SelectedAuthenticationIndex].Information;
        }
Example #17
0
        private void InitializeWidgets(Dictionary <Type, string> processes)
        {
            // Por defecto tiene un elemento sin texto que mejor eliminamos.
            bitmapProcessCmb.RemoveText(0);

            foreach (string desc in processes.Values)
            {
                bitmapProcessCmb.AppendText(desc);
            }
        }
Example #18
0
        void FillPolicySets()
        {
            loading = true;
            int current = policiesCombo.Active;

            ((ListStore)policiesCombo.Model).Clear();
            policiesCombo.WidthRequest = -1;

            sets.Sort((p1, p2) => p1.Name.CompareTo(p2.Name));

            foreach (PolicySet pset in sets)
            {
                policiesCombo.AppendText(pset.Name ?? "");
            }
            if (current == -1 && sets.Count > 0)
            {
                policiesCombo.Active = 0;
            }
            else if (current >= sets.Count)
            {
                policiesCombo.Active = sets.Count - 1;
            }
            else
            {
                policiesCombo.Active = current;
            }

            if (policiesCombo.SizeRequest().Width < 200)
            {
                policiesCombo.WidthRequest = 200;
            }

            loading = false;

            if (policiesCombo.Active != -1 && sets [policiesCombo.Active] != currentSet)
            {
                currentSet      = sets [policiesCombo.Active];
                editingSet.Name = currentSet.Name;
                editingSet.CopyFrom(currentSet);
            }
            UpdateStatus();
        }
        public WindowOne()
        {
            VBox vb = new VBox();

            Button sendDrink = new Button("Send Drink");

            sendDrink.Clicked += OnSend;
            drink.Changed     += new EventHandler(onDrinkChanged);

            drink.AppendText("Beer");
            drink.AppendText("Red Wine");
            drink.AppendText("White Wine");
            drink.AppendText("Whiskey");

            vb.PackStart(drink, false, false, 1);
            vb.PackStart(sendDrink, false, false, 1);

            w1.Add(vb);
            w1.ShowAll();
        }
Example #20
0
    public static void ComboUpdate(ComboBox myCombo, List <double> list)
    {
        //1stdelete combo values
        comboDelAll(myCombo);

        //2nd put new values
        foreach (double l in list)
        {
            myCombo.AppendText(l.ToString());
        }
    }
Example #21
0
    //more elegant method, with ArrayList
    public static void ComboUpdate(ComboBox myCombo, ArrayList array)
    {
        //1stdelete combo values
        comboDelAll(myCombo);

        //2nd put new values
        foreach (string str in array)
        {
            myCombo.AppendText(str);
        }
    }
Example #22
0
    public static void ComboUpdate(ComboBox myCombo, List <string> list)
    {
        //1stdelete combo values
        comboDelAll(myCombo);

        //2nd put new values
        foreach (string l in list)
        {
            myCombo.AppendText(l);
        }
    }
        public WindowTwo()
        {
            VBox vb = new VBox();

            Button sendCheese = new Button("Send Cheese");

            sendCheese.Clicked += OnSend;
            cheese.Changed     += new EventHandler(onCheeseChanged);

            cheese.AppendText("Gorgonzola");
            cheese.AppendText("Edam");
            cheese.AppendText("Brie");
            cheese.AppendText("Feta");

            vb.PackStart(cheese, false, false, 1);
            vb.PackStart(sendCheese, false, false, 1);

            w2.Add(vb);
            w2.ShowAll();
        }
Example #24
0
        public ComboBoxWidget(string[] entries)
        {
            this.Build();
            foreach (string s in entries)
            {
                combobox.AppendText(s);
            }

            combobox.Changed += delegate {
                OnChanged();
            };
        }
Example #25
0
        // Convenience function to create a combo box holding a number of strings
        private ComboBox CreateComboBox(string [] strings)
        {
            ComboBox combo = ComboBox.NewText();

            foreach (string str in strings)
            {
                combo.AppendText(str);
            }

            combo.Active = 0;
            return(combo);
        }
Example #26
0
        /// <summary>
        /// Adds the methods.
        /// </summary>
        /// <param name="sender">Sender.</param>
        /// <param name="e">E.</param>
        private static void AddMethods(object sender, EventArgs e)
        {
            var name         = classes.ActiveText.ToString();
            var currentClass = assembly.GetType(name);

            Clear(methods);
            Clear(paramethers);
            foreach (var method in currentClass.GetMethods())
            {
                methods.AppendText(method.Name);
            }
        }
Example #27
0
        public QueryLimitBox(QueryOrder [] orders, QueryLimit [] limits) : base()
        {
            this.orders = orders;
            this.limits = limits;

            Spacing = 5;

            enabled_checkbox          = new CheckButton(Catalog.GetString("_Limit to"));
            enabled_checkbox.Toggled += OnEnabledToggled;

            count_spin = new SpinButton(0, double.MaxValue, 1)
            {
                Numeric = true,
                Digits  = 0,
                Value   = 25
            };
            count_spin.SetSizeRequest(60, -1);

            limit_combo = ComboBox.NewText();
            foreach (var limit in limits)
            {
                limit_combo.AppendText(limit.Label);
            }

            order_combo = ComboBox.NewText();
            order_combo.RowSeparatorFunc = IsRowSeparator;
            foreach (var order in orders)
            {
                if (order == null)
                {
                    order_combo.AppendText(string.Empty);
                }
                else
                {
                    order_combo.AppendText(order.Label);
                }
            }

            PackStart(enabled_checkbox, false, false, 0);
            PackStart(count_spin, false, false, 0);
            PackStart(limit_combo, false, false, 0);
            PackStart(new Label(Catalog.GetString("selected by")), false, false, 0);
            PackStart(order_combo, false, false, 0);

            enabled_checkbox.Active = false;
            limit_combo.Active      = 0;
            order_combo.Active      = 0;

            OnEnabledToggled(null, null);

            ShowAll();
        }
Example #28
0
        /// <summary>
        /// Adds the paramethers.
        /// </summary>
        /// <param name="sender">Sender.</param>
        /// <param name="e">E.</param>
        private static void AddParamethers(object sender, EventArgs e)
        {
            var currentClassName  = classes.ActiveText.ToString();
            var currentClass      = assembly.GetType(currentClassName);
            var currentMethodName = methods.ActiveText.ToString();
            var currentMethod     = currentClass.GetMethod(currentMethodName);

            Clear(paramethers);
            foreach (var paramether in currentMethod.GetParameters())
            {
                paramethers.AppendText(paramether.Name);
            }
        }
Example #29
0
File: Util.cs Project: MrJoe/lat
        public static ComboBox CreateServerCombo()
        {
            ComboBox serverComboBox = ComboBox.NewText();

            foreach (string s in Global.Connections.ConnectionNames)
            {
                serverComboBox.AppendText(s);
            }

            serverComboBox.Active = 0;
            serverComboBox.Show();

            return(serverComboBox);
        }
Example #30
0
        void PopulateCombos()
        {
            for (uint k = 0; k < rolls.Length; k++)
            {
                uint numphotos = rollstore.PhotosInRoll(rolls[k]);
                // Roll time is in UTC always
                var date = rolls[k].Time.ToLocalTime();

                string header = $"{date.ToString ("%dd %MMM, %HH:%mm")} ({numphotos})";

                combo_roll_1.AppendText(header);
                combo_roll_2.AppendText(header);
            }
        }
Example #31
0
    private void PopulateComboBox()
    {
        ComboBox aux = ComboBox.NewText ();
        aux.Changed += ChangeComboBox;
        Box box = (Box) templateComboBox.Parent;
        box.Remove (templateComboBox);
        templateComboBox = aux;
        box.PackEnd (templateComboBox);

        FileInfo[] files = new DirectoryInfo(Defines.TEMPLATES_DATADIR).GetFiles("*.rc");
        foreach (FileInfo fileInfo in files)
        {
            StreamReader sr = fileInfo.OpenText();
            string line;
            string path = "";
            string templateName = "";
            char[] delimiter= {'='};
            while (true) {
                line = sr.ReadLine ();
                if (line == null)
                    break;

                string[] split = line.Split (delimiter);
                if (split[0] == null || split[1] == null)
                    continue;

                switch (split[0].ToUpper()) {
                    case "NAME":
                        templateName = split[1];
                        path = System.IO.Path.ChangeExtension (fileInfo.FullName, "html");
                        break;
                    case "CATALOG":
                        if (catalog.Name.Equals (split[1])) {
                            templateComboBox.AppendText (templateName);
                            templates.Add (templateName, path);
                        }
                        break;
                }
            }
            sr.Close ();
        }
        templateComboBox.Active = 0;
    }
Example #32
0
    //when only one value has to be displayed
    public static void ComboUpdate(ComboBox myCombo, string myData)
    {
        //1stdelete combo values
        comboDelAll(myCombo);

        //2nd put new values
        myCombo.AppendText (myData);
    }
Example #33
0
    //if there's no default value, simply pass a "" and there will be returned a 0, that's the first value of combo
    public static int ComboUpdate(ComboBox myCombo, string [] myData, string strDefault)
    {
        //1stdelete combo values
        comboDelAll(myCombo);

        //2nd put new values
        int i=0;
        int foundValue=0;
        foreach (string str in myData) {
            myCombo.AppendText (str);
            if(str == strDefault)
                foundValue = i;
            i++;
        }
        return foundValue;
    }
Example #34
0
    protected void Populate()
    {
        this.SetDefaultSize(1024,768);
        Window pingpong = new Window(Gtk.WindowType.Toplevel);
        pingpong.SetDefaultSize(500,50);
        pingpong.SetPosition(Gtk.WindowPosition.CenterOnParent);
        pingpong.Title = "Loading...";
        _pulseBar = new ProgressBar();
        pingpong.Add(_pulseBar);
        pingpong.ShowAll();
        pingpong.Show();

        while (_currentStrs == null)
        {
            Application.Invoke( delegate {
                _pulseBar.Pulse();
            });

            Thread.Sleep(100);
        }

        Application.Invoke( delegate {
            pingpong.Destroy();

            this.Remove(_vbox);
            _vbox = new VBox(false, 10);

            MenuBar bar = new MenuBar ();

            Menu fileMenu = new Menu ();
            MenuItem fileMenuItem = new MenuItem ("File");
            fileMenuItem.Submenu = fileMenu;

            MenuItem exit = new MenuItem ("Exit");
            exit.Activated += delegate(object sender, EventArgs e) {
                Application.Quit ();
            };

            MenuItem openFile = new MenuItem ("Open file...");

            openFile.Activated += OpenFile;

            fileMenu.Append (openFile);
            fileMenu.Append (exit);

            bar.Append (fileMenuItem);

            _vbox.PackStart(bar, false, false, 0);

            _regxTitle = ComboBox.NewText();
            _regxTitle.Changed += HandleChanged;

            foreach (KeyValuePair<string, string> pair in _regexes)
                _regxTitle.AppendText(pair.Key);

            _regx = new Entry();
            _regx.IsEditable = false;
            _regx.CanFocus = false;

            HBox comboRegexBox = new HBox(true, 10);
            comboRegexBox.SetSizeRequest(768, 50);

            comboRegexBox.PackStart(_regxTitle, false,false, 0);
            comboRegexBox.PackStart(_regx, true, true, 0);

            Button search = new Button("Search!");
            search.Clicked += HandleClicked;
            comboRegexBox.PackStart(search, false, false, 20);

            _vbox.PackStart(comboRegexBox, true, true, 10);
            ScrolledWindow sw = new ScrolledWindow();
            _tv = new TreeView();
            sw.Add(_tv);

            CellRendererText tsText  = new CellRendererText();
            TreeViewColumn match = new TreeViewColumn();
            match.Title = "Match";
            match.PackStart(tsText, true);
            match.AddAttribute(tsText, "text", 0);

            _tv.AppendColumn(match);

            TreeStore store = new TreeStore(typeof(string));

            foreach (string str in _currentStrs)
                store.AppendValues(str);

            _tv.Model = store;
            sw.SetSizeRequest(768,600);
            _vbox.PackStart(sw, false, false, 0);
            this.Add(_vbox);
            this.ShowAll();
        });
    }
Example #35
0
    public GnomeArtNgApp(string[] args)
    {
        Application.Init();
        //i18n
        Catalog.Init("gnomeartng","./locale");
        config=new CConfiguration();
        //initialize Glade
        string mainW = "MainWindow";
        Glade.XML gxml = new Glade.XML (null, "gui.glade", mainW, null);
        mainWindow = (Gtk.Window) gxml.GetWidget (mainW);
        gxml.Autoconnect (this);

        //Connect all events
        mainWindow.DeleteEvent+=new DeleteEventHandler(OnWindowDeleteEvent);
        ExtInfoPreviewButton.Clicked += new EventHandler(OnPreviewButtonClicked);
        InstallButton.Clicked  += new EventHandler(OnInstallButtonClicked);
        RevertButton.Clicked  += new EventHandler(OnRevertButtonClicked);
        RefreshButton.Clicked += new EventHandler(OnRefreshButtonClicked);
        SaveButton.Clicked  += new EventHandler(OnSaveButtonClicked);
        MainNotebook.SwitchPage += new SwitchPageHandler(OnSwitchPage);
        FilterEntry.Changed += new EventHandler(OnFilterEntriesChanged);
        //		SortKindCb.Changed += new EventHandler(OnSortKindEntryChanged);
        //		SortDirectionCb.Changed += new EventHandler(OnSortDirectionEntryChanged);
        //		SortCloseButton.Clicked += new EventHandler(OnSortCloseClicked);
        FilterEntry.KeyReleaseEvent += new KeyReleaseEventHandler(OnFilterbarKeyReleased);
        FilterCloseButton.Clicked += new EventHandler(OnFilterbarCloseClicked);

        //Menuitems
        QuitMenuItem.Activated += new EventHandler(OnQuitItemSelected);
        UpdateMenuItem.Activated += new EventHandler(OnUpdateItemSelected);
        DonateMenuItem.Activated += new EventHandler(CUpdateWindow.onDonateButtonClicked);
        FilterMenuItem.Activated += new EventHandler(OnFilterItemSelected);
        //		SortMenuItem.Activated += new EventHandler(OnSortItemSelected);
        InfoMenuItem.Activated += new EventHandler(OnInfoItemSelected);
        PreferencesMenuItem.Activated += new EventHandler(OnPreferencesItemSelected);
        FTAItem.Activated += new EventHandler(onFtaItemSelected);

        //First, download all thumbs...but don't bother the user with the update message, even if there is one
        bool RestartApp= false;
        if (config.NeverStartedBefore)
            new CFirstTimeAssistant(config);
        else if (config.DontBotherForUpdates==false) {
            if (config.UpdateAvailable) {
                Console.WriteLine("An update is available, newest version is: "+config.NewestVersionNumberOnServer);
                RestartApp = ShowUpdateWindow();
            }
        }

        if (!RestartApp) {
            //Application placement - doesn't work properly with compiz (is it the window placement plugin?)
            if (config.SettingsLoadOk) {
                mainWindow.Resize(config.Window.Width, config.Window.Height);
                mainWindow.Move(config.Window.X, config.Window.Y);
                //Console.WriteLine(config.Window.X+" "+ config.Window.Y);
            }

            //ArtManager erzeugen
            man = new CArtManager(config);

            //Stores anlegen und IconViews anlegen
            for(int i=0;i<ListStoreCount;i++){
                sWins[i] = (Gtk.ScrolledWindow)(gxml.GetWidget("swin"+i));
                stores[i]= new ListStore (typeof(Pixbuf),typeof (string), typeof (string), typeof(int));
                IconViews[i] = new Gtk.IconView(stores[i]);
                IconViews[i].SelectionChanged += new System.EventHandler(OnSelChanged);
                IconViews[i].ItemActivated += new ItemActivatedHandler(OnItemActivated);
                IconViews[i].PixbufColumn = 0;
                CurrentIconView = IconViews[0];

                sWins[i].Add(IconViews[i]);
                IconViews[i].Show();
            }

            //Create the comboboxes
            imageTypeBox = ComboBox.NewText();
            imageResolutionsBox = ComboBox.NewText();
            imageStyleBox = ComboBox.NewText();

            //Verschiedene Styles hinzufügen
            imageStyleBox.AppendText(Catalog.GetString("Centered"));
            imageStyleBox.AppendText(Catalog.GetString("Filled"));
            imageStyleBox.AppendText(Catalog.GetString("Scaled"));
            imageStyleBox.AppendText(Catalog.GetString("Zoomed"));
            imageStyleBox.AppendText(Catalog.GetString("Tiled"));
            imageStyleBox.Active=0;
            imageStyleBox.Changed += new EventHandler(OnImageStyleBoxChanged);

            LowerTable.Attach(imageTypeBox,1,2,2,3);
            LowerTable.Attach(imageResolutionsBox,1,2,3,4);
            LowerTable.Attach(imageStyleBox,1,2,4,5);

            OnSwitchPage(MainNotebook,new SwitchPageArgs());
            Gtk.Application.Run ();

        }
    }
Example #36
0
    public static void ComboUpdate(ComboBox myCombo, List<double> list)
    {
        //1stdelete combo values
        comboDelAll(myCombo);

        //2nd put new values
        foreach (double l in list)
            myCombo.AppendText (l.ToString());
    }
Example #37
0
    //more elegant method, with ArrayList
    public static void ComboUpdate(ComboBox myCombo, ArrayList array)
    {
        //1stdelete combo values
        comboDelAll(myCombo);

        //2nd put new values
        foreach (string str in array)
            myCombo.AppendText (str);
    }
Example #38
-1
 public static void ComboAdd(ComboBox myCombo, string str)
 {
     myCombo.AppendText (str);
 }