private static void Load_Executed(object sender, ExecutedRoutedEventArgs e) { if (Context as MainWindow != null) { if ((Context as MainWindow).lbxSavedPatterns.SelectedIndex != -1) { DotMatrixSetting setting = ((Context as MainWindow).lbxSavedPatterns.SelectedItem as DotMatrixSetting); (Context as MainWindow).LoadDotMatrixFromSetting(setting); } } }
private static void Load_Executed(object sender, ExecutedRoutedEventArgs e) { if (context as MainWindow != null && listBox != null) { if (listBox.SelectedIndex != -1) { DotMatrixSetting setting = listBox.SelectedItem as DotMatrixSetting; (context as MainWindow).LoadDotMatrixFromSetting(setting); } } }