Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            label15.Text = "Working";
            GameInfo tempInfo      = new GameInfo();
            string   URLInput      = "";
            string   LocationInput = "";

            URLInput      = textBox1.Text;
            LocationInput = textBox2.Text;
            if (URLInput.Length > 1)
            {
                tempInfo          = DoStuff.ReadPage(URLInput);
                tempInfo.Location = LocationInput;
                tempInfo.URL      = URLInput;
                if (!NameList.Contains(tempInfo.Name))
                {
                    theInformation.Add(tempInfo);
                    NameList.Add(tempInfo.Name);
                    listBox1.BeginUpdate();
                    listBox1.Items.Add(tempInfo.Name);
                    listBox1.EndUpdate();
                    textBox1.Clear();
                    textBox2.Clear();
                }
            }

            label15.Text = "Done";
        }
Ejemplo n.º 2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     listBox1.BeginUpdate();
     theInformation = DoStuff.LoadXML();
     foreach (GameInfo tempInfo in theInformation)
     {
         NameList.Add(tempInfo.Name);
     }
     foreach (string tempName in NameList)
     {
         listBox1.Items.Add(tempName);
     }
     listBox1.EndUpdate();
 }
Ejemplo n.º 3
0
        private void button6_Click(object sender, EventArgs e)
        {
            listBox1.BeginUpdate();
            listBox1.Items.Clear();
            foreach (GameInfo CheckInfo in theInformation)
            {
                label15.Text = "Working";
                GameInfo tempInfo = DoStuff.ReadPage(CheckInfo.URL);
                UpdateList        = new List <string>();
                UpdateInformation = new List <GameInfo>();
                if (tempInfo.Updated != CheckInfo.Updated || tempInfo.Version != CheckInfo.Version)
                {
                    CheckInfo.Version = tempInfo.Version;
                    CheckInfo.Updated = tempInfo.Updated;
                    UpdateList.Add(CheckInfo.Name);
                    UpdateInformation.Add(CheckInfo);
                    listBox1.Items.Add(CheckInfo.Name);
                }
            }
            listBox1.EndUpdate();

            label15.Text = "Done";
        }