示例#1
0
        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);
            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();
        }
示例#2
0
        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();
        }
示例#3
0
        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();
        }
示例#4
0
        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();
        }