AniDBmini.MPCProcWatcher.StartUp C# (CSharp) Method

StartUp() public method

Checks for already running mpc processes.
public StartUp ( ) : void
return void
        public void StartUp()
        {
            ManagementObjectSearcher mpcProcs = new ManagementObjectSearcher(m_wScope,
                new SelectQuery("SELECT * FROM Win32_Process WHERE Name = 'mpc-hc.exe' OR name = 'mpc-hc64.exe'"));

            foreach (ManagementObject obj in mpcProcs.Get())
                OnMPCStarted(obj);
        }

Usage Example

        public MainWindow(AniDBAPI api)
        {
            m_aniDBAPI = api;
            AniDBAPI.AppendDebugLine("Welcome to AniDBmini, connected to: " + m_aniDBAPI.APIServer);

            InitializeComponent();

            SetMylistVisibility();

            m_mpcProcWatcher = new MPCProcWatcher();
            m_mpcProcWatcher.OnMPCStarted += new MPCStartedHandler(OnMPCStarted);
            m_mpcProcWatcher.StartUp();

            mylistStats.ItemsSource     = mylistStatsList;
            debugListBox.ItemsSource    = m_aniDBAPI.DebugLog;
            hashingListBox.ItemsSource  = hashFileList;
            animeTabControl.ItemsSource = animeTabList;

            animeTabList.OnCountChanged += new CountChangedHandler(animeTabList_OnCountChanged);

            m_aniDBAPI.OnFileHashingProgress += new FileHashingProgressHandler(OnFileHashingProgress);
            m_aniDBAPI.OnAnimeTabFetched     += new AnimeTabFetchedHandler(OnAnimeTabFetched);
            m_aniDBAPI.OnFileInfoFetched     += new FileInfoFetchedHandler(OnFileInfoFetched);
        }
All Usage Examples Of AniDBmini.MPCProcWatcher::StartUp