/// <summary> /// Account Management Shutdown Thread. /// </summary> static private void ShutdownThread() { foreach (Banter.Account account in AccountManagement.GetAccounts()) { account.Disconnect(); } }
private void OnAddPersonClicked(object sender, EventArgs args) { HIGMessageDialog dialog = new HIGMessageDialog(this, Gtk.DialogFlags.DestroyWithParent, Gtk.MessageType.Question, Gtk.ButtonsType.OkCancel, Catalog.GetString("Banter - Add person"), Catalog.GetString("Invite a new person"), Catalog.GetString("Enter the email address of the person you'd like to add.")); Gtk.Entry emailEntry = new Entry(); emailEntry.ActivatesDefault = true; dialog.ExtraWidget = emailEntry; int returnCode = dialog.Run(); if (returnCode == (int)Gtk.ResponseType.Ok) { string emailAddress = emailEntry.Text.Trim(); // do stuff to add the new person Account account = null; foreach (Account acc in AccountManagement.GetAccounts()) { account = acc; break; } if (account != null) { account.InviteUser(emailAddress); } //Logger.Debug("FIXME: Add code to invite the person {0}", emailAddress); } dialog.Destroy(); }