Beispiel #1
0
 private void login()
 {
     try
     {
         // disable all controls so that user can't change them while logging in
         EnableControls (false);
         this.button2.Label = Languages.Get("cancel");
         LoggingIn = true;
         Config.UseSsl = checkbutton1.Active;
         Config.Project = combobox1.ActiveText;
         this.progressbar1.Adjustment.Value = 0;
         // FIXME
         //if (Config.Languages.Contains(cmLanguage.Text)) { Config.Language = cmLanguage.Text; } // set language (if needed)
         Config.Username = entry1.Text; // set username
         Config.Password = entry2.Text; // set password
         Login.LoggingOn = true; // set loggin in
         Login.phase = Login.LoginState.LoggingIn; // set phase
         LoginRequest lr = new LoginRequest(); // start a new login request
         //lr.Login_Form = this;
         progress(Languages.Get("login-progress-start"));
         lr.Start();
         timer = new GLib.TimeoutHandler(login_Tick);
         GLib.Timeout.Add(200, timer);
     }
     catch (Exception fail)
     {
         Core.ExceptionHandler(fail);
         EnableControls (true);
     }
 }