Beispiel #1
0
        public void TimerAction(string actiontype, string counter)
        {
            try
            {
                TagData tg = new TagData();
                switch (actiontype.ToLower(CultureInfo.InvariantCulture))
                {
                case "start":
                    objScorePlayer.PlayActionSet(ConfigHandler.AppSettings.Settings["counterstartaction"].Value);
                    break;

                case "stop":
                    objScorePlayer.PlayActionSet(ConfigHandler.AppSettings.Settings["counterstopaction"].Value);
                    break;

                case "update":
                    tg.UserTags      = new string[] { ConfigHandler.AppSettings.Settings["counterusertag"].Value };
                    tg.Values        = new string[] { counter };
                    tg.IsOnAirUpdate = true;
                    tg.Indexes       = new string[] { "0" };
                    objScorePlayer.UpdateSceneGraph(tg);
                    break;

                case "updateextra":
                    tg.UserTags      = new string[] { ConfigHandler.AppSettings.Settings["extratimeusertag"].Value };
                    tg.Values        = new string[] { counter };
                    tg.IsOnAirUpdate = true;
                    tg.Indexes       = new string[] { "0" };
                    objScorePlayer.UpdateSceneGraph(tg);
                    break;

                case "extrain":
                    objScorePlayer.PlayActionSet(ConfigHandler.AppSettings.Settings["extratimein"].Value);
                    break;

                case "extraout":
                    objScorePlayer.PlayActionSet(ConfigHandler.AppSettings.Settings["extratimeout"].Value);
                    break;

                case "extrastart":
                    objScorePlayer.PlayActionSet(ConfigHandler.AppSettings.Settings["startextratime"].Value);
                    break;

                case "extrastop":
                    objScorePlayer.PlayActionSet(ConfigHandler.AppSettings.Settings["stopextratime"].Value);
                    break;

                default:
                    break;
                }
            }
            catch (Exception ex)
            {
                LogWriter.WriteLog(ex); WriteTrace(ex.ToString());
            }
        }
Beispiel #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);
            }
        }