Octgn.Play.Gui.ChatControl.ChatControl C# (CSharp) Method

ChatControl() public method

public ChatControl ( ) : System
return System
        public ChatControl()
        {
            AutoScroll = true;
            InitializeComponent();
            if (DesignerProperties.GetIsInDesignMode(this)) return;

            (output.Document.Blocks.FirstBlock).Margin = new Thickness();

            //var listener = new ChatTraceListener("ChatListener", this);

            Loaded += delegate
            {
                chatTimer2 = new System.Timers.Timer(100);
                chatTimer2.Enabled = true;
                chatTimer2.Elapsed += this.TickMessage;
            };
            Unloaded += delegate
            {
                chatTimer2.Enabled = false;
                chatTimer2.Elapsed -= this.TickMessage;
                chatTimer2.Dispose();
            };
        }