public ObservableGamesView(GameObservationManager observer, ICSClient client) { observableGamesWidget = new ObservableGamesWidget (observer); relayTournamentsView = new RelayTournamentsView (client); TabPos = PositionType.Left; AppendPage (relayTournamentsView, new Label (Catalog. GetString ("Tournaments"))); AppendPage (observableGamesWidget, new Label (Catalog. GetString ("Games"))); ShowAll (); }
public ICSDetailsWidget() : base() { menubar = new ICSMenuBar (); menubar.disconnectMenuItem.Activated += on_disconnect_activate; menubar.connectMenuItem.Activated += on_connect_activate; menubar.ShowAll (); Image img = new Image (); img.Stock = Stock.Network; toolbutton = new ToolButton (img, Catalog. GetString ("Chess Server")); toolbutton.ShowAll (); client = new ICSClient (); title = String.Format (Catalog.GetString ("ICS: {0}@{1}:{2}"), client.User, client.server, client.port); book = new Notebook (); book.Show (); Add (book); obManager = new GameObservationManager (client, this); observableGames = new ObservableGamesWidget (obManager); graph = new GameAdvertisementGraph (client); book.AppendPage (graph, new Label (Catalog. GetString ("Seek Graph"))); ads = new GameAdvertisements (client); book.AppendPage (ads, new Label (Catalog. GetString ("Game Seeks"))); book.AppendPage (observableGames, new Label (Catalog. GetString ("Watch Games"))); shell = new ICSShell (client); book.AppendPage (shell, new Label (Catalog. GetString ("Shell"))); client.ChallengeEvent += OnChallengeEvent; client.AuthEvent += OnAuth; client.ConnectionErrorEvent += OnConnectionError; ShowConfigWidget (); menubar.disconnectMenuItem.Sensitive = false; GLib.Idle.Add (delegate () { Authenticate (); return false;} ); accel = new AccelGroup (); menubar.quitMenuItem. AddAccelerator ("activate", accel, new AccelKey (Gdk.Key. q, Gdk. ModifierType. ControlMask, AccelFlags. Visible)); ShowAll (); CsBoardApp.Instance.QuitEvent += OnQuitEvent; }