Esempio n. 1
0
        async void DoCreateCircleCommand()
        {
           
            int circle_id = await _mLearningService.CreateCircle(UserID, CircleName, CircleType);
           

            var circle = new circle_by_user { id=circle_id,name = CircleName, type = CircleType };

            CirclesList.Add(circle);

            //Register the Publisher as a user in a Circle
            _mLearningService.CreateObject<CircleUser>(new CircleUser { Circle_id = circle_id, User_id = UserID, created_at = DateTime.UtcNow, updated_at = DateTime.UtcNow }, c => c.id);

            
        }
Esempio n. 2
0
        async Task DoSelectCircleCommand(circle_by_user circle)
        {


            CircleID = circle.id;

            try
            {
                var watch = Stopwatch.StartNew();
                await LoadCircleTags(CircleID);
                await LoadPostsInCircle(CircleID);
                await LoadUsersInCircle(CircleID);
                await LoadLearningObjects(CircleID);
                await LoadQuizzes(CircleID);

                watch.Stop();

                Mvx.Trace("Time elapsed: " + watch.ElapsedMilliseconds);
            }
            catch (WebException e)
            {
              
                ConnectionOK = false;
            }
            catch (HttpRequestException e)
            {
                
                ConnectionOK = false;
            }
            catch (MobileServiceInvalidOperationException e)
            {
                Mvx.Trace("MobileServiceInvalidOperationException " + e.Message);
                OperationOK = false;
            }
        }
Esempio n. 3
0
 void DoManageCirclesCommand(circle_by_user circle)
 {
     ShowViewModel<ManageCirclesViewModel>(new  {circle_id = circle.id,user_id=UserID});
 }