Skip to content

Commit ef5076f

Browse files
committed
Added a check on the location of the program
1 parent 0ea2b1d commit ef5076f

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

PBPModSwitch/PBPModSwitch/ViewModels/MainWindowViewModel.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ public MainWindowViewModel()
5757

5858
s_modCachePath = Path.Combine("core", "_mods");
5959

60+
if (!File.Exists("Penumbra.exe"))
61+
{
62+
waitingStatus.waitingMessage = "Error: It seems that the program is not placed in the game folder!";
63+
return;
64+
}
65+
6066
try
6167
{
6268
if (Directory.Exists(s_modCachePath))

PBPModSwitch/PBPModSwitch/Views/MainWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
<RowDefinition Height="5"/>
119119
<RowDefinition Height="*"/>
120120
</Grid.RowDefinitions>
121-
<TextBlock Grid.Column="0" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Bottom" Foreground="White" FontSize="36" Text="{Binding Path=waitingStatus.waitingMessage}"></TextBlock>
121+
<TextBlock Grid.Column="0" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Bottom" Foreground="White" FontSize="36" Text="{Binding Path=waitingStatus.waitingMessage}" TextWrapping="Wrap" TextAlignment="Center"></TextBlock>
122122
<ProgressBar Visibility="{Binding waitingStatus.showProgress, Converter={StaticResource BoolToVisConverter}}" Grid.Column="0" Grid.Row="2" Value="{Binding waitingStatus.progressValue}" Maximum="{Binding waitingStatus.progressMax}" HorizontalAlignment="Center" VerticalAlignment="Top" Width="400"></ProgressBar>
123123
</Grid>
124124
</Grid>

0 commit comments

Comments
 (0)