private void nc_Click(object sender, RoutedEventArgs e) { this.Close(); if (Message.Content.ToString().ToLower().Contains("nintendont")) { SDSetup sd = new SDSetup(true, path); try { sd.Owner = (FindResource("mvm") as MainViewModel).mw; sd.WindowStartupLocation = WindowStartupLocation.CenterOwner; } catch (Exception) { } sd.ShowDialog(); } else { SDSetup sd = new SDSetup(false, path); try { sd.Owner = (FindResource("mvm") as MainViewModel).mw; sd.WindowStartupLocation = WindowStartupLocation.CenterOwner; } catch (Exception) { } sd.ShowDialog(); } }
private void nc_Click(object sender, RoutedEventArgs e) { Close(); var containNintendont = Message.Content.ToString().ToLower().Contains("nintendont"); SDSetup sd = new SDSetup(containNintendont ? true : false, path); try { sd.Owner = (FindResource("mvm") as MainViewModel).mw; sd.WindowStartupLocation = WindowStartupLocation.CenterOwner; } catch (Exception) { //left empty on purpose } sd.ShowDialog(); }