Ejemplo n.º 1
0
        private AnalyzerDatabaseStatistics LoadStatistics()
        {
            try
            {
                AnalyzerDatabaseStatistics statistics;
                if (ZetaLongPaths.ZlpIOHelper.FileExists(LocalizationStatisticsService.AnalyzerDatabaseStatisticsPath))
                {
                    statistics = XmlSerialize <AnalyzerDatabaseStatistics> .Deserialize(
                        LocalizationStatisticsService.AnalyzerDatabaseStatisticsPath);
                }
                else
                {
                    statistics = EmptyStatistics();
                }

                return(statistics);
            }
            catch (Exception)
            {
                return(EmptyStatistics());
            }
        }
        private AnalyzerDatabaseSettings LoadSettings()
        {
            try
            {
                AnalyzerDatabaseSettings settings;
                if (ZetaLongPaths.ZlpIOHelper.FileExists(LocalizationSettingsService.AnalyzerDatabaseConfigPath))
                {
                    settings = XmlSerialize <AnalyzerDatabaseSettings> .Deserialize(
                        LocalizationSettingsService.AnalyzerDatabaseConfigPath);
                }
                else
                {
                    settings = EmptySettings();
                }

                return(settings);
            }
            catch (Exception)
            {
                return(EmptySettings());
            }
        }