/// <summary> /// Open the setting window /// </summary> /// <param name="e"></param> protected override void OnActivated(EventArgs e) { configurationWin = new ConfigurationWindow(); //also in case of newly created user read it and use as default UserProfile = configurationWin.Profile; chatID = UserProfile.Sender; // If UserProfile is the default user force a setup if (configurationWin.NewlyCreatedUser) { //open the setting windows configurationWin.Owner = this; configurationWin.ShowDialog(); } base.OnActivated(e); }
/// <summary> /// Open the configuration window /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Configure_button_click(object sender, RoutedEventArgs e) { configurationWin = new ConfigurationWindow(); configurationWin.Owner = this; configurationWin.ShowDialog(); }