Esempio n. 1
0
        void FillServers()
        {
            int current = comboServers.Active;

            updatingServers = true;
            servers         = BugzillaService.GetServers();
            ((ListStore)comboServers.Model).Clear();

            foreach (ServerInfo s in servers)
            {
                comboServers.AppendText(s.Name);
            }

            if (current < servers.Length)
            {
                comboServers.Active = current;
            }
            else
            {
                updatingServers     = false;
                comboServers.Active = servers.Length - 1;
            }

            updatingServers = false;
        }
Esempio n. 2
0
        protected void OnAddServer()
        {
            BugzillaServer   newServer = new BugzillaServer();
            EditServerDialog dlg       = new EditServerDialog(newServer, true);

            if (dlg.Run() == (int)ResponseType.Ok)
            {
                dlg.Save();
                BugzillaService.AddServer(newServer);
                FillServers();
                servers             = BugzillaService.GetServers();
                comboServers.Active = servers.Length - 1;
            }
            dlg.Destroy();
        }