コード例 #1
0
 public override void vmethod_2()
 {
     base.vmethod_2();
     Task.Run((Action)(() =>
     {
         try
         {
             this.method_11(0);
             if (this.GClass30_0.GEnum2_0 != GEnum2.const_2)
             {
                 GClass80 gclass80 = new GClass80((WebProxy)null, false, false);
                 gclass80.Event_5 += (EventHandler <GClass81>)((object_0, gclass81_0) => this.method_15());
                 gclass80.method_1(new List <GClass30>((IEnumerable <GClass30>) new GClass30[1]
                 {
                     this.GClass30_0
                 }), 100, 10000);
             }
             else
             {
                 this.method_15();
             }
         }
         catch (Exception ex)
         {
             this.method_10(ex);
         }
     }));
 }
コード例 #2
0
        private void method_8(object object_0, Class58 class58_0)
        {
            GClass78 gclass78 = (GClass78)object_0;

            if (!this.bool_1)
            {
                this.method_5("Network lost");
            }
            if (!this.bool_0)
            {
                this.gclass78_0.method_0();
            }
            this.gstruct3_0 = gclass78.DownloadSpeed;
            ulong ulong0 = this.gstruct3_0.ulong_0;

            if (ulong0 > this.MaxSpeed)
            {
                this.MaxSpeed = ulong0;
            }
            try
            {
                this.timeSpan_1 = GStruct3.smethod_1(this.dataSize_0.Diff(gclass78.TotalDownloadedCurrentGame), this.gstruct3_0);
                this.timeSpan_2 = GStruct3.smethod_1(this.dataSize_1.Diff(gclass78.TotalDataDownloaded), this.gstruct3_0);
                this.timeSpan_0 = GStruct3.smethod_1(new DataSize((ulong)class58_0.long_2).Diff(new DataSize((ulong)class58_0.long_1)), this.gstruct3_0);
                this.int_4      = GClass80.smethod_0(this.dataSize_0, gclass78.TotalDownloadedCurrentGame);
                this.int_5      = GClass80.smethod_0(this.dataSize_1, gclass78.TotalDataDownloaded);
                this.int_3      = (int)((double)class58_0.long_1 / (double)class58_0.long_2 * 100.0);
                if (this.int_1++ == 8)
                {
                    this.list_0.Add((int)this.gstruct3_0.ulong_0);
                    this.int_1 = 0;
                }
                this.method_16(this.int_4, this.int_5, this.int_3, this.timeSpan_1, this.timeSpan_2, this.timeSpan_0, this.gstruct3_0, (GClass30)null);
            }
            catch
            {
            }
        }
コード例 #3
0
        public bool method_14()
        {
            if (this.PatchGame == null)
            {
                throw new Exception("This game is not patchable!");
            }
            GClass30 title = (GClass30)GClass28.dictionary_0[this.PatchGame];

            if (RadMessageBox.Show(string.Format("This title is a modified version of {0}.\nUSB Helper can build an iso for you by automatically patching the game from the eShop.\nThis way you do not have to provide the iso.\nProceed? (About {1}MB will of data will be downloaded)", (object)title.Name, (object)this.PatchSize), "Proceed?", MessageBoxButtons.YesNo) != DialogResult.Yes)
            {
                return(false);
            }
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            GClass94.Class79 class79 = new GClass94.Class79();
            if (title.GEnum2_0 != GEnum2.const_2)
            {
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: variable of a compiler-generated type
                GClass94.Class80 class80  = new GClass94.Class80();
                GClass80         gclass80 = new GClass80((WebProxy)null, true, true);
                // ISSUE: reference to a compiler-generated field
                class80.frmWait_0 = new FrmWait("USB Helper is downloading the base game", true);
                // ISSUE: reference to a compiler-generated method
                gclass80.Event_6 += new EventHandler <GEventArgs0>(class80.method_0);
                // ISSUE: reference to a compiler-generated method
                gclass80.Event_5 += new EventHandler <GClass81>(class80.method_1);
                gclass80.method_1(((IEnumerable <GClass30>) new GClass30[1]
                {
                    title
                }).ToList <GClass30>(), 100, 10000);
                // ISSUE: reference to a compiler-generated field
                int num = (int)class80.frmWait_0.ShowDialog();
            }
            Dolphin dolphin = new Dolphin(title, false);

            dolphin.method_5();
            string rom = dolphin.GetRom();

            // ISSUE: reference to a compiler-generated field
            class79.string_0 = new Alphaleonis.Win32.Filesystem.DirectoryInfo(rom).Parent.FullName;
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            class79.string_1 = Alphaleonis.Win32.Filesystem.Path.Combine(class79.string_0, "workdir.tmp");
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            class79.string_2 = Alphaleonis.Win32.Filesystem.Path.Combine(class79.string_0, "patch.uhd");
            dolphin.method_12(true);
            int num1;
            // ISSUE: reference to a compiler-generated method
            FrmWait frmWait1 = new FrmWait("USB Helper is preparing the game...", new Action(class79.method_0), (Action <Exception>)(exception_0 => num1 = (int)RadMessageBox.Show(exception_0.ToString())));

            // ISSUE: reference to a compiler-generated field
            class79.frmWait_0 = new FrmWait("USB Helper is downloading the differential data", true);
            WebClient webClient = new WebClient();

            // ISSUE: reference to a compiler-generated method
            webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(class79.method_1);
            // ISSUE: reference to a compiler-generated method
            webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(class79.method_2);
            // ISSUE: reference to a compiler-generated field
            webClient.DownloadFileAsync(new Uri(string.Format("{0}/res/Wii/template/{1}/patch.uhd", (object)Class67.String_2, (object)this.ToInject.ProductId)), class79.string_2);
            // ISSUE: reference to a compiler-generated field
            int num2 = (int)class79.frmWait_0.ShowDialog();
            int num3;
            // ISSUE: reference to a compiler-generated method
            FrmWait frmWait2 = new FrmWait("USB HELPER is patching the game...", new Action(class79.method_3), (Action <Exception>)(exception_0 => num3 = (int)RadMessageBox.Show(exception_0.ToString())));

            // ISSUE: reference to a compiler-generated field
            GClass6.smethod_6(class79.string_2);
            // ISSUE: reference to a compiler-generated field
            GClass6.smethod_5(class79.string_1);
            // ISSUE: reference to a compiler-generated field
            if (!this.vmethod_0(new Alphaleonis.Win32.Filesystem.DirectoryInfo(Alphaleonis.Win32.Filesystem.Path.Combine(class79.string_0, "new-image")).GetFiles()[0].FullName))
            {
                throw new Exception("The output iso was not recognized!");
            }
            int num4 = (int)new frmInjectionAnimation((GClass91)this).ShowDialog();

            dolphin.method_12(true);
            // ISSUE: reference to a compiler-generated field
            GClass6.smethod_5(Alphaleonis.Win32.Filesystem.Path.Combine(class79.string_0, "rawFiles"));
            return(true);
        }