public Server_Connection.DailyTask[] getTasks()
        {
            string configFilePath           = "\\ActivityMonitor\\ActivityMonitor.cfg";
            string activityMonitorDirectory = "\\ActivityMonitor";

            Server_Connection.User me = new Server_Connection.User();

            StreamReader readConfigFile = new StreamReader(configFilePath);

            string lastKnownTasks = killBrackets(readConfigFile.ReadLine());
            string patientName    = killBrackets(readConfigFile.ReadLine());

            string hostname  = killBrackets(readConfigFile.ReadLine());
            string username  = killBrackets(readConfigFile.ReadLine());
            string password  = killBrackets(readConfigFile.ReadLine());
            string startTime = killBrackets(readConfigFile.ReadLine());
            string endTime   = killBrackets(readConfigFile.ReadLine());
            string date      = killBrackets(readConfigFile.ReadLine());

            me.Username = username;
            me.Password = password;
            // me.Username = "******";
            //me.Password = "******";
            return(server_conn.GetTasks(me));
        }
        public void sendStats()
        {
            Server_Connection.User me = new Server_Connection.User();
            // me.Username = "******";
            //me.Password = "******";



            string       configFilePath           = "\\ActivityMonitor\\ActivityMonitor.cfg";
            string       activityMonitorDirectory = "\\ActivityMonitor";
            StreamReader readConfigFile           = new StreamReader(configFilePath);

            string lastKnownTasks = killBrackets(readConfigFile.ReadLine());
            string patientName    = killBrackets(readConfigFile.ReadLine());

            string hostname  = killBrackets(readConfigFile.ReadLine());
            string username  = killBrackets(readConfigFile.ReadLine());
            string password  = killBrackets(readConfigFile.ReadLine());
            string startTime = killBrackets(readConfigFile.ReadLine());
            string endTime   = killBrackets(readConfigFile.ReadLine());
            string date      = killBrackets(readConfigFile.ReadLine());

            me.Username = username;
            me.Password = password;



            Queue <Stats> Todays = BadIdea.GetStats();

            //loop as long as there are still stats

            Todays.Enqueue(new WalkingStats(4000, (long)2, (long)3));

            while (Todays.Count > 0)
            {
                Server_Connection.WalkingStats mystats = new Server_Connection.WalkingStats();
                Stats Frog = Todays.Dequeue();

                mystats.idDailyTask  = BadIdea.DailyTaskID;
                mystats.idStatistics = 0;

                mystats.StartDateTime = new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
                mystats.StartDateTime = mystats.StartDateTime.AddMilliseconds(Frog.start_time);

                mystats.EndDateTime = new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
                mystats.EndDateTime = mystats.StartDateTime.AddMilliseconds(Frog.end_time);

                mystats.StatsClass = "WalkingStats";
                mystats.steps      = Frog.getStats();
                server_conn.UploadStats(me, mystats);
            }
        }
        public void sendStats()
        {
            Server_Connection.User me = new Server_Connection.User();
            // me.Username = "******";
            //me.Password = "******";

            string configFilePath = "\\ActivityMonitor\\ActivityMonitor.cfg";
            string activityMonitorDirectory = "\\ActivityMonitor";
            StreamReader readConfigFile = new StreamReader(configFilePath);

            string lastKnownTasks = killBrackets(readConfigFile.ReadLine());
            string patientName = killBrackets(readConfigFile.ReadLine());

            string hostname = killBrackets(readConfigFile.ReadLine());
            string username = killBrackets(readConfigFile.ReadLine());
            string password = killBrackets(readConfigFile.ReadLine());
            string startTime = killBrackets(readConfigFile.ReadLine());
            string endTime = killBrackets(readConfigFile.ReadLine());
            string date = killBrackets(readConfigFile.ReadLine());
            me.Username = username;
            me.Password = password;

            Queue<Stats> Todays = BadIdea.GetStats();
            //loop as long as there are still stats

            Todays.Enqueue(new WalkingStats(4000, (long)2, (long)3));

            while (Todays.Count > 0)
            {

                Server_Connection.WalkingStats mystats = new Server_Connection.WalkingStats();
                Stats Frog = Todays.Dequeue();

                mystats.idDailyTask = BadIdea.DailyTaskID;
                mystats.idStatistics = 0;

                mystats.StartDateTime = new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
                mystats.StartDateTime = mystats.StartDateTime.AddMilliseconds(Frog.start_time);

                mystats.EndDateTime = new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
                mystats.EndDateTime = mystats.StartDateTime.AddMilliseconds(Frog.end_time);

                mystats.StatsClass = "WalkingStats";
                mystats.steps = Frog.getStats();
                server_conn.UploadStats(me, mystats);
            }
        }
        public Server_Connection.DailyTask[] getTasks()
        {
            string configFilePath = "\\ActivityMonitor\\ActivityMonitor.cfg";
            string activityMonitorDirectory = "\\ActivityMonitor";

            Server_Connection.User me = new Server_Connection.User();

            StreamReader readConfigFile = new StreamReader(configFilePath);

            string lastKnownTasks = killBrackets(readConfigFile.ReadLine());
            string patientName = killBrackets(readConfigFile.ReadLine());

            string hostname = killBrackets(readConfigFile.ReadLine());
            string username = killBrackets(readConfigFile.ReadLine());
            string password = killBrackets(readConfigFile.ReadLine());
            string startTime = killBrackets(readConfigFile.ReadLine());
            string endTime = killBrackets(readConfigFile.ReadLine());
            string date = killBrackets(readConfigFile.ReadLine());
            me.Username = username;
            me.Password = password;
            // me.Username = "******";
            //me.Password = "******";
            return server_conn.GetTasks(me);
        }
 public void UploadStats(User me, Stats stats)
 {
     this.Invoke("UploadStats", new object[] {
                 me,
                 stats});
 }
 public DailyTask[] GetTasks(User me)
 {
     object[] results = this.Invoke("GetTasks", new object[] {
                 me});
     return ((DailyTask[])(results[0]));
 }
 /// <remarks/>
 public System.IAsyncResult BeginUploadStats(User me, Stats stats, System.AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("UploadStats", new object[] {
                 me,
                 stats}, callback, asyncState);
 }
 /// <remarks/>
 public System.IAsyncResult BeginGetTasks(User me, System.AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("GetTasks", new object[] {
                 me}, callback, asyncState);
 }