Exemplo n.º 1
0
        void a_Completed(object sender, AuthorizationCompletedEventArgs e)
        {
            Invoke(new Action(() =>
            {
                if (e.Exception != null)
                {
                    MessageBox.Show(e.Exception.Message);
                    progressBar1.Visible = false;
                    btAuth.Enabled       = true;
                }
                else
                {
                    cookie = e.Cookie;
                    uid    = e.Uid;
                    token  = e.Token;


                    textBox1.Text = string.Format("{0} -r +auth_ip {1} -uid {2} -token {3} -lang en_us -time_offset 300",
                                                  //textBox1.Text = string.Format("-t +auth_ip {0} -auth_port 1237 -handle 1111 -lang en_us -time_offset 300",
                                                  gamePathBox.Text,
                                                  loginServerIpBox.Text,
                                                  e.Uid,
                                                  e.Token);

                    progressBar1.Visible = false;
                    btAuth.Enabled       = true;
                    btStart.Visible      = true;
                    textBox1.Visible     = true;
                }
            }));
        }
Exemplo n.º 2
0
        protected virtual void OnCompleted(AuthorizationCompletedEventArgs e)
        {
            EventHandler <AuthorizationCompletedEventArgs> handler = Completed;

            if (handler != null)
            {
                handler(this, e);
            }
        }