using KOP_Labs.Classes; using KOP_Labs.Exceptions; using System.Security.Principal; using System.Text; namespace WinForm { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void booksForm1_Load(object sender, EventArgs e) { } private void buttonFillValues_Click(object sender, EventArgs e) { booksForm1.FillValues("fgdfgfdgd fdgdffdg adsdds"); } private void buttonClear_Click(object sender, EventArgs e) { booksForm1.ClearList(); } private void buttonTextBox_Click(object sender, EventArgs e) { labelCheckComponent.Text = "Ââåäåííûé òåêñò: "; labelCheckComponent.Text += textBoxComponent1.Value; if (textBoxComponent1.Error.Length > 0) { MessageBox.Show(textBoxComponent1.Error); } } private void buttonTable_Click(object sender, EventArgs e) { tableComponent.AddRow(new Book(1, "book1", "lalala")); tableComponent.AddRow(new Book(1, "book2", "lalala2")); tableComponent.AddRow(new Book(1, "book3", "lalala")); } private void buttonConfig_Click(object sender, EventArgs e) { tableComponent.TableConfiguration(3, new List() { "fds", "fds", "fds" }, new List() { 80, 80, 80 }, new List { true, true, true }, new List { "Id", "Name", "Annotation" }); } private void buttonCleatTable_Click(object sender, EventArgs e) { tableComponent.ClearRows(); } private void buttonGetObj_Click(object sender, EventArgs e) { string answer = tableComponent.GetSelectedObject().Name.ToString() + " " + tableComponent.GetSelectedObject().Annotation.ToString() + " "; MessageBox.Show(answer); } } }