//--------------------------------------------------------------------------------------------------------- /// <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); }
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); }
//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(); }
//swipe action private void OnSwipeRight() { if (Index <= 0) { DisplayAlert("owo no", "End of List", "ok"); return; } Index--; Post = Search.posts[Index]; ReloadMediaPage(); }
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(); }
public ObservableCollection <CComment> GetComments(CPost currentPost) { throw new NotImplementedException(); }
public void DeletePost(string id) { CPost post = new CPost(Guid.Parse(id)); post.Delete(); }