Пример #1
0
 // Token: 0x06000133 RID: 307 RVA: 0x00007054 File Offset: 0x00005254
 public void method_0(GClass15 gclass15_1, GClass10 gclass10_0, GClass7 gclass7_1, GClass14 gclass14_1, bool bool_2, Settings settings_1)
 {
     this.bool_0     = true;
     this.settings_0 = settings_1;
     this.gclass7_0  = gclass7_1;
     this.gclass7_0.method_0();
     this.gclass7_0.Thread_0.Start(new GClass11(gclass10_0, (double)this.settings_0.WindupMultiplier, (double)this.settings_0.TotalDelayMultiplier));
     this.gclass15_0 = gclass15_1;
     this.gclass14_0 = gclass14_1;
     GClass1.smethod_0();
     this.thread_0          = new Thread(new ParameterizedThreadStart(this.method_2));
     this.thread_0.Priority = ThreadPriority.Highest;
     this.thread_0.Start(bool_2);
 }
Пример #2
0
    // Token: 0x060003F2 RID: 1010 RVA: 0x00017A44 File Offset: 0x00015C44
    public static string smethod_0(GClass15 <GClass9> gclass15_0)
    {
        string text   = "";
        string format = "{0}       {1,3}      {2,4}     {3,5}         {4}\r\n";

        text += "BSSID     \t         Channel    RSSI    WPS Locked    ESSID\r\n";
        text += "-------------------------------------------------------------------------------------\r\n";
        checked
        {
            int num = gclass15_0.Count - 1;
            for (int i = 0; i <= num; i++)
            {
                text += string.Format(format, new object[]
                {
                    gclass15_0[i].BSSID,
                    gclass15_0[i].Channel,
                    gclass15_0[i].RSSI,
                    gclass15_0[i].ApSetupLocked,
                    gclass15_0[i].SSID
                });
            }
            return(text);
        }
    }
