示例#1
0
 public frmCommunitySaves(GClass32 gclass32_1)
 {
     this.InitializeComponent();
     this.gclass32_0 = gclass32_1;
     if (gclass32_1.method_14(false) != null && gclass32_1.method_14(false).FileSaveLocation != null)
     {
         this.method_0();
     }
     else
     {
         int num = (int)RadMessageBox.Show("This title does not support community saves.");
         this.Close();
     }
 }
示例#2
0
 public static void smethod_0(GClass32 gclass32_0)
 {
     if (!gclass32_0.Boolean_1)
     {
         return;
     }
     try
     {
         GClass95 gclass95_0 = gclass32_0.method_14(false);
         if (!gclass95_0.Boolean_0)
         {
             if (!gclass95_0.EmuConfiguration_0.AutoUpdate)
             {
                 int num = (int)RadMessageBox.Show(string.Format("No emulator detected. Please install it in {0} or enable Automatic updates in 'Emu. Settings'.", (object)gclass95_0.Root_BIN_Path));
                 return;
             }
             gclass95_0.CheckWebForEmulatorUpdate();
         }
         gclass95_0.FullScreen = true;
         frmShortcutType frmShortcutType = new frmShortcutType((GClass30)gclass32_0);
         if (frmShortcutType.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         if (frmShortcutType.ShortcutType == GEnum9.const_1)
         {
             GClass128.smethod_5(gclass32_0, gclass95_0);
         }
         else if (frmShortcutType.ShortcutType == GEnum9.const_0)
         {
             if (gclass95_0 is Cemu)
             {
                 (gclass95_0 as Cemu).RenderUpsideDown = frmShortcutType.SteamLinkFix;
             }
             GClass128.smethod_7(gclass32_0, gclass95_0);
         }
         int num1 = (int)RadMessageBox.Show("Done!");
     }
     catch (Exception ex)
     {
         int num = (int)RadMessageBox.Show(ex.ToString());
     }
 }
示例#3
0
 private void method_17(GClass32 gclass32_1, float float_1 = 1f)
 {
     try
     {
         SoundEffectInstance soundEffectInstance0 = this.soundEffectInstance_0;
         if (soundEffectInstance0 != null)
         {
             soundEffectInstance0.Stop();
         }
         SoundEffect soundEffect0 = this.soundEffect_0;
         if (soundEffect0 != null)
         {
             soundEffect0.Dispose();
         }
         this.soundEffectInstance_0 = (SoundEffectInstance)null;
         this.soundEffect_0         = (SoundEffect)null;
         if (gclass32_1 == null)
         {
             return;
         }
         GClass95 gclass95 = gclass32_1.method_14(false);
         if (!File.Exists(gclass95.String_2))
         {
             return;
         }
         if (!File.Exists(gclass95.String_3))
         {
             this.method_10(this.GClass32_0);
         }
         using (FileStream fileStream = File.OpenRead(gclass95.String_3))
             this.soundEffect_0 = SoundEffect.FromStream((Stream)fileStream);
         if (this.soundEffect_0 == null)
         {
             return;
         }
         this.soundEffectInstance_0 = this.soundEffect_0.CreateInstance();
         this.soundEffect_0.Play(float_1, 0.0f, 0.0f);
     }
     catch
     {
     }
 }
示例#4
0
        private void method_10(GClass32 gclass32_1)
        {
            GClass95 gclass95 = gclass32_1.method_14(false);

            using (BinaryWriter binaryWriter = new BinaryWriter((Stream)File.Create(gclass95.String_3)))
            {
                byte[] buffer = new byte[2];
                using (FileStream fileStream = File.Open(gclass95.String_2, FileMode.Open))
                {
                    binaryWriter.Write(this.byte_0);
                    binaryWriter.Write((int)(fileStream.Length + 44L - 8L));
                    binaryWriter.Write(this.byte_1);
                    binaryWriter.Write((int)fileStream.Length - 8);
                    while (fileStream.Read(buffer, 0, 2) != 0)
                    {
                        binaryWriter.Write(buffer[1]);
                        binaryWriter.Write(buffer[0]);
                    }
                }
            }
        }
示例#5
0
        private void FrmImport_Load(object sender, EventArgs e)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            FrmImport.Class156 class156 = new FrmImport.Class156();
            // ISSUE: reference to a compiler-generated field
            class156.frmImport_0 = this;
            this.lstTitles.SortDescriptors.Add(new SortDescriptor("Value", ListSortDirection.Ascending));
            // ISSUE: reference to a compiler-generated field
            class156.string_0 = new string[0];
            // ISSUE: reference to a compiler-generated field
            class156.string_1 = new string[0];
            int num1;
            // ISSUE: reference to a compiler-generated method
            FrmWait frmWait = new FrmWait("USB Helper is looking for importable titles...", new Action(class156.method_0), (Action <Exception>)(exception_0 => num1 = (int)RadMessageBox.Show("An error has occured.\n" + (object)exception_0)));
            Struct4 struct4;

            // ISSUE: reference to a compiler-generated field
            foreach (string str1 in class156.string_0)
            {
                string    str2      = "Ready to import";
                GClass100 gclass100 = GClass100.smethod_0(str1, GEnum3.const_1);
                TitleId   titleId   = new TitleId(gclass100.TitleId.ToString("x16"));
                if (!GClass28.dictionary_0.ContainsKey(titleId.FullGame))
                {
                    string           str3             = "Cannot be imported, not in the database";
                    ListViewDataItem listViewDataItem = new ListViewDataItem();
                    this.lstTitles.Items.Add(listViewDataItem);
                    listViewDataItem.Enabled = false;
                    listViewDataItem[0]      = (object)string.Format("UNKNOWN ({0})", (object)titleId.IdRaw);
                    listViewDataItem[1]      = (object)str3;
                }
                else
                {
                    GClass30 gclass30 = (GClass30)null;
                    switch (titleId.IdType)
                    {
                    case GEnum1.const_0:
                        gclass30 = (GClass30)GClass28.dictionary_0[titleId.FullGame];
                        if (gclass30.System == GEnum3.const_0)
                        {
                            gclass30 = (GClass30)GClass28.dictionary_0[titleId.FullGame].Updates.Last <GClass33>();
                            break;
                        }
                        if (gclass30.System == GEnum3.const_1)
                        {
                            // ISSUE: object of a compiler-generated type is created
                            // ISSUE: variable of a compiler-generated type
                            FrmImport.Class157 class157 = new FrmImport.Class157();
                            // ISSUE: reference to a compiler-generated field
                            class157.ushort_0 = gclass100.TitleVersion;
                            try
                            {
                                // ISSUE: reference to a compiler-generated method
                                gclass30 = (GClass30)GClass28.dictionary_0[titleId.FullGame].Updates.Find(new Predicate <GClass33>(class157.method_0));
                                break;
                            }
                            catch
                            {
                                gclass30 = (GClass30)null;
                                break;
                            }
                        }
                        else
                        {
                            break;
                        }

                    case GEnum1.const_1:
                        gclass30 = (GClass30)GClass28.dictionary_0[titleId.FullGame];
                        break;

                    case GEnum1.const_2:
                        gclass30 = (GClass30)GClass28.dictionary_0[titleId.FullGame].Dlc;
                        break;

                    case GEnum1.const_3:
                        gclass30 = (GClass30)GClass28.dictionary_0[titleId.FullGame];
                        break;

                    case GEnum1.const_4:
                        gclass30 = (GClass30)GClass28.dictionary_0[titleId.FullGame];
                        break;
                    }
                    if (gclass30 != null)
                    {
                        ListViewDataItem listViewDataItem1 = new ListViewDataItem();
                        struct4               = new Struct4();
                        struct4.gclass100_0   = gclass100;
                        struct4.gclass30_0    = gclass30;
                        struct4.string_0      = Path.GetDirectoryName(str1);
                        listViewDataItem1.Tag = (object)struct4;
                        ListViewDataItem listViewDataItem2 = listViewDataItem1;
                        if (gclass30.GEnum2_0 != GEnum2.const_0)
                        {
                            str2 = "Cannot be imported, already in the library";
                            listViewDataItem2.Enabled = false;
                        }
                        this.lstTitles.Items.Add(listViewDataItem2);
                        listViewDataItem2[0] = (object)gclass30.ToString();
                        listViewDataItem2[1] = (object)str2;
                    }
                }
            }
            // ISSUE: reference to a compiler-generated field
            foreach (string str in class156.string_1)
            {
                try
                {
                    if (!(new DirectoryInfo(Path.GetDirectoryName(str)).Name != "meta"))
                    {
                        TitleId key = new TitleId(XDocument.Load(str).Descendants((XName)"title_id").ElementAt <XElement>(0).Value);
                        if (key.IdType == GEnum1.const_1)
                        {
                            if (GClass28.dictionary_0.ContainsKey(key))
                            {
                                GClass32 gclass32 = GClass28.dictionary_0[key];
                                GClass95 gclass95 = gclass32.method_14(false);
                                if (gclass95 != null)
                                {
                                    if (!gclass32.Boolean_1)
                                    {
                                        ListViewDataItem listViewDataItem1 = new ListViewDataItem();
                                        this.lstTitles.Items.Add(listViewDataItem1);
                                        listViewDataItem1[0] = (object)(gclass32.Name + " (EMU)");
                                        listViewDataItem1[1] = (object)"Importable";
                                        ListViewDataItem listViewDataItem2 = listViewDataItem1;
                                        struct4            = new Struct4();
                                        struct4.gclass30_0 = (GClass30)gclass32;
                                        struct4.gclass95_0 = gclass95;
                                        struct4.string_0   = new DirectoryInfo(Path.GetDirectoryName(str)).Parent.FullName;
                                        // ISSUE: variable of a boxed type
                                        __Boxed <Struct4> local = (ValueType)struct4;
                                        listViewDataItem2.Tag = (object)local;
                                    }
                                }
                            }
                        }
                    }
                }
                catch
                {
                }
            }
            if (this.lstTitles.Items.Count != 0)
            {
                return;
            }
            int num2 = (int)RadMessageBox.Show("No games were found. Please specify another path.");

            this.DialogResult = DialogResult.Abort;
            this.Close();
        }