예제 #1
0
        public LogDetailViewModel(string logPath)
        {
            LogPath           = Path.Combine(FolderFactory.LogFolder, logPath);
            CanExecuteClose   = true;
            CanExecuteExport  = true;
            ShowScoreItems    = Visibility.Collapsed;
            ShowActivityItems = Visibility.Collapsed;

            if (File.Exists(LogPath) && LogPath.EndsWith(".xml"))
            {
                if (LogPath.Contains("Score"))
                {
                    LogType        = LogTypes.Score;
                    ScoreItems     = GetScoreItems();
                    ShowScoreItems = Visibility.Visible;
                }
                else if (LogPath.Contains("Activity"))
                {
                    LogType           = LogTypes.Activity;
                    ActivityItems     = GetActivityItems();
                    ShowActivityItems = Visibility.Visible;
                }
            }
        }