コード例 #1
0
ファイル: Preferences.cs プロジェクト: RoDaniel/featurehouse
 private bool logout(int itemIndex)
 {
     bool result = false;
     ListViewItem lvi = accounts.Items[itemIndex];
     Domain domain = (Domain)lvi.Tag;
     if (domain != null)
     {
         DomainAuthentication domainAuth = new DomainAuthentication("iFolder", domain.ID, null);
         Status authStatus = domainAuth.Logout(simiasManager.WebServiceUri, simiasManager.DataPath);
         if (authStatus != null && authStatus.statusCode == StatusCodes.Success)
         {
             result = true;
             domain.DomainInfo.Authenticated = false;
             lvi.Tag = domain;
             if (this.simiasWebService.GetRememberOption(domain.ID) == false)
             {
                 this.simiasWebService.StorePassPhrase(domain.ID, "", CredentialType.None, false);
             }
             FormsTrayApp.globalProp().updateifListViewDomainStatus(domain.DomainInfo.ID, false);
             (FormsTrayApp.globalProp()).RemoveDomainFromUIList(domain.DomainInfo.ID, null);
         }
     }
     return result;
 }
コード例 #2
0
ファイル: Preferences.cs プロジェクト: RoDaniel/featurehouse
 public bool logoutFromDomain(Domain domain)
 {
     bool result = false;
     if (domain != null)
     {
         DomainAuthentication domainAuth = new DomainAuthentication("iFolder", domain.ID, null);
         Status authStatus = domainAuth.Logout(simiasManager.WebServiceUri, simiasManager.DataPath);
         if (authStatus != null && authStatus.statusCode == StatusCodes.Success)
         {
             result = true;
             domain.DomainInfo.Authenticated = false;
             if (this.simiasWebService.GetRememberOption(domain.ID) == false)
             {
                 this.simiasWebService.StorePassPhrase(domain.ID, "", CredentialType.None, false);
             }
             FormsTrayApp.globalProp().updateifListViewDomainStatus(domain.DomainInfo.ID, false);
             (FormsTrayApp.globalProp()).RemoveDomainFromUIList(domain.DomainInfo.ID, null);
             FormsTrayApp.globalProp().UpdateiFolderStatus(domain.DomainInfo.Authenticated, domain.DomainInfo.ID);
         }
     }
     return result;
 }
コード例 #3
0
 public void LogoutDomain(string domainID)
 {
     DomainAuthentication domainAuth =
     new DomainAuthentication(
      "iFolder",
      domainID,
      null);
        domainAuth.Logout(simiasManager.WebServiceUri, simiasManager.DataPath);
        try
        {
     DomainInformation dom =
      simws.GetDomainInformation(domainID);
     if (dom != null)
     {
      dom.Authenticated = false;
      ClearDomainPassPhrase(domainID);
      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 (DomainLoggedOut != null)
     DomainLoggedOut(this, new DomainEventArgs(domainID));
 }