开发者

Revision Updater

开发者 https://www.devze.com 2023-02-28 13:56 出处:网络
I want to make a method that will check the server\'s revision, check the \"website\" for a revision higher than it, then change the s开发者_JAVA技巧erver\'s revision.

I want to make a method that will check the server's revision, check the "website" for a revision higher than it, then change the s开发者_JAVA技巧erver's revision.

Here's what I've gotten so far.

    /// <summary>
    /// Update the Emulator's Revision!
    /// </summary>
    private static void Update()
    {
        int pause = 900;
        Console.WriteLine("Checking your revision");
        Thread.Sleep(pause);
        Console.WriteLine("------->" + Revision);
        Console.WriteLine("Checking Checking the newest revision online");
        Thread.Sleep(pause);
        //string Test = "Anything" > Revision;
        string Website = new WebClient().DownloadString("http://whatever.com/revision.php/");
        //if (Website.Contains(Test))
        //{
        //}
    }

Is there a way to find anything that is over "Revision" on "website"?


If I understand you correctly you simply want to check a "revision string" if it is higher than what you got locally.

As I see it, it depends on what you use as a revision. If it looks something like "1.0.0.1" (major, minor, built and so on) I would break the string apart with the Split method and convert it into integers, then compare each part separately.

I'm not aware that a simple "revision-compare"-method exists.

0

精彩评论

暂无评论...
验证码 换一张
取 消