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.
11 using System
.Collections
.Generic
;
15 namespace Circ
.Frontend
.GtkSharp
17 public partial class MainWindow
19 int numberOfDiscussions
;
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);
37 numberOfDiscussions++;
39 Gtk.Application.Invoke( delegate (object s, EventArgs e) {
40 this.discussionContainer.AppendPage(box, new Label(channelName));
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);
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);
64 public Notebook ServerContainer
{
66 return serverContainer
;
70 public int NumberOfDiscussions
{
72 return numberOfDiscussions
;
76 public int NumberOfServers
{
78 return numberOfServers
;