Feature Added: -Start command line option

This commit is contained in:
BubbaGumpShrump 2024-12-16 19:00:45 -05:00
parent a541c5822b
commit 9a4f224b92
6 changed files with 19 additions and 7 deletions

View file

@ -10,5 +10,4 @@ namespace AutoTrackR2
public partial class App : Application public partial class App : Application
{ {
} }
} }

View file

@ -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"); string scriptPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "KillTrackR_MainScript.ps1");
TailFileAsync(scriptPath); TailFileAsync(scriptPath);
} }

View file

@ -1,4 +1,4 @@
$TrackRver = "2.0r" $TrackRver = "2.03"
# Path to the config file # Path to the config file
$appName = "AutoTrackR2" $appName = "AutoTrackR2"

View file

@ -49,6 +49,18 @@ namespace AutoTrackR2
InitializeConfigPage(); InitializeConfigPage();
UpdateTabVisuals(); 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) private void CloseWindow(object sender, RoutedEventArgs e)

View file

@ -9,7 +9,7 @@ namespace AutoTrackR2
{ {
public partial class UpdatePage : UserControl public partial class UpdatePage : UserControl
{ {
private string currentVersion = "v2.0-release"; private string currentVersion = "v2.03-release";
private string latestVersion; private string latestVersion;
public UpdatePage() public UpdatePage()

View file

@ -198,15 +198,15 @@
{ {
"Name" = "8:Microsoft Visual Studio" "Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:AutoTrackR2_Setup" "ProductName" = "8:AutoTrackR2_Setup"
"ProductCode" = "8:{288819A9-947F-47BE-900E-205C7D7EAAF7}" "ProductCode" = "8:{0CEA0E54-DACE-4708-81F4-F059C2555A2F}"
"PackageCode" = "8:{94C078B7-DD3E-4091-9F5E-780DE3481E1C}" "PackageCode" = "8:{59DD7243-3BBF-4686-8388-51BFB8782FA2}"
"UpgradeCode" = "8:{0B78A147-D0DE-4F72-8906-A62611787CA7}" "UpgradeCode" = "8:{0B78A147-D0DE-4F72-8906-A62611787CA7}"
"AspNetVersion" = "8:" "AspNetVersion" = "8:"
"RestartWWWService" = "11:FALSE" "RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE" "RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:FALSE" "DetectNewerInstalledVersion" = "11:FALSE"
"InstallAllUsers" = "11:FALSE" "InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:2.0.2" "ProductVersion" = "8:2.0.3"
"Manufacturer" = "8:GrieferNET" "Manufacturer" = "8:GrieferNET"
"ARPHELPTELEPHONE" = "8:" "ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:discord.gg/griefernet" "ARPHELPLINK" = "8:discord.gg/griefernet"