Beispiel #1
0
        void DoWork(object sender, DoWorkEventArgs e)
        {
            BackgroundWorker bw = sender as BackgroundWorker;

            if (bw.CancellationPending)
            {
                e.Cancel = true;
            }
            RoomData roomdata = worklog.InitialGaia();
            JObject  json     = worklog.GetUserInfo();
            JObject  jsoncoin = worklog.GetCoins();

            mytemp   = new MyTemp(json, jsoncoin, roomdata);
            e.Result = mytemp;
        }
Beispiel #2
0
        void CompletedWork(object sender, RunWorkerCompletedEventArgs e)
        {
            if (e.Error != null)
            {
                MessageBox.Show("Error");
            }
            else if (e.Cancelled)
            {
                MessageBox.Show("Canceled");
            }
            else
            {
                MyTemp my = (MyTemp)e.Result;
                GetGaiaStatus(my.roomdata);


                GetUserInfo(my.json, my.jsoncoin);

                btn_LoadUserInfo.Enabled = true;
            }
        }