示例#1
0
        private void changeInfo(int pos)
        {
            //initializes entry dialog
            FrmEntry entry = new FrmEntry();

            //passes all data for game to the form
            entry.Title     = games[pos].game;
            entry.Platform  = games[pos].platform;
            entry.Developer = games[pos].dev;
            entry.Genre     = games[pos].genre;
            entry.Price     = games[pos].price;
            entry.Inventory = games[pos].inv;
            entry.Cover     = games[pos].cover;
            if (entry.ShowDialog() == DialogResult.OK)
            {
                //sets game's data to inputted data
                games[pos].game     = entry.Title;
                games[pos].platform = entry.Platform;
                games[pos].dev      = entry.Developer;
                games[pos].genre    = entry.Genre;
                games[pos].price    = entry.Price;
                games[pos].inv      = entry.Inventory;
                games[pos].cover    = entry.Cover;
                //sorst games by title
                sort();
                //refills combo box
                comboFill();
                //empties text boxes
                Reset();
            }
        }
示例#2
0
 private void addNewGameToolStripMenuItem_Click(object sender, EventArgs e)
 {
     //initializes entry dialog form
     FrmEntry entry = new FrmEntry();
     if (entry.ShowDialog() == DialogResult.OK)
     {
         //increment # of entries
         count++;
         //set values of structure to the entries from the form
         games[count].game = entry.Title;
         games[count].platform = entry.Platform;
         games[count].dev = entry.Developer;
         games[count].genre = entry.Genre;
         games[count].price = entry.Price;
         games[count].inv = entry.Inventory;
         games[count].cover = entry.Cover;
         //sorts game titles
         sort();
         //refills combo box
         comboFill();
     }
 }
示例#3
0
        private void addNewGameToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //initializes entry dialog form
            FrmEntry entry = new FrmEntry();

            if (entry.ShowDialog() == DialogResult.OK)
            {
                //increment # of entries
                count++;
                //set values of structure to the entries from the form
                games[count].game     = entry.Title;
                games[count].platform = entry.Platform;
                games[count].dev      = entry.Developer;
                games[count].genre    = entry.Genre;
                games[count].price    = entry.Price;
                games[count].inv      = entry.Inventory;
                games[count].cover    = entry.Cover;
                //sorts game titles
                sort();
                //refills combo box
                comboFill();
            }
        }
示例#4
0
 private void changeInfo(int pos)
 {
     //initializes entry dialog
     FrmEntry entry = new FrmEntry();
     //passes all data for game to the form
     entry.Title = games[pos].game;
     entry.Platform = games[pos].platform;
     entry.Developer = games[pos].dev;
     entry.Genre = games[pos].genre;
     entry.Price = games[pos].price;
     entry.Inventory = games[pos].inv;
     entry.Cover = games[pos].cover;
     if (entry.ShowDialog() == DialogResult.OK)
     {
         //sets game's data to inputted data
         games[pos].game = entry.Title;
         games[pos].platform = entry.Platform;
         games[pos].dev = entry.Developer;
         games[pos].genre = entry.Genre;
         games[pos].price = entry.Price;
         games[pos].inv = entry.Inventory;
         games[pos].cover = entry.Cover;
         //sorst games by title
         sort();
         //refills combo box
         comboFill();
         //empties text boxes
         Reset();
     }
 }