mirror of
https://github.com/SlothDpal/Relaunch-Process.git
synced 2026-02-22 17:27:38 +03:00
add: Autoinsert process name, .exe filter
This commit is contained in:
5
Form1.cs
5
Form1.cs
@@ -156,6 +156,7 @@ namespace Process_Auto_Relaunch
|
||||
private void buttonSetProgramStart_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog openFile = new OpenFileDialog();
|
||||
openFile.Filter = "Èñïîëíÿåìûå ôàéëû (*.exe)|*.exe";
|
||||
openFile.Title = "Óêàæèòå ïðîãðàììó çàïóñêà";
|
||||
|
||||
if (openFile.ShowDialog() == DialogResult.Cancel)
|
||||
@@ -163,7 +164,9 @@ namespace Process_Auto_Relaunch
|
||||
return;
|
||||
}
|
||||
|
||||
//labelProgramStartPath.Text = openFile.FileName;
|
||||
int lastSlash = openFile.FileName.LastIndexOf("\\");
|
||||
textBoxProcessName.Text = openFile.FileName.Substring(lastSlash+1);
|
||||
textBoxProcessName.Text = textBoxProcessName.Text.Remove(textBoxProcessName.Text.Length-4);
|
||||
Settings.Default.startProgramPath = openFile.FileName;
|
||||
Settings.Default.Save();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user