コード例 #1
0
 private void Login()
 {
     this.m_LoginRemoteMessage = null;
     if (AssetStoreClient.HasActiveSessionID)
     {
         AssetStoreClient.Logout();
     }
     if (string.IsNullOrEmpty(this.m_Email))
     {
         this.m_LoginRemoteMessage = "Please enter your email address.";
         this.Repaint();
         return;
     }
     if (!this.IsValidEmail(this.m_Email))
     {
         this.m_LoginRemoteMessage = "Invalid email address.";
         this.Repaint();
         return;
     }
     if (string.IsNullOrEmpty(this.m_Password))
     {
         this.m_LoginRemoteMessage = "Please enter your password.";
         this.Repaint();
         return;
     }
     AssetStoreClient.LoginWithCredentials(this.m_Email, this.m_Password, AssetStoreClient.RememberSession, delegate(string errorMessage)
     {
         this.m_LoginRemoteMessage = errorMessage;
         if (errorMessage == null)
         {
             if (this.m_LoginCallback != null)
             {
                 this.m_LoginCallback(this.m_LoginRemoteMessage);
             }
             base.Close();
         }
         else
         {
             this.Repaint();
         }
     });
 }
コード例 #2
0
 private void Login()
 {
     this.m_LoginRemoteMessage = null;
     if (AssetStoreClient.HasActiveSessionID)
     {
         AssetStoreClient.Logout();
     }
     AssetStoreClient.LoginWithCredentials(this.m_Username, this.m_Password, AssetStoreClient.RememberSession, delegate(string errorMessage)
     {
         this.m_LoginRemoteMessage = errorMessage;
         if (errorMessage == null)
         {
             base.Close();
         }
         else
         {
             base.Repaint();
         }
     });
 }