예제 #1
0
 private void method_2(object sender, FileSystemEventArgs e)
 {
     try
     {
         if (!(GClass30.smethod_3(e.Name) != e.Name))
         {
             return;
         }
         this.method_4(Path.GetPathRoot(e.FullPath));
     }
     catch
     {
     }
 }
예제 #2
0
        private static string smethod_9(GClass32 gclass32_0)
        {
            string string_1 = (string)null;

            try
            {
                try
                {
                    string string_0 = string.Format("{0}/res/emulators/banners/{1}.png", (object)Class67.CDNWiiUUSBHelperURL, (object)gclass32_0.TitleId.IdRaw);
                    string_1 = System.IO.Path.Combine(GClass128.String_0, gclass32_0.TitleId.IdRaw + ".banner.png");
                    new GClass78().method_5(string_0, string_1, 0UL, GClass78.GEnum4.const_0, (WebProxy)null, 0L, (byte[])null, (byte[])null, (byte)0);
                    return(string_1);
                }
                catch
                {
                    string_1 = (string)null;
                }
                string html1 = new GClass78().Download_File_UTF8("http://steambanners.booru.org/index.php?page=post&s=list&tags=" + GClass30.smethod_3(GClass30.smethod_3(gclass32_0.Name.ToLower())).Replace(' ', '+'));
                HtmlAgilityPack.HtmlDocument htmlDocument = new HtmlAgilityPack.HtmlDocument();
                htmlDocument.LoadHtml(html1);
                IEnumerable <string> source = htmlDocument.DocumentNode.Descendants("a").Where <HtmlNode>((Func <HtmlNode, bool>)(htmlNode_0 => htmlNode_0.Attributes.Contains("id"))).Select <HtmlNode, string>((Func <HtmlNode, string>)(htmlNode_0 => htmlNode_0.Attributes["href"].Value)).Where <string>((Func <string, bool>)(string_0 => string_0.Contains("index.php?page=post")));
                if (source.Any <string>())
                {
                    string html2 = new GClass78().Download_File_UTF8("http://steambanners.booru.org/" + HtmlEntity.DeEntitize(source.ElementAt <string>(0)));
                    htmlDocument.LoadHtml(html2);
                    string string_0_1 = htmlDocument.DocumentNode.Descendants("img").Where <HtmlNode>((Func <HtmlNode, bool>)(htmlNode_0 => htmlNode_0.Attributes.Contains("src"))).Select <HtmlNode, string>((Func <HtmlNode, string>)(htmlNode_0 => htmlNode_0.Attributes["src"].Value)).Where <string>((Func <string, bool>)(string_0 => string_0.Contains("img.booru.org/steambanners//images"))).ElementAt <string>(0);
                    string_1 = System.IO.Path.Combine(GClass128.String_0, gclass32_0.TitleId.IdRaw + ".banner.png");
                    new GClass78().method_5(string_0_1, string_1, 0UL, GClass78.GEnum4.const_0, (WebProxy)null, 0L, (byte[])null, (byte[])null, (byte)0);
                }
            }
            catch
            {
            }
            return(string_1);
        }
예제 #3
0
 private void method_3(DriveInfo driveInfo_0)
 {
     try
     {
         string index = Path.Combine(driveInfo_0.RootDirectory.FullName, "install");
         if (!driveInfo_0.IsReady || driveInfo_0.DriveType != DriveType.Removable || !Directory.Exists(index))
         {
             return;
         }
         if (this.dictionary_0.ContainsKey(index))
         {
             this.dictionary_0[index].EnableRaisingEvents = false;
             this.dictionary_0[index].Dispose();
             this.dictionary_0.Remove(index);
         }
         FileSystemWatcher fileSystemWatcher = new FileSystemWatcher(index);
         fileSystemWatcher.Created            += new FileSystemEventHandler(this.method_2);
         fileSystemWatcher.EnableRaisingEvents = true;
         this.dictionary_0.Add(index, fileSystemWatcher);
         IEnumerable <DirectoryInfo> source = new DirectoryInfo(index).EnumerateDirectories().Where <DirectoryInfo>((Func <DirectoryInfo, bool>)(directoryInfo_0 => GClass30.smethod_3(directoryInfo_0.Name) != directoryInfo_0.Name));
         Func <DirectoryInfo, bool>  func   = (Func <DirectoryInfo, bool>)(directoryInfo_0 => File.Exists(Path.Combine(directoryInfo_0.FullName, "title.tik")));
         Func <DirectoryInfo, bool>  predicate;
         if (!source.Where <DirectoryInfo>(predicate).Any <DirectoryInfo>())
         {
             return;
         }
         this.method_4(driveInfo_0.Name);
     }
     catch
     {
     }
 }