public static void ShowSettingsDialog(Window owner) { ChatClientControl chatControl = ((MainWindow)SquiggleContext.Current.MainWindow).chatControl; ISelfBuddy buddy = null; if (chatControl.ContactList.ChatContext.Coalesce(context => context.IsLoggedIn)) { buddy = chatControl.ContactList.ChatContext.LoggedInUser; } var settings = new SettingsWindow(SquiggleContext.Current); settings.Owner = owner; if (settings.ShowDialog().GetValueOrDefault()) { chatControl.SignIn.LoadSettings(SettingsProvider.Current.Settings); } }
internal SettingsWindow(SquiggleContext context) : this() { this.context = context; this.currentUser = context.ChatClient.CurrentUser; }