34 lines
678 B
C#
34 lines
678 B
C#
namespace ComponentsView
|
|
{
|
|
public partial class FormComponents : Form
|
|
{
|
|
|
|
public FormComponents()
|
|
{
|
|
InitializeComponent();
|
|
testComponent.FileName = "2.txt";
|
|
}
|
|
|
|
private void buttonSaveText_Click(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
testComponent.SaveToFile(richTextBoxTest.Lines);
|
|
MessageBox.Show("Ñîõàðíåíî óñïåøíî", "Ðåçóëüòàò",
|
|
MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
MessageBox.Show(ex.Message, "Îøèáêà!",
|
|
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
}
|
|
|
|
}
|
|
|
|
private void buttonSaveTextWord_Click(object sender, EventArgs e)
|
|
{
|
|
componentBigText.SetText(string.Empty);
|
|
}
|
|
}
|
|
}
|