diff --git a/MainWindow.axaml b/MainWindow.axaml
index a4fa8ff..7e8d99b 100644
--- a/MainWindow.axaml
+++ b/MainWindow.axaml
@@ -66,12 +66,14 @@
+
-
+
+
diff --git a/MainWindow.axaml.cs b/MainWindow.axaml.cs
index 9373fe2..f9c0769 100644
--- a/MainWindow.axaml.cs
+++ b/MainWindow.axaml.cs
@@ -66,6 +66,7 @@ public MainWindow() {
InputFilePath.Text = lastFile;
currentFile = lastFile;
ButtonCommit.IsEnabled = true;
+ ButtonRun.IsEnabled = true;
ReadFile();
}
}
@@ -103,6 +104,7 @@ private async void ButtonPickFile_Click(object sender, RoutedEventArgs e) {
RenderList();
}
ButtonCommit.IsEnabled = true;
+ ButtonRun.IsEnabled = true;
}
}
private async void ButtonReloadFile_Click(object sender, RoutedEventArgs e) {
@@ -121,6 +123,7 @@ private async void ButtonReloadFile_Click(object sender, RoutedEventArgs e) {
ClearOperationsList();
RenderList();
ButtonCommit.IsEnabled = true;
+ ButtonRun.IsEnabled = true;
} else {
InputFilePath.Text = currentFile;
}
@@ -135,6 +138,7 @@ private async void InputFilePath_LostFocus(object? sender, RoutedEventArgs e) {
currentFile = fileName;
ReadFile();
ButtonCommit.IsEnabled = true;
+ ButtonRun.IsEnabled = true;
} else {
DialogMessage message = new DialogMessage(
"The file / path you've entered does not exist.\nDo you want to create it?",
@@ -149,6 +153,7 @@ private async void InputFilePath_LostFocus(object? sender, RoutedEventArgs e) {
ClearOperationsList();
RenderList();
ButtonCommit.IsEnabled = true;
+ ButtonRun.IsEnabled = true;
} else {
InputFilePath.Text = currentFile;
}
@@ -490,7 +495,7 @@ public void RenderList() {
GridOperations.Children.Add(addArbitrary);
}
- private void ButtonCommit_Click(object sender, RoutedEventArgs e) {
+ private void ButtonCommit_Click(object? sender, RoutedEventArgs e) {
// MessageBox.Show("Inspect!"); // set breakpoint here for convenient variable inspection
StreamWriter file;
@@ -524,6 +529,11 @@ private void ButtonCommit_Click(object sender, RoutedEventArgs e) {
file.Close();
}
+ private void ButtonRun_Click(object? sender, RoutedEventArgs e) {
+ ButtonCommit_Click(sender, e);
+ System.Diagnostics.Process.Start(currentFile);
+ }
+
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) {
Regkey.SetValue("Width", MainWindow1.Width);
Regkey.SetValue("Height", MainWindow1.Height);
diff --git a/README.md b/README.md
index 2b482ac..67f6e08 100644
--- a/README.md
+++ b/README.md
@@ -48,8 +48,6 @@ Important: the program is targeting Windows 10.0.18362 and *might or might not*
## To-do
-- re-check default operation settings
-- button to run script now
- dialog for default settings of new operations, save to registry
#### Delayed indefinitely