示例#1
0
        /// <summary>
        /// Login to Domain
        /// </summary>
        /// <param name="dom">Domain Information</param>
        public void LoginDomain(DomainInformation dom)
        {
            try
            {
                LoginDialog =
                    new iFolderLoginDialog(dom.ID, dom.Name, dom.MemberName);
                if (!Util.RegisterModalWindow(LoginDialog))
                {
                    LoginDialog.Destroy();
                    LoginDialog = null;
                    return;
                }

                LoginDialog.Response +=
                    new ResponseHandler(OnLoginDialogResponse);

                LoginDialog.ShowAll();

                string password = domainController.GetDomainPassword(dom.ID);
                if (password != null)
                {
                    LoginDialog.Hide();
                    LoginDialog.Password = password;
                    LoginDialog.Respond(Gtk.ResponseType.Ok);
                }
            }
            catch
            {
                Util.ShowLoginError(topLevelWindow, StatusCodes.Unknown);

                UpdateDomainStatus(dom.ID);
            }
        }
示例#2
0
        /// <summary>
        /// Event Handler for Login Dialog Response event
        /// </summary>
        private void OnLoginDialogResponse(object o, ResponseArgs args)
        {
            switch (args.ResponseId)
            {
            case Gtk.ResponseType.Ok:
                DomainInformation dom = domainController.GetDomain(LoginDialog.Domain);

                if (WaitDialog != null)
                {
                    WaitDialog.Hide();
                    WaitDialog.Destroy();
                    WaitDialog = null;
                }

                VBox  vbox            = new VBox(false, 0);
                Image connectingImage = new Image(Util.ImagesPath("ifolder-add-account48.png"));
                vbox.PackStart(connectingImage, false, false, 0);

                WaitDialog =
                    new iFolderWaitDialog(
                        topLevelWindow,
                        vbox,
                        iFolderWaitDialog.ButtonSet.None,
                        Util.GS("Connecting..."),
                        Util.GS("Connecting..."),
                        Util.GS("Please wait while your iFolder account is connecting."));

                if (!Util.RegisterModalWindow(WaitDialog))
                {
                    try
                    {
                        Util.CurrentModalWindow.Present();
                    }
                    catch {}
                    WaitDialog.Destroy();
                    return;
                }
                WaitDialog.Show();

                DomainLoginThread domainLoginThread =
                    new DomainLoginThread(domainController);

                domainLoginThread.Completed +=
                    new DomainLoginCompletedHandler(OnDomainLoginCompleted);

                domainLoginThread.Login(dom.ID, LoginDialog.Password, LoginDialog.ShouldSavePassword);

                break;

            case Gtk.ResponseType.Cancel:
            case Gtk.ResponseType.DeleteEvent:
                LoginDialog.Hide();
                LoginDialog.Destroy();
                LoginDialog = null;
                break;
            }
        }
 private void OnLoginDialogResponse(object o, ResponseArgs args)
 {
     switch (args.ResponseId)
        {
     case Gtk.ResponseType.Ok:
      DomainInformation dom = domainController.GetDomain(LoginDialog.Domain);
      if (WaitDialog != null)
      {
       WaitDialog.Hide();
       WaitDialog.Destroy();
       WaitDialog = null;
      }
      VBox vbox = new VBox(false, 0);
      Image connectingImage = new Image(Util.ImagesPath("ifolder-add-account48.png"));
      vbox.PackStart(connectingImage, false, false, 0);
      WaitDialog =
       new iFolderWaitDialog(
        topLevelWindow,
        vbox,
        iFolderWaitDialog.ButtonSet.None,
        Util.GS("Connecting..."),
        Util.GS("Connecting..."),
        Util.GS("Please wait while your iFolder account is connecting."));
      if (!Util.RegisterModalWindow(WaitDialog))
      {
       try
       {
        Util.CurrentModalWindow.Present();
       }
       catch{}
       WaitDialog.Destroy();
       return;
      }
      WaitDialog.Show();
      DomainLoginThread domainLoginThread =
       new DomainLoginThread(domainController);
      domainLoginThread.Completed +=
       new DomainLoginCompletedHandler(OnDomainLoginCompleted);
      domainLoginThread.Login(dom.ID, LoginDialog.Password, LoginDialog.ShouldSavePassword);
      break;
     case Gtk.ResponseType.Cancel:
     case Gtk.ResponseType.DeleteEvent:
      LoginDialog.Hide();
      LoginDialog.Destroy();
      LoginDialog = null;
      break;
        }
 }
 private void OnDomainLoginCompleted(object o, DomainLoginCompletedArgs args)
 {
     if (WaitDialog != null)
        {
     WaitDialog.Hide();
     WaitDialog.Destroy();
     WaitDialog = null;
        }
        Status authStatus = args.AuthenticationStatus;
        if (authStatus != null)
        {
     switch (authStatus.statusCode)
     {
      case StatusCodes.Success:
      case StatusCodes.SuccessInGrace:
       if (LoginDialog != null)
       {
        LoginDialog.Hide();
        LoginDialog.Destroy();
        LoginDialog = null;
       }
       int result;
       iFolderWebService ifws = DomainController.GetiFolderService();
       int policy = ifws.GetSecurityPolicy(args.DomainID);
       if( policy % 2 == 0)
        break;
       bool passphraseStatus = simws.IsPassPhraseSet(args.DomainID);
       if(passphraseStatus == true)
       {
        bool rememberOption = simws.GetRememberOption(args.DomainID);
        if( rememberOption == false)
        {
     ShowVerifyDialog( args.DomainID, simws);
        }
        else
        {
     Debug.PrintLine(" remember Option true. Checking for passphrase existence");
     string passphrasecheck = simws.GetPassPhrase(args.DomainID);
     if(passphrasecheck == null || passphrasecheck == "")
     {
      Debug.PrintLine("BugBug: Passphrase doesn't exist");
      ShowVerifyDialog( args.DomainID, simws);
     }
        }
       }
       else
       {
        iFolderWindow.ShowEnterPassPhraseDialog(args.DomainID, simws);
       }
       iFolderData ifdata = iFolderData.GetData();
                 ifdata.Refresh();
       UpdateWidgetSensitivity();
       break;
      case StatusCodes.InvalidCertificate:
       DomainInformation dom = domainController.GetDomain(args.DomainID);
       if( authStatus.UserName != null)
       {
        dom.Host = authStatus.UserName;
       }
       byte[] byteArray = simws.GetCertificate(dom.Host);
       System.Security.Cryptography.X509Certificates.X509Certificate cert = new System.Security.Cryptography.X509Certificates.X509Certificate(byteArray);
       iFolderMsgDialog dialog = new iFolderMsgDialog(
        null,
        iFolderMsgDialog.DialogType.Question,
        iFolderMsgDialog.ButtonSet.YesNo,
        "",
        Util.GS("Accept the certificate of this server?"),
        string.Format(Util.GS("iFolder is unable to verify \"{0}\" as a trusted server.  You should examine this server's identity certificate carefully."), dom.Host),
        cert.ToString(true));
       Gdk.Pixbuf certPixbuf = Util.LoadIcon("gnome-mime-application-x-x509-ca-cert", 48);
       if (certPixbuf != null && dialog.Image != null)
        dialog.Image.Pixbuf = certPixbuf;
       int rc = dialog.Run();
       dialog.Hide();
       dialog.Destroy();
       if(rc == -8)
       {
        simws.StoreCertificate(byteArray, dom.Host);
        LoginDialog.Respond(Gtk.ResponseType.Ok);
       }
       else
       {
        LoginDialog.Respond(Gtk.ResponseType.Cancel);
       }
       break;
       case StatusCodes.UserAlreadyMoved:
        LoginDialog.Respond(Gtk.ResponseType.Ok);
        break;
      default:
       Util.ShowLoginError(topLevelWindow, authStatus.statusCode);
       if (LoginDialog != null)
        LoginDialog.Present();
       UpdateDomainStatus(args.DomainID);
       break;
     }
        }
        else
        {
     Util.ShowLoginError(topLevelWindow, StatusCodes.Unknown);
     if (LoginDialog != null)
      LoginDialog.Present();
     UpdateDomainStatus(args.DomainID);
        }
        iFolderWindow ifwin = Util.GetiFolderWindow();
        ifwin.UpdateServerInfoForSelectedDomain();
        ifwin.UpdateListViewItems();
 }
 public void LoginDomain(DomainInformation dom)
 {
     try
        {
     LoginDialog =
      new iFolderLoginDialog(dom.ID, dom.Name, dom.MemberName);
     if (!Util.RegisterModalWindow(LoginDialog))
     {
      LoginDialog.Destroy();
      LoginDialog = null;
      return;
     }
     LoginDialog.Response +=
      new ResponseHandler(OnLoginDialogResponse);
     LoginDialog.ShowAll();
     string password = domainController.GetDomainPassword(dom.ID);
     if (password != null)
     {
      LoginDialog.Hide();
      LoginDialog.Password = password;
      LoginDialog.Respond(Gtk.ResponseType.Ok);
     }
        }
        catch
        {
     Util.ShowLoginError(topLevelWindow, StatusCodes.Unknown);
     UpdateDomainStatus(dom.ID);
        }
 }
 private void ReLogin(string domainID)
 {
     if (LoginDialog != Util.CurrentModalWindow) return;
        if (LoginDialog == null)
        {
     DomainInformation dom = domainController.GetDomain(domainID);
     if(dom.Authenticated)
     {
      return;
     }
     if (dom != null)
     {
      LoginDialog =
       new iFolderLoginDialog(dom.ID, dom.Name, dom.MemberName);
      if (!Util.RegisterModalWindow(LoginDialog))
      {
       LoginDialog.Destroy();
       LoginDialog = null;
       return;
      }
      LoginDialog.Response +=
       new ResponseHandler(OnReLoginDialogResponse);
      LoginDialog.ShowAll();
     }
        }
        else
        {
     LoginDialog.Present();
        }
 }
 public iFolderApplication(string[] args)
     : base("ifolder", "1.0", Modules.UI, args)
 {
     Util.InitCatalog();
        Util.SetQuitiFolderDelegate(new QuitiFolderDelegate(QuitiFolder));
        tIcon = new Egg.TrayIcon("iFolder");
        currentIconAnimationDirection = 0;
        this.ClientUpgradeStatus = null;
        this.NewClientVersion = null;
        this.NewClientDomainID = null;
        eBox = new EventBox();
        eBox.ButtonPressEvent +=
     new ButtonPressEventHandler(trayapp_clicked);
                 quitDlg = new iFolderMsgDialog(
                 null,
                 iFolderMsgDialog.DialogType.Question,
                 iFolderMsgDialog.ButtonSet.YesNo,
                 Util.GS("Exit Novell iFolder"),
                  Util.GS("If you exit the Novell iFolder application, changes in your iFolder will no longer be tracked.\nThe next time you login, Novell iFolder will reconcile any differences between your iFolder and Server.\n\nAre you sure you want to exit the Application ?"),
                 " ");
                  quitDlg.Response += new ResponseHandler(YesNo_Clicked);
        RunningPixbuf =
      new Pixbuf(Util.ImagesPath("ifolder16.png"));
        StartingPixbuf =
      new Pixbuf(Util.ImagesPath("ifolder-waiting16.png"));
        StoppingPixbuf =
      new Pixbuf(Util.ImagesPath("ifolder-waiting16.png"));
        DownloadingPixbuf =
      new Pixbuf(Util.ImagesPath("ifolder-download16.png"));
        UploadingPixbuf =
      new Pixbuf(Util.ImagesPath("ifolder-upload16.png"));
        gAppIcon = new Gtk.Image(RunningPixbuf);
        eBox.Add(gAppIcon);
        tIcon.Add(eBox);
        tIcon.ShowAll();
        LoginDialog = null;
        collectionSynchronizing = null;
        synchronizationErrors = new Hashtable();
        iFolderAppStateChanged = new Gtk.ThreadNotify(
        new Gtk.ReadyEvent(OniFolderAppStateChanged));
        simiasManager = Util.CreateSimiasManager(args);
        startingUpNotifyWindow = null;
        shuttingDownNotifyWindow = null;
        forceShutdown = false;
        ClientUpgradeDialog = null;
 }
 private void OnReLoginDialogResponse(object o, ResponseArgs args)
 {
     switch (args.ResponseId)
        {
     case Gtk.ResponseType.Ok:
      DomainInformation dom = domainController.GetDomain(LoginDialog.Domain);
      if (dom == null)
      {
       iFolderMsgDialog dialog = new iFolderMsgDialog(
        null,
        iFolderMsgDialog.DialogType.Error,
        iFolderMsgDialog.ButtonSet.None,
        Util.GS("Account Error"),
        Util.GS("This account has been removed from your computer."),
        Util.GS("If you wish to connect to this account again, please add it in the Account Settings Dialog."));
       dialog.Run();
       dialog.Hide();
       dialog.Destroy();
       dialog = null;
       LoginDialog.Hide();
       LoginDialog.Destroy();
       LoginDialog = null;
       break;
      }
      try
      {
       string DomainID = LoginDialog.Domain;
       Status status =
        domainController.AuthenticateDomain(
     LoginDialog.Domain,
     LoginDialog.Password,
     LoginDialog.ShouldSavePassword);
       if (status != null)
       {
        switch(status.statusCode)
        {
     case StatusCodes.Success:
     case StatusCodes.SuccessInGrace:
      ifdata.Refresh();
      Debug.PrintLine("Login dialog response- success");
      LoginDialog.Hide();
      LoginDialog.Destroy();
      LoginDialog = null;
       ShowClientUpgradeMessageBox();
                                         int result;
       int policy = ifws.GetSecurityPolicy(DomainID);
       if( policy % 2 == 0)
        break;
                                         bool passphraseStatus = simws.IsPassPhraseSet(DomainID);
       if(passphraseStatus == true)
       {
        bool rememberOption = simws.GetRememberOption(DomainID);
        if( rememberOption == false)
        {
     ShowVerifyDialog( DomainID, simws);
        }
        else
        {
     Debug.PrintLine(" remember Option true. Checking for passphrase existence");
     string passphrasecheck;
     passphrasecheck= simws.GetPassPhrase(DomainID);
     if(passphrasecheck == null || passphrasecheck == "")
      ShowVerifyDialog( DomainID, simws);
        }
       }
       else
       {
        iFolderWindow.ShowEnterPassPhraseDialog(DomainID, simws);
       }
      break;
     case StatusCodes.InvalidCertificate:
      if( status.UserName != null)
      {
       dom.Host = status.UserName;
      }
      byte[] byteArray = simws.GetCertificate(dom.Host);
      System.Security.Cryptography.X509Certificates.X509Certificate cert = new System.Security.Cryptography.X509Certificates.X509Certificate(byteArray);
      iFolderMsgDialog dialog = new iFolderMsgDialog(
       null,
       iFolderMsgDialog.DialogType.Question,
       iFolderMsgDialog.ButtonSet.YesNo,
       "",
       Util.GS("Accept the certificate of this server?"),
       string.Format(Util.GS("iFolder is unable to verify \"{0}\" as a trusted server.  You should examine this server's identity certificate carefully."), dom.Host),
       cert.ToString(true));
      Gdk.Pixbuf certPixbuf = Util.LoadIcon("gnome-mime-application-x-x509-ca-cert", 48);
      if (certPixbuf != null && dialog.Image != null)
       dialog.Image.Pixbuf = certPixbuf;
      int rc = dialog.Run();
      dialog.Hide();
      dialog.Destroy();
      if(rc == -8)
      {
       simws.StoreCertificate(byteArray, dom.Host);
       OnReLoginDialogResponse(o, args);
      }
      else
      {
       domainController.DisableDomainAutoLogin(LoginDialog.Domain);
       LoginDialog.Hide();
       LoginDialog.Destroy();
       LoginDialog = null;
      }
      break;
     case StatusCodes.UserAlreadyMoved:
      OnReLoginDialogResponse(o, args);
      break;
     default:
      Util.ShowLoginError(LoginDialog, status.statusCode);
      break;
        }
       }
      }
      catch(Exception e)
      {
       iFolderMsgDialog dialog = new iFolderMsgDialog(
        null,
        iFolderMsgDialog.DialogType.Error,
        iFolderMsgDialog.ButtonSet.None,
        Util.GS("Account Error"),
        Util.GS("Unable to connect to the iFolder Server"),
        Util.GS("An error was encountered while connecting to the iFolder server.  Please verify the information entered and try again.  If the problem persists, please contact your network administrator."),
        e.Message);
       dialog.Run();
       dialog.Hide();
       dialog.Destroy();
       dialog = null;
      }
      break;
     case Gtk.ResponseType.Cancel:
     case Gtk.ResponseType.DeleteEvent:
      domainController.DisableDomainAutoLogin(LoginDialog.Domain);
      LoginDialog.Hide();
      LoginDialog.Destroy();
      LoginDialog = null;
      break;
        }
 }
 private void LoginDomain(DomainInformation dom, TreeIter iter)
 {
     try
        {
     bool bSavePassword = false;
     string password = domainController.GetDomainPassword(dom.ID);
     if (password != null)
      bSavePassword = true;
     else
     {
      iFolderLoginDialog dialog =
       new iFolderLoginDialog(
        dom.ID, dom.Name, dom.MemberName);
      int rc = dialog.Run();
      dialog.Hide();
      if (rc == (int)ResponseType.Ok)
      {
       password = dialog.Password;
       bSavePassword = dialog.ShouldSavePassword;
      }
      else
      {
       dialog.Destroy();
       return;
      }
      dialog.Destroy();
     }
     if (WaitDialog != null)
     {
      WaitDialog.Hide();
      WaitDialog.Destroy();
      WaitDialog = null;
     }
     VBox vbox = new VBox(false, 0);
     Image connectingImage = new Image(Util.ImagesPath("ifolder48.png"));
     vbox.PackStart(connectingImage, false, false, 0);
     Label l = new Label("<span size=\"xx-small\">FIXME: This will be\nreplaced with an\nanimated image</span>");
     vbox.PackStart(l);
     l.UseMarkup = true;
     l.LineWrap = true;
     WaitDialog =
      new iFolderWaitDialog(
       topLevelWindow,
       vbox,
       iFolderWaitDialog.ButtonSet.None,
       Util.GS("Connecting..."),
       Util.GS("Connecting..."),
       Util.GS("Please wait while your iFolder account is connecting."));
     WaitDialog.Show();
     DomainLoginThread domainLoginThread =
      new DomainLoginThread(
       domainController, dom.ID, password, bSavePassword);
     domainLoginThread.Completed +=
      new EventHandler(OnDomainLoginCompleted);
     domainLoginThread.Login();
        }
        catch
        {
     Util.ShowLoginError(topLevelWindow, StatusCodes.Unknown);
     UpdateDomainStatus(dom.ID);
        }
 }
