using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
namespace BasicTextFile
{
public partial class FrmLab1 : Form
{
public FrmLab1()
{
InitializeComponent();
}
private void btnCreate_Click(object sender, EventArgs e)
{
frmFilename frm = new frmFilename();
frm.ShowDialog();
string getInput;
getInput = txtInput.Text;
string docPath =
Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
using (StreamWriter outputFile = new StreamWriter(Path.Combine(docPath,
frmFilename.SetFileName)))
{
outputFile.WriteLine(getInput);
Console.WriteLine(getInput);
outputFile.Close();
}
frmRegistration reg = new frmRegistration();
reg.ShowDialog();
Close();
}
}
}