예제 #1
0
        // Token: 0x060019D3 RID: 6611 RVA: 0x00047A08 File Offset: 0x00045C08
        public static bool smethod_3(string processName, Class141 process)
        {
            Process[] array = Class156.smethod_3(processName);
            bool      result;

            try
            {
                if (array.Length != 1)
                {
                    result = false;
                }
                else
                {
                    IntPtr intPtr = array[0].smethod_0();
                    Class335.smethod_3(Class197.string_2, new object[]
                    {
                        intPtr
                    });
                    process.MainWindowHandle = intPtr;
                    Class335.smethod_3(Class197.string_3, new object[]
                    {
                        process.MainWindowHandle
                    });
                    result = true;
                }
            }
            finally
            {
                array.smethod_1 <Process>();
            }
            return(result);
        }
        // Token: 0x06001787 RID: 6023 RVA: 0x0003DB84 File Offset: 0x0003BD84
        public RunBaseForm(IntPtr hWnd) : this()
        {
            Class335.smethod_3(RunBaseForm.string_0, new object[]
            {
                hWnd
            });
            this.manualResetEventSlim_0 = new ManualResetEventSlim(false);
            this.intptr_0 = hWnd;
            this.class318_0.method_5(Keys.Escape, Keys.None, false);
            Size size = new Size(1024, 768);

            this.struct42_0 = Struct42.smethod_2(new Point(50, 720), new Point(size.Width, size.Height));
        }
예제 #3
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);
        }
    }
예제 #4
0
 // Token: 0x060019D2 RID: 6610 RVA: 0x00047950 File Offset: 0x00045B50
 public static bool smethod_2(this Class141 process, Form owner, EventHandler <EventArgs15> e = null)
 {
     using (Class499 @class = new Class499(owner))
     {
         using (WindowSelect_1 windowSelect_ = Class460.smethod_0(e))
         {
             @class.method_0(windowSelect_);
             if (windowSelect_.ShowDialog() == DialogResult.OK)
             {
                 Class335.smethod_3(Class197.string_1, new object[]
                 {
                     windowSelect_.SelectedHandle
                 });
                 process.MainWindowHandle = windowSelect_.SelectedHandle;
                 Class335.smethod_3(Class197.string_0, new object[]
                 {
                     process.MainWindowHandle
                 });
                 return(true);
             }
         }
     }
     return(false);
 }
예제 #5
0
    private void method_9()
    {
        int num = 4;

        this.class410_0 = new Class410();
        BinaryReader reader = new BinaryReader(this.stream_0, Encoding.Unicode);
        uint         num2   = this.class522_0.uint_2;
        Class335     class2 = new Class335();

        while (num2 != 0xfffffffe)
        {
            this.stream_0.Position = Class967.smethod_0(num2, true);
            for (int i = 0; i < 4; i++)
            {
                this.class410_0.method_3(new Class1090(reader));
            }
            class2.Interface34.imethod_1(num2);
            num2 = this.class917_0.method_0(num2);
            if (class2.Interface34.imethod_3(num2))
            {
                throw new InvalidOperationException(BookmarkStart.b("縩䐫䬭ု䄱䀳䐵䴷夹䠻䬽㈿❁⁃晅㭇㹉⍋㱍ㅏ㕑ㅓ癕㹗㍙せ㭝䁟ᅡţͥէᥩ䱫ᩭὯ剱ᙳ፵塷᥹፻౽ꚇꪉ쪋쾍쒏늑秊ﶛ캟톡蒣얥톧즩삫쮭쎯鲱", num));
            }
        }
    }
예제 #6
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;
            }
        }
