コード例 #1
0
        }     //end (Paging_FormClosing)

        /// <summary>
        /// used to play the default controller
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnPlayDefaultController_Click(object sender, EventArgs e)
        {
            try
            {
                btnPlayDefaultController.BackColor = Color.DimGray;
                if (m_objShotBox != null)
                {
                    m_objTagData.UserTags      = new string[] { m_objShotBox.UserTags[0].Name, m_objShotBox.UserTags[1].Name };
                    m_objTagData.Indexes       = new string[] { "-1", "-1" };
                    m_objTagData.IsOnAirUpdate = true;
                    m_objTagData.SgXml         = m_sSGvariable;
                    m_objTagData.TagType       = new DataTargetType[] { DataTargetType.UserTag, DataTargetType.UserTag };
                    m_objTagData.Values        = new string[] { "Header", m_objArrPageText[0].ToString().Trim() };
                    m_objShotBox.UpdateSceneGraph(m_objTagData);
                    m_objShotBox.Play(true, true);
                    m_iPlayCount++;
                    // m_objShotBox.Play();

                    #region old code
                    // m_objShotBox.Controllers[0].Play();
                    //if (m_bIsPause)
                    //{
                    //    m_objShotBox.Play(false, false);
                    //    m_objShotBox.Controllers[0].Play(false,false);
                    //    m_bIsPause = false;
                    //}//end (if)
                    //else
                    //{
                    //    if (m_bIsStop)
                    //    {
                    //        m_objShotBox.Controllers[0].Stop();
                    //        m_iPlayCount = 0;
                    //        m_objArrPageText.Clear();
                    //        ReadFile(txtTextFile.Tag.ToString());
                    //        m_bIsStop = false;
                    //    }//end (if)
                    //    m_objTagData.UserTags = new string[] { m_objShotBox.UserTags[0].Name, m_objShotBox.UserTags[1].Name };
                    //    m_objTagData.Indexes = new string[] { "-1", "-1" };
                    //    m_objTagData.IsOnAirUpdate = true;
                    //    m_objTagData.SgXml = m_sSGvariable;
                    //    m_objTagData.TagType = new DataTargetType[] { DataTargetType.UserTag, DataTargetType.UserTag };
                    //    m_objTagData.Values = new string[] { "Header", m_objArrPageText[0].ToString().Trim() };

                    //    m_objShotBox.UpdateSceneGraph(m_objTagData);
                    //    m_objShotBox.Play(true, true);
                    //    m_iPlayCount++;
                    //}//end (else)
                    #endregion
                } //end (if)
            }     //end (btnPlayDefaultController_Click)
            catch (Exception ex)
            {
                LogWriter.WriteLog(MODULENAME, ex);
            } //end (catch)
        }     //end (btnPlayDefaultController_Click)
コード例 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void objPlayer1_OnShotBoxStatus(object sender, SHOTBOXARGS e)
        {
            if (e.SHOTBOXRESPONSE == SHOTBOXMSG.PREPARED)
            {
                IsInitialized = true;
                IsSceneLoaded = true;

                if (sender != null)
                {
                    ShotBox shotboxobj = sender as ShotBox;
                    if (shotboxobj != null)
                    {
                        if (shotboxobj.Equals(objScorePlayer))
                        {
                            WriteTrace("objPlayer1_OnShotBoxStatus Scoreplayer Scene prepared,Calling SetMatchUdt...");
                            SetMatchUdt();
                        }
                        WriteTrace("objPlayer1_OnShotBoxStatus Scoreplayer Scene prepared,Calling Play..");
                        shotboxobj.Play(true, true);
                    }
                    else
                    {
                        if (sender is IPlayer)
                        {
                            IPlayer playerobj = sender as IPlayer;
                            if (playerobj != null)
                            {
                                WriteTrace("objPlayer1_OnShotBoxStatus BackGround Scene prepared,Calling Play...");
                                playerobj.Play(true, true);
                            }
                        }
                    }
                }
            }
            else if (e.SHOTBOXRESPONSE == SHOTBOXMSG.PLAYCOMPLETE)
            {
                WriteTrace("objPlayer1_OnShotBoxStatus SHOTBOXMSG.PLAYCOMPLETE event..");
                if (sender is ShotBox)
                {
                    ShotBox shotboxobj = sender as ShotBox;
                    if (shotboxobj.Equals(objScorePlayer))
                    {
                        WriteTrace("objPlayer1_OnShotBoxStatus Scoreplayer Scene playcomplete,Calling DeleteSg...");
                        shotboxobj.DeleteSg();
                    }
                }
                else if (sender is IPlayer)
                {
                    IPlayer playerobj = sender as IPlayer;
                    if (playerobj.Equals(objBGPlayer))
                    {
                        WriteTrace("objPlayer1_OnShotBoxStatus BackGround Scene playcomplete,Calling DeleteSg...");
                        playerobj.DeleteSg();
                    }
                }
            }
        }
コード例 #3
0
ファイル: Paging.cs プロジェクト: WASP3D/Shot-Box-SDK-Samples
 private void ContinuePlay()
 {
     try
     {
         if (!Equals(cbPlayText.CheckState, CheckState.Checked))
         {
             m_objShotBox.Play();
         }
         else if (Equals(cbPlayText.CheckState, CheckState.Checked))
         {
             m_iPlayCount = 0;
             m_objArrayList.Clear();
             ReadFile(txtTextFile.Tag.ToString());
             UpdatePlayController();
         }
     }
     catch (Exception ex)
     {
         LogWriter.WriteLog("error in continue play", ex);
     }
 }
コード例 #4
0
        }     //end (btnFileDialog_Click_1)

        /// <summary>
        /// used to play the scenegraph
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnPlay_Click_1(object sender, EventArgs e)
        {
            try
            {
                if (!Equals(m_objShotBox, null))
                {
                    btnPlay.BackColor = Color.DarkGray;
                    if (!m_bIsPause)
                    {
                        m_objShotBox.Play(true, true);
                    }//end (if)
                    else
                    {
                        m_objShotBox.Play(false, false);
                    }
                    m_bIsPause = false;
                } //end (if)
            }     //end (try)
            catch (Exception ex)
            {
                LogWriter.WriteLog(MODULENAME, ex);
            } //end (catch)
        }     //end (btnPlay_Click_1)
コード例 #5
0
 /// <summary>
 /// used to play the scenegraph
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPlay_Click(object sender, EventArgs e)
 {
     try
     {
         if (!Equals(m_objShotBox, null))
         {
             btnPlay.BackColor = Color.DarkGray;
             if (!m_isPause)
             {
                 m_objShotBox.Play(true, true);
             }
             else
             {
                 m_objShotBox.Play(false, false);
             }
             m_isPause = false;
         }
     }
     catch (Exception ex)
     {
         LogWriter.WriteLog("error in playing the scenegraph", ex.Message);
     }
 }