public App()
        {
            try
            {
                AppCurrent = Current;
            }
            catch { }
            if (LocalesManager.CheckResxLocales() && Environment.GetCommandLineArgs().Length == 1)
            {
                Process.Start(ResourceAssembly.Location);
                Application.Current.Shutdown();
                return;
            }

            AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;

            ModulesManager.PreInitModules();

            if (!Modules.SelfUpdater.Security.CheckEnvironment())
            {
                ExitApp(); return;
            }
            if (!HandleCmdArgs())
            {
                ExitApp(); return;
            }

            try
            {
                if (SingleInstance <App> .InitializeAsFirstInstance(Unique))
                {
                    mainInstance = true;
                    InitApp();
                }
                else
                {
                    ExitApp();
                }
            }
            catch (Exception e)
            {
                Logger.FatalError("App", e);
            }
        }