Ejemplo n.º 1
0
        public Form1()
        {
            this.InitializeComponent();
            string url = "http://steevens.net/tf2c-public/header.png?random=" + new Random().Next().ToString();

            if (Form1.CheckForUrl(url))
            {
                this.pictureBox1.ImageLocation = url;
            }
            this.steam = new Steam();
            if (System.IO.File.Exists(this.executableFilename + ".old"))
            {
                System.IO.File.Delete(this.executableFilename + ".old");
            }
            string path = this.getGamePath() + "\\.remove";

            if (System.IO.File.Exists(path))
            {
                System.IO.File.Delete(path);
            }
            this.tabControl1.Selecting += new TabControlCancelEventHandler(this.tabControl1_Selecting);
            try
            {
                StreamReader streamReader = new StreamReader(this.getGamePath() + "\\config.txt");
                this.sdkPathBox.Text = streamReader.ReadLine();
                this.paramBox.Text   = streamReader.ReadLine();
                streamReader.Close();
            }
            catch (Exception ex)
            {
                this.detectSDK(true);
            }
            this.downloadTreeFile();
        }