Beispiel #1
0
        private async Task <List <RecallInfo> > GetRecallInfo(string year, string make, string model)
        {
            var querystring = "?year=" + year + "&make=" + make + "&model=" + model;
            var response    = await client.GetAsync("http://prhinehart-carfinder.azurewebsites.net:80/api/Cars/GetRecallInfo" + querystring);

            var result     = response.Content.ReadAsStringAsync().Result;
            var recallList = new List <RecallInfo>();

            if (result == "No recall information was found for this vehicle.")
            {
                var recallInfo = new RecallInfo()
                {
                    Summary = result
                };
                recallList.Add(recallInfo);
                return(recallList);
            }
            var data = (JArray)JsonConvert.DeserializeObject(result);

            foreach (var item in data.Children())
            {
                var recallInfo = new RecallInfo()
                {
                    Summary     = item["Summary"].ToString(),
                    Component   = item["Component"].ToString(),
                    Consequence = item["Consequence"].ToString()
                };
                recallList.Add(recallInfo);
            }
            return(recallList);
        }
Beispiel #2
0
 private static void Game_OnGameLoad(EventArgs args)
 {
     tts.Volume = 100;
     int i = 0;
     foreach (Obj_AI_Hero hero in
     ObjectManager.Get<Obj_AI_Hero>().Where(hero => hero.Team != ObjectManager.Player.Team))
     {
         RecallInfo recallInfo = new RecallInfo(hero, i++);
         Program.Instance()._recallInfo[hero] = recallInfo;
     }
     //_recallInfo[ObjectManager.Player] = new RecallInfo(ObjectManager.Player,i);
     Program.Instance().Print("Recall Voice Loaded!");
 }
Beispiel #3
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            tts.Volume = 100;
            int i = 0;

            foreach (Obj_AI_Hero hero in
                     ObjectManager.Get <Obj_AI_Hero>().Where(hero => hero.Team != ObjectManager.Player.Team))
            {
                RecallInfo recallInfo = new RecallInfo(hero, i++);
                Program.Instance()._recallInfo[hero] = recallInfo;
            }
            //_recallInfo[ObjectManager.Player] = new RecallInfo(ObjectManager.Player,i);
            Program.Instance().Print("Recall Voice Loaded!");
        }