Example #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            var sa = new ServerApi();

            sa.Start();

            if (File.Exists("wow.exe") & Directory.Exists("Data"))
            {
                if (File.Exists("realmlist.wtf"))
                {
                    if ((File.ReadAllText("realmlist.wtf") == "set realmlist wow.superwow.ru") | (File.ReadAllText("realmlist.wtf") == "set realmlist 212.12.14.82"))
                    {
                        linkLabel1.Text = "All ok! GL HF!";
                    }
                    else
                    {
                        linkLabel1.Text = "Wrong realmlist";
                        butPlay.Enabled = false;
                        var r1 = new Realmlist();
                        r1.Show(); // Shows Dialog1
                    }
                }
                else
                {
                    File.WriteAllText("realmlist.wtf", "set realmlist wow.superwow.ru");
                    butPlay.Enabled = true;
                    linkLabel1.Text = "Realmlist superwow.ru setup";
                }
            }
            else
            {
                linkLabel1.Text  = "This no game directory :-(";
                butSetup.Enabled = false;
                butPlay.Enabled  = false;
            }



            try
            {
                using (var client = new WebClient())
                {
                    HtmlCode = linkLabel1.Text + "\n" + client.DownloadString("http://superwow.ru/launcher/component.php");
                    HtmlCode = HtmlCode + "\n" + "Server latency " + ServerStatus.PingHost("wow.superwow.ru");
                }
            }
            catch
            {
                HtmlCode = linkLabel1.Text + "\n" + "Server Offline";
            }
            linkLabel1.Text  = HtmlCode;
            butClose.Visible = true;
            butMin.Visible   = true;
            butSetup.Visible = true;
            butPlay.Visible  = true;
            label1.Visible   = true;
        }
Example #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            var sa = new ServerApi();
            sa.Start();

            if (File.Exists("wow.exe") & Directory.Exists("Data"))
            {
                if (File.Exists("realmlist.wtf"))
                {
                    if ((File.ReadAllText("realmlist.wtf") == "set realmlist wow.superwow.ru") | (File.ReadAllText("realmlist.wtf") == "set realmlist 212.12.14.82"))
                    {
                        linkLabel1.Text = "All ok! GL HF!";
                    }
                    else
                    {
                        linkLabel1.Text = "Wrong realmlist";
                        butPlay.Enabled = false;
                        var r1 = new Realmlist();
                        r1.Show(); // Shows Dialog1
                     }
                }
                else
                {
                    File.WriteAllText("realmlist.wtf", "set realmlist wow.superwow.ru");
                    butPlay.Enabled = true;
                    linkLabel1.Text = "Realmlist superwow.ru setup";
                }
            }
            else
            {
                linkLabel1.Text = "This no game directory :-(";
                butSetup.Enabled = false;
                butPlay.Enabled = false;
            }

            try
            {
                using (var client = new WebClient())
                {
                    HtmlCode = linkLabel1.Text + "\n" + client.DownloadString("http://superwow.ru/launcher/component.php");
                    HtmlCode = HtmlCode + "\n" + "Server latency " + ServerStatus.PingHost("wow.superwow.ru");
                }
            }
            catch
            {
                HtmlCode = linkLabel1.Text + "\n" + "Server Offline";

            }
            linkLabel1.Text = HtmlCode;
            butClose.Visible = true;
            butMin.Visible = true;
            butSetup.Visible = true;
            butPlay.Visible = true;
            label1.Visible = true;
        }