Пример #3
0
        private void InternaPrelPlay()
        {
            if (!this.CheckNvidiaDriverVersion())
            {
                return;
            }
            if (this.EmuConfiguration_0.AutoUpdate && new ComputerInfo().TotalPhysicalMemory >= 6442450944UL)
            {
                this.InstallCommunityShaders();
            }
            this.Event_0           += (EventHandler)((sender, e) => Class27.smethod_0(this.gclass30_0 as GClass32));
            this._modArgumentString = (string)null;
            GClass15 gclass15 = new GClass15((GClass32)this.gclass30_0);

            if (gclass15.InstalledMods.Count <= 0)
            {
                return;
            }
            Dictionary <string, ulong> counter     = (Dictionary <string, ulong>)null;
            Dictionary <string, ulong> counter_mlc = (Dictionary <string, ulong>)null;

            try
            {
                counter = JsonConvert.DeserializeObject <Dictionary <string, ulong> >(System.IO.File.ReadAllText(this.PerformanceFile));
            }
            catch
            {
                counter = new Dictionary <string, ulong>();
            }
            try
            {
                counter_mlc = JsonConvert.DeserializeObject <Dictionary <string, ulong> >(System.IO.File.ReadAllText(this.PerformanceFileMlc));
            }
            catch
            {
                counter_mlc = new Dictionary <string, ulong>();
            }
            gclass15.method_7();
            List <GClass16> gclass16List = gclass15.method_4();
            Class22         mapper       = new Class22(this.CurrentGamePath, counter, 134217728L);
            Class22         mapper_mlc   = new Class22(System.IO.Path.Combine(this.Root_BIN_Path, "mlc01"), counter_mlc, 134217728L);

            foreach (Alphaleonis.Win32.Filesystem.FileInfo fileInfo in gclass15.List_0)
            {
                if (System.IO.File.Exists(this.Root_BIN_Path + "\\mlc01\\usr\\title\\00050000\\" + this.gclass30_0.TitleId.High.ToLower() + fileInfo.FullName.Substring(gclass15.String_0.Length)))
                {
                    mapper_mlc.method_1("\\usr\\title\\00050000\\" + this.gclass30_0.TitleId.High.ToLower() + fileInfo.FullName.Substring(gclass15.String_0.Length), fileInfo.FullName);
                }
                else if (System.IO.File.Exists(this.CurrentGamePath + fileInfo.FullName.Substring(gclass15.String_0.Length)))
                {
                    mapper.method_1(fileInfo.FullName.Substring(gclass15.String_0.Length), fileInfo.FullName);
                }
                else
                {
                    mapper_mlc.method_1("\\usr\\title\\00050000\\" + this.gclass30_0.TitleId.High.ToLower() + fileInfo.FullName.Substring(gclass15.String_0.Length), fileInfo.FullName);
                    mapper.method_1(fileInfo.FullName.Substring(gclass15.String_0.Length), fileInfo.FullName);
                }
            }
            foreach (GClass16 gclass16 in gclass16List)
            {
                string string_2 = gclass15.String_0 + gclass16.ArchiveRelativePath;
                mapper.method_1(gclass16.GameRelativePath, string_2);
                mapper_mlc.method_1("\\usr\\title\\00050000\\" + this.gclass30_0.TitleId.High.ToLower() + gclass16.GameRelativePath, string_2);
            }
            Task.Run((Action)(() =>
            {
                foreach (KeyValuePair <string, ulong> keyValuePair in (IEnumerable <KeyValuePair <string, ulong> >)counter.OrderByDescending <KeyValuePair <string, ulong>, ulong>((Func <KeyValuePair <string, ulong>, ulong>)(x => x.Value)))
                {
                    mapper.method_2(keyValuePair.Key);
                }
                foreach (KeyValuePair <string, ulong> keyValuePair in (IEnumerable <KeyValuePair <string, ulong> >)counter_mlc.OrderByDescending <KeyValuePair <string, ulong>, ulong>((Func <KeyValuePair <string, ulong>, ulong>)(x => x.Value)))
                {
                    mapper_mlc.method_2(keyValuePair.Key);
                }
                mapper.method_0();
                mapper_mlc.method_0();
            }));
            System.IO.Directory.CreateDirectory(System.IO.Path.Combine(GClass88.DirectoryCache, "mods", "mount"));
            foreach (System.IO.DirectoryInfo enumerateDirectory in new System.IO.DirectoryInfo(System.IO.Path.Combine(GClass88.DirectoryCache, "mods", "mount")).EnumerateDirectories())
            {
                try
                {
                    try
                    {
                        Dokan.RemoveMountPoint(enumerateDirectory.FullName);
                    }
                    catch
                    {
                    }
                    enumerateDirectory.Delete(true);
                }
                catch
                {
                }
            }
            string mount_point     = System.IO.Path.Combine(GClass88.DirectoryCache, "mods", "mount", System.IO.Path.GetRandomFileName());
            string mount_point_mlc = System.IO.Path.Combine(GClass88.DirectoryCache, "mods", "mount", System.IO.Path.GetRandomFileName());

            GClass6.smethod_5(mount_point);
            System.IO.Directory.CreateDirectory(mount_point);
            System.IO.Directory.CreateDirectory(mount_point_mlc);
            this.Event_0 += (EventHandler)((sender, e) =>
            {
                mapper.method_4();
                mapper_mlc.method_4();
                System.IO.File.WriteAllText(this.PerformanceFile, JsonConvert.SerializeObject((object)counter));
                string performanceFileMlc = this.PerformanceFileMlc;
                IEnumerable <KeyValuePair <string, ulong> > source = counter_mlc.Where <KeyValuePair <string, ulong> >((Func <KeyValuePair <string, ulong>, bool>)(x => x.Key.Contains("\\USR\\TITLE\\00050000\\")));
                Func <KeyValuePair <string, ulong>, string> func = (Func <KeyValuePair <string, ulong>, string>)(x => x.Key);
                Func <KeyValuePair <string, ulong>, string> keySelector;
                string contents = JsonConvert.SerializeObject((object)source.ToDictionary <KeyValuePair <string, ulong>, string, ulong>(keySelector, (Func <KeyValuePair <string, ulong>, ulong>)(x => x.Value)));
                System.IO.File.WriteAllText(performanceFileMlc, contents);
                Dokan.RemoveMountPoint(mount_point);
                Dokan.RemoveMountPoint(mount_point_mlc);
                GClass6.smethod_5(mount_point);
                GClass6.smethod_5(mount_point_mlc);
            });
            Task.Run((Action)(() => mapper.Mount(mount_point, DokanOptions.WriteProtection, 10, (ILogger)null)));
            Task.Run((Action)(() => mapper_mlc.Mount(mount_point_mlc, DokanOptions.FixedDrive, 10, (ILogger)null)));
            Thread.Sleep(2000);
            this._modArgumentString = this.GenerateArguments(((IEnumerable <string>)System.IO.Directory.GetFiles(System.IO.Path.Combine(mount_point, "code") + "\\")).Where <string>((Func <string, bool>)(x => System.IO.Path.GetExtension(x) == ".rpx")).ToList <string>()[0], mount_point_mlc);
        }