public static ClientSettings Show(Window owner, ClientSettings clientSettings)
 {
     var window = new SettingsWindow
     {
         Owner = owner,
         WindowStartupLocation = WindowStartupLocation.CenterOwner,
         ResizeMode = ResizeMode.NoResize,
         SizeToContent = SizeToContent.WidthAndHeight,
         _clientSettings = clientSettings
     };
     window.UpdateForm();
     return window.ShowDialog() == true ? window._clientSettings : null;
 }
Beispiel #2
0
 private void SettingsButton_OnClick(object sender, RoutedEventArgs e)
 {
     _clientSettings = SettingsWindow.Show(this, _clientSettings) ?? _clientSettings;
 }