예제 #1
0
        public List <ViewSeriesItem> GetSerieList(Int64 chartId, Guid userId)
        {
            Trace.Assert(Db != null);
            ObjectResult <ViewSeries> os = Db.GetSnapshotSerieList(chartId, userId);

            List <ViewSeries> result = os.ToList();

            var result2 = new List <ViewSeriesItem>();

            for (int i = 0; i < result.Count(); i++)
            {
                ViewSeries vs   = result[i];
                var        item = new ViewSeriesItem
                {
                    Name      = (i + 1).ToString(CultureInfo.InvariantCulture),
                    StartTime = vs.StartTime,
                    EndTime   = vs.EndTime,
                    Count     = vs.Count,
                    Id        = vs.Units
                };
                result2.Add(item);
            }

            return(result2);
        }
예제 #2
0
 public ViewComic(string title, ViewSeries series, int?seriesNumber, List <ViewAuthor> authors, ViewPublisher publisher)
 {
     Title        = title;
     Series       = series;
     SeriesNumber = seriesNumber;
     if (DuplicateAuthors(authors))
     {
         throw new PresentationException("Een strip kan niet twee keer dezelfde autheur hebben.");
     }
     Authors   = authors;
     Publisher = publisher;
 }
        private void CommandBinding_DeleteSeries(object sender, ExecutedRoutedEventArgs e)
        {
            AnimeSeriesVM ser = e.Parameter as AnimeSeriesVM;

            if (ser == null)
            {
                return;
            }

            Window parentWindow = Window.GetWindow(this);

            try
            {
                DeleteSeriesGroupForm frm = new DeleteSeriesGroupForm();
                frm.Owner = parentWindow;
                bool?result = frm.ShowDialog();

                if (result.HasValue && result.Value == true)
                {
                    //bool deleteFiles = frm.DeleteFiles;

                    this.Cursor = Cursors.Wait;
                    JMMServerVM.Instance.clientBinaryHTTP.DeleteAnimeSeries(ser.AnimeSeriesID.Value, frm.DeleteFiles, frm.DeleteGroups);

                    MainListHelperVM.Instance.RefreshGroupsSeriesData();
                    MainListHelperVM.Instance.ShowChildWrappers(MainListHelperVM.Instance.CurrentWrapper);

                    MissingSeriesCollection.Remove(ser);
                    ViewSeries.Refresh();

                    this.Cursor = Cursors.Arrow;
                }
            }
            catch (Exception ex)
            {
                Utils.ShowErrorMessage(ex);
            }
            finally
            {
                this.Cursor = Cursors.Arrow;
            }
        }
예제 #4
0
 void txtSeriesSearch_TextChanged(object sender, TextChangedEventArgs e)
 {
     ViewSeries.Refresh();
 }