Little Startup Manager/Program.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。


using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Threading;
using System.Globalization;

namespace Little_Startup_Manager
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            bool bMutexCreated = false;
            Mutex mutexMain = new Mutex(true, "Little Startup Manager", out bMutexCreated);

            // If mutex isnt available, show message and exit...
            if (!bMutexCreated)
            {
                MessageBox.Show(Properties.Resources.programAlreadyRunning, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                Application.Exit();
                return;
            }

            if (args.Length > 0)
            {
                foreach (string arg in args)
                {
                    // Culture needs to be sent via arguments as LRC settings are inaccessible and a static variable doesnt seem to return the right culture
                    if (arg.StartsWith(@"/culture:"))
                    {
                        int lcid = 0;

                        if (Int32.TryParse(arg.Remove(0, @"/culture:".Length), out lcid))
                        {
                            CultureInfo ci = new CultureInfo(lcid);
                            Properties.Resources.Culture = Thread.CurrentThread.CurrentUICulture = ci;

                            if (ci.Name == "zh-CHS")
                                Application.CurrentCulture = new CultureInfo(0x0804); // zh-CN Chinese (People's Republic of China)
                            else if (ci.Name == "zh-CHT")
                                Application.CurrentCulture = new CultureInfo(0x0404); // zh-TW Chinese (Taiwan)
                            else
                                Application.CurrentCulture = CultureInfo.CreateSpecificCulture(ci.Name);
                        }
                        
                    }
                }
                
            }

            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
            Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);

            Application.EnableVisualStyles();
后面还有 20 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。