1
0
mirror of https://github.com/Ylianst/MeshCentralRouter synced 2025-12-15 07:43:38 +00:00

Fixed custom apps.

This commit is contained in:
Ylian Saint-Hilaire
2022-05-13 00:06:58 -07:00
parent 957bdb2648
commit f6c44b1d42
7 changed files with 162 additions and 81 deletions

View File

@@ -13,21 +13,24 @@ namespace MeshCentralRouter
public partial class CustomAppsRunForm : Form
{
private string command = null;
private string args = null;
public CustomAppsRunForm(string command)
public CustomAppsRunForm(string command, string args)
{
this.command = command;
this.args = args;
InitializeComponent();
}
public string getFinalCommand()
public string getFinalArgs()
{
return command.Replace("%L", addressTextBox.Text).Replace("%P", portTextBox.Text);
return args.Replace("%L", addressTextBox.Text).Replace("%P", portTextBox.Text).Replace("%N", nameTextBox.Text);
}
public void UpdateInfo()
{
commandTextBox.Text = getFinalCommand();
commandTextBox.Text = command;
argsTextBox.Text = getFinalArgs();
}
private void addressTextBox_TextChanged(object sender, EventArgs e)