Little Registry Cleaner/Program.cs

(开头部分) 3KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.IO;
using System.Threading;
using System.Diagnostics;
using System.Reflection;
// 下载于www.51aspx.com
namespace Little_Registry_Cleaner
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            bool bMutexCreated = false;
            Mutex mutexMain = new Mutex(true, "Little Registry Cleaner", 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;
            }

            // Create event log source
            if (!EventLog.SourceExists(Application.ProductName))
                EventLog.CreateEventSource(Application.ProductName, "Application");

            // If application is being ran for first time or is newer version, then upgrade settings
            if (Properties.Settings.Default.bUpgradeSettings || !Properties.Settings.Default.IsSynchronized)
            {
                Properties.Settings.Default.Upgrade();
                Properties.Settings.Default.bUpgradeSettings = false;
            }

            //#if (!DEBUG)
            // Add event handler for thread exceptions
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
            Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
            //#else

            //#endif

            // Check if admin, otherwise exit
            if (!Permissions.IsUserAdministrator)
            {
                MessageBox.Show(Properties.Resources.programNeedAdmin, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                Application.Exit();
                return;
            }

            // Check for Common Tools
            if (!Utils.SearchPath("Common Tools.dll") && !File.Exists("Common Tools.dll"))
            {
后面还有 41 行代码,购买后查看完整代码

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

AI 解读 AI

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

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