Ejemplo n.º 1
0
        static App()
        {
            AppDomain.CurrentDomain.UnhandledException += ExceptionLogger.LogAppDomainException;

            RegisterServices();

            CtcpClient.ClientSoftware.Name             = "MetroIRC";
            CtcpClient.ClientSoftware.Version          = Assembly.GetExecutingAssembly().GetName().Version.ToString(2);
            CtcpClient.ClientSoftware.OSName           = "Windows";
            CtcpClient.ClientSoftware.DownloadLocation = "https://bitbucket.org/Aethec/metroirc/downloads";

            ColorManager.AddMainColorDictionary(Colors.Black, new Uri("MetroIrc;component/Resources/Colors/Black.xaml", UriKind.Relative));
            ColorManager.AddMainColorDictionary(Colors.White, new Uri("MetroIrc;component/Resources/Colors/White.xaml", UriKind.Relative));

            TranslationManager.TranslationProvider = TranslationManager.ResourcesTranslationProvider;

            if (!TranslationManager.AvailableLanguages.Contains(TranslationManager.CurrentLanguage))
            {
                if (!TranslationManager.AvailableLanguages.Contains(DefaultCulture))
                {
                    throw new ApplicationException("Do not delete the en-US translation file.");
                }

                TranslationManager.CurrentLanguage = DefaultCulture;
            }
        }