コード例 #1
0
            //---------------------------------------------------------------------------------------------------------
            /// <summary>
            /// Конфигурирование моделей
            /// </summary>
            /// <param name="model_builder">Интерфейс для построения моделей</param>
            //---------------------------------------------------------------------------------------------------------
            protected override void OnModelCreating(ModelBuilder model_builder)
            {
                CUser.ModelCreating(model_builder);
                CPost.ModelCreating(model_builder);
                CFieldActivity.ModelCreating(model_builder);

                base.OnModelCreating(model_builder);
            }
コード例 #2
0
        public bool CreatePost(string posterId, string targetGroupId, string replyPostId, string title, string content, bool isSticky, DateTime?eventTimeStamp)
        {
            CPost post = new CPost(Guid.Parse(posterId), targetGroupId == null ? Guid.Empty : Guid.Parse(targetGroupId), replyPostId == null ? Guid.Empty : Guid.Parse(replyPostId), title, content, isSticky, false, DateTime.Now, eventTimeStamp);

            if (post.Create() > 0)
            {
                return(true);
            }
            return(false);
        }
コード例 #3
0
        //swipe action
        private async void OnSwipeLeft()
        {
            //if Next_post touches the threshhold we have to update the prefetch
            if ((Search.posts.Count - Index) < Search.ResultsPerPage)
            {
                await Search.UpdateCacheAsync();
            }
            Index++;
            Post = Search.posts[Index];

            ReloadMediaPage();
        }
コード例 #4
0
        //swipe action
        private void OnSwipeRight()
        {
            if (Index <= 0)
            {
                DisplayAlert("owo no", "End of List", "ok");
                return;
            }

            Index--;
            Post = Search.posts[Index];

            ReloadMediaPage();
        }
コード例 #5
0
        public MediaPage(object sender, int index)
        {
            InitializeComponent();

            Search = (Booru)sender;
            Index  = index;
            Post   = Search.posts[Index];

            //Add Gesture
            var floatingMenuPan = new PanGestureRecognizer();

            floatingMenuPan.PanUpdated += OnFloatingMenuPan;
            UIContentLayers.GestureRecognizers.Add(floatingMenuPan);

            //Add Gesture
            var panGesture = new PanGestureRecognizer();

            panGesture.PanUpdated += OnMediaPan;
            UIContentLayers.GestureRecognizers.Add(panGesture);

            ReloadMediaPage();
        }
コード例 #6
0
 public ObservableCollection <CComment> GetComments(CPost currentPost)
 {
     throw new NotImplementedException();
 }
コード例 #7
0
        public void DeletePost(string id)
        {
            CPost post = new CPost(Guid.Parse(id));

            post.Delete();
        }