示例#10
0
 public iFolderApplication(string[] args)
     : base("ifolder", "1.0", Modules.UI, args)
 {
     Util.InitCatalog();
        Util.SetQuitiFolderDelegate(new QuitiFolderDelegate(QuitiFolder));
        tIcon = new TrayIcon("iFolder");
        bCollectionIsSynchronizing = false;
        currentIconAnimationDirection = 0;
        eBox = new EventBox();
        eBox.ButtonPressEvent +=
     new ButtonPressEventHandler(trayapp_clicked);
        RunningPixbuf =
      new Pixbuf(Util.ImagesPath("ifolder24.png"));
        StartingPixbuf =
      new Pixbuf(Util.ImagesPath("ifolder-startup.png"));
        StoppingPixbuf =
      new Pixbuf(Util.ImagesPath("ifolder-shutdown.png"));
        DownloadingPixbuf =
      new Gdk.PixbufAnimation(Util.ImagesPath("ifolder24.gif"));
        UploadingPixbuf =
      new Gdk.PixbufAnimation(Util.ImagesPath("ifolder24-upload.gif"));
        gAppIcon = new Gtk.Image(RunningPixbuf);
        eBox.Add(gAppIcon);
        tIcon.Add(eBox);
        tIcon.ShowAll();
        LoginDialog = null;
        collectionSynchronizing = null;
        synchronizationErrors = new Hashtable();
        iFolderStateChanged = new Gtk.ThreadNotify(
        new Gtk.ReadyEvent(OniFolderStateChanged));
        simiasManager = Util.CreateSimiasManager(args);
 }
