mirror of
https://github.com/BubbaGumpShrump/AutoTrackR2.git
synced 2025-07-12 14:37:50 +00:00
Feature Added: -Start command line option
This commit is contained in:
parent
a541c5822b
commit
9a4f224b92
6 changed files with 19 additions and 7 deletions
|
@ -10,5 +10,4 @@ namespace AutoTrackR2
|
|||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -59,8 +59,9 @@ namespace AutoTrackR2
|
|||
}
|
||||
}
|
||||
|
||||
private void StartButton_Click(object sender, RoutedEventArgs e)
|
||||
public void StartButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
UpdateButtonState(true);
|
||||
string scriptPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "KillTrackR_MainScript.ps1");
|
||||
TailFileAsync(scriptPath);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$TrackRver = "2.0r"
|
||||
$TrackRver = "2.03"
|
||||
|
||||
# Path to the config file
|
||||
$appName = "AutoTrackR2"
|
||||
|
|
|
@ -49,6 +49,18 @@ namespace AutoTrackR2
|
|||
InitializeConfigPage();
|
||||
|
||||
UpdateTabVisuals();
|
||||
|
||||
Loaded += MainWindow_Loaded; // Handle Loaded event
|
||||
}
|
||||
|
||||
private void MainWindow_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// Check command-line arguments after the window is loaded
|
||||
var args = Environment.GetCommandLineArgs();
|
||||
if (args.Contains("-start", StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
homePage.StartButton_Click(null, null);
|
||||
}
|
||||
}
|
||||
|
||||
private void CloseWindow(object sender, RoutedEventArgs e)
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace AutoTrackR2
|
|||
{
|
||||
public partial class UpdatePage : UserControl
|
||||
{
|
||||
private string currentVersion = "v2.0-release";
|
||||
private string currentVersion = "v2.03-release";
|
||||
private string latestVersion;
|
||||
|
||||
public UpdatePage()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue