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.
13 using Circ
.Controller
;
15 namespace Circ
.Frontend
.GtkSharp
17 public partial class ServerPanel
: Gtk
.Bin
19 IConnectionControl ctrl
;
20 MessagesPanel messages
;
23 public ServerPanel(IConnectionControl ctrl
): base()
26 Gtk
.Application
.Invoke( delegate {
27 this.messages
= new MessagesPanel();
28 this.buffer
= messages
.Buffer
;
31 this.textWindow
.Add(messages
);
32 this.channelsNb
.SwitchPage
+= PageSwitched
;
35 MainWindow
.CurrentServerPanel
= this;
38 internal Notebook Pages
{
40 return this.channelsNb
;
44 void PageSwitched(object sender
, SwitchPageArgs e
)
46 MainWindow
.CurrentChannelPanel
= this.channelsNb
.GetNthPage((int)e
.PageNum
) as ChannelPanel
;
49 /*public int CurrentPage {
51 return this.channelsNb.CurrentPage;
54 this.channelsNb.CurrentPage = value;
58 public Widget CurrentPageWidget {
60 return this.channelsNb.CurrentPageWidget;
64 public Widget GetMenuWidget(Widget widg)
66 return this.channelsNb.GetMenuLabel(widg);
71 return this.channelsNb.NPages;
75 public void NextPage()
77 this.channelsNb.NextPage();