Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Server_Connection.ActivityMonitor am = new Server_Connection.ActivityMonitor();


            Server_Connection.User u = new Server_Connection.User();
            u.Username = "******";
            u.Password = "******";

            Server_Connection.DailyTask[] dt = am.GetTasks(u);

            for (int i = 0; i < dt.GetLength(0); i++)
            {
                Console.WriteLine("{0}", dt[i].idDailyTask);
            }

            Server_Connection.WalkingStats ws = new Server_Connection.WalkingStats();
            ws.idDailyTask   = dt[0].idDailyTask;
            ws.steps         = 259;
            ws.StartDateTime = DateTime.Now;
            ws.EndDateTime   = DateTime.Now.AddHours(1);
            ws.StatsClass    = "WalkingStats";

            am.UploadStats(u, ws);
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            Server_Connection.ActivityMonitor am = new Server_Connection.ActivityMonitor();

            Server_Connection.User u = new Server_Connection.User();
            u.Username = "******";
            u.Password = "******";

            Server_Connection.DailyTask[] dt = am.GetTasks(u);

            for (int i = 0; i < dt.GetLength(0); i++)
                Console.WriteLine("{0}", dt[i].idDailyTask);

            Server_Connection.WalkingStats ws = new Server_Connection.WalkingStats();
            ws.idDailyTask = dt[0].idDailyTask;
            ws.steps = 259;
            ws.StartDateTime = DateTime.Now;
            ws.EndDateTime = DateTime.Now.AddHours(1);
            ws.StatsClass = "WalkingStats";

            am.UploadStats(u, ws);
        }
Ejemplo n.º 3
0
 /// <remarks/>
 public void GetTasksAsync(User me, object userState) {
     if ((this.GetTasksOperationCompleted == null)) {
         this.GetTasksOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetTasksOperationCompleted);
     }
     this.InvokeAsync("GetTasks", new object[] {
                 me}, this.GetTasksOperationCompleted, userState);
 }
Ejemplo n.º 4
0
 /// <remarks/>
 public void GetTasksAsync(User me) {
     this.GetTasksAsync(me, null);
 }
Ejemplo n.º 5
0
 public DailyTask[] GetTasks(User me) {
     object[] results = this.Invoke("GetTasks", new object[] {
                 me});
     return ((DailyTask[])(results[0]));
 }
Ejemplo n.º 6
0
 /// <remarks/>
 public void UploadStatsAsync(User me, Stats stats, object userState) {
     if ((this.UploadStatsOperationCompleted == null)) {
         this.UploadStatsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUploadStatsOperationCompleted);
     }
     this.InvokeAsync("UploadStats", new object[] {
                 me,
                 stats}, this.UploadStatsOperationCompleted, userState);
 }
Ejemplo n.º 7
0
 /// <remarks/>
 public void UploadStatsAsync(User me, Stats stats) {
     this.UploadStatsAsync(me, stats, null);
 }
Ejemplo n.º 8
0
 public void UploadStats(User me, Stats stats) {
     this.Invoke("UploadStats", new object[] {
                 me,
                 stats});
 }