// ============================================ // PRIVATE (Methods) Event Handlers // ============================================ private void OnPasswordFocusIn(object obj, FocusInEventArgs args) { Gtk.Application.Invoke(delegate { GUI.Dialogs.Login login = this.nyFolder.LoginDialog; login.Password = BuddyDb.AccountPassword(login.Username); }); }
// ============================================ // PRIVATE (Methods) Event Handlers // ============================================ private void OnUserLogin(object sender) { GUI.Dialogs.Login login = this.nyFolder.LoginDialog; if (login.RememberPassword && login.SecureAuthentication) { BuddyDb.AddAccount(login.Username, login.Password); } myAccountId = BuddyDb.AccountId(login.Username); }
private void OnLoginDialogStart(object sender) { Gtk.Application.Invoke(delegate { GUI.Dialogs.Login login = sender as GUI.Dialogs.Login; // Fill User Entry Completion string[] accounts = BuddyDb.Accounts(); login.UserNameCompletion.Model = CreateEntryCompletion(accounts); login.UserNameComboBoxAppend(accounts); login.UserNameCompletion.TextColumn = 0; // Add Login Dialogs Menus AddLoginDialogMenus(login); // Add Event Handler When Password Entry Get Focus login.PasswordFocusIn += new FocusInEventHandler(OnPasswordFocusIn); }); }
private void AddLoginDialogMenus(GUI.Dialogs.Login login) { ActionEntry[] entries = new ActionEntry[] { // new ActionEntry("FileMenu", null, "_File", null, null, null), // File Menu new ActionEntry("Accounts", null, "Accounts", null, "Accounts", new EventHandler(OnAccountsDialog)) }; string ui = "<ui>" + " <menubar name='MenuBar'>" + " <menu action='FileMenu'>" + " <menuitem action='Accounts' position='top'/>" + " </menu>" + " </menubar>" + "</ui>"; login.Menu.AddMenus(ui, entries); }
private void OnLoginDialogClose(object sender) { GUI.Dialogs.Login login = sender as GUI.Dialogs.Login; login.PasswordFocusIn -= new FocusInEventHandler(OnPasswordFocusIn); }
// ============================================ // PRIVATE (Methods) Event Handlers // ============================================ private void OnLoginDialogStarted(object sender) { GUI.Dialogs.Login loginDialog = sender as GUI.Dialogs.Login; AddMenu(loginDialog.Menu); }