private bool InitializeQuickTimePlayerControl()
        {
            if (!MainModel.isQuickTimeSupported) // it failed last time so don't try initializing again this session
            {
                Logger.Debug("isQuickTimeSupported = false");
                return false;
            }

            try
            {
                DisposeWindowsMediaPlayerControl();

                qtPlayer = new QuickTimePlayerControl();

                qtPlayer.OpenStateChanged += new EventHandler<OpenStateChangedEventArgs>(handleOpenStateChanged);
                qtPlayer.PlayStateChanged += new EventHandler<PlayStateChangedEventArgs>(handlePlayStateChanged);
                qtPlayer.PlayerError += new EventHandler<PlayerErrorEventArgs>(handlePlayerError);

                qtPlayer.Visible = false;

                this.Controls.Add(qtPlayer);

                this.PlayerType = PlayerTypes.QuickTime;

                AnalyticsHelper.FireEvent("Each details - QuickTime installed");

                Logger.Info("success");

                return true;
            }
            catch (Exception ex)
            {
                Logger.Error("Error initializing: " + ex);

                MainModel.isQuickTimeInstalled = false;

                MainModel.isQuickTimeSupported = false;

                AnalyticsHelper.FireEvent("Each details - QuickTime not installed");

                return false;
            }
        }
 private void DisposeQuickTimeControl()
 {
     if (qtPlayer != null)
     {
         qtPlayer.OpenStateChanged -= this.handleOpenStateChanged;
         qtPlayer.PlayStateChanged -= this.handlePlayStateChanged;
         qtPlayer.PlayerError -= this.handlePlayerError;
         qtPlayer.Dispose();
         qtPlayer = null;
     }
 }