Heroic Gunz - C# Launcher

Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    Mako is insane. ThePhailure772 is offline
    MemberRank
    Sep 2007 Join Date
    1,115Posts

    Re: Heroic Gunz - C# Launcher

    Lets go over what's wrong with this and why no one should use it.

    1. Synchronous downloads.
    Code:
    
    namespace GLauncher{
        class PatchFile{
            public bool checkPatchFile(string from){
                try{
                    WebClient PatchFile = new WebClient();
                    PatchFile.DownloadFile(from+"ZPatch.xml", "ZPatch.xml");
                    return true;
                }catch(WebException exeption){
                    MessageBox.Show(Convert.ToString(exeption));
                    return false;
                }
            }
        }
    2. Using MD5 hashing instead of a decent algorithm.
    Code:
        class Hash{
            public string GetMD5HashFromFile(string fileName){
                FileStream file = new FileStream(fileName, FileMode.Open);
                MD5 md5 = new MD5CryptoServiceProvider();
                byte[] retVal = md5.ComputeHash(file);
                file.Close();
    
    
                StringBuilder sb = new StringBuilder();
                for (int i = 0; i < retVal.Length; i++){
                    sb.Append(retVal[i].ToString("x2"));
                }
                return sb.ToString();
            }
        }
    3. Sleeping on a main thread.
    Code:
            private void checkPatchFile(){
                PatchFile checkPatch = new PatchFile();
                if (!checkPatch.checkPatchFile(Convert.ToString(this.PatchLocation))){
                    this.TransferSpeed.Visible = false;
                    this.Information.Text = "Exiting Gunz Launcher.";
                    this.Information.Refresh();
                    Thread.Sleep(500);
                    this.Information.Text = "Exiting Gunz Launcher..";
                    this.Information.Refresh();
                    Thread.Sleep(500);
                    this.Information.Text = "Exiting Gunz Launcher...";
                    this.Information.Refresh();
                    Thread.Sleep(500);
                    Environment.Exit(0);
                }else{
                    this.checkFiles();
                }
            }
    4. Do I even need to explain this?
    Code:
            static bool FilesAreEqual(FileInfo first, FileInfo second){
                if (first.Length != second.Length)
                    return false;
                int iterations = (int)Math.Ceiling((double)first.Length / BYTES_TO_READ);
                using (FileStream fs1 = first.OpenRead())
                using (FileStream fs2 = second.OpenRead()){
                    byte[] one = new byte[BYTES_TO_READ];
                    byte[] two = new byte[BYTES_TO_READ];
                    for (int i = 0; i < iterations; i++){
                        fs1.Read(one, 0, BYTES_TO_READ);
                        fs2.Read(two, 0, BYTES_TO_READ);
                        if (BitConverter.ToInt64(one, 0) != BitConverter.ToInt64(two, 0))
                            return false;
                    }
                }
                return true;
            }

  2. #17
    Currently Stoned ! Ronny786 is offline
    MemberRank
    Dec 2011 Join Date
    Lost WorldLocation
    984Posts

    Re: Heroic Gunz - C# Launcher

    not a BACK DOOR ... But FRONT and OPEN door lol ..
    any idea bout CGLEncryption?

  3. #18
    Intelligent DoucheBag jur13n is offline
    MemberRank
    Jan 2008 Join Date
    Zwolle,Location
    1,946Posts

    Re: Heroic Gunz - C# Launcher

    Quote Originally Posted by Duluxe View Post
    You cant, i opened up the .sln in VS 2003 and it says its been used with a higher version of Visual Studio...
    Wa I talking about opening or installing ?

    Install 2003, 2008, 2012 > right mouse click sln > open with > 2008 or 2012, and you can still use 2003 for other stuff.
    sigh..

  4. #19
    Novice Realtekk is offline
    MemberRank
    Jun 2012 Join Date
    3Posts

    Re: Heroic Gunz - C# Launcher

    Cute launcher

    Thanks

  5. #20
    Alpha Member Chrisss is offline
    MemberRank
    Feb 2012 Join Date
    Ask the Fox!Location
    1,660Posts

    Re: Heroic Gunz - C# Launcher

    May i ask how i get this Launcher working? I open it up in 2012 and open Form1 and edit this part
    PHP Code:
            private Uri PatchLocation = new Uri("http://127.0.0.1/UnitedUpdate/Gunz"); 
    and build it and when i open it up and run i recieve this error, is there anything else i gotta do?? Thanks




Page 2 of 2 FirstFirst 12

Advertisement