示例#11
0
 private void OnReLoginDialogResponse(object o, ResponseArgs args)
 {
     switch (args.ResponseId)
        {
     case Gtk.ResponseType.Ok:
      Status status =
       domainController.AuthenticateDomain(
        LoginDialog.Domain,
        LoginDialog.Password,
        LoginDialog.ShouldSavePassword);
      if (status == null ||
       (status.statusCode != StatusCodes.Success &&
        status.statusCode != StatusCodes.SuccessInGrace))
      {
       Util.ShowLoginError(LoginDialog, status.statusCode);
      }
      else
      {
       LoginDialog.Hide();
       LoginDialog.Destroy();
       LoginDialog = null;
      }
      break;
     case Gtk.ResponseType.Cancel:
     case Gtk.ResponseType.DeleteEvent:
      domainController.DisableDomainAutoLogin(LoginDialog.Domain);
      LoginDialog.Hide();
      LoginDialog.Destroy();
      LoginDialog = null;
      break;
        }
 }
示例#12
0
        /// <summary>
        /// Event handler for Domain Login COmpleted
        /// </summary>
        private void OnDomainLoginCompleted(object o, DomainLoginCompletedArgs args)
        {
            if (WaitDialog != null)
            {
                WaitDialog.Hide();
                WaitDialog.Destroy();
                WaitDialog = null;
            }

            Status authStatus = args.AuthenticationStatus;

            if (authStatus != null)
            {
                switch (authStatus.statusCode)
                {
                case StatusCodes.Success:
                case StatusCodes.SuccessInGrace:
                    if (LoginDialog != null)
                    {
                        LoginDialog.Hide();
                        LoginDialog.Destroy();
                        LoginDialog = null;
                    }
                    // Check if any recovery agent present;
                    // if( domainController.GetRAList(args.DomainID) == null)
                    // {
                    // No recovery agent present;
                    //		return;
                    // }
                    ShowClientUpgradeMessageBox();
                    iFolderWebService ifws = DomainController.GetiFolderService();
                    int policy             = ifws.GetSecurityPolicy(args.DomainID);
                    if (policy % 2 == 0)
                    {
                        break;
                    }
                    bool passphraseStatus = simws.IsPassPhraseSet(args.DomainID);
                    if (passphraseStatus == true)
                    {
                        bool rememberOption = simws.GetRememberOption(args.DomainID);
                        if (rememberOption == false)
                        {
                            ShowVerifyDialog(args.DomainID, simws);
                        }
                        else
                        {
                            Debug.PrintLine(" remember Option true. Checking for passphrase existence");
                            string passphrasecheck = simws.GetPassPhrase(args.DomainID);
                            if (passphrasecheck == null || passphrasecheck == "")
                            {
                                Debug.PrintLine("BugBug: Passphrase doesn't exist");
                                ShowVerifyDialog(args.DomainID, simws);
                            }
                        }
                    }
                    else
                    {
                        iFolderWindow.ShowEnterPassPhraseDialog(args.DomainID, simws);
                    }

//						string[] array = domainController.GetRAList( args.DomainID);
                    iFolderData ifdata = iFolderData.GetData();
                    ifdata.Refresh();
                    UpdateWidgetSensitivity();
                    break;

                case StatusCodes.InvalidCertificate:
                    DomainInformation dom = domainController.GetDomain(args.DomainID);
                    if (authStatus.UserName != null)
                    {
                        dom.Host = authStatus.UserName;
                    }
                    byte[] byteArray = simws.GetCertificate(dom.Host);
                    System.Security.Cryptography.X509Certificates.X509Certificate cert = new System.Security.Cryptography.X509Certificates.X509Certificate(byteArray);

                    iFolderMsgDialog dialog = new iFolderMsgDialog(
                        null,
                        iFolderMsgDialog.DialogType.Question,
                        iFolderMsgDialog.ButtonSet.YesNo,
                        "",
                        Util.GS("Accept the certificate of this server?"),
                        string.Format(Util.GS("iFolder is unable to verify \"{0}\" as a trusted server.  You should examine this server's identity certificate carefully."), dom.Host),
                        cert.ToString(true));

                    Gdk.Pixbuf certPixbuf = new Gdk.Pixbuf(Util.ImagesPath("ifolder-application-x-x509-ca-cert_48.png"));
                    if (certPixbuf != null && dialog.Image != null)
                    {
                        dialog.Image.Pixbuf = certPixbuf;
                    }

                    int rc = dialog.Run();
                    dialog.Hide();
                    dialog.Destroy();
                    if (rc == -8)                            // User clicked the Yes button
                    {
                        simws.StoreCertificate(byteArray, dom.Host);
                        LoginDialog.Respond(Gtk.ResponseType.Ok);
                    }
                    else
                    {
                        LoginDialog.Respond(Gtk.ResponseType.Cancel);
                    }
                    break;

                case StatusCodes.UserAlreadyMoved:
                    LoginDialog.Respond(Gtk.ResponseType.Ok);
                    break;

                default:
                    Util.ShowLoginError(topLevelWindow, authStatus.statusCode);

                    if (LoginDialog != null)
                    {
                        LoginDialog.Present();
                    }

                    UpdateDomainStatus(args.DomainID);
                    break;
                }
                //UpdateiFolderWindowOnLoginComplete();
            }
            else
            {
                Util.ShowLoginError(topLevelWindow, StatusCodes.Unknown);

                if (LoginDialog != null)
                {
                    LoginDialog.Present();
                }

                UpdateDomainStatus(args.DomainID);
            }

            iFolderWindow ifwin = Util.GetiFolderWindow();

            ifwin.UpdateServerInfoForSelectedDomain();
            ifwin.UpdateListViewItems();
        }