1
0
mirror of https://github.com/Ylianst/MeshCentralRouter synced 2025-12-22 19:23:28 +00:00

Added custom app support.

This commit is contained in:
Ylian Saint-Hilaire
2022-05-12 16:07:33 -07:00
parent 95d1a442be
commit bf668eae23
19 changed files with 6885 additions and 431 deletions

58
CustomAppsRunForm.cs Normal file
View File

@@ -0,0 +1,58 @@
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;
namespace MeshCentralRouter
{
public partial class CustomAppsRunForm : Form
{
private string command = null;
public CustomAppsRunForm(string command)
{
this.command = command;
InitializeComponent();
}
public string getFinalCommand()
{
return command.Replace("%L", addressTextBox.Text).Replace("%P", portTextBox.Text);
}
public void UpdateInfo()
{
commandTextBox.Text = getFinalCommand();
}
private void addressTextBox_TextChanged(object sender, EventArgs e)
{
UpdateInfo();
}
private void portTextBox_TextChanged(object sender, EventArgs e)
{
UpdateInfo();
}
private void CustomAppsRunForm_Load(object sender, EventArgs e)
{
UpdateInfo();
}
private void okButton_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
}
private void cancelButton_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
}
}
}