Ejemplo n.º 1
0
 /// <summary>
 /// 登录淘宝
 /// </summary>
 public void LoginTaoBao()
 {
     if (this.InvokeRequired)
     {
         this.Invoke(new Action(LoginTaoBao), new object[] { });
     }
     else
     {
         TimingRefreshAlimamaPage();
         if (lw != null)
         {
             lw.Dispose();
             lw.Close();
             lw = null;
         }
         lw = new TBSync.LoginWindow();
         lw.LoginSuccessHandle += Lw_LoginSuccessHandle;
         lw.CloseWindowHandle  += Lw_CloseWindowHandle;
         lw.StartPosition       = FormStartPosition.CenterScreen;
         lw.ShowDialog(this);
     }
 }
Ejemplo n.º 2
0
 private void loginWindowsClose()
 {
     if (lw == null)
     {
         return;
     }
     if (lw.InvokeRequired)
     {
         this.lw.Invoke(new Action(loginWindowsClose), new object[] { });
     }
     else
     {
         if (lw != null)
         {
             lw.Close();
         }
         lw = null;
     }
 }