示例#1
0
        public MainForm()
        {
            this.Buffers = new List<Buffer>();

            // Initialize UI elements
            this.InitializeComponent();

            // Create the initial buffer
            Buffer b = new Buffer(1, "kitchat");
            this.Buffers.Add(b);
            this.SwitchBuffer(b);

            // Add the starting message
            string ver = Assembly.GetExecutingAssembly().GetName().Version.ToString();
            string m = String.Format("Started KitChat {0:s}", ver);
            BufferEntry bentry = new BufferEntry(m);
            b.Enqueue(bentry);

#if DEBUG
            Buffer debugBuffer = new Buffer(2, "debug");
            this.Buffers.Add(debugBuffer);
#endif
        }
示例#2
0
 public void Enqueue(BufferEntry entry)
 {
     this.Contents.Enqueue(entry);
     this.OnUpdateContents(new EventArgs());
 }