GetString() public static method

public static GetString ( string uri ) : string
uri string
return string
コード例 #1
0
ファイル: GameInfo.cs プロジェクト: meguerreroa/Etupirka
        public async void updateInfoFromESOnline()
        {
            if (erogameScapeID > 0)
            {
                string result = await TaskEx.Run(() => { return(NetworkUtility.GetString("http://erogamescape.dyndns.org/~ap2/ero/toukei_kaiseki/game.php?game=" + erogameScapeID)); });

                //Console.Write(result);
                string matchTitle   = "<div id=\"soft-title\"><span class=\"bold\">(?<title>.*?)</span>";
                string matchBrand   = "<td><a href=\"brand.php\\?brand=(?<brandid>.*?)\">(?<brand>.*?)</a></td>";
                string matchSaleDay = "<td><a href=\"toukei_hatubaibi_month.php\\?.*\">(?<saleday>.*?)</a></td>";

                Regex re = new Regex(matchTitle, RegexOptions.IgnoreCase);
                for (Match m = re.Match(result); m.Success; m = m.NextMatch())
                {
                    Title = System.Net.WebUtility.HtmlDecode(m.Groups["title"].Value);
                    //		Console.Write(title);
                }
                re = new Regex(matchBrand, RegexOptions.IgnoreCase);
                for (Match m = re.Match(result); m.Success; m = m.NextMatch())
                {
                    Brand = System.Net.WebUtility.HtmlDecode(m.Groups["brand"].Value);
                    //			Console.Write(brand);
                }
                re = new Regex(matchSaleDay, RegexOptions.IgnoreCase);
                for (Match m = re.Match(result); m.Success; m = m.NextMatch())
                {
                    string saleday = m.Groups["saleday"].Value;
                    SaleDay = DateTime.ParseExact(saleday, "yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture);
                    //		Console.Write(saleday);
                }
            }
        }
コード例 #2
0
        private void doCheckUpdate()
        {
            string  str            = NetworkUtility.GetString("http://etupirka.halcyons.org/checkversion.php");
            Version lastestVersion = new Version(str);
            Version myVersion      = new Version(FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).FileVersion);

            if (lastestVersion > myVersion)
            {
                if (MessageBox.Show("Version " + str + " が見つかりました、更新しますか?", "Etupirkaを更新する", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
                {
                    Process.Start("https://github.com/Aixile/Etupirka");
                }
            }
        }
コード例 #3
0
 private void doCheckUpdate()
 {
     try
     {
         string  str            = NetworkUtility.GetString("http://etupirka.halcyons.org/checkversion.php");
         Version lastestVersion = new Version(str);
         Version myVersion      = new Version(FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).FileVersion);
         if (lastestVersion > myVersion)
         {
             if (MessageBox.Show("Version " + str + "Update found, Would you like to update?", "Update Etupirka", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
             {
                 Process.Start("https://github.com/Aixile/Etupirka/releases");
             }
         }
     }catch
     {
     }
 }