private void CreateItems() { if (ScoreSheet != null) { mListScoreItems.Clear(); for (int i = 0; i < ScoreSheet.Items.Count; i++) { ScoreItem item = ScoreSheet.Items[i]; ScoreGroup scoreGroup = item as ScoreGroup; if (scoreGroup != null) { ScoreGroupViewer scoreGroupViewer = new ScoreGroupViewer(); scoreGroupViewer.ScoreGroup = scoreGroup; scoreGroupViewer.Settings = Settings; scoreGroupViewer.Languages = Languages; scoreGroupViewer.LangID = LangID; scoreGroupViewer.ViewClassic = ViewClassic; scoreGroupViewer.ViewMode = ViewMode; if (ViewClassic == ScoreItemClassic.Table) { if (i > 0) { scoreGroupViewer.BorderThickness = new Thickness(1, 1, 0, 0); } else { scoreGroupViewer.BorderThickness = new Thickness(0, 1, 0, 0); } } mListScoreItems.Add(scoreGroupViewer); } Standard standard = item as Standard; if (standard != null) { StandardViewer standardViewer = new StandardViewer(); standardViewer.Standard = standard; standardViewer.Settings = Settings; standardViewer.Languages = Languages; standardViewer.LangID = LangID; standardViewer.ViewClassic = ViewClassic; standardViewer.ViewMode = ViewMode; if (ViewClassic == ScoreItemClassic.Table) { if (i > 0) { standardViewer.BorderThickness = new Thickness(1, 1, 0, 0); } else { standardViewer.BorderThickness = new Thickness(0, 1, 0, 0); } } mListScoreItems.Add(standardViewer); } } } }
private static void OnIsNAChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { StandardViewer viewer = (StandardViewer)d; if (viewer != null) { viewer.OnIsNAChanged((bool)e.OldValue, (bool)e.NewValue); } }