Emulator Update System

Results 1 to 9 of 9
  1. #1
    Proficient Member Squard is offline
    MemberRank
    Dec 2011 Join Date
    155Posts

    Emulator Update System

    Hello Ragezone

    This is an update system for checking versions.

    Code:
        class VersionAdapter : IDisposable
        {
            private string Version = string.Empty;
    
            public VersionAdapter(string Version)
            {
                this.Version = Version;
            }
    
            public string GetNewest()
            {
                var Builder = new StringBuilder();
                var Buffer = new byte[8192];
    
                try
                {
                    HttpWebRequest Request = (HttpWebRequest)WebRequest.Create("http://breakz0ne.webs.com/B33R.version");
                    HttpWebResponse Response = (HttpWebResponse)Request.GetResponse();
    
                    Stream ResStream = Response.GetResponseStream();
    
                    var Count = 0;
    
                    do
                    {
                        Count = ResStream.Read(Buffer, 0, Buffer.Length);
    
                        if (Count > 0)
                        {
                            Builder.Append(Encoding.ASCII.GetString(Buffer, 0, Count));
                        }
                    }
                    while (Count > 0);
                }
                catch { }
    
                var Version = Builder.ToString();
    
                return Version;
            }
    
            public Boolean Validate()
            {
                var A = string.Empty;
                var B = string.Empty;
    
                for (int x = 0; x <= 3; x++)
                {
                    var Am = int.Parse(Version.Split('.')[x]);
                    var Bm = int.Parse(GetNewest().Split('.')[x]);
    
                    A += Am;
                    B += Bm;
                }
    
                return int.Parse(A) < int.Parse(B);
            }
    
            public void Dispose() { }
        }
    How to use?
    Code:
                using (var VersionAdapter = new VersionAdapter(%CURRENTVERSIONEMULATOR%))
                {
                    if (VersionAdapter.Validate()) // Outdated
                    {
                       // Update Emulator.
                    }
                }


  2. #2
    Account Upgraded | Title Enabled! Akimbo is offline
    MemberRank
    Jul 2011 Join Date
    NorwayLocation
    305Posts

    Re: Emulator Update System

    Nice one :)

    Of: Juggernaut, thats a cod zombies drink? haha

  3. #3
    Account Upgraded | Title Enabled! RoyZ is offline
    MemberRank
    Jul 2011 Join Date
    BelgiumLocation
    316Posts

    Re: Emulator Update System

    Nice :) thanks?

  4. #4
    Alpha Member Zak© is offline
    MemberRank
    Oct 2007 Join Date
    2,693Posts

    Re: Emulator Update System

    Quote Originally Posted by Akimbo View Post
    Nice one :)

    Of: Juggernaut, thats a cod zombies drink? haha
    Nice release.

    And nope in MW3 there a type of killstreak called Juggernaught that gives you a big heavy armed suit and a riot shield.

  5. #5
    Account Upgraded | Title Enabled! Pookie is offline
    MemberRank
    Mar 2011 Join Date
    1,038Posts

    Re: Emulator Update System

    Nice release, thanks.

  6. #6
    Account Upgraded | Title Enabled! CyberVibe is offline
    MemberRank
    Jan 2012 Join Date
    C:\inetpub\Location
    215Posts

    Re: Emulator Update System

    This is great! Thanks for this!

  7. #7
    Alpha Member Zak© is offline
    MemberRank
    Oct 2007 Join Date
    2,693Posts

    Re: Emulator Update System

    Update. The project name is Boolean!

    Due: Project String.
    [Coming soon!]

  8. #8
    Account Upgraded | Title Enabled! George2000 is offline
    MemberRank
    Jul 2011 Join Date
    The NetherlandsLocation
    1,150Posts

    Re: Emulator Update System

    Quote Originally Posted by Zak© View Post
    Nice release.

    And nope in MW3 there a type of killstreak called Juggernaught that gives you a big heavy armed suit and a riot shield.
    That's the point streak, the real kill streak is a LMG and MP412 (revolver)

    Ontopic: looks.. nice I guess.

  9. #9
    Habbo section forever TimGlipper is offline
    MemberRank
    Oct 2011 Join Date
    On RaGEZONE.comLocation
    243Posts

    Re: Emulator Update System

    Nice realase!



Advertisement