コード例 #1
0
ファイル: frmEx.cs プロジェクト: Ifover/MC-EX
 private void FrmEx_Load(object sender, EventArgs e)
 {
     #region 获取信息の块(每次登录都会重新获取)                          //待编辑
     Mydata.Gtk        = Myhelp.getGtk(Mydata.Cookies);  //gtk
     Mydata.isChanging = false;
     Mydata.Iuin       = Myhelp.getIuin(Mydata.Cookies); //登录者QQ
     string Iname = Myhelp.getIname(Myhelp.postHtml("http://card.show.qq.com/cgi-bin/card_user_mainpage?g_tk=" + Mydata.Gtk, "uin=" + Mydata.Iuin, Mydata.Cookies));
     //Debug.WriteLine(Iname);
     tsmiUser.Text = Iname == "" ? Mydata.Iuin : Iname; //如果有ID就ID,没有就用QQ
     gBoxI.Text    = Iname == "" ? Mydata.Iuin : Iname; //如果有ID就ID,没有就用QQ
     gBoxI.Text   += ".卡箱 [点此刷新]";
     #endregion
     gboxThemes.Location = new Point(-190, 27);
     ThreadStart myThreaddelegate = new ThreadStart(Load_Card);
     Thread      tre = new Thread(myThreaddelegate)
     {
         IsBackground = true   // 设置为后台线程,在主窗口退出时线程强制退出
     };
     tre.Start();
 }//载入窗口时