Skip to content

Commit

Permalink
added better notice when reading or writing fastfile
Browse files Browse the repository at this point in the history
  • Loading branch information
kruumy authored and kruumy committed Mar 9, 2023
1 parent d1d085f commit b5f4fbe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions EasyZoneBuilder.GUI/DarkTheme.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource ControlSelectedBorderBrush}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="border" Value="{StaticResource ControlBrightDefaultBackground}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource ControlBrightDefaultBorderBrush}"/>
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource ControlDisabledGlythColour}"/>
<Setter Property="Background" TargetName="border" Value="{StaticResource ControlMouseOverBackground}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource ControlMouseOverBorderBrush}"/>
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource ControlDarkerBackground}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
Expand Down
3 changes: 3 additions & 0 deletions EasyZoneBuilder.GUI/Mod.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ private async void writeFastFileBtn_Click( object sender, RoutedEventArgs e )
if ( selectedMod.SelectedItem is Core.Mod sMod )
{
writeFastFileBtn.IsEnabled = false;
object oldContent = writeFastFileBtn.Content;
writeFastFileBtn.Content = "Writing...";
sMod.CSV.Push();
await sMod.BuildZone();
writeFastFileBtn.Content = oldContent;
writeFastFileBtn.IsEnabled = true;
MessageBox.Show($"Wrote to mod.ff successfully!", "Success", MessageBoxButton.OK, MessageBoxImage.Information);
}
Expand Down
3 changes: 3 additions & 0 deletions EasyZoneBuilder.GUI/Zone.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@ private async void readFastFileBtn_Click( object sender, RoutedEventArgs e )
if ( selectedZone.SelectedItem is string ss && selectedAssetType.SelectedItem is string sat )
{
readFastFileBtn.IsEnabled = false;
object oldBtnContext = readFastFileBtn.Content;
readFastFileBtn.Content = "Reading...";
AssetList.ItemsSource = Array.Empty<string>();
AssetsFoundLabel.Content = "Assets Found: 0";
IEnumerable<string> assets = await ZoneBuilder.ListAssets(AssetTypeUtil.Parse(sat), ss);
cvs.Source = assets;
AssetList.ItemsSource = cvs.View;
AssetsFoundLabel.Content = "Assets Found: " + assets.Count();
readFastFileBtn.Content = oldBtnContext;
readFastFileBtn.IsEnabled = true;
}
}
Expand Down

0 comments on commit b5f4fbe

Please sign in to comment.