private void CreateComments()
 {
     if (ScoreItem == null)
     {
         return;
     }
     PanelComments.Children.Clear();
     for (int i = 0; i < ScoreItem.Comments.Count; i++)
     {
         Comment       comment       = ScoreItem.Comments[i];
         CommentViewer commentViewer = new CommentViewer();
         commentViewer.Comment     = comment;
         commentViewer.ViewClassic = ViewClassic;
         PanelComments.Children.Add(commentViewer);
     }
 }
        private void CreateScoreObject()
        {
            PanelScoreObjects.Children.Clear();
            if (ScoreObject != null)
            {
                ScoreSheet scoreSheet;
                switch (ScoreObject.Type)
                {
                case ScoreObjectType.ScoreSheet:
                    scoreSheet = ScoreObject as ScoreSheet;
                    if (scoreSheet != null)
                    {
                        ScoreSheetViewer scoreSheetViewer = new ScoreSheetViewer();
                        scoreSheetViewer.ScoreSheet  = scoreSheet;
                        scoreSheetViewer.Settings    = Settings;
                        scoreSheetViewer.Languages   = Languages;
                        scoreSheetViewer.LangID      = LangID;
                        scoreSheetViewer.ViewClassic = scoreSheet.ViewClassic;
                        PanelScoreObjects.Children.Add(scoreSheetViewer);
                    }
                    break;

                case ScoreObjectType.ScoreGroup:
                    ScoreGroup scoreGroup = ScoreObject as ScoreGroup;
                    if (scoreGroup != null)
                    {
                        scoreSheet = scoreGroup.ScoreSheet;
                        ScoreGroupViewer scoreGroupViewer = new ScoreGroupViewer();
                        scoreGroupViewer.ScoreGroup  = scoreGroup;
                        scoreGroupViewer.Settings    = Settings;
                        scoreGroupViewer.ViewClassic = scoreGroup.ViewClassic;
                        if (scoreSheet != null)
                        {
                            scoreGroupViewer.ViewClassic = scoreSheet.ViewClassic;
                        }
                        scoreGroupViewer.Languages = Languages;
                        scoreGroupViewer.LangID    = LangID;
                        PanelScoreObjects.Children.Add(scoreGroupViewer);
                    }
                    break;

                case ScoreObjectType.NumericStandard:
                case ScoreObjectType.YesNoStandard:
                case ScoreObjectType.ItemStandard:
                case ScoreObjectType.SliderStandard:
                    Standard standard = ScoreObject as Standard;
                    if (standard != null)
                    {
                        scoreSheet = standard.ScoreSheet;
                        StandardViewer standardViewer = new StandardViewer();
                        standardViewer.ViewClassic = standard.ViewClassic;
                        if (scoreSheet != null)
                        {
                            standardViewer.ViewClassic = scoreSheet.ViewClassic;
                        }
                        standardViewer.Standard  = standard;
                        standardViewer.Settings  = Settings;
                        standardViewer.Languages = Languages;
                        standardViewer.LangID    = LangID;
                        PanelScoreObjects.Children.Add(standardViewer);
                    }
                    break;

                case ScoreObjectType.StandardItem:
                    StandardItem standardItem = ScoreObject as StandardItem;
                    if (standardItem != null)
                    {
                        StandardItemViewer standardItemViewer = new StandardItemViewer();
                        standardItemViewer.StandardItem = standardItem;
                        standardItemViewer.Settings     = Settings;
                        standardItemViewer.Languages    = Languages;
                        standardItemViewer.LangID       = LangID;
                        PanelScoreObjects.Children.Add(standardItemViewer);
                    }
                    break;

                case ScoreObjectType.TextComment:
                case ScoreObjectType.ItemComment:
                    Comment comment = ScoreObject as Comment;
                    if (comment != null)
                    {
                        CommentViewer commentViewer = new CommentViewer();
                        commentViewer.Comment   = comment;
                        commentViewer.Settings  = Settings;
                        commentViewer.Languages = Languages;
                        commentViewer.LangID    = LangID;
                        PanelScoreObjects.Children.Add(commentViewer);
                    }
                    break;

                case ScoreObjectType.CommentItem:
                    CommentItem commentItem = ScoreObject as CommentItem;
                    if (commentItem != null)
                    {
                        CommentItemViewer commentItemViewer = new CommentItemViewer();
                        commentItemViewer.CommentItem = commentItem;
                        commentItemViewer.Settings    = Settings;
                        commentItemViewer.Languages   = Languages;
                        commentItemViewer.LangID      = LangID;
                        PanelScoreObjects.Children.Add(commentItemViewer);
                    }
                    break;

                case ScoreObjectType.ControlItem:
                    ControlItem controlItem = ScoreObject as ControlItem;
                    if (controlItem != null)
                    {
                        ControlItemViewer controlItemViewer = new ControlItemViewer();
                        controlItemViewer.ControlItem = controlItem;
                        controlItemViewer.Settings    = Settings;
                        controlItemViewer.Languages   = Languages;
                        controlItemViewer.LangID      = LangID;
                        PanelScoreObjects.Children.Add(controlItemViewer);
                    }
                    break;
                }
            }
        }