예제 #7
0
        // Token: 0x060028D0 RID: 10448 RVA: 0x0009A000 File Offset: 0x00098200
        private static bool smethod_10(Process p, out string logFile)
        {
            Class335.smethod_2(Class142.string_7, true);
            List <FileSystemInfo> list = Class471.smethod_2(p.Id);

            if (list != null)
            {
                using (List <FileSystemInfo> .Enumerator enumerator = list.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        FileSystemInfo fileSystemInfo = enumerator.Current;
                        if (fileSystemInfo is FileInfo && string.Equals(fileSystemInfo.Extension, Class142.string_4, StringComparison.OrdinalIgnoreCase) && fileSystemInfo.Name.StartsWith("toontown", StringComparison.OrdinalIgnoreCase) && fileSystemInfo.Exists)
                        {
                            logFile = fileSystemInfo.FullName;
                            Class335.smethod_3(Class142.string_6, new object[]
                            {
                                logFile
                            });
                            return(true);
                        }
                    }
                    goto IL_B4;
                }
                bool result;
                return(result);
            }
            Class335.smethod_2(Class142.string_5, true);
IL_B4:
            string text = null;

            if ((p.StartInfo == null || string.IsNullOrEmpty(text = p.StartInfo.WorkingDirectory)) && p.MainModule != null)
            {
                text = Path.GetDirectoryName(p.MainModule.FileName);
            }
            if (!string.IsNullOrEmpty(text) && Directory.Exists(text))
            {
                Class142.Class442 @class = new Class142.Class442();
                Class335.smethod_3(Class142.string_2, new object[]
                {
                    text
                });
                @class.dateTime_0 = p.StartTime;
                @class.hashSet_0  = Class142.smethod_3();
                IEnumerable <string> source = Class234.smethod_1(text, Class142.string_3, Class142.string_4).Where(new Func <string, bool>(@class.method_0));
                if (Class142.func_0 == null)
                {
                    Class142.func_0 = new Func <string, bool>(Class142.smethod_12);
                }
                string[] array = source.Where(Class142.func_0).Where(new Func <string, bool>(@class.method_1)).ToArray <string>();
                if (array.Length == 1)
                {
                    logFile = array[0];
                    Class335.smethod_3(Class142.string_1, new object[]
                    {
                        logFile
                    });
                    return(true);
                }
            }
            Class335.smethod_2(Class142.string_0, true);
            logFile = null;
            return(false);
        }
 public abstract void Visit(Class335 c);
 public override void Visit(Class335 c) { }
예제 #10
0
            // Token: 0x06001E94 RID: 7828 RVA: 0x00063DB8 File Offset: 0x00061FB8
            public unsafe void method_0()
            {
                try
                {
                    Struct24  @struct = new Struct24(int.MaxValue, int.MaxValue, int.MinValue, int.MinValue);
                    Struct24  struct2 = new Struct24(int.MaxValue, int.MaxValue, int.MinValue, int.MinValue);
                    bool *    ptr     = stackalloc bool[(UIntPtr)(this.class95_0.rectangle_0.Height * this.class95_0.rectangle_0.Width)];
                    bool *    ptr2    = stackalloc bool[(UIntPtr)(this.class95_0.rectangle_0.Height * this.class95_0.rectangle_0.Width)];
                    Struct24 *ptr3    = &@struct;
                    Struct24 *ptr4    = &struct2;
                    using (Class125 @class = new Class125(this.bitmap_0))
                    {
                        using (new Class125.Class153(@class))
                        {
                            Array[][] array = new Array[this.class95_0.array_0.Length][];
                            this.class95_0.array_0.CopyTo(array, 0);
                            for (int i = 0; i < this.class95_0.rectangle_0.Height; i++)
                            {
                                Array[] array2 = array[i];
                                Array[] array3 = array2;
                                int     j      = 0;
                                while (j < array3.Length)
                                {
                                    Array array4 = array3[j];
                                    int   k      = array4.GetLowerBound(0);
                                    int   length = array4.GetLength(0);
                                    int   num    = k + length - 1;
                                    bool  flag   = false;
                                    if (this.class95_0.bool_0)
                                    {
                                        Struct33[] array5 = new Struct33[length];
                                        array4.CopyTo(array5, 0);
                                        try
                                        {
                                            Struct33[] array6;
                                            Struct33 * ptr5;
                                            if ((array6 = array5) != null && array6.Length != 0)
                                            {
                                                fixed(Struct33 *ptr5 = &array6[0])
                                                {
                                                }
                                            }
                                            else
                                            {
                                                ptr5 = null;
                                            }
                                            Struct33 *ptr6 = ptr5;
                                            Struct33 *ptr7 = @class.pBase + @class.Width * i + k;
                                            bool *    ptr8 = ptr + k + (IntPtr)this.class95_0.rectangle_0.Width * (IntPtr)i;
                                            while (k <= num)
                                            {
                                                if (ptr7->A != ptr6->A || ptr7->R != ptr6->R || ptr7->G != ptr6->G || ptr7->B != ptr6->B)
                                                {
                                                    *ptr8 = true;
                                                    flag = true;
                                                    if (ptr3->int_0 > k)
                                                    {
                                                        ptr3->int_0 = k;
                                                    }
                                                    if (ptr3->int_2 < k)
                                                    {
                                                        ptr3->int_2 = k;
                                                    }
                                                }
                                                ptr7++;
                                                ptr6++;
                                                ptr8++;
                                                k++;
                                            }
                                            goto IL_3B8;
                                        }
                                        finally
                                        {
                                            Struct33 *ptr5 = null;
                                        }
                                        goto IL_25F;
                                    }
                                    goto IL_25F;
IL_395:
                                    j++;
                                    continue;
IL_36D:
                                    if (ptr3->int_1 > i)
                                    {
                                        ptr3->int_1 = i;
                                    }
                                    if (ptr3->int_3 < i)
                                    {
                                        ptr3->int_3 = i;
                                        goto IL_395;
                                    }
                                    goto IL_395;
IL_25F:
                                    Struct54[] array7 = new Struct54[length];
                                    array4.CopyTo(array7, 0);
                                    try
                                    {
                                        Struct54[] array8;
                                        Struct54 * ptr9;
                                        if ((array8 = array7) != null && array8.Length != 0)
                                        {
                                            fixed(Struct54 *ptr9 = &array8[0])
                                            {
                                            }
                                        }
                                        else
                                        {
                                            ptr9 = null;
                                        }
                                        Struct54 *ptr10 = ptr9;
                                        Struct33 *ptr11 = @class.pBase + @class.Width * i + k;
                                        bool *    ptr12 = ptr + k + (IntPtr)this.class95_0.rectangle_0.Width * (IntPtr)i;
                                        while (k <= num)
                                        {
                                            if (ptr11->R != ptr10->R || ptr11->G != ptr10->G || ptr11->B != ptr10->B)
                                            {
                                                *ptr12 = true;
                                                flag = true;
                                                if (ptr3->int_0 > k)
                                                {
                                                    ptr3->int_0 = k;
                                                }
                                                if (ptr3->int_2 < k)
                                                {
                                                    ptr3->int_2 = k;
                                                }
                                            }
                                            ptr11++;
                                            ptr10++;
                                            ptr12++;
                                            k++;
                                        }
                                        goto IL_3B8;
                                    }
                                    finally
                                    {
                                        Struct54 *ptr9 = null;
                                    }
                                    goto IL_36D;
IL_3B8:
                                    if (flag)
                                    {
                                        goto IL_36D;
                                    }
                                    goto IL_395;
                                }
                                if (this.cancellationToken_0.IsCancellationRequested)
                                {
                                    return;
                                }
                            }
                        }
                    }
                    for (int l = ptr3->int_1; l < ptr3->int_3; l++)
                    {
                        bool  flag2 = false;
                        bool *ptr13 = ptr + ptr3->int_0 + (IntPtr)l * (IntPtr)this.class95_0.rectangle_0.Width;
                        bool *ptr14 = ptr2 + ptr3->int_0 + (IntPtr)l * (IntPtr)this.class95_0.rectangle_0.Width;
                        for (int m = ptr3->int_0; m < ptr3->int_2; m++)
                        {
                            if (*ptr13 && (m + 1 == this.class95_0.rectangle_0.Width || ptr13[1]) && (m == 0 || *(ptr13 - 1)) && (l + 1 == this.class95_0.rectangle_0.Height || ptr13[this.class95_0.rectangle_0.Width]) && (l == 0 || *(ptr13 - this.class95_0.rectangle_0.Width)))
                            {
                                *ptr14 = true;
                                flag2 = true;
                                if (ptr4->int_0 > m)
                                {
                                    ptr4->int_0 = m;
                                }
                                if (ptr4->int_2 < m)
                                {
                                    ptr4->int_2 = m;
                                }
                            }
                            ptr13++;
                            ptr14++;
                        }
                        if (flag2)
                        {
                            if (ptr4->int_1 > l)
                            {
                                ptr4->int_1 = l;
                            }
                            if (ptr4->int_3 < l)
                            {
                                ptr4->int_3 = l;
                            }
                        }
                        if (this.cancellationToken_0.IsCancellationRequested)
                        {
                            return;
                        }
                    }
                    for (int n = ptr4->int_1; n < ptr4->int_3; n++)
                    {
                        bool *ptr15 = ptr2 + ptr4->int_0 + (IntPtr)n * (IntPtr)this.class95_0.rectangle_0.Width;
                        for (int num2 = ptr4->int_0; num2 < ptr4->int_2; num2++)
                        {
                            if (*ptr15)
                            {
                                Struct24 struct3 = this.class95_0.method_9(ptr15, num2, n);
                                struct3.int_2++;
                                struct3.int_3++;
                                Rectangle rectangle = struct3.method_0();
                                Size      size      = rectangle.Size;
                                Class335.smethod_3(Class95 <ColorType> .string_1, new object[]
                                {
                                    rectangle
                                });
                                if (size.Width > this.size_0.Width && size.Height > this.size_0.Height && size.Width < this.size_1.Width && size.Height < this.size_1.Height)
                                {
                                    bool flag3 = true;
                                    for (int num3 = rectangle.Y; num3 < rectangle.Bottom; num3++)
                                    {
                                        int[] array9 = this.class95_0.int_1[num3];
                                        if (array9.Length > 0)
                                        {
                                            foreach (int num5 in array9)
                                            {
                                                if (num5 >= rectangle.Left && num5 <= rectangle.Right)
                                                {
                                                    flag3 = false;
                                                    break;
                                                }
                                            }
                                        }
                                        else
                                        {
                                            flag3 = false;
                                        }
                                        if (!flag3)
                                        {
                                            break;
                                        }
                                        if (this.cancellationToken_0.IsCancellationRequested)
                                        {
                                            return;
                                        }
                                    }
                                    if (flag3)
                                    {
                                        Rectangle rectangle2 = rectangle.smethod_4(this.class95_0.rectangle_0.X, this.class95_0.rectangle_0.Y);
                                        Class335.smethod_3(Class95 <ColorType> .string_0, new object[]
                                        {
                                            rectangle2
                                        });
                                        this.list_0.Add(rectangle2);
                                    }
                                }
                                for (int num6 = struct3.int_1; num6 < struct3.int_3; num6++)
                                {
                                    bool *ptr16 = ptr2 + struct3.int_0 + (IntPtr)num6 * (IntPtr)this.class95_0.rectangle_0.Width;
                                    for (int num7 = struct3.int_0; num7 < struct3.int_2; num7++)
                                    {
                                        *ptr16 = false;
                                        ptr16++;
                                    }
                                }
                            }
                            ptr15++;
                        }
                        if (this.cancellationToken_0.IsCancellationRequested)
                        {
                            break;
                        }
                    }
                }
                catch (Exception ex)
                {
                    this.exception_0 = ex;
                }
            }