コード例 #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
        //public void UpdateScore(string Team,string score)
        //{
        //    if(isInitialized && isSceneLoaded)
        //    {
        //        TagData tg=new TagData();
        //        if(Team.ToLower()=="home")
        //        {
        //            tg.UserTags = new string[] { ConfigurationManager.AppSettings["homescoreusertag"] };
        //            tg.Values=new string[]{score};
        //            objplayer.UpdateSceneGraph(tg);
        //        }
        //        else
        //        {
        //            tg.UserTags = new string[] { ConfigurationManager.AppSettings["awayscoreusertag"] };
        //            tg.Values = new string[] { score };
        //            objplayer.UpdateSceneGraph(tg);
        //        }
        //    }
        //}
        public void TimerAction(string actiontype, string counter)
        {
            try
            {
                TagData tg = new TagData();
                switch (actiontype.ToLower())
                {
                case "start":
                    m_objBugPlayer.PlayActionSet(ConfigurationManager.AppSettings["counterstartaction"]);
                    break;

                case "stop":
                    m_objBugPlayer.PlayActionSet(ConfigurationManager.AppSettings["counterstopaction"]);
                    break;

                case "update":
                    tg.UserTags = new string[] { ConfigurationManager.AppSettings["counterusertag"] };
                    tg.Values   = new string[] { counter };

                    m_objBugPlayer.UpdateSceneGraph(tg);

                    break;

                case "updateextra":
                    tg.UserTags = new string[] { ConfigurationManager.AppSettings["extratimeusertag"] };
                    tg.Values   = new string[] { counter };
                    m_objBugPlayer.UpdateSceneGraph(tg);
                    break;

                case "extrain":
                    m_objBugPlayer.PlayActionSet(ConfigurationManager.AppSettings["extratimein"]);
                    break;

                case "extraout":
                    m_objBugPlayer.PlayActionSet(ConfigurationManager.AppSettings["extratimeout"]);
                    break;

                case "extrastart":
                    m_objBugPlayer.PlayActionSet(ConfigurationManager.AppSettings["startextratime"]);
                    break;

                case "extrastop":
                    m_objBugPlayer.PlayActionSet(ConfigurationManager.AppSettings["stopextratime"]);
                    break;

                default:
                    break;
                }
            }
            catch (Exception ex)
            {
                LogWriter.WriteLog(ex);
            }
        }
コード例 #3
0
ファイル: Paging.cs プロジェクト: WASP3D/Shot-Box-SDK-Samples
 /// <summary>
 /// update the controller
 /// </summary>
 private void UpdatePlayController()
 {
     m_objTagData.UserTags      = new string[] { m_objShotBox.UserTags[1].Name };
     m_objTagData.Indexes       = new string[] { "-1" };
     m_objTagData.IsOnAirUpdate = true;
     m_objTagData.SgXml         = m_sSGvariable;
     m_objTagData.TagType       = new DataTargetType[] { DataTargetType.UserTag };
     m_objTagData.Values        = new string[] { m_objArrayList[m_iPlayCount].ToString().Trim() };
     m_objShotBox.Controllers[0].GoTo(0);
     m_objShotBox.UpdateSceneGraph(m_objTagData);
     m_objShotBox.Controllers[0].Play();
     m_iPlayCount++;
 }
コード例 #4
0
 /// <summary>
 /// Set match udt name in the udt sequecer object
 /// </summary>
 /// <param name="frmobj"></param>
 public void SetMatchUdt()
 {
     if (objScorePlayer != null)
     {
         WriteTrace("SetMatchUDT " + Hometeamshortname + " VS " + Awayteamshortname);
         WriteTrace("SetMatchUDT " + Hometeamscore + " : " + Awayteamscore);
         TagData tg = new TagData();
         tg.UserTags      = new string[] { "Hometeamscore", "Awayteamscore", "Hometeamname", "Awayteamname" };
         tg.Values        = new string[] { Hometeamscore, Awayteamscore, Hometeamshortname, Awayteamshortname };
         tg.IsOnAirUpdate = true;
         tg.Indexes       = new string[] { "0", "0", "0", "0" };
         objScorePlayer.UpdateSceneGraph(tg);
     }
 }
コード例 #5
0
        }     //end (btnPreview_Click_1)

        /// <summary>
        /// used to update the scenegraph
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnUpdate_Click_1(object sender, EventArgs e)
        {
            TagData tagData;

            try
            {
                if (!Equals(m_objShotBox, null))
                {
                    if (!string.IsNullOrEmpty(cmbUserTag.SelectedItem.ToString()) && !string.IsNullOrEmpty(txtUserValue.Text))
                    {
                        tagData = new TagData();
                        tagData.IsOnAirUpdate = true;
                        tagData.SgXml         = Util.getSGFromWSL(fileDialog.FileName);
                        tagData.TagType       = new DataTargetType[] { DataTargetType.UserTag };
                        tagData.UserTags      = new string[] { cmbUserTag.SelectedItem.ToString() };
                        tagData.Values        = new string[] { txtUserValue.Text };
                        tagData.Indexes       = new string[] { "-1" };
                        m_objShotBox.UpdateSceneGraph(tagData);
                    } //end (if)
                }     //end (if)
            }         //end (try)
            catch (Exception ex)
            {
                LogWriter.WriteLog(MODULENAME, ex);
            } //end (catch)
        }     //end (btnUpdate_Click_1)
コード例 #6
0
        /// <summary>
        /// used to update the scenegraph
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnUpdate_Click_1(object sender, EventArgs e)
        {
            TagData tagData;

            try
            {
                if (!Equals(m_objShotBox, null))
                {
                    if (!string.IsNullOrEmpty(cmbUserTag.SelectedItem.ToString()) && !string.IsNullOrEmpty(txtUserValue.Text))
                    {
                        tagData = new TagData();
                        tagData.IsOnAirUpdate = true;
                        tagData.SgXml         = Util.getSGFromWSL(fileDialog.FileName);

                        tagData.UserTags = new string[] { cmbUserTag.SelectedItem.ToString() };
                        tagData.Values   = new string[] { txtUserValue.Text };
                        tagData.Indexes  = new string[] { "-1" };
                        m_objShotBox.UpdateSceneGraph(tagData);
                    }
                }
            }
            catch (Exception ex)
            {
                LogWriter.WriteLog("error in updating the scenegraph", ex.Message);
            }
        }