コード例 #1
0
 private Status HandleDomainLoggedIn(string domainID, Status status)
 {
     DomainController.upgradeStatus = status;
        Debug.PrintLine("In handledoaminloggedin");
        try
        {
     DomainInformation dom =
      simws.GetDomainInformation(domainID);
     if (dom != null)
     {
      dom.Authenticated = true;
      if (keyedDomains.Contains(dom.ID))
       keyedDomains[dom.ID] = dom;
      else
      {
       AddDomainToHashtable(dom);
       if (DomainAdded != null)
       {
        DomainAddedIdleHandler addedHandler =
     new DomainAddedIdleHandler(domainID, this);
        GLib.Idle.Add(addedHandler.IdleHandler);
       }
      }
     }
        }
        catch{}
        if (DomainLoggedIn != null)
     DomainLoggedIn(this, new DomainEventArgs(domainID));
        if (status.statusCode == StatusCodes.SuccessInGrace)
        {
     if (status.RemainingGraceLogins < status.TotalGraceLogins)
     {
      if (DomainInGraceLoginPeriod != null)
      {
       DomainInGraceLoginPeriodEventArgs graceEventArgs =
        new DomainInGraceLoginPeriodEventArgs(
     domainID,
     status.RemainingGraceLogins);
       DomainInGraceLoginPeriod(this, graceEventArgs);
      }
     }
        }
        CheckForUpdate(domainID);
        return DomainController.upgradeStatus;
 }
コード例 #2
0
 public void OnDomainInGraceLoginPeriodEvent(object sender, DomainInGraceLoginPeriodEventArgs args)
 {
     DomainInformation dom = domainController.GetDomain(args.DomainID);
        iFolderMsgDialog dg =
     new iFolderMsgDialog(
      topLevelWindow,
      iFolderMsgDialog.DialogType.Error,
      iFolderMsgDialog.ButtonSet.Ok,
      dom != null ? dom.Name : "",
      Util.GS("Your password has expired"),
      string.Format(Util.GS("You have {0} grace logins remaining."), args.RemainingGraceLogins));
        dg.Run();
        dg.Hide();
        dg.Destroy();
 }
コード例 #3
0
 private void HandleDomainLoggedIn(string domainID, Status status)
 {
     try
        {
     DomainInformation dom =
      simws.GetDomainInformation(domainID);
     if (dom != null)
     {
      dom.Authenticated = true;
      if (keyedDomains.Contains(dom.ID))
       keyedDomains[dom.ID] = dom;
      else
      {
       AddDomainToHashtable(dom);
       if (DomainAdded != null)
        DomainAdded(this, new DomainEventArgs(domainID));
      }
     }
        }
        catch{}
        if (DomainLoggedIn != null)
     DomainLoggedIn(this, new DomainEventArgs(domainID));
        if (status.statusCode == StatusCodes.SuccessInGrace)
        {
     if (status.RemainingGraceLogins < status.TotalGraceLogins)
     {
      if (DomainInGraceLoginPeriod != null)
      {
       DomainInGraceLoginPeriodEventArgs graceEventArgs =
        new DomainInGraceLoginPeriodEventArgs(
     domainID,
     status.RemainingGraceLogins);
       DomainInGraceLoginPeriod(this, graceEventArgs);
      }
     }
        }
 }