Exemplo n.º 1
0
 /// <summary>
 /// Launches or focuses MPC-HC.
 /// </summary>
 private void mpchcLaunch(object sender, RoutedEventArgs e)
 {
     if (m_mpcAPI == null || !m_mpcAPI.isHooked || !m_mpcAPI.FocusMPC())
     {
         if (File.Exists(ConfigFile.Read("mpcPath").ToString()))
         {
             m_mpcAPI = new MPCAPI(this);
             m_mpcAPI.OnFileWatched += new FileWatchedHandler(OnFileWatched);
         }
         else if (MessageBox.Show("Please ensure you have located the mpc-hc executable inside the options.\nWould you like to set mpc-hc's location now?",
                                  "Media Player Classic - Home Cinema not found!", MessageBoxButton.YesNo, MessageBoxImage.Error) == MessageBoxResult.Yes &&
                  SetMPCHCLocation())
         {
             mpchcLaunch(sender, e);
         }
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Launches or focuses MPC-HC.
 /// </summary>
 private void mpchcLaunch(object sender, RoutedEventArgs e)
 {
     if (m_mpcAPI == null || !m_mpcAPI.isHooked || !m_mpcAPI.FocusMPC())
     {
         if (File.Exists(ConfigFile.Read("mpcPath").ToString()))
         {
             m_mpcAPI = new MPCAPI(this);
             m_mpcAPI.OnFileWatched += new FileWatchedHandler(OnFileWatched);
         }
         else if (MessageBox.Show("Please ensure you have located the mpc-hc executable inside the options.\nWould you like to set mpc-hc's location now?",
                                  "Media Player Classic - Home Cinema not found!", MessageBoxButton.YesNo, MessageBoxImage.Error) == MessageBoxResult.Yes &&
                 SetMPCHCLocation())
             mpchcLaunch(sender, e);
     }
 }