Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="songViewModel"></param>
        public SngTimbresViewModel(ISongViewModel songViewModel)
        {
            SongViewModel = songViewModel;

            Song = SongViewModel.Song;

            // Select first if none selected.
            if ((Song.Timbres.TimbresCollection.Any()) &&
                (Song.Timbres.TimbresCollection.Count(item => item.IsSelected) == 0))
            {
                Song.Timbres.TimbresCollection[0].IsSelected = true;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="songViewModel"></param>
        public SongTimbresWindow(ISongViewModel songViewModel)
        {
            InitializeComponent();
            ViewModel = new SngTimbresViewModel(songViewModel)
            {
                UpdateUiContent = () =>
                {
                    listViewTimbres.Items.Refresh();
                    listViewTimbres.UpdateLayout();
                },

                CloseWindow = CloseWindow
            };

            DataContext = ViewModel;
        }
Exemplo n.º 3
0
 public MainViewModel(ISongViewModel songViewModel, IPlaylistViewModel playlistViewModel)
 {
     SongViewModel     = songViewModel;
     PlaylistViewModel = playlistViewModel;
 }