public MainViewModel()
      {
         Players = new ObservableCollection<PlayersViewModel>();
 
         string url = "http://192.168.1.19/projects/t20lite/index.php/api/api/get_playersbyteam;
         var task = new HttpGetTask<PlayerList>(url, this.OnPostExecute);
         task.OnPreExecute = this.OnPreExecute;
         task.OnError = this.OnError;
 
         task.Execute();
      }   
    public void GetPlayer()
    {
        string url = "http://192.168.1.19/projects/t20lite/index.php/api/api/get_playersbyteam;"
                     // Do something with url and tour TeamID
                     var task = new HttpGetTask <PlayerList>(url, this.OnPostExecute);

        task.OnPreExecute = this.OnPreExecute;
        task.OnError      = this.OnError;

        task.Execute();
    }
Example #3
0
//	public static void FinishApi(object sender, EventArgs e){
//		MyLog.I("FinishApi " + (string)sender);
//	}

    public void startGetTask()
    {
        MyLog.I(TAG, "startGetTask");
        // nativeから取得
        MyUser user = new MyUser();

        user.Initialize("GJEJx0hhNa", "Tv5ujQDdBU");
        MyLog.W(TAG, "MyUser Initialize");

        user.checkValue();
        string build = user.GetAppVersionName_Android();

        MyLog.W(TAG, "MyUser build = " + build);

        // TODO API
        m_HttpGetTask = gameObject.AddComponent <HttpGetTask>();
        m_HttpGetTask.ExecApiTask(user);
    }