private void SettingsButton_Clicked(object sender, RoutedEventArgs e) { ModifySettingsDialog dialog = new ModifySettingsDialog(this.NetworkConnectionData.UserName, this.NetworkConnectionData.ServerAddress, this.NetworkConnectionData.ViewerAddress); dialog.Owner = this; bool?result = dialog.ShowDialog(); if (result.HasValue && result.Value) { if (!dialog.UserName.Equals(this.NetworkConnectionData.UserName)) { this.NetworkConnectionData.UserName = dialog.UserName; } if (!dialog.ServerAddress.Equals(this.NetworkConnectionData.ServerAddress)) { this.NetworkConnectionData.ServerAddress = dialog.ServerAddress; } if (!dialog.ViewerAddress.Equals(this.NetworkConnectionData.ViewerAddress)) { this.NetworkConnectionData.ViewerAddress = dialog.ViewerAddress; } } }
private void SettingsButton_Clicked(object sender, RoutedEventArgs e) { ModifySettingsDialog dialog = new ModifySettingsDialog(this.NetworkConnectionData.UserName, this.NetworkConnectionData.ServerAddress, this.NetworkConnectionData.ViewerAddress); dialog.Owner = this; bool? result = dialog.ShowDialog(); if (result.HasValue && result.Value) { if (!dialog.UserName.Equals(this.NetworkConnectionData.UserName)) { this.NetworkConnectionData.UserName = dialog.UserName; } if (!dialog.ServerAddress.Equals(this.NetworkConnectionData.ServerAddress)) { this.NetworkConnectionData.ServerAddress = dialog.ServerAddress; } if (!dialog.ViewerAddress.Equals(this.NetworkConnectionData.ViewerAddress)) { this.NetworkConnectionData.ViewerAddress = dialog.ViewerAddress; } } }