// ============================================ // PUBLIC Constructors // ============================================ /// Create New NyFolder Window public Window() : base(Info.Name + " " + Info.Version) { // Initialize Window this.SetDefaultSize(620, 320); DefaultIcon = StockIcons.GetPixbuf("NyFolderIcon"); this.DeleteEvent += new DeleteEventHandler(OnWindowDelete); // Initialize VBox this.vboxMain = new Gtk.VBox(false, 2); this.Add(this.vboxMain); // Initialize Menu Manager this.menuManager = new MenuManager(); this.menuManager.Activated += new EventHandler(OnMenuActivated); this.AddAccelGroup(this.menuManager.AccelGroup); // Initialize HBox Menu this.hboxMenu = new Gtk.HBox(false, 0); this.vboxMain.PackStart(hboxMenu, false, false, 0); // Initialize MenuBar Gtk.MenuBar menuBar = this.MenuBar; this.hboxMenu.PackStart(menuBar, false, false, 0); // Initialize HBox this.hbox = new Gtk.HBox(); this.vboxMain.PackStart(this.hbox, true, true, 2); // Initialize Left VBox this.vboxLeft = new Gtk.VBox(false, 2); this.hbox.PackStart(this.vboxLeft, false, false, 2); // Initialize User Panel this.userPanel = new UserPanel(); this.vboxLeft.PackStart(this.userPanel, false, false, 2); // Initialize Right VBox this.vboxRight = new Gtk.VBox(false, 2); this.hbox.PackStart(this.vboxRight, true, true, 2); // Initialize ToolBar Gtk.Toolbar toolBar = this.ToolBar; toolBar.ShowArrow = true; toolBar.IconSize = Gtk.IconSize.LargeToolbar; toolBar.ToolbarStyle = ToolbarStyle.Both; this.vboxRight.PackStart(toolBar, false, false, 2); // Initialize Notebook Viewer this.notebookViewer = new NotebookViewer(); this.vboxRight.PackStart(this.notebookViewer, true, true, 2); // Initialize Status Bar this.statusBar = new Gtk.Statusbar(); this.vboxMain.PackEnd(this.statusBar, false, false, 0); // Window Show All this.ShowAll(); }
// ============================================ // PUBLIC Constructors // ============================================ public FolderManager(MenuManager menu, UserPanel userPanel, NotebookViewer nv) { this.userPanel = userPanel; this.notebookViewer = nv; this.menuManager = menu; // Network Viewer Displayed at Start... SetSensitiveGoUpMenu(false); SetSensitiveGoHomeMenu(false); // Add Event Handlers this.menuManager.Activated += new EventHandler(OnMenuActivated); this.notebookViewer.SwitchPage += new SwitchPageHandler(OnSwitchPage); this.notebookViewer.DirChanged += new BoolEventHandler(OnBoolEventHandler); this.userPanel.FolderButton.Clicked += new EventHandler(OnMyFolderCliecked); }
// ============================================ // PUBLIC Constructors // ============================================ public FolderManager(GUI.Window window) { // Initialize Components this.menuManager = window.Menu; this.userPanel = window.UserPanel; this.notebookViewer = window.NotebookViewer; // Network Viewer Displayed at Start... SetSensitiveGoUpMenu(false); SetSensitiveGoHomeMenu(false); // Add Event Handlers this.menuManager.Activated += new EventHandler(OnMenuActivated); this.notebookViewer.SwitchPage += new SwitchPageHandler(OnSwitchPage); this.notebookViewer.DirChanged += new BoolEventHandler(OnDirChanged); this.userPanel.FolderButton.Clicked += new EventHandler(OnMyFolderCliecked); }
// ============================================ // PUBLIC Constructors // ============================================ public NetworkManager(MenuManager menu, UserPanel userPanel, NotebookViewer nv) { this.userPanel = userPanel; this.notebookViewer = nv; this.menuManager = menu; // Initialize P2PManager & CMD Manager this.p2pManager = P2PManager.GetInstance(); this.cmdManager = CmdManager.GetInstance(); // Network SetSensitiveNetworkMenu(P2PManager.IsListening()); // Add Event Handlers this.menuManager.Activated += new EventHandler(OnMenuActivated); notebookViewer.NetworkViewer.ItemRemoved += new PeerSelectedHandler(OnPeerRemove); }
// ============================================ // PUBLIC Constructors // ============================================ public NetworkManager(GUI.Window window) { // Initialize Events (None) UserAccept = null; // Initialize Components this.menuManager = window.Menu; this.userPanel = window.UserPanel; this.notebookViewer = window.NotebookViewer; this.networkViewer = this.notebookViewer.NetworkViewer; // Initialize P2PManager & CMD Manager this.p2pManager = P2PManager.GetInstance(); // Network SetSensitiveNetworkMenu(P2PManager.IsListening()); // Add Event Handlers menuManager.Activated += new EventHandler(OnMenuActivated); networkViewer.ItemRemoved += new PeerSelectedHandler(OnPeerRemove); CmdManager.AddProtocolEvent += new SetProtocolEventHandler(OnAddProtocolEvent); CmdManager.DelProtocolEvent += new SetProtocolEventHandler(OnDelProtocolEvent); }