private void OnClearAllButLastHour(object sender, ExecutedRoutedEventArgs e)
        {
            DateTime Now = DateTime.UtcNow;

            while (GlobalMessageList.Count > 0 && GlobalMessageList[0].LogTime < Now)
            {
                GlobalMessageList.RemoveAt(0);
            }
        }
        private void OnParseMessageInfo(List <string> ChatLineList, string GuildName)
        {
            for (int i = 0; i < 4; i++)
            {
                if (ChatLineList.Count == 0)
                {
                    if (AutoScroll)
                    {
                        scrollMessages.ScrollToBottom();
                    }
                    return;
                }

                LogEntry LogEntry;
                if (Plugin.ParseMessageInfo(ChatLineList[0], HideSpoilers, DisplayGlobal, DisplayHelp, DisplayTrade, GuildName, out LogEntry))
                {
                    GlobalMessageList.Add(LogEntry);
                }

                ChatLineList.RemoveAt(0);
            }

            Dispatcher.BeginInvoke(new ParseMessageInfoHandler(OnParseMessageInfo), ChatLineList, GuildName);
        }
 private void OnClearAll(object sender, ExecutedRoutedEventArgs e)
 {
     GlobalMessageList.Clear();
 }