public void SetMeOnlineStatus(OnlineStatusRequest value)
 {
     if (ContactListViewModel == null)
     {
         ContactListViewModel = new ContactListViewModel();
     }
     ContactListViewModel.SetMeOnlineStatusCommand.Execute(value);
 }
        void SetMeOnline()
        {
            var strUserId             = Convert.ToString(MyApplication.Me.USERID);
            OnlineStatusRequest model = new OnlineStatusRequest()
            {
                IsOnline = true, UserId = strUserId
            };

            EngineService.EngineInstance.SetMeOnlineStatus(model);
        }
 void ExecuteMeOnlineStatusCommand(OnlineStatusRequest model)
 {
     try
     {
         SocketManagerDataStore.GetInstance().ChatHubProxy.Invoke("SetOnlineStatus", model.UserId, model.IsOnline);
     }
     catch (Exception e)
     {
     }
 }
        protected override void OnDestroy()
        {
            tabLayout.TabSelected   -= TabLayout_TabSelected;
            tabLayout.TabReselected -= TabLayout_TabReselected;

            if (EngineService.EngineInstance != null && MyApplication.Me != null)
            {
                var strUserId             = Convert.ToString(MyApplication.Me.USERID);
                OnlineStatusRequest model = new OnlineStatusRequest()
                {
                    IsOnline = false, UserId = strUserId
                };
                EngineService.EngineInstance.SetMeOnlineStatus(model);
                EngineService.EngineInstance.StopThis();
            }
            base.OnDestroy();
        }