public MainWindow() { if (!Debugger.IsAttached) { AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; } m_options = new ChatOptions(); m_playSounds = m_options.GetOption("PlaySounds", true); m_highlightQuestions = m_options.GetOption("HighlightQuestions", true); m_confirmBans = m_options.GetOption("ConfirmBans", true); m_confirmTimeouts = m_options.GetOption("ConfirmTimeouts", false); m_showIcons = m_options.GetOption("ShowIcons", true); m_showTimestamp = m_options.GetOption("ShowTimestamps", false); m_fontSize = 14; OnTop = m_options.GetOption("OnTop", false); m_channel = m_options.Stream.ToLower(); TwitchHttp.Instance.PollChannelData(m_channel); TwitchHttp.Instance.ChannelDataReceived += Instance_ChannelDataReceived; m_thread = new Thread(ThreadProc); m_thread.Start(); Messages = new ObservableCollection <ChatItem>(); InitializeComponent(); Channel.Text = m_channel; ChatInput.Focus(); }
public MainWindow() { if (!Debugger.IsAttached) { AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; } m_options = new ChatOptions(); m_playSounds = m_options.GetOption("PlaySounds", true); m_highlightQuestions = m_options.GetOption("HighlightQuestions", true); m_confirmBans = m_options.GetOption("ConfirmBans", true); m_confirmTimeouts = m_options.GetOption("ConfirmTimeouts", false); m_showIcons = m_options.GetOption("ShowIcons", true); m_showTimestamp = m_options.GetOption("ShowTimestamps", false); m_fontSize = 14; OnTop = m_options.GetOption("OnTop", false); m_channelName = m_options.Stream.ToLower(); LoadAsyncData(); DispatcherTimer dispatcherTimer = new DispatcherTimer(); dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick); dispatcherTimer.Interval = new TimeSpan(0, 2, 0); dispatcherTimer.Start(); Messages = new ObservableCollection <ChatItem>(); InitializeComponent(); Channel.Text = m_channelName; ChatInput.Focus(); }
public MainWindow() { if (!Debugger.IsAttached) AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; m_options = new ChatOptions(); m_playSounds = m_options.GetOption("PlaySounds", true); m_highlightQuestions = m_options.GetOption("HighlightQuestions", true); m_confirmBans = m_options.GetOption("ConfirmBans", true); m_confirmTimeouts = m_options.GetOption("ConfirmTimeouts", false); m_showIcons = m_options.GetOption("ShowIcons", true); m_showTimestamp = m_options.GetOption("ShowTimestamps", false); m_fontSize = 14; OnTop = m_options.GetOption("OnTop", false); m_channelName = m_options.Stream.ToLower(); LoadAsyncData(); DispatcherTimer dispatcherTimer = new DispatcherTimer(); dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick); dispatcherTimer.Interval = new TimeSpan(0, 2, 0); dispatcherTimer.Start(); Messages = new ObservableCollection<ChatItem>(); InitializeComponent(); Channel.Text = m_channelName; ChatInput.Focus(); }
public MainWindow() { if (!Debugger.IsAttached) AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; m_options = new ChatOptions(); m_playSounds = m_options.GetOption("PlaySounds", true); m_highlightQuestions = m_options.GetOption("HighlightQuestions", true); m_confirmBans = m_options.GetOption("ConfirmBans", true); m_confirmTimeouts = m_options.GetOption("ConfirmTimeouts", false); m_showIcons = m_options.GetOption("ShowIcons", true); m_showTimestamp = m_options.GetOption("ShowTimestamps", false); m_fontSize = 14; OnTop = m_options.GetOption("OnTop", false); m_channel = m_options.Stream.ToLower(); TwitchHttp.Instance.PollChannelData(m_channel); TwitchHttp.Instance.ChannelDataReceived += Instance_ChannelDataReceived; m_thread = new Thread(ThreadProc); m_thread.Start(); Messages = new ObservableCollection<ChatItem>(); InitializeComponent(); Channel.Text = m_channel; ChatInput.Focus(); }