Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace View
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- listBox1.Items.Add("Run");
- listBox1.Items.Add("Swimming");
- listBox1.Items.Add("Barbell");
- dataGridView1.Rows.Add();
- /* dataGridView1.Rows[0].Cells[0].Value = "Run";
- dataGridView1.Rows[0].Cells[1].Value = 6;
- dataGridView1.Rows[0].Cells[2].Value = 8;
- dataGridView1.Rows.Add();
- dataGridView1.Rows[1].Cells[0].Value = "Swimming";
- dataGridView1.Rows[1].Cells[1].Value = 9;
- dataGridView1.Rows[1].Cells[2].Value = "butterfly";
- dataGridView1.Rows.Add();
- dataGridView1.Rows[2].Cells[0].Value = "Barbel";
- dataGridView1.Rows[2].Cells[1].Value = 10;
- dataGridView1.Rows[2].Cells[2].Value = 6;
- */
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- Refresh();
- }
- private void button2_Click(object sender, EventArgs e)
- {
- int i = dataGridView1.SelectedCells[0].RowIndex;
- dataGridView1.Rows.RemoveAt(i);
- }
- private void button1_Click(object sender, EventArgs e)
- {
- AddForm f = new AddForm();
- // this.Hide();
- f.Show();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement