Esempio n. 1
0
 public static async Task BindWelcomeEventAsync(BindGameEvent welcomeEventHandler)
 {
     try
     {
         HttpResponseMessage response = await Connector.Client.PostAsJsonAsync(
             "bind_game_event", welcomeEventHandler);
     }
     catch (Exception ex)
     {
         string currentMethodName = ErrorHandling.GetCurrentMethodName();
         ErrorHandling.LogErrorToTxtFile(ex, currentMethodName);
     }
 }
Esempio n. 2
0
 public void CreateGameEventHandler()
 {
     try
     {
         List <Datas> datas = new List <Datas>()
         {
             new Datas()
             {
                 HasText      = true,
                 PreFix       = "",
                 IconId       = 1,
                 Suffix       = "%",
                 LengthMillis = 15000,
                 Repeats      = true
             }
         };
         List <Handlers> handlers = new List <Handlers>()
         {
             new Handlers()
             {
                 DeviceType = "screened",
                 Zone       = "one",
                 Mode       = "screen",
                 Datas      = datas
             }
         };
         GameEventHandler = new BindGameEvent()
         {
             Game     = "DAYACTIVE",
             Event    = "DISPLAY_TIME",
             Handlers = handlers
         };
     }
     catch (Exception ex)
     {
         string currentMethodName = ErrorHandling.GetCurrentMethodName();
         ErrorHandling.LogErrorToTxtFile(ex, currentMethodName);
     }
 }
Esempio n. 3
0
        public void CreateWelcomeEventHandler()
        {
            try
            {
                List <Datas> datas = new List <Datas>()
                {
                    new Datas()
                    {
                        HasText      = true,
                        PreFix       = "D",
                        IconId       = 15,
                        Suffix       = "",
                        LengthMillis = 500
                    },
                    new Datas()
                    {
                        HasText      = true,
                        PreFix       = "Da",
                        IconId       = 15,
                        Suffix       = "",
                        LengthMillis = 500
                    },
                    new Datas()
                    {
                        HasText      = true,
                        PreFix       = "Day",
                        IconId       = 15,
                        Suffix       = "",
                        LengthMillis = 500
                    },
                    new Datas()
                    {
                        HasText      = true,
                        PreFix       = "DayA",
                        IconId       = 15,
                        Suffix       = "",
                        LengthMillis = 500
                    },
                    new Datas()
                    {
                        HasText      = true,
                        PreFix       = "DayAc",
                        IconId       = 15,
                        Suffix       = "",
                        LengthMillis = 500
                    },
                    new Datas()
                    {
                        HasText      = true,
                        PreFix       = "DayAct",
                        IconId       = 15,
                        Suffix       = "",
                        LengthMillis = 500
                    },
                    new Datas()
                    {
                        HasText      = true,
                        PreFix       = "DayActi",
                        IconId       = 15,
                        Suffix       = "",
                        LengthMillis = 500
                    },
                    new Datas()
                    {
                        HasText      = true,
                        PreFix       = "DayActiv",
                        IconId       = 15,
                        Suffix       = "",
                        LengthMillis = 500
                    },
                    new Datas()
                    {
                        HasText      = true,
                        PreFix       = "DayActive",
                        IconId       = 15,
                        Suffix       = "",
                        LengthMillis = 500
                    },
                    new Datas()
                    {
                        HasText      = true,
                        PreFix       = "",
                        IconId       = 15,
                        Suffix       = "",
                        LengthMillis = 500
                    },
                    new Datas()
                    {
                        HasText      = true,
                        PreFix       = "DayActive",
                        IconId       = 15,
                        Suffix       = "",
                        LengthMillis = 500
                    },
                    new Datas()
                    {
                        HasText      = true,
                        PreFix       = "",
                        IconId       = 15,
                        Suffix       = "",
                        LengthMillis = 500
                    },
                    new Datas()
                    {
                        HasText      = true,
                        PreFix       = "DayActive",
                        IconId       = 15,
                        Suffix       = "",
                        LengthMillis = 1000
                    },
                };

                List <Handlers> handlers = new List <Handlers>()
                {
                    new Handlers()
                    {
                        DeviceType = "screened",
                        Zone       = "one",
                        Mode       = "screen",
                        Datas      = datas
                    }
                };

                //Bind Handler
                WelcomeEventHandler = new BindGameEvent()
                {
                    Game     = "DAYACTIVE",
                    Event    = "WELCOME",
                    Handlers = handlers
                };
            }
            catch (Exception ex)
            {
                string currentMethodName = ErrorHandling.GetCurrentMethodName();
                ErrorHandling.LogErrorToTxtFile(ex, currentMethodName);
            }
        }