Ejemplo n.º 1
0
        public static ChatObject[] Load(string path)
        {
            if (!File.Exists(path))
            {
                return(null);
            }

            try {
                string       json     = File.ReadAllText(path);
                ChatObject[] chatObjs = JsonConvert.DeserializeObject <List <ChatObject> > (json).ToArray();

                if (chatObjs != null && chatObjs.Length > 0)
                {
                    string channel = chatObjs[0].ChannelID;
                    TwitchBadgeLoader.LoadChannelBadges(channel);
                    BTTVEmoticonLoader.LoadChannelEmoticons(channel);
                    FFZEmoticonLoader.LoadChannelSets(channel);
                }
                return(chatObjs);
            } catch (Exception ex) {
                System.Diagnostics.Debug.WriteLine("Failed to load chat objects: " + ex);
                return(null);
            }
        }
Ejemplo n.º 2
0
 private void LoadingForm_Shown(object sender, EventArgs e)
 {
     VodDownloader.UpdateVideoDl();
     TwitchBadgeLoader.LoadGlobalBadges();
     BTTVEmoticonLoader.LoadOfficialEmoticons();
 }