* Corrected small things to make Circ-git compile from within MonoDevelop
[circ.git] / Circ.Frontend.GtkSharp / DiscussionContainer.cs
blob9a3e64a7bb7486f72c46397ea09402441998edda
1 #region License
2 /* Circ.Frontend.GtkSharp : GTK# frontend for Circ
3 * Copyright (C) 2007 LAVAL Jérémie
5 * This file is licensed under the terms of the LGPL.
7 * For the complete licence see the file COPYING.
8 */
9 #endregion
10 using System;
11 using System.Collections.Generic;
12 using Gtk;
15 namespace Circ.Frontend.GtkSharp
17 public partial class MainWindow
19 int numberOfDiscussions;
20 int numberOfServers;
22 /*public void AddDiscussion(string channelName, IMessagesPanel messages, IUsersPanel users)
24 HBox box = new HBox(false, 2);
26 ScrolledWindow win1 = new ScrolledWindow();
27 win1.HscrollbarPolicy = PolicyType.Never;
28 win1.VscrollbarPolicy = PolicyType.Always;
29 win1.Add((MessagesPanel)messages);
31 ScrolledWindow win2 = new ScrolledWindow();
32 win2.Add((UsersPanel)users);
34 box.Add(win1);
35 box.Add(win2);
37 numberOfDiscussions++;
39 Gtk.Application.Invoke( delegate (object s, EventArgs e) {
40 this.discussionContainer.AppendPage(box, new Label(channelName));
41 win1.ShowAll();
42 win2.ShowAll();
43 } );
46 public void AddServer(string serverName, IServerPanel server)
48 ScrolledWindow win1 = new ScrolledWindow();
49 win1.HscrollbarPolicy = PolicyType.Never;
50 win1.VscrollbarPolicy = PolicyType.Always;
51 win1.Add((MessagesPanel)server);
52 Label lbl = new Label(serverName);
54 numberOfServers++;
56 Logger.Debug("Updating the View with a new Server");
57 Gtk.Application.Invoke( delegate (object s, EventArgs e) {
58 this.discussionContainer.AppendPage(win1, lbl);
59 win1.ShowAll();
60 lbl.Show();
61 } );
62 }*/
64 public Notebook ServerContainer {
65 get {
66 return serverContainer;
70 public int NumberOfDiscussions {
71 get {
72 return numberOfDiscussions;
76 public int NumberOfServers {
77 get {
78 return numberOfServers;