private void MainForm_Load(object sender, EventArgs e) { try { if (IniFileInfo.ShowExample) { if (PlayApp.PlayListArray.Count == 0) { PlayApp.DebugLoadPlayListInfo(); //PlayApp.ThreadLoadPlayListTimeCurrent = PlayApp.ThreadLoadPlayListTime - 2; } } Thread tmpThread = new Thread(this.ThreadLoadPlayListVoid); tmpThread.IsBackground = true; tmpThread.Start(); this.tmrPlayList.Start(); #if !DEBUG MaxShowThis(false); #endif //商标 - 在最下层 this.ShowTrademarkForm(); //字幕 - 在第二层 this.ShowMessageForm(); } catch (Exception ex) { LogApp.OutputErrorLog("MainForm", "MainForm_Load", ex); } }
private void ThreadLoadPlayListVoid() { try { if (PlayApp.NowLoadPlayList == false) { PlayApp.LoadPlayListInfo(); } } catch (Exception ex) { LogApp.OutputErrorLog("MainForm", "ThreadLoadPlayListVoid", ex); } }
private void tmrPlayList_Tick(object sender, EventArgs e) { this.GetNowVisible(); try { this.tmrPlayList.Stop(); this.ThreadLoadPlayList(); if (PlayApp.NewPlayListExist) { CloseAll(); PlayApp.ExecutePlayListStart(); } if (PlayApp.PlayListArray.Count > 0) { PlayList eplObject = PlayApp.ExecutePlayList; if (eplObject == null || eplObject.PlayListState == PlayListStateType.Wait || eplObject.PlayListState == PlayListStateType.Stop) { if (PlayApp.CurrentPlayValid()) { if (PlayApp.ExecutePlayListStart()) { ShowApp.NowMessageIsRefresh = true; ShowApp.NowTrademarkIsRefresh = true; executeTempleteFlag = false; this.tmrTemplete_Tick(null, null); } } else { CloseAll(); return; } } else if (eplObject.PlayListState == PlayListStateType.Last) { if (eplObject.LoopPlayValid) { eplObject.PlayStart(); ShowApp.NowMessageIsRefresh = true; ShowApp.NowTrademarkIsRefresh = true; executeTempleteFlag = false; this.tmrTemplete_Tick(null, null); } else { eplObject.PlayStop(); } } else if (eplObject.PlayListState == PlayListStateType.Execute) { } } System.Threading.Thread.Sleep(100); this.tmrPlayList.Start(); } catch (Exception ex) { this.tmrPlayList.Start(); LogApp.OutputErrorLog("MainForm", "tmrPlayList_Tick", ex); } }