コード例 #1
0
ファイル: DisplayBox.cs プロジェクト: Mofsy/jinxbot
        /// <summary>
        /// Creates a new <see>ChatBox</see>.
        /// </summary>
        public DisplayBox()
        {
            InitializeComponent();
            this.AddChatImplementation = new AddChatCallback(AddChatImpl);

            m_renderers = new Dictionary<Type, ChatNodeRenderer>();
            InitializeRenderer(typeof(ChatNode), typeof(ChatNodeRenderer));

            this.StylesheetUri = new Uri(Path.Combine(Environment.CurrentDirectory, "StandardStyles.xaml"), UriKind.Absolute);
        }
コード例 #2
0
ファイル: DisplayBox.cs プロジェクト: wjlafrance/jinxbot
        /// <summary>
        /// Creates a new <see>ChatBox</see>.
        /// </summary>
        public DisplayBox()
        {
            InitializeComponent();
            this.AddChatImplementation = new AddChatCallback(AddChatImpl);

            m_renderers = new Dictionary <Type, ChatNodeRenderer>();
            InitializeRenderer(typeof(ChatNode), typeof(ChatNodeRenderer));

            this.StylesheetUri = new Uri(Path.Combine(Environment.CurrentDirectory, "StandardStyles.xaml"), UriKind.Absolute);
        }
コード例 #3
0
ファイル: IrcPanel.cs プロジェクト: Tawling/botwoon
 private void AddChat(string sender, string message)
 {
     if (destination.InvokeRequired)
     {
         try
         {
             var d = new AddChatCallback(AddChat);
             Invoke(d, new[] { sender, message });
         }
         catch (InvalidOperationException)
         {
             //This is probably safely ignored.
         }
     }
     else
     {
         chatBox.AddChat(sender, message);
     }
 }