Example #1
0
        public MainWindow()
        {
            PlaylistViewModel avm = new PlaylistViewModel();
            LibraryViewModel lvm = new LibraryViewModel();
            MW_ViewModel	vm = new MW_ViewModel(avm, lvm, this);
            this.DataContext = vm;

            vm.ClickHandlers.Add(ButtonType.Play, action_Play);
            vm.ClickHandlers.Add(ButtonType.Pause, action_Pause);
            vm.ClickHandlers.Add(ButtonType.Stop, action_Stop);
            vm.OpenHandler += action_Open;
            vm.SetMediaHandler += setMediaElement;

            _mouseIsDown = false;
            SeekerIsEnabled = false;
            SeekerMax = 1;

            InitializeComponent();

            _seekerTimer = new DispatcherTimer();
            _seekerTimer.Interval = TimeSpan.FromMilliseconds(200);
            _seekerTimer.Tick += SeekerTick;

            PlaylistGrid.DataContext = avm;
            Library_tab.DataContext = lvm;
        }
Example #2
0
        public fullscreen(VisualBrush vb, MW_ViewModel vm)
        {
            this.DataContext = vm;
            InitializeComponent();

            display.Fill = vb;
        }