Ejemplo n.º 1
0
        /// <summary>
        /// Command for adding author to the selected author list
        /// </summary>
        public void AddAuthorExecute()
        {
            ViewAuthor author = SelectedPossibleAuthor;

            PossibleAuthorsList.Remove(author);
            SelectedAuthorList.Add(author);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Command for removing author from the selected author list
        /// </summary>
        public void RemoveAuthorExecute()
        {
            ViewAuthor author = SelectedCurrentAuthor;

            SelectedAuthorList.Remove(author);
            PossibleAuthorsList.Add(author);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// sets ui values to the selectedcomic
        /// </summary>
        /// <param name="comic">comic to set</param>
        public void SetComic(ViewComic comic)
        {
            InputTitle         = comic.Title;
            SelectedViewSeries = comic.Series;
            InputSeriesNr      = comic.SeriesNumber.ToString();

            foreach (ViewAuthor author in comic.Authors)
            {
                SelectedAuthorList.Add(author);
                PossibleAuthorsList.Remove(author);
            }

            SelectedViewPublisher = comic.Publisher;
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Method for filtering out possible authors depending on a given query
 /// </summary>
 /// <param name="query"></param>
 public void FilterOutAuthors(string query)
 {
     if (query == "")
     {
         PossibleAuthorsList = new ObservableCollection <ViewAuthor>(_allAuthorsList);
     }
     else
     {
         PossibleAuthorsList.Clear();
         foreach (ViewAuthor viewAuthor in _allAuthorsList)
         {
             if (viewAuthor.Name.ToLower().StartsWith(query.ToLower()))
             {
                 PossibleAuthorsList.Add(viewAuthor);
             }
         }
     }
 }