Пример #1
0
        public MainWindow()
        {
            _vm = new MainWindowViewModel();
            this.DataContext = _vm;

            InitializeComponent();
        }
Пример #2
0
        public MainWindowViewModel()
        {
            // init instance of wmp-player from wmp.dll
            PlayerEngineModel playerEngine = new PlayerEngineModel(false,false);

            // init view-models taking wmp-player as argument
            Player = new PlayerEngineViewModel(playerEngine);
            CurrentSong = new CurrentSongViewModel(playerEngine);
            Playlist = new PlaylistViewModel(playerEngine);
            Navigation = new Server.ServerNavigationViewModel();
            Servers = new ConnectionLibrary();

            // undo/redo
            CommandLib = new CommandLibrary();

            Player.Volume = 80;

            _this = this;
        }
Пример #3
0
 //Lav konstruktør som hente mainwindowviewmodel ind
 public ConnectCommand(MainWindowViewModel mwvm)
 {
     this._mwvm = mwvm;
 }
Пример #4
0
 public ClearPlaylistCommand(MainWindowViewModel mwvm)
 {
     this._mwvm = mwvm;
 }
Пример #5
0
 public NavigateCommand(MainWindowViewModel mwvm)
 {
     this._mwvm = mwvm;
 }
Пример #6
0
 public PlayPauseCommand(MainWindowViewModel vm)
 {
     _vm = vm;
 }
Пример #7
0
 public AddToPlaylistCommand(MainWindowViewModel mwvm)
 {
     //this._plwm = plwm;
     this._mwvm = mwvm;
 }
 public RemoveFromPlaylistCommand(MainWindowViewModel mvvm)
 {
     _mwvm = mvvm;
 }