AniDBmini.MainWindow.PlayWithMPCHC_Click C# (CSharp) Метод

PlayWithMPCHC_Click() приватный Метод

private PlayWithMPCHC_Click ( object sender, RoutedEventArgs e ) : void
sender object
e System.Windows.RoutedEventArgs
Результат void
        private void PlayWithMPCHC_Click(object sender, RoutedEventArgs e)
        {
            object entry = (sender as MenuItem).Tag;

            if (entry is AnimeEntry)
                AddToPlaylist(GetFilePathList(sender), true);
            else if (entry is FileEntry)
            {
                FileEntry fEntry = entry as FileEntry;
                if (fEntry.path != null ||
                    (MessageBox.Show("Would you like to locate the file?", "File not found!",
                    MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.Yes &&
                    SetFileLocation(fEntry)))
                {
                    mpchcLaunch(this, null);

                    ThreadPool.QueueUserWorkItem(new WaitCallback(delegate
                    {
                        while (!m_mpcAPI.isHooked) Thread.Sleep(200);
                        m_mpcAPI.OpenFile(fEntry.path);
                    }));
                }
            }
        }