Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog fbd = new FolderBrowserDialog();
            DialogResult result = fbd.ShowDialog();

            textBox1.Text = fbd.SelectedPath;

            toolStripStatusLabel1.Text = "Adding files from directory " + fbd.SelectedPath;
            Regex rgx = new Regex("[ABCDEF0-9]{20,}");
            var files = Directory.GetFiles(fbd.SelectedPath, "*.*", SearchOption.AllDirectories)
                .Where(path => rgx.IsMatch(path)).ToList();

            toolStripStatusLabel1.Text = "Parsing " + files.Count + " files";
            foreach (string filePath in files)
            {
                GameInterpreter gi = new GameInterpreter(filePath);
                glv.addGame(gi);
            }
            toolStripStatusLabel1.Text = "Idle";
        }
Exemple #2
0
 public void addGame(GameInterpreter gi)
 {
     this.il.Images.Add(gi.titleId, gi.thumbnail);
     this.lv.Items.Add(new ListViewItem(gi.title_en, this.il.Images.Count -1));
     this.Games.Add(gi);
 }