Beispiel #1
0
        void LoginPostTick()
        {
            postTask.Tick();
            if (!postTask.Completed)
            {
                return;
            }

            if (postTask.Error != null)
            {
                SetStatus("&c" + postTask.Error);
            }
            else if (postTask.Success)
            {
                game.Username = postTask.Username;
                fetchTask     = new FetchServersTask();
                fetchTask.RunAsync(game);
                SetStatus("&eRetrieving servers list..");
            }
            else
            {
                DisplayWebException(postTask.WebEx, "sign in");
            }

            postTask = null;
            game.RedrawBackground();
            Resize();
        }
 void RefreshList(int mouseX, int mouseY)
 {
     if (fetchTask != null)
     {
         return;
     }
     fetchTask = new FetchServersTask();
     fetchTask.RunAsync(game);
     view.RefreshText = "&eWorking..";
     Resize();
 }