Ejemplo n.º 1
0
        private void backdropMovieCombo_DropDown(object sender, EventArgs e)
        {
            if (_node == null || updating)
            {
                return;
            }

            if (_node.DBManager == null)
            {
                _node.DBManager = MovingPicturesCore.DatabaseManager;
            }

            object selected = backdropMovieCombo.SelectedItem;

            backdropMovieCombo.Items.Clear();
            HashSet <DBMovieInfo>            unsortedMovies = _node.GetPossibleFilteredItems();
            IOrderedEnumerable <DBMovieInfo> sortedMovies   = unsortedMovies.OrderBy((movie) => movie.SortBy);

            backdropMovieCombo.Items.AddRange(sortedMovies.ToArray());

            backdropMovieCombo.SelectedItem = selected;
        }
 /// <summary>
 /// Returns a list of possible movies for this node
 /// </summary>
 /// <param name="node"></param>
 /// <returns></returns>
 public HashSet<DBMovieInfo> GetPossibleMovies(DBNode<DBMovieInfo> node)
 {
     lock (syncRefresh) {
         if (!possibleMovies.ContainsKey(node)) {
             possibleMovies[node] = node.GetPossibleFilteredItems();
         }
     }
     return possibleMovies[node];
 }