Beispiel #1
0
 private void test_login()
 {
     while (true)
     {
         if (SpyLogin.initme("4"))
         {
             SpyLogin.start();
             while (true)
             {
                 if (SpyLogin.IsOK)
                 {
                     break;
                 }
                 Thread.Sleep(1000);
             }
             Thread.Sleep(5000);
             ObjectManager.Initialize(SpyLogin.WOW_P.Id);
             if (!ObjectManager.Initialized)
             {
                 Thread.Sleep(5000);
                 ObjectManager.Initialize(SpyLogin.WOW_P.Id);
             }
             Thread.Sleep(5000);
             Logging.Write(ObjectManager.MyPlayer.Name);
             Thread.Sleep(5000);
             SpyLogin.WOW_P.Kill();
         }
         Thread.Sleep(15000);
     }
 }
Beispiel #2
0
        private void MutiLogin()
        {
            string[] charid;
            charid = txtMutiLogin.Text.Split('#');

            for (int iLoop = 0; iLoop < charid.Length; iLoop++)
            {
                if (SpyLogin.initme(charid[iLoop]))
                {
                    SpyLogin.start();
                    while (true)
                    {
                        if (SpyLogin.IsOK)
                        {
                            break;
                        }
                        Thread.Sleep(1000);
                    }
                }
            }
        }
Beispiel #3
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(comboBoxCharList.Text))
            {
                return;
            }
            KeyValuePair <string, string> singlechar = (KeyValuePair <string, string>)comboBoxCharList.SelectedItem;
            Dictionary <string, string>   result     = SpyDB.GetCharLoginInfo(singlechar.Key);

            if (result.Count == 0)
            {
                MessageBox.Show("数据库没有找到信息,检查视图v_login_info的数据");
                return;
            }

            SpyLogin.initme(result["AccountName"], result["AccountPass"], result["RealmName"], result["CharIdx"], result["AccountList"]);
            SpyLogin.start();
            //while (!SpyLogin.IsOK) { Thread.Sleep(100); };
            //MessageBox.Show("OKOK_____AUTO Login");
            //ObjectManager.Initialize(SpyLogin.WOW_P.Id);
        }