Just a C# beginner here that just build his first application and now wants to make some changes to make it more ideal.
Today I got three textboxes where the users type in year, month and project number. When they click GO the application opens the respective folder: L:\2019\01\20190133
I would like to make it simpler, one textbox that gets divided into three strings (year, month, PO-number).
Any ideas? Sorry for the bad format of this post, feel free to correct/shame me :)
Current code:
private void button1_Click(object sender, System.EventArgs e)
{
int tbyear;
int tbmonth;
int tbpnr;
tbyear = int.Parse(textBox1.Text);
tbmonth = int.Parse(textBox2.Text);
tbpnr = int.Parse(textBox3.Text);
string tby = textBox1.Text;
string tbm = textBox2.Text;
string tbnr = textBox3.Text;
string path = Path.Combine(tby, tbm);
string pathnr = textBox1.Text + textBox2.Text + textBox3.Text;
System.Diagnostics.Process.Start("explorer.exe", @"L:\" + path + "\\" + pathnr);