コード例 #1
0
        public Form2(Form main, BeanfunClient beanfunClient, string game, string accout, string service_code, string service_region)
        {
            this.main = main;

            this.beanfunClient = beanfunClient;

            this.service_code   = service_code;
            this.service_region = service_region;

            InitializeComponent();

            this.Text = game + "-" + accout; //更改視窗名稱

            pingWorker.RunWorkerAsync();     //執行pingWorker

            //將該遊戲的所有帳號放到listView1中
            foreach (var account in this.beanfunClient.accountList)
            {
                string[] row          = { WebUtility.HtmlDecode(account.sname), account.sacc };
                var      listViewItem = new ListViewItem(row);
                listView1.Items.Add(listViewItem);
            }

            //如果有選項 就用程式選取第一個選項
            if (listView1.Items.Count > 0)
            {
                listView1.Items[0].Selected = true;
                listView1.Select();
            }
        }
コード例 #2
0
        private void loginWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            Debug.WriteLine("loginWorker starting"); //將這句話顯示在Debug視窗

            beanfunClient = new BeanfunClient();     //創建BeanfunClient實例

            //執行登入方法
            beanfunClient.Login(account_textBox.Text, password_textBox.Text, service_code, service_region);
        }
コード例 #3
0
 public CaptchaWnd(BeanfunClient client, string samplecaptcha)
 {
     InitializeComponent();
     if (!App.IsWin10)
     {
         SourceChord.FluentWPF.AcrylicWindow.SetTintOpacity(this, 1.0);
     }
     this.samplecaptcha = samplecaptcha;
     Client             = client;
     Button_Click(null, null);
 }