[Need Coder!] WWG Launcher

Joined
Feb 20, 2010
Messages
1
Reaction score
1
A small and simple launcher I made for World Wide Gaming GunZ. I need a coder to, you know, code it.

TragicComedy - [Need Coder!] WWG Launcher - RaGEZONE Forums


I need all the buttons to be coded to the appropriate destinations, the mouseover glow, and the scrollbar. Also it would be nice if once the launcher is opened (like double clicked from desktop) then a small popup would show giving me and the coder credit! =)

If anyone's interested, please reply or PM me!

Muchos Gracias,
TragicComedy.
 
Looks pretty bad actually, but for your first is good o,o?
The register button isn't good, the text is overlapping.

GL finding a coder!
 
Last edited:
I is a super 1337 kewdR!
I have about 4 1/2 years of experience in GunZ and 5 years experience in programming and computer science.
Languages known = C++ (advanced), C# (intermediate), PHP (advanced), ASM (intermediate)...

I would be glad to help out any way I can :)
 
I is a super 1337 kewdR!
I have about 4 1/2 years of experience in GunZ and 5 years experience in programming and computer science.
Languages known = C++ (advanced), C# (intermediate), PHP (advanced), ASM (intermediate)...

I would be glad to help out any way I can :)

You can't code ..QQ no need for the lies
 
