/// Quit The Application public void Quit() { Restart = false; // Quitting Event if (loginDialog != null && LoginDialogClosed != null) { LoginDialogClosed(loginDialog); loginDialog.Hide(); loginDialog.Destroy(); } loginDialog = null; if (mainWindow != null && MainWindowClosed != null) { MainWindowClosed(mainWindow); mainWindow.Hide(); mainWindow.Destroy(); } mainWindow = null; // Do User Logout if (UserLogout != null) { UserLogout(myInfo); } Protocol.MyInfo.Logout(); this.myInfo = null; }
private void OnLogout(object sender) { RestartApplication = true; // Destroy Main Window window.Destroy(); window = null; Gtk.Application.Quit(); }
// ============================================ // PUBLIC Constructors // ============================================ public Glue(GUI.Window window) { this.window = window; this.window.RemoveEvent += new BlankEventHandler(OnRemove); // Download Manager Protocol.DownloadManager.Added += new BlankEventHandler(AddDownload); Protocol.DownloadManager.Finished += new BlankEventHandler(DelDownload); Protocol.DownloadManager.Received += new BlankEventHandler(UpdateDownload); // Upload Manager UploadManager.Added += new BlankEventHandler(AddUpload); UploadManager.Finished += new BlankEventHandler(DelUpload); UploadManager.SendedPart += new BlankEventHandler(UpdateUpload); }
// ============================================ // PRIVATE Members // ============================================ // ============================================ // PUBLIC Constructors // ============================================ public DownloadManager() { this.dlWindow = null; // Initialize Talk Stock Gdk.Pixbuf pixbuf; pixbuf = new Gdk.Pixbuf(null, "Download.png"); StockIcons.AddToStock("Download", pixbuf); StockIcons.AddToStockImages("Download", pixbuf); pixbuf = new Gdk.Pixbuf(null, "Upload.png"); StockIcons.AddToStockImages("Upload", pixbuf); pixbuf = new Gdk.Pixbuf(null, "DlTrash.png"); StockIcons.AddToStockImages("DlTrash", pixbuf); }
// ============================================ // PRIVATE Methods // ============================================ private void RunMainWindow() { // Start NyFolder Window this.window = new GUI.Window(); this.window.Logout += new BlankEventHandler(OnLogout); Debug.Log("Logged In as {0}", myInfo.Name); Debug.Log("Shared Path: {0}", Paths.UserSharedDirectory(myInfo.Name)); // Add GUI Glue new GUI.Glue.FolderManager(window.Menu, window.UserPanel, window.NotebookViewer); new GUI.Glue.NetworkManager(window.Menu, window.UserPanel, window.NotebookViewer); new GUI.Glue.ProtocolManager(window.NotebookViewer); // NyFolder Window ShowAll this.window.ShowAll(); // Start 'Main Window Started' Event if (MainWindowStarted != null) { MainWindowStarted(this); } }
// ============================================ // PRIVATE Methods // ============================================ private void RunMainWindow() { // Start NyFolder Window mainWindow = new GUI.Window(); mainWindow.Quit += new BlankEventHandler(OnQuit); mainWindow.Logout += new BlankEventHandler(OnLogout); Debug.Log("Logged In as {0}", myInfo.Name); Debug.Log("Shared Path: {0}", Paths.UserSharedDirectory(myInfo.Name)); // Add GUI Glue new GUI.Glue.FolderManager(mainWindow); new GUI.Glue.NetworkManager(mainWindow); new GUI.Glue.ProtocolManager(mainWindow); // NyFolder Window ShowAll mainWindow.ShowAll(); // Start 'Main Window Started' Event if (MainWindowStarted != null) { MainWindowStarted(mainWindow); } }
// ============================================ // PRIVATE Methods // ============================================ private void RunMainWindow() { // Start NyFolder Window this.window = new GUI.Window(); this.window.Logout += new BlankEventHandler(OnLogout); Debug.Log("Logged In as {0}", myInfo.Name); Debug.Log("Shared Path: {0}", Paths.UserSharedDirectory(myInfo.Name)); // Add GUI Glue new GUI.Glue.FolderManager(window.Menu, window.UserPanel, window.NotebookViewer); new GUI.Glue.NetworkManager(window.Menu, window.UserPanel, window.NotebookViewer); new GUI.Glue.ProtocolManager(window.NotebookViewer); // NyFolder Window ShowAll this.window.ShowAll(); // Start 'Main Window Started' Event if (MainWindowStarted != null) MainWindowStarted(this); }
protected void OnDlManager(object sender, EventArgs args) { if (this.dlWindow == null) { this.dlWindow = new GUI.Window(); this.dlWindow.DeleteEvent += new DeleteEventHandler(OnDlWinClose); this.guiGlue = new GUI.Glue(this.dlWindow); } this.dlWindow.ShowAll(); }
protected void OnDlWinClose(object sender, DeleteEventArgs args) { if (this.guiGlue != null) { this.guiGlue.Dispose(); this.guiGlue = null; } if (this.dlWindow != null) { this.dlWindow.DeleteEvent -= new DeleteEventHandler(OnDlWinClose); this.dlWindow.Destroy(); this.dlWindow = null; } }