//Load a new video file - return true if succes, false otherwise public Boolean load(String filename, Control panel) { // Did the filename change? if (m_play != null && filename != this.filename) { // File name changed, close the old file m_play.Dispose(); m_play = null; m_State = State.Uninit; } // If we have no file open if (m_play == null) { try { // Open the file, provide a handle to play it in this.filename = filename; m_play = new DxPlay(panel, filename); // Let us know when the file is finished playing m_play.StopPlay += new DxPlay.DxPlayEvent(m_play_StopPlay); m_State = State.Stopped; } catch (COMException ce) { return(false); } } //A new file was loaded return(true); }
//Load a new video file - return true if succes, false otherwise public Boolean load(String filename, Control panel) { // Did the filename change? if (m_play != null && filename != this.filename) { // File name changed, close the old file m_play.Dispose(); m_play = null; m_State = State.Uninit; } // If we have no file open if (m_play == null) { try { // Open the file, provide a handle to play it in this.filename = filename; m_play = new DxPlay(panel, filename); // Let us know when the file is finished playing m_play.StopPlay += new DxPlay.DxPlayEvent(m_play_StopPlay); m_State = State.Stopped; } catch (COMException ce) { return false; } } //A new file was loaded return true; }