Skip to content

Commit

Permalink
Few hotfixes because SteamCMD is being SteamCMD
Browse files Browse the repository at this point in the history
  • Loading branch information
Foxlider committed Jul 28, 2021
1 parent 17d94b4 commit 823a915
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
2 changes: 1 addition & 1 deletion FASTER/FASTER.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<PublishReadyToRun>true</PublishReadyToRun>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<UseWPF>true</UseWPF>
<Version>1.7.2.103</Version>
<Version>1.7.2.105</Version>
<Authors>Keelah Fox</Authors>
<Company>FoxliCorp.</Company>
<Description>Fox's Arma Server Tool Extended Rewrite</Description>
Expand Down
4 changes: 2 additions & 2 deletions FASTER/Views/SteamUpdater.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@
</Style>
</RichTextBox.Resources>
</RichTextBox>
<ProgressBar Name="ISteamProgressBar" Grid.Row="2" Grid.Column="0" Margin="10,10,10,10" Height="32"/>
<Button Name="ISteamCancelButton" Grid.Row="2" VerticalAlignment="Stretch" Grid.Column="1" Content="Cancel" Margin="0,10,10,10" IsEnabled="False" Click="ISteamCancelButton_Click" Style="{StaticResource MahApps.Styles.Button.MetroSquare.Accent}" BorderThickness="0"/>
<mah:MetroProgressBar Name="ISteamProgressBar" Grid.Row="2" Grid.Column="0" Margin="10,10,10,10" Height="32"/>
<Button Name="ISteamCancelButton" Grid.Row="2" VerticalAlignment="Stretch" Grid.Column="1" Content="Cancel" Margin="0,10,10,10" IsEnabled="False" Click="ISteamCancelButton_Click" Style="{StaticResource MahApps.Styles.Button.MetroSquare.Accent}" BorderThickness="0"/>
</Grid>
</Grid>
<simpleChildWindow:ChildWindow
Expand Down
26 changes: 23 additions & 3 deletions FASTER/Views/SteamUpdater.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ public async Task RunSteamCommand(string steamCmd, string steamCommand, string t

var tasks = new List<Task>();

ISteamProgressBar.IsIndeterminate = true;
//ISteamProgressBar.IsIndeterminate = true;
ISteamProgressBar.Value = 1;

switch (type)
{
Expand Down Expand Up @@ -401,8 +402,10 @@ private void UpdateTextBox(string text)
while (_localRunThread && threadSlept < 10000);
if (_localRunThread)
{
Dispatcher?.Invoke(() =>
Dispatcher?.Invoke(() =>
{
if (ISteamGuardDialog.IsOpen)
return;
ISteamGuardDialog.Visibility = Visibility.Visible;
ISteamGuardDialog.IsOpen = true;
});
Expand All @@ -411,7 +414,24 @@ private void UpdateTextBox(string text)
t.Start();
}

if (text.Contains("Logged in OK"))
if (text.StartsWith("password:"))
{
Dispatcher?.Invoke(() =>
{
MetroWindow.DisplayMessage("You need to enter your password.");
});
}

if (text.Contains("Enter the current code from "))
{
Dispatcher?.Invoke(() =>
{
ISteamGuardDialog.Visibility = Visibility.Visible;
ISteamGuardDialog.IsOpen = true;
});
}

if (text.Contains("Logged in OK") || text.Contains("Waiting for user info..."))
{
lock (_runLogLock)
{ _runLog = false; }
Expand Down

0 comments on commit 823a915

Please sign in to comment.