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("gfgdf", "book1", "lalala")); tableComponent.AddRow(new Book("Pushkin","book2", "lalala2")); tableComponent.AddRow(new Book("Pushkin", "book3", "lalala")); } private void buttonConfig_Click(object sender, EventArgs e) { List tableParameters = new List(); tableParameters.Add(new TableParameters("fds", 80, true, "Id")); tableParameters.Add(new TableParameters("fds", 80, true, "Name")); tableParameters.Add(new TableParameters("fds", 80, true, "Annotation")); tableComponent.TableConfiguration(3, tableParameters); } 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); } } }