private void button10_Click(object sender, EventArgs e) { udbc class1 = new udbc(); int wSizeL = class1.ReadWidth(); int hSizeL = class1.ReadHeight(); int tValL = class1.ReadLen(); string lTextL = class1.ReadText(); Width = wSizeL; Height = hSizeL; trackBar1.Value = tValL; string content = class1.OpenText(lTextL); richTextBox1.Text = content; }
private void button8_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(domainUpDown1.Text) && !string.IsNullOrWhiteSpace(domainUpDown1.Text)) { try { udbc class1 = new udbc(); openedFile = domainUpDown1.Text; string content = class1.OpenText(openedFile); richTextBox1.Text = content; } catch { MessageBox.Show("Ошибка!", "WARNING, CRITICAL ERROR!", MessageBoxButtons.OK, MessageBoxIcon.Warning); richTextBox1.Text = ""; } } else { MessageBox.Show("Выбирите текст!", "WARNING, CRITICAL ERROR!", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }