예제 #1
0
파일: Me.cs 프로젝트: mvalipour/WP7Facefeed
        /// <summary>
        /// Loads the profile of the current user to a ME object, when ready the given callback is fired
        /// </summary>
        public static void GetCurrent(Action<Me> callback)
        {
            if (_Current == null)
            {
                FBDataAccess.Current.GetGraph("me", data =>
                {
                    _Current = FBEntity.Parse<Me>(data);

                    callback.Invoke(_Current);
                });
            }
            else
            {
                callback.Invoke(_Current);
            }
        }
예제 #2
0
        private void LoadItem()
        {
            LoadingManager.Start();

            Me.GetCurrent(me =>
            {
                LoadingManager.Stop();

                if (me == null)
                {
                    App.MyApp.NavigateToLogin();
                }
                else
                {
                    Item = me;

                    ThreadHelper.RunOnUI(() =>
                    {
                        LoadMeData();
                    });
                }
            });
        }