2021-07-03 22:04:53 +00:00
|
|
|
|
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;
|
2021-07-17 13:06:25 +00:00
|
|
|
|
using System.Text.RegularExpressions;
|
2021-07-03 22:04:53 +00:00
|
|
|
|
namespace Tidstagning
|
|
|
|
|
{
|
|
|
|
|
public partial class ConfigUI : Form
|
|
|
|
|
{
|
2021-07-17 13:06:25 +00:00
|
|
|
|
|
|
|
|
|
private String OnCommand = "";
|
|
|
|
|
private String OffCommand = "";
|
|
|
|
|
|
2021-07-03 22:04:53 +00:00
|
|
|
|
public ConfigUI()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void buttonFolderInput_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
folderBrowserInput.ShowDialog();
|
|
|
|
|
textPathInput.Text = folderBrowserInput.SelectedPath;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void buttonFolderOutput_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
folderBrowserOutput.ShowDialog();
|
|
|
|
|
textPathOutput.Text = folderBrowserOutput.SelectedPath;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void buttonCancel_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
this.Close();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void buttonSave_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Properties.Settings.Default.Save();
|
|
|
|
|
this.Close();
|
|
|
|
|
}
|
2021-07-04 19:52:24 +00:00
|
|
|
|
|
|
|
|
|
private void checkBoxRelay_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
panelRelaySettings.Enabled = checkBoxRelay.Enabled;
|
|
|
|
|
}
|
2021-07-17 13:06:25 +00:00
|
|
|
|
|
|
|
|
|
private void textBox1_TextChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
textBox3.Text = Regex.Unescape(textBox1.Text);
|
|
|
|
|
}
|
|
|
|
|
catch
|
|
|
|
|
{
|
|
|
|
|
textBox3.Text = "";
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-07-03 22:04:53 +00:00
|
|
|
|
}
|
|
|
|
|
}
|