Ejemplo n.º 1
0
 public static JMediaPlayer GetJMediaPlayer()
 {
     if (jmp == null)
     {
         jmp = new JMediaPlayer();
     }
     return(jmp);
 }
 public IntelligentPlayingManager(bool Enabled)
 {
     enabled             = Enabled;
     mediaPlayer         = JMediaPlayer.GetJMediaPlayer();
     config              = Config.GetInstance;
     pauseTimer          = new DispatcherTimer();
     pauseTimer.Tick    += PauseTimeElapsed;
     pauseTimer.Interval = new TimeSpan(0, 0, 0, 0, 1000);
     userPaused          = false;
 }
Ejemplo n.º 3
0
 static bool SetMediaSource(string[] args)
 {
     if (args != null && args.Length > 0)
     {
         JMediaPlayer jmp = JMediaPlayer.GetJMediaPlayer();
         if (jmp.Playing)
         {
             jmp.Stop();
         }
         JMediaPlayer.NowPlaying = args[0];
         return(true);
     }
     return(false);
 }
Ejemplo n.º 4
0
 public bool SignalExternalCommandLineArgs(IList <string> args)
 {
     string[] Args = null;
     if (args.Count > 1)
     {
         Args = new string[args.Count - 1];
         for (int i = 0; i < Args.Length; i++)
         {
             Args[i] = args[i + 1];
         }
     }
     if (SetMediaSource(Args))
     {
         JMediaPlayer.GetJMediaPlayer().Play();
         MainWindow.Topmost = true;
         MainWindow.Topmost = false;
     }
     return(true);
 }
Ejemplo n.º 5
0
 private void Init()
 {
     config = Config.GetInstanceInit(functions);
     intelligentPlayingManager = new IntelligentPlayingManager();
     title         = new TitleAssembler(SetTitle);
     changeAllowed = true;
     SetFunctions();
     jmp = JMediaPlayer.GetJMediaPlayer();
     config.SignUp(ConfigChanged);
     SetConfig();
     jmp.SetMediaEvents(MediaEnded, MediaOpened, PositionChanged, PlayChanged);
     if (JMediaPlayer.NowPlaying != String.Empty)
     {
         btn_start.IsEnabled = true;
         btn_start_Click(null, null);
     }
     ofd = new OpenFileDialog();
     slide_volume.Value = 50;
     hook = new GlobalKeyboardHook(KeyDownHandler);
     hook.Hook();
 }