Esempio n. 1
0
        public WpfMediaKitMedia()
        {
            //Commands
            OpenFileCommand = new RelayCommand(OpenFile);
            OpenDiscCommand = new RelayCommand(OpenDisc, o => false);
            OpenStreamCommand = new RelayCommand(OpenStream, CanOpenStream);
            OpenDeviceCommand = new RelayCommand(OpenDevice, o => false);
            OpenProcessCommand = new RelayCommand(o => { }, o => false);
            PlayCommand = new RelayCommand(Play, CanPlay);
            PauseCommand = new RelayCommand(Pause, CanPause);
            StopCommand = new RelayCommand(Stop, CanStop);
            PreviousCommand = new RelayCommand(PreviousChapter);
            NextCommand = new RelayCommand(NextChapter);
            SeekCommand = new RelayCommand(Seek, CanSeek);
            LoopCommand = new RelayCommand(Loop);

            _timer = new DispatcherTimer(DispatcherPriority.Send);
            _timer.Interval = new TimeSpan(0, 0, 0, 0, 125);
            _timer.Tick += timer_Tick;
        }
Esempio n. 2
0
 public VlcDotNetMedia()
 {   
     //Commands
     OpenFileCommand = new RelayCommand(OpenFile);
     OpenDiscCommand = new RelayCommand(OpenDisc);
     OpenStreamCommand = new RelayCommand(OpenStream, CanOpenStream);
     OpenDeviceCommand = new RelayCommand(o => { }, o => false);
     OpenProcessCommand = new RelayCommand(o => { }, o => false); 
     PlayCommand = new RelayCommand(Play, CanPlay);
     PauseCommand = new RelayCommand(Pause, CanPause);
     StopCommand = new RelayCommand(Stop, CanStop);
     PreviousCommand = new RelayCommand(PreviousChapter);
     NextCommand = new RelayCommand(NextChapter);
     SeekCommand = new RelayCommand(Seek, CanSeek);
     LoopCommand = new RelayCommand(Loop);
     
     PropertyChanged += OnPropertyChanged;
 }
Esempio n. 3
-1
        public GdiMedia()
        {
            //Commands

            OpenFileCommand = new RelayCommand(o => { }, o => false);
            OpenDiscCommand = new RelayCommand(o => { }, o => false);
            OpenStreamCommand = new RelayCommand(o => { }, o => false);
            OpenDeviceCommand = new RelayCommand(o => { }, o => false);
            OpenProcessCommand = new RelayCommand(OpenProcess);

            _media = new Image();
            _timer = new DispatcherTimer(DispatcherPriority.Send);
            _timer.Interval = new TimeSpan(0, 0, 0, 0, 125);
            _timer.Tick += TimerOnTick;
        }