it isnt hard to code lol if you really wanted it done google is your answer
i have coded a auto updating launcher better then any ive seen coded around here
a few fixes that i cba to do and itll work fine
you might wanna add xml phrasing instead i know i will if i use it again
p.s this was for eudemons worked fine few bugs that are easy to fix

Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml;
using System.IO;
using System.Security.Cryptography;
using System.Net;
using System.Collections;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace EuroDemons_Launcher
{
    public partial class Form1 : Form
    {
        ArrayList Updates = new ArrayList();
        public static string temppath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
        string dirpath = temppath.Replace("file:\\", "");
        int updatedone = 0;
        string url = "http://patch.eurodemons.co.uk/";
        string copy1;
        string copy2;
        public const int WM_NCLBUTTONDOWN = 0xA1;
        public const int HT_CAPTION = 0x2;
        [DllImportAttribute("user32.dll")]
        public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
        [DllImportAttribute("user32.dll")]
        public static extern bool ReleaseCapture();
        public Form1()
        {
            InitializeComponent();
        }
        public void update()
        {
            label1.Text = "Checking For Updates Please Wait...";
            label1.Visible = true;
            WebClient client = new WebClient();
            client.DownloadFileCompleted += new AsyncCompletedEventHandler(updatepatch);
            client.DownloadFileAsync(new Uri(url + "patch.text"), dirpath + "\\patch.text");
        }
        void updatepatch(object sender, AsyncCompletedEventArgs e)
        {
            phraseupdate(url);
        }
        private void phraseupdate(string localURL)
        {
            using (StreamReader reader = new StreamReader(dirpath + "\\patch.text"))
            {
                string line;
                while ((line = reader.ReadLine()) != null)
                {
                    string updateread = line;
                    string[] update = updateread.Split('-');// 0 path/filename - 1 md5 - 2 filename
                    if (!updatecheck(dirpath + "\\" + update[0] + "\\" + update[2], update[1]) == true)
                    {
                        Updates.Add(update[0] + "-" + localURL + update[2] + "-" + update[2]);
                    }
                }
                label1.Visible = false;
                if (Updates.Count != 0)
                {
                    Download();
                    label1.Text = "Downloading Updates...";
                    label1.Visible = true;
                    label2.Text = "Updating Files 1 / " + Updates.Count;
                    label2.Visible = true;
                } else {
                     button1.Enabled = true;
                    label1.Text = "No Updates Press Start To Launch Eurodemons.";
                    label1.Visible = true;
                    label2.Visible = false;
                     button1.Image = EuroDemons_Launcher.Properties.Resources.Start;
                }
                if (reader != null)
                    reader.Close();
            }
        }
        public Boolean updatecheck(string filename, string md5)
        {
            if (File.Exists(filename))
            {
                if (MD5(filename) == md5)
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
            else
            {
                return false;
            }
        }
        protected string MD5(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();
        }
        public void ExecuteCommandSync(object command)
        {
            try
            {
                System.Diagnostics.ProcessStartInfo procStartInfo =
                    new System.Diagnostics.ProcessStartInfo("cmd", "/c " + command);
                procStartInfo.RedirectStandardOutput = true;
                procStartInfo.UseShellExecute = false;
                procStartInfo.CreateNoWindow = true;
                System.Diagnostics.Process proc = new System.Diagnostics.Process();
                proc.StartInfo = procStartInfo;
                proc.Start();
                string result = proc.StandardOutput.ReadToEnd();
                proc.Close();
                Close();
            }
            catch (Exception)
            {
                MessageBox.Show("Error Launching Game");
            }
            Close();
        }
        private void Download()
        {
            copy1 = "";
            copy2 = "";
            if (!Directory.Exists(dirpath + "\\patch"))
            {
                Directory.CreateDirectory(dirpath + "\\patch");
            }
            string file = Updates[updatedone].ToString();
            string[] url = file.Split('-');
            copy1 = dirpath + "\\patch\\" + url[2];
            copy2 = dirpath + url[0] + url[2];
            if (File.Exists(copy1))
            {
                File.Delete(copy1);
            }
            if (File.Exists(copy2))
            {
                File.Delete(copy2);
            }
            progressBar1.Visible = true;
            progressBar2.Visible = true;
            label3.Visible = true;
            label3.Visible = true;
            label4.Visible = true;
            label3.Text = "Downloading " + url[2] + ".";
            WebClient client = new WebClient();
            client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(client_DownloadProgressChanged);
            client.DownloadFileCompleted += new AsyncCompletedEventHandler(DownloadCompleted);
            client.DownloadFileAsync(new Uri(url[1]), dirpath + "\\Patch\\" + url[2]);
        }

        void client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
        {
            double bytesIn = double.Parse(e.BytesReceived.ToString());
            double totalBytes = double.Parse(e.TotalBytesToReceive.ToString());
            double percentage = bytesIn / totalBytes * 100;
            progressBar2.Value = int.Parse(Math.Truncate(percentage).ToString());
        }

        void DownloadCompleted(object sender, AsyncCompletedEventArgs e)
        {
                File.Move(copy1, copy2);
                if (updatedone == Updates.Count - 1)
                {
                    progressBar1.Value = 100;
                    button1.Enabled = true;
                    button1.Image = EuroDemons_Launcher.Properties.Resources.Start;
                    label1.Text = "Files Sucessfully Updated Press Start To Play EuroDemons.";
                    label1.Visible = true;
                    label2.Visible = false;
                    label3.Visible = false;
                    label4.Visible = false;
                    progressBar1.Visible = false;
                    progressBar2.Visible = false;
                }
                else
                {
                    updatedone++;
                    Download();
                    int percent = (int)(Decimal.Divide(updatedone, Updates.Count) * 100);
                    progressBar1.Value = percent;
                    int updatedcounter = updatedone + 1;
                    label2.Text = "Updating Files " + updatedcounter + " / " + Updates.Count + ".";
            }
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            if (File.Exists(dirpath + "\\Replace.exe"))
            {
                File.Delete(dirpath + "\\Replace.exe");
            }
            update();
            timer1.Interval = 5000;
            timer1.Start();
        }
        public void move(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                ReleaseCapture();
                SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
            }
        }
        private void Form1_MouseDown(object sender, MouseEventArgs e)
        {
            move(sender, e);
        }
        private void timer1_Tick(object sender, EventArgs e)
        {
            webBrowser1.Left = 3;
        }
        private void button1_Click_1(object sender, EventArgs e)
        {
            Close();
            button1.Enabled = false;
            button1.Image = EuroDemons_Launcher.Properties.Resources.StartRed;
            ExecuteCommandSync("@Eurodemons.exe Eurodemons");
            Close();
        }
        private void button3_Click_1(object sender, EventArgs e)
        {
            MessageBox.Show("Designed By Steven & Kris & Timmy, Coded By Steven © 2010 - 2011 All Rights Reserved");
        }
        private void button2_Click_1(object sender, EventArgs e)
        {
            Close();
        }
        private void progressBar1_MouseDown(object sender, MouseEventArgs e)
        {
            move(sender, e);
        }
        private void progressBar2_MouseDown(object sender, MouseEventArgs e)
        {
            move(sender, e);
        }
        private void label1_MouseDown(object sender, MouseEventArgs e)
        {
            move(sender, e);
        }
        private void label2_MouseDown(object sender, MouseEventArgs e)
        {
            move(sender, e);
        }
        private void label4_MouseDown(object sender, MouseEventArgs e)
        {
            move(sender, e);
        }
        private void label3_MouseDown(object sender, MouseEventArgs e)
        {
            move(sender, e);
        }
    }
}
 
Last edited:
it isnt hard to code lol if you really wanted it done google is your answer
i have coded a auto updating launcher better then any ive seen coded around here
a few fixes that i cba to do and itll work fine
you might wanna add xml phrasing instead i know i will if i use it again
p.s this was for eudemons worked fine few bugs that are easy to fix

Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml;
using System.IO;
using System.Security.Cryptography;
using System.Net;
using System.Collections;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace EuroDemons_Launcher
{
    public partial class Form1 : Form
    {
        ArrayList Updates = new ArrayList();
        public static string temppath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
        string dirpath = temppath.Replace("file:\\", "");
        int updatedone = 0;
        string url = "http://patch.eurodemons.co.uk/";
        string copy1;
        string copy2;
        public const int WM_NCLBUTTONDOWN = 0xA1;
        public const int HT_CAPTION = 0x2;
        [DllImportAttribute("user32.dll")]
        public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
        [DllImportAttribute("user32.dll")]
        public static extern bool ReleaseCapture();
        public Form1()
        {
            InitializeComponent();
        }
        public void update()
        {
            label1.Text = "Checking For Updates Please Wait...";
            label1.Visible = true;
            WebClient client = new WebClient();
            client.DownloadFileCompleted += new AsyncCompletedEventHandler(updatepatch);
            client.DownloadFileAsync(new Uri(url + "patch.text"), dirpath + "\\patch.text");
        }
        void updatepatch(object sender, AsyncCompletedEventArgs e)
        {
            phraseupdate(url);
        }
        private void phraseupdate(string localURL)
        {
            using (StreamReader reader = new StreamReader(dirpath + "\\patch.text"))
            {
                string line;
                while ((line = reader.ReadLine()) != null)
                {
                    string updateread = line;
                    string[] update = updateread.Split('-');// 0 path/filename - 1 md5 - 2 filename
                    if (!updatecheck(dirpath + "\\" + update[0] + "\\" + update[2], update[1]) == true)
                    {
                        Updates.Add(update[0] + "-" + localURL + update[2] + "-" + update[2]);
                    }
                }
                label1.Visible = false;
                if (Updates.Count != 0)
                {
                    Download();
                    label1.Text = "Downloading Updates...";
                    label1.Visible = true;
                    label2.Text = "Updating Files 1 / " + Updates.Count;
                    label2.Visible = true;
                } else {
                     button1.Enabled = true;
                    label1.Text = "No Updates Press Start To Launch Eurodemons.";
                    label1.Visible = true;
                    label2.Visible = false;
                     button1.Image = EuroDemons_Launcher.Properties.Resources.Start;
                }
                if (reader != null)
                    reader.Close();
            }
        }
        public Boolean updatecheck(string filename, string md5)
        {
            if (File.Exists(filename))
            {
                if (MD5(filename) == md5)
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
            else
            {
                return false;
            }
        }
        protected string MD5(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();
        }
        public void ExecuteCommandSync(object command)
        {
            try
            {
                System.Diagnostics.ProcessStartInfo procStartInfo =
                    new System.Diagnostics.ProcessStartInfo("cmd", "/c " + command);
                procStartInfo.RedirectStandardOutput = true;
                procStartInfo.UseShellExecute = false;
                procStartInfo.CreateNoWindow = true;
                System.Diagnostics.Process proc = new System.Diagnostics.Process();
                proc.StartInfo = procStartInfo;
                proc.Start();
                string result = proc.StandardOutput.ReadToEnd();
                proc.Close();
                Close();
            }
            catch (Exception)
            {
                MessageBox.Show("Error Launching Game");
            }
            Close();
        }
        private void Download()
        {
            copy1 = "";
            copy2 = "";
            if (!Directory.Exists(dirpath + "\\patch"))
            {
                Directory.CreateDirectory(dirpath + "\\patch");
            }
            string file = Updates[updatedone].ToString();
            string[] url = file.Split('-');
            copy1 = dirpath + "\\patch\\" + url[2];
            copy2 = dirpath + url[0] + url[2];
            if (File.Exists(copy1))
            {
                File.Delete(copy1);
            }
            if (File.Exists(copy2))
            {
                File.Delete(copy2);
            }
            progressBar1.Visible = true;
            progressBar2.Visible = true;
            label3.Visible = true;
            label3.Visible = true;
            label4.Visible = true;
            label3.Text = "Downloading " + url[2] + ".";
            WebClient client = new WebClient();
            client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(client_DownloadProgressChanged);
            client.DownloadFileCompleted += new AsyncCompletedEventHandler(DownloadCompleted);
            client.DownloadFileAsync(new Uri(url[1]), dirpath + "\\Patch\\" + url[2]);
        }

        void client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
        {
            double bytesIn = double.Parse(e.BytesReceived.ToString());
            double totalBytes = double.Parse(e.TotalBytesToReceive.ToString());
            double percentage = bytesIn / totalBytes * 100;
            progressBar2.Value = int.Parse(Math.Truncate(percentage).ToString());
        }

        void DownloadCompleted(object sender, AsyncCompletedEventArgs e)
        {
                File.Move(copy1, copy2);
                if (updatedone == Updates.Count - 1)
                {
                    progressBar1.Value = 100;
                    button1.Enabled = true;
                    button1.Image = EuroDemons_Launcher.Properties.Resources.Start;
                    label1.Text = "Files Sucessfully Updated Press Start To Play EuroDemons.";
                    label1.Visible = true;
                    label2.Visible = false;
                    label3.Visible = false;
                    label4.Visible = false;
                    progressBar1.Visible = false;
                    progressBar2.Visible = false;
                }
                else
                {
                    updatedone++;
                    Download();
                    int percent = (int)(Decimal.Divide(updatedone, Updates.Count) * 100);
                    progressBar1.Value = percent;
                    int updatedcounter = updatedone + 1;
                    label2.Text = "Updating Files " + updatedcounter + " / " + Updates.Count + ".";
            }
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            if (File.Exists(dirpath + "\\Replace.exe"))
            {
                File.Delete(dirpath + "\\Replace.exe");
            }
            update();
            timer1.Interval = 5000;
            timer1.Start();
        }
        public void move(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                ReleaseCapture();
                SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
            }
        }
        private void Form1_MouseDown(object sender, MouseEventArgs e)
        {
            move(sender, e);
        }
        private void timer1_Tick(object sender, EventArgs e)
        {
            webBrowser1.Left = 3;
        }
        private void button1_Click_1(object sender, EventArgs e)
        {
            Close();
            button1.Enabled = false;
            button1.Image = EuroDemons_Launcher.Properties.Resources.StartRed;
            ExecuteCommandSync("@Eurodemons.exe Eurodemons");
            Close();
        }
        private void button3_Click_1(object sender, EventArgs e)
        {
            MessageBox.Show("Designed By Steven & Kris & Timmy, Coded By Steven © 2010 - 2011 All Rights Reserved");
        }
        private void button2_Click_1(object sender, EventArgs e)
        {
            Close();
        }
        private void progressBar1_MouseDown(object sender, MouseEventArgs e)
        {
            move(sender, e);
        }
        private void progressBar2_MouseDown(object sender, MouseEventArgs e)
        {
            move(sender, e);
        }
        private void label1_MouseDown(object sender, MouseEventArgs e)
        {
            move(sender, e);
        }
        private void label2_MouseDown(object sender, MouseEventArgs e)
        {
            move(sender, e);
        }
        private void label4_MouseDown(object sender, MouseEventArgs e)
        {
            move(sender, e);
        }
        private void label3_MouseDown(object sender, MouseEventArgs e)
        {
            move(sender, e);
        }
    }
}

nice code ^^ in C#
=P
Thanks maybe i can get more ideas :P
With this now he can code it xd
 
i might code it for him i already gave him my pc id banning server and client side that took me 8 hours to code client side - c++ server side c# lol rodi dosnt even want this
 
Last edited:
Back