Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
 internal SettingsWindow(SquiggleContext context) : this()
 {
     this.context     = context;
     this.currentUser = context.ChatClient.CurrentUser;
 }