// Token: 0x06001B30 RID: 6960 RVA: 0x00009D9E File Offset: 0x00007F9E
 public void method_0()
 {
     DialogBox.smethod_7(this.exception_0, Class291.string_23);
 }
 // Token: 0x06001B13 RID: 6931 RVA: 0x00051DBC File Offset: 0x0004FFBC
 private void method_2(bool displayErrorIfFailure)
 {
     Class110.Instance.JoeFishSettings.CustomCaptureFile = null;
     if (File.Exists(Class291.string_20))
     {
         bool    flag   = false;
         Class98 @class = null;
         try
         {
             @class = new Class98(Class291.string_20);
             flag   = true;
         }
         catch (Exception ex)
         {
             if (@class != null)
             {
                 @class.Dispose();
             }
             @class = null;
             if (displayErrorIfFailure)
             {
                 ex.smethod_1(new object[]
                 {
                     Class291.string_20
                 });
             }
         }
         if (flag && this.method_1(@class))
         {
             if (this.class98_0 != null)
             {
                 this.class98_0.Dispose();
             }
             this.class98_0 = @class;
             this.DefaultCapturesMenuItem.Checked = true;
             this.CustomCapturesMenuItem.Checked  = false;
             return;
         }
         if (@class != null)
         {
             @class.Dispose();
         }
         @class = null;
         if (displayErrorIfFailure)
         {
             DialogBox.smethod_3(JoeFish.string_13, JoeFish.string_9);
             return;
         }
     }
     else
     {
         if (this.class98_0 != null)
         {
             this.class98_0.Dispose();
         }
         this.class98_0 = null;
         if (displayErrorIfFailure)
         {
             DialogBox.smethod_3(JoeFish.string_11, JoeFish.string_12);
         }
         this.DefaultCapturesMenuItem.Checked = false;
         this.CustomCapturesMenuItem.Checked  = false;
     }
 }
 // Token: 0x06001B29 RID: 6953 RVA: 0x00009D5E File Offset: 0x00007F5E
 private static void smethod_0()
 {
     DialogBox.smethod_4(JoeFish.string_14, JoeFish.string_15);
 }
예제 #4
0
 // Token: 0x06001AEA RID: 6890 RVA: 0x00009B41 File Offset: 0x00007D41
 private static void smethod_0(KeyValuePair <string, string> errorMessage)
 {
     DialogBox.smethod_3(errorMessage.Value, Connect.string_20);
 }
예제 #5
0
 // Token: 0x06001AEE RID: 6894 RVA: 0x00009B92 File Offset: 0x00007D92
 private void method_2(KeyValuePair <string, string> arg)
 {
     this.class220_0.connect_0.BringToFront();
     this.class220_0.connect_0.Activate();
     DialogBox.smethod_2(arg.Value, Connect.string_20, Enum121.const_2);
 }
예제 #6
0
 private static void smethod_3()
 {
     DialogBox.smethod_3(UninstallationCleanUp.string_9, UninstallationCleanUp.string_10);
 }
예제 #7
0
        // Token: 0x06001AD4 RID: 6868 RVA: 0x00050CBC File Offset: 0x0004EEBC
        private void method_1()
        {
            Connect.Class220 @class = new Connect.Class220();
            @class.connect_0 = this;
            if (!Class509.CanLoginToToonTownOrDialog)
            {
                return;
            }
            Class509.InstallingOrLoggingIn = true;
            @class.string_0 = this.txtUsername.Text;
            string text = this.txtPassword.Text;

            if (string.IsNullOrEmpty(@class.string_0) || string.IsNullOrEmpty(text))
            {
                DialogBox.smethod_3(Connect.string_0, Connect.string_1);
                Class509.InstallingOrLoggingIn = false;
                return;
            }
            @class.enum101_0 = (this.TestServerRadioButton.Checked ? Enum101.const_2 : (this.OpenServerRadioButton.Checked ? Enum101.const_1 : Enum101.const_1));
            if (Class142.smethod_1(@class.enum101_0, @class.string_0) && DialogBox.smethod_6(Connect.string_2, Connect.string_3, new Enum39[]
            {
                Enum39.const_5,
                Enum39.const_6
            }) != DialogResult.Yes)
            {
                Class509.InstallingOrLoggingIn = false;
                return;
            }
            Connect.Class221 class2 = new Connect.Class221();
            class2.class147_0 = new Class147(@class.enum101_0, @class.string_0, text);
            try
            {
                EventHandler     eventHandler = null;
                Connect.Class222 class3       = new Connect.Class222();
                class3.class221_0 = class2;
                class3.class220_0 = @class;
                class3.loading_0  = new Loading();
                try
                {
                    Form loading_ = class3.loading_0;
                    if (eventHandler == null)
                    {
                        eventHandler = new EventHandler(class3.method_0);
                    }
                    loading_.Shown += eventHandler;
                    class3.loading_0.ShowDialog();
                }
                finally
                {
                    if (class3.loading_0 != null)
                    {
                        ((IDisposable)class3.loading_0).Dispose();
                    }
                }
            }
            finally
            {
                if (class2.class147_0 != null)
                {
                    ((IDisposable)class2.class147_0).Dispose();
                }
            }
        }
        // Token: 0x06001AB2 RID: 6834 RVA: 0x0004E82C File Offset: 0x0004CA2C
        public static void smethod_7(Exception ex, string path)
        {
            if (path == null)
            {
                path = string.Empty;
            }
            Type type = ex.GetType();

            if (type == typeof(InvalidFileType))
            {
                DialogBox.smethod_4(string.Format(Class217.cultureInfo_0, DialogBox.string_19, new object[]
                {
                    path
                }), DialogBox.string_20);
                return;
            }
            if (type == typeof(ArgumentNullException))
            {
                DialogBox.smethod_4(string.Format(Class217.cultureInfo_0, DialogBox.string_15, new object[]
                {
                    ex.Message
                }), DialogBox.string_16);
                return;
            }
            if (type == typeof(ArgumentException))
            {
                DialogBox.smethod_4(string.Format(Class217.cultureInfo_0, DialogBox.string_13, new object[]
                {
                    ex.Message
                }), DialogBox.string_14);
                return;
            }
            if (type == typeof(WebException))
            {
                DialogBox.smethod_4(string.Format(Class217.cultureInfo_0, "There has been a exception while downloading: '{0}'. '{1}'", new object[]
                {
                    path,
                    ex.Message
                }), "Error downloading");
                return;
            }
            if (type == typeof(PathTooLongException))
            {
                DialogBox.smethod_4(string.Format(Class217.cultureInfo_0, DialogBox.string_3, new object[]
                {
                    path
                }), DialogBox.string_4);
                return;
            }
            if (type == typeof(DirectoryNotFoundException))
            {
                DialogBox.smethod_4(string.Format(Class217.cultureInfo_0, DialogBox.string_5, new object[]
                {
                    Path.GetDirectoryName(path)
                }), DialogBox.string_6);
                return;
            }
            if (type == typeof(IOException))
            {
                DialogBox.smethod_4(string.Format(Class217.cultureInfo_0, DialogBox.string_7, new object[]
                {
                    ex.Message
                }), DialogBox.string_8);
                return;
            }
            if (type == typeof(NotSupportedException))
            {
                DialogBox.smethod_4(string.Format(Class217.cultureInfo_0, DialogBox.string_9, new object[]
                {
                    ex.Message
                }), DialogBox.string_10);
                return;
            }
            if (type == typeof(UnauthorizedAccessException))
            {
                DialogBox.smethod_4(string.Format(Class217.cultureInfo_0, DialogBox.string_11, new object[]
                {
                    ex.Message
                }), DialogBox.string_12);
                return;
            }
            if (type == typeof(FileNotFoundException))
            {
                DialogBox.smethod_4(string.Format(Class217.cultureInfo_0, DialogBox.string_1, new object[]
                {
                    path
                }), DialogBox.string_2);
                return;
            }
            if (type == typeof(InvalidPixelFormatException))
            {
                InvalidPixelFormatException ex2 = ex as InvalidPixelFormatException;
                DialogBox.smethod_4(string.Format(Class217.cultureInfo_0, DialogBox.string_0, new object[]
                {
                    Path.GetFileName(path),
                    ex2.PixelFormat.smethod_0()
                }), "Invalid Pixel Format");
                return;
            }
            DialogBox.smethod_4(string.Format(Class217.cultureInfo_0, DialogBox.string_17, new object[]
            {
                ex.Message
            }), DialogBox.string_18);
        }
예제 #9
0
        private void method_8(object _)
        {
            Class110        instance            = Class110.Instance;
            Class114        createdFileArchive  = instance.CreatedFileArchive;
            Class112        applicationSettings = instance.ApplicationSettings;
            List <Class524> list  = new List <Class524>();
            List <string>   list2 = new List <string>();
            List <string>   list3 = new List <string>();

            list2.Add(UninstallationCleanUp.string_6);
            list2.Add(UninstallationCleanUp.string_5);
            list2.Add(UninstallationCleanUp.string_4);
            list2.Add(UninstallationCleanUp.string_3);
            list2.Add(UninstallationCleanUp.string_2);
            list3.Add(UninstallationCleanUp.string_1);
            list3.Add(UninstallationCleanUp.string_0);
            foreach (Class524 @class in createdFileArchive.Files)
            {
                this.method_3(list, @class.string_1);
            }
            foreach (Class524 class2 in createdFileArchive.Files)
            {
                this.method_2(list, Class291.string_4, Path.GetDirectoryName(class2.string_1));
                this.method_2(list, Class291.string_5, Path.GetDirectoryName(class2.string_1));
            }
            createdFileArchive.Files.Clear();
            foreach (Class524 class3 in instance.RaceTrackFileIndex.Files)
            {
                this.method_3(list, class3.string_1);
            }
            instance.RaceTrackFileIndex.Files.Clear();
            foreach (Class524 class4 in instance.JoeFishSettings.JoeFishCaptureSettings.Files)
            {
                this.method_3(list, class4.string_1);
            }
            instance.JoeFishSettings.JoeFishCaptureSettings.Files.Clear();
            foreach (Class524 class5 in instance.GardenerFloraSettings.GardenerFloraCaptureFiles.Files)
            {
                this.method_3(list, class5.string_1);
            }
            instance.GardenerFloraSettings.GardenerFloraCaptureFiles.Files.Clear();
            foreach (Class524 class6 in instance.GardenerFloraSettings.GardenerFloraFiles.Files)
            {
                this.method_3(list, class6.string_1);
            }
            instance.GardenerFloraSettings.GardenerFloraFiles.Files.Clear();
            foreach (Class102 class7 in instance.ConnectSettings.ContentPacks)
            {
                this.method_3(list, class7.FileName);
            }
            instance.ConnectSettings.ContentPacks.Clear();
            if (Class336.smethod_0(Class291.string_2, applicationSettings.ScreenshotSaveDirectory) && Directory.Exists(Class291.string_2))
            {
                MethodInvoker methodInvoker           = null;
                UninstallationCleanUp.Class232 class8 = new UninstallationCleanUp.Class232();
                class8.uninstallationCleanUp_0 = this;
                class8.string_0 = Class234.smethod_1(Class291.string_2, UninstallationCleanUp.string_21, UninstallationCleanUp.string_22);
                if (class8.string_0.Length > 0)
                {
                    if (methodInvoker == null)
                    {
                        methodInvoker = new MethodInvoker(class8.method_0);
                    }
                    this.smethod_6(methodInvoker);
                }
            }
            foreach (string path in list2)
            {
                this.method_3(list, Path.Combine(Class291.string_4, path));
                this.method_3(list, Path.Combine(Class291.string_5, path));
            }
            foreach (string path2 in list3)
            {
                this.method_4(list, Path.Combine(Class291.string_4, path2));
                this.method_4(list, Path.Combine(Class291.string_5, path2));
            }
            if (Directory.Exists(Class291.string_4))
            {
                string[] array = Class234.smethod_1(Class291.string_4, UninstallationCleanUp.string_19, UninstallationCleanUp.string_20);
                foreach (string file in array)
                {
                    this.method_3(list, file);
                }
            }
            if (Directory.Exists(Class291.string_5))
            {
                string[] array3 = Class234.smethod_1(Class291.string_5, UninstallationCleanUp.string_19, UninstallationCleanUp.string_20);
                foreach (string file2 in array3)
                {
                    this.method_3(list, file2);
                }
            }
            this.method_3(list, Class291.string_23);
            this.method_3(list, Class291.string_16);
            this.method_3(list, Class291.string_14);
            this.method_3(list, Class291.string_17);
            this.method_3(list, Class291.string_15);
            this.method_6(list, Path.Combine(Class291.string_4, UninstallationCleanUp.string_18));
            this.method_6(list, Path.Combine(Class291.string_5, UninstallationCleanUp.string_18));
            this.method_4(list, Class291.string_2);
            this.method_4(list, Class291.string_6);
            this.method_4(list, Class291.string_9);
            this.method_4(list, Class291.string_10);
            this.method_4(list, Class291.string_8);
            this.method_4(list, Class291.string_11);
            this.method_4(list, Class291.string_7);
            this.method_4(list, Class291.string_3);
            this.method_4(list, Class291.string_5);
            this.method_4(list, Class291.string_4);
            this.method_4(list, Class291.string_13);
            this.method_4(list, Class291.string_1);
            if (Directory.Exists(Class291.string_0) && !Class234.smethod_2(Class291.string_0))
            {
                this.method_5(list, Class291.string_0);
            }
            if (list.Count > 0)
            {
                string text = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString() + UninstallationCleanUp.string_17);
                bool   flag;
                try
                {
                    using (Stream stream = File.Open(text, FileMode.OpenOrCreate, FileAccess.Write, FileShare.None))
                    {
                        using (StreamWriter streamWriter = new StreamWriter(stream, Encoding.Unicode))
                        {
                            streamWriter.WriteLine(UninstallationCleanUp.string_16);
                            streamWriter.WriteLine(string.Empty);
                            foreach (Class524 class9 in list)
                            {
                                streamWriter.WriteLine(class9.string_1);
                            }
                            streamWriter.WriteLine(string.Empty);
                            streamWriter.WriteLine(UninstallationCleanUp.string_15);
                            streamWriter.WriteLine(UninstallationCleanUp.string_14);
                        }
                    }
                    flag = true;
                }
                catch
                {
                    flag = false;
                }
                if (flag)
                {
                    if (UninstallationCleanUp.func_0 == null)
                    {
                        UninstallationCleanUp.func_0 = new Func <bool>(UninstallationCleanUp.smethod_2);
                    }
                    if (!this.smethod_5(UninstallationCleanUp.func_0))
                    {
                        goto IL_768;
                    }
                    try
                    {
                        ProcessStartInfo processStartInfo = new ProcessStartInfo();
                        processStartInfo.FileName        = text;
                        processStartInfo.UseShellExecute = true;
                        processStartInfo.ErrorDialog     = true;
                        using (Process process = new Process())
                        {
                            process.StartInfo = processStartInfo;
                            process.Start();
                        }
                        goto IL_768;
                    }
                    catch
                    {
                        DialogBox.smethod_3(string.Format(UninstallationCleanUp.string_11, text), UninstallationCleanUp.string_12);
                        goto IL_768;
                    }
                }
                if (UninstallationCleanUp.methodInvoker_0 == null)
                {
                    UninstallationCleanUp.methodInvoker_0 = new MethodInvoker(UninstallationCleanUp.smethod_3);
                }
                this.smethod_6(UninstallationCleanUp.methodInvoker_0);
            }
IL_768:
            this.smethod_4(new MethodInvoker(this.method_9));
        }
 // Token: 0x06001AB1 RID: 6833 RVA: 0x0000998F File Offset: 0x00007B8F
 public static DialogResult smethod_6(string text, string caption, params Enum39[] buttons)
 {
     return(DialogBox.smethod_12(text, caption, Enum90.const_1, true, buttons));
 }
 // Token: 0x06001AB7 RID: 6839 RVA: 0x000099A8 File Offset: 0x00007BA8
 public static DialogResult smethod_12(string message, string title, Enum90 dialogType, bool enabledCloseButton, params Enum39[] buttons)
 {
     return(DialogBox.smethod_13(message, title, dialogType, enabledCloseButton, Enum121.const_0, buttons));
 }
 // Token: 0x06001AB6 RID: 6838 RVA: 0x0000999B File Offset: 0x00007B9B
 public static DialogResult smethod_11(string message, string title, Enum90 dialogType, params Enum39[] buttons)
 {
     return(DialogBox.smethod_13(message, title, dialogType, true, Enum121.const_0, buttons));
 }
 // Token: 0x060019F5 RID: 6645 RVA: 0x0000922D File Offset: 0x0000742D
 private static void smethod_0(PointF p)
 {
     DialogBox.smethod_3(string.Format("The point: '{0}' already exists for the playground.", p), "Point Already Exists");
 }
        // Token: 0x060019F4 RID: 6644 RVA: 0x00049304 File Offset: 0x00047504
        private void method_12()
        {
            if (!this.class141_0.ProcessOpen)
            {
                if (!this.class141_0.smethod_1(this))
                {
                    return;
                }
                this.method_11();
            }
            Enum57 playground = this.class142_0.Playground;

            if (playground == Enum57.const_0)
            {
                DialogBox.smethod_3("Cannot record the position as ToonTown does not appear to be in a playground.", "Unknown Playground");
                return;
            }
            WayPointEditor.Class203 @class = new WayPointEditor.Class203();
            @class.nullable_0 = null;
            EventHandler eventHandler = null;

            WayPointEditor.Class204 class2 = new WayPointEditor.Class204();
            class2.class203_0       = @class;
            class2.wayPointEditor_0 = this;
            class2.loading_0        = new Loading();
            try
            {
                Form loading_ = class2.loading_0;
                if (eventHandler == null)
                {
                    eventHandler = new EventHandler(class2.method_0);
                }
                loading_.Shown += eventHandler;
                class2.loading_0.ShowDialog();
            }
            finally
            {
                if (class2.loading_0 != null)
                {
                    ((IDisposable)class2.loading_0).Dispose();
                }
            }
            if (@class.nullable_0 != null)
            {
                Dictionary <PointF, Enum99> dictionary;
                WayPointEditor.Class200     class3;
                if (this.class101_0.WayPoints.ContainsKey(playground))
                {
                    dictionary = this.class101_0.WayPoints[playground];
                    class3     = this.dictionary_0[playground];
                }
                else
                {
                    dictionary = new Dictionary <PointF, Enum99>();
                    this.class101_0.WayPoints.Add(playground, dictionary);
                    this.PlaygroundList.Items.Add(class3 = new WayPointEditor.Class200(playground));
                    this.dictionary_0.Add(playground, class3);
                    this.PlaygroundList.Sort();
                }
                this.PlaygroundList.SelectedItems.Clear();
                if (class3 != null)
                {
                    class3.Selected = true;
                }
                PointF location = @class.nullable_0.Value.Location;
                WayPointEditor.Class198 class4 = null;
                if (dictionary.ContainsKey(location))
                {
                    WayPointEditor.smethod_0(location);
                    using (IEnumerator enumerator = this.WayPointList.Items.GetEnumerator())
                    {
                        while (enumerator.MoveNext())
                        {
                            object obj = enumerator.Current;
                            WayPointEditor.Class198 class5 = (WayPointEditor.Class198)obj;
                            if (class5.Point == location)
                            {
                                class4 = class5;
IL_1D4:
                                goto IL_217;
                            }
                        }
                        goto IL_1D4;
                    }
                }
                dictionary.Add(location, Enum99.flag_0);
                this.WayPointList.Items.Add(class4 = new WayPointEditor.Class198(location, Enum99.flag_0));
                base.FileModified = true;
IL_217:
                foreach (object obj2 in this.WayPointList.SelectedItems)
                {
                    WayPointEditor.Class198 class6 = (WayPointEditor.Class198)obj2;
                    class6.Selected = false;
                }
                if (class4 != null)
                {
                    class4.Selected = true;
                    return;
                }
            }
            else
            {
                DialogBox.smethod_3("The Way Point Editor was unable to retrieve your toon's coordinates. Check if ToonTown is responding and your toon is in a Playground.", "Unable to Retrieve Coordinates");
            }
        }