示例#1
0
 // ============================================
 // 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);
     });
 }
示例#2
0
 // ============================================
 // 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);
 }
示例#3
0
        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);
            });
        }
示例#4
0
        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);
        }
示例#5
0
 private void OnLoginDialogClose(object sender)
 {
     GUI.Dialogs.Login login = sender as GUI.Dialogs.Login;
     login.PasswordFocusIn -= new FocusInEventHandler(OnPasswordFocusIn);
 }
示例#6
0
        // ============================================
        // PRIVATE (Methods) Event Handlers
        // ============================================
        private void OnLoginDialogStarted(object sender)
        {
            GUI.Dialogs.Login loginDialog = sender as GUI.Dialogs.Login;

            AddMenu(loginDialog.Menu);
        }