Example #1
0
    internal Class800(StyleCollection A_0)
    {
        int count = A_0.Count;

        this.hashtable_0 = new Hashtable(count);
        this.hashtable_1 = new Hashtable(count);
        this.hashtable_2 = new Hashtable();
        this.class335_0  = Class335.smethod_0();
        StyleCollection docStyleCollection = A_0.DocStyleCollection;

        for (int i = 0; i < count; i++)
        {
            this.method_0(docStyleCollection[i] as Style);
        }
    }
Example #2
0
        private static void Main()
        {
            Class283.Class284 @class = new Class283.Class284();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            @class.mutex_0                      = null;
            @class.memoryMappedFile_0           = null;
            @class.mutex_1                      = null;
            Thread.CurrentThread.CurrentCulture = (Thread.CurrentThread.CurrentUICulture = Class217.cultureInfo_0);
            Class368 class2 = new Class368(Class291.string_17);

            Class373.Logger = class2;
            Class367 class3 = class2;

            if (Class283.eventHandler_0 == null)
            {
                Class283.eventHandler_0 = new EventHandler <EventArgs25>(Class283.smethod_1);
            }
            class3.LogFileCompressed += Class283.eventHandler_0;
            @class.bool_0             = false;
            @class.action_0           = new Action(@class.method_0);
            @class.bool_1             = false;
            @class.action_1           = new Action(@class.method_1);
            @class.action_2           = new Action(@class.method_2);
            @class.action_3           = new Action <Exception, string>(@class.method_3);
            UnhandledExceptionEventHandler value = new UnhandledExceptionEventHandler(@class.method_4);

            AppDomain.CurrentDomain.UnhandledException += value;
            ThreadExceptionEventHandler value2 = new ThreadExceptionEventHandler(@class.method_5);

            Application.ThreadException += value2;
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            Enum29 @enum = Environment.OSVersion.smethod_0();

            if (@enum > Enum29.const_0 && @enum < Enum29.const_10)
            {
                DialogBox.smethod_3(Class283.string_2, Class283.string_3);
                Application.Exit();
                return;
            }
            try
            {
                try
                {
                    @class.mutex_1 = new Mutex(false, Class283.string_16);
                    if (!(@class.bool_0 = @class.mutex_1.WaitOne()))
                    {
                        Environment.ExitCode = 1;
                        Application.Exit();
                    }
                    else if (Class265.smethod_1(Class283.string_15))
                    {
                        Class283.smethod_0();
                        Environment.ExitCode = 1;
                        Application.Exit();
                    }
                    else if (Class409.Current.Flags.Contains(Class283.string_17))
                    {
                        Environment.ExitCode = 0;
                        Application.Exit();
                    }
                    else if (Class409.Current.Flags.Contains(Class283.string_18))
                    {
                        if (DialogBox.smethod_6(Class283.string_6, Class283.string_7, new Enum39[]
                        {
                            Enum39.const_5,
                            Enum39.const_6
                        }) == DialogResult.Yes)
                        {
                            using (UninstallationCleanUp uninstallationCleanUp = new UninstallationCleanUp())
                            {
                                Application.Run(uninstallationCleanUp);
                            }
                        }
                        Application.Exit();
                    }
                    else
                    {
                        try
                        {
                            @class.mutex_0 = new Mutex(false, Class283.string_15);
                        }
                        catch (Exception ex)
                        {
                            @class.action_1();
                            ex.smethod_0();
                            DialogBox.smethod_4(Class283.string_8, Class283.string_9);
                            Application.Exit();
                            return;
                        }
                        if (!(@class.bool_1 = @class.mutex_0.WaitOne(TimeSpan.Zero, false)))
                        {
                            Class283.smethod_0();
                            Environment.ExitCode = 1;
                            Application.Exit();
                        }
                        else
                        {
                            try
                            {
                                @class.memoryMappedFile_0 = MemoryMappedFile.CreateNew(Class283.string_13, 4L, MemoryMappedFileAccess.ReadWrite);
                            }
                            catch (IOException ex2)
                            {
                                ex2.smethod_0();
                                @class.action_2();
                                if (Marshal.GetHRForException(ex2) == (int)Class265.uint_0)
                                {
                                    Class283.smethod_0();
                                    Environment.ExitCode = 1;
                                    Application.Exit();
                                    return;
                                }
                            }
                            using (Class283.icon_0 = Icon.ExtractAssociatedIcon(Application.ExecutablePath))
                            {
                                Class176 instance = Class176.Instance;
                                DateTime now      = DateTime.Now;
                                if (instance.UpdateStepOn == Enum111.const_6 || (Class110.Instance.ApplicationSettings.UpdateType != Enum78.const_3 && (now - instance.LastCheckedForUpdate).TotalDays >= 14.0))
                                {
                                    bool flag = false;
                                    try
                                    {
                                        using (Updater updater = new Updater(true))
                                        {
                                            Application.Run(updater);
                                            switch (updater.UpdateResult)
                                            {
                                            case Enum43.const_4:
                                            case Enum43.const_6:
                                                flag = true;
                                                break;

                                            case Enum43.const_5:
                                                instance.UpdateStepOn = Enum111.const_0;
                                                flag = true;
                                                Application.Exit();
                                                return;
                                            }
                                        }
                                    }
                                    finally
                                    {
                                        if (flag)
                                        {
                                            instance.LastCheckedForUpdate = now;
                                            instance.method_0();
                                        }
                                    }
                                }
                                try
                                {
                                    using (Class435 class4 = new Class435())
                                    {
                                        EventHandler <EventArgs11> eventHandler = null;
                                        Class283.Class285          class5       = new Class283.Class285();
                                        class5.class284_0 = @class;
                                        class5.class330_0 = new Class330();
                                        try
                                        {
                                            Class435 class6 = class4;
                                            if (eventHandler == null)
                                            {
                                                eventHandler = new EventHandler <EventArgs11>(class5.method_0);
                                            }
                                            class6.DataReceived += eventHandler;
                                            if (@class.memoryMappedFile_0 != null)
                                            {
                                                using (MemoryMappedViewStream memoryMappedViewStream = @class.memoryMappedFile_0.CreateViewStream(0L, (long)Class283.int_0, MemoryMappedFileAccess.ReadWrite))
                                                {
                                                    using (BinaryWriter binaryWriter = new BinaryWriter(memoryMappedViewStream, Class217.encoding_0))
                                                    {
                                                        binaryWriter.Write(Process.GetCurrentProcess().Id);
                                                        binaryWriter.Write(class4.Handle.ToInt64());
                                                    }
                                                }
                                            }
                                            @class.action_0();
                                            bool flag2 = Class409.Current.Flags.Contains("DEBUG");
                                            try
                                            {
                                                if (flag2)
                                                {
                                                    Class335.smethod_0(Class291.DebugLogDirectory);
                                                    Class110.Instance.CreatedFileArchive.method_4(Class335.LogFile);
                                                    Class335.smethod_2(Class283.string_5, false);
                                                    Class335.smethod_2(Class283.string_4, false);
                                                }
                                                Application.Run(class5.class330_0);
                                            }
                                            finally
                                            {
                                                if (flag2)
                                                {
                                                    Class335.smethod_2(Class283.string_5, false);
                                                    Class335.smethod_1();
                                                }
                                            }
                                        }
                                        finally
                                        {
                                            if (class5.class330_0 != null)
                                            {
                                                ((IDisposable)class5.class330_0).Dispose();
                                            }
                                        }
                                    }
                                }
                                finally
                                {
                                    Class110.smethod_1();
                                }
                            }
                        }
                    }
                }
                finally
                {
                    @class.action_0();
                }
            }
            finally
            {
                @class.action_1();
                @class.action_2();
                Application.ThreadException -= value2;
            }
        }