private void button1_Click(object sender, EventArgs e) { Value4 v4 = new Value4(this.textBox1.Text, this.textBox2.Text, this.textBox3.Text, this.textBox4.Text); int insertAt = this.GetFirstSelectedRowIndex(); this.lst.Insert(insertAt + 1, v4); this.BindAndRefresh(); }
private void ReadAll() { if (File.Exists(fileName)) { this.lst = File.ReadAllText(fileName, Encoding.UTF8) .Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries) .Select(x => Value4.ConvertFromLine(x)).ToList(); } }