Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

Commit

Permalink
Merge pull request #72 from tasetase/fleet-status-fix
Browse files Browse the repository at this point in the history
Fixed the quick status of the fleet
  • Loading branch information
Yuubari committed Aug 7, 2015
2 parents ccfecc5 + 820a715 commit 77cf85d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Grabacr07.KanColleViewer/Properties/Resources.en.resx
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ Low: Performance over quality. Ugliest setting.</value>
<value>Ready to sortie!</value>
</data>
<data name="StateDetail_MoraleRecovering" xml:space="preserve">
<value>Morale recovered</value>
<value>Morale recovering</value>
</data>
<data name="StateDetail_MoraleRecoveryTimer" xml:space="preserve">
<value>Morale will be restored in</value>
Expand Down
38 changes: 25 additions & 13 deletions Grabacr07.KanColleViewer/Views/Contents/StateDetailIndicator.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,11 @@
<TextBlock x:Name="Text"
Style="{DynamicResource DefaultTextStyleKey}"
Foreground="{DynamicResource ActiveForegroundBrushKey}">
<TextBlock.Text>
<MultiBinding StringFormat="{}{0}: {1}">
<Binding Source="{x:Static models:ResourceService.Current}" Path="Resources.StateDetail_MoraleRecoveryTimer" />
<Binding Path="Condition.Remaining" />
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</Border>
</Grid>

<DataTemplate.Triggers>
<DataTrigger Binding="{Binding Condition.IsRejuvenating}"
Value="False">
<Setter TargetName="Text"
Property="Text"
Value="{Binding Resources.StateDetail_MoraleRecovering, Source={x:Static models:ResourceService.Current}, Mode=OneWay}" />
</DataTrigger>
<DataTrigger Binding="{Binding State.IsReady}"
Value="True">
<Setter TargetName="Border"
Expand All @@ -54,7 +42,31 @@
Property="Text"
Value="{Binding Resources.StateDetail_IsReady, Source={x:Static models:ResourceService.Current}, Mode=OneWay}" />
</DataTrigger>
<DataTrigger Binding="{Binding Fleet.IsWounded}"
<DataTrigger Binding="{Binding Condition.IsRejuvenating}"
Value="True">
<Setter TargetName="Text"
Property="Text">
<Setter.Value>
<MultiBinding StringFormat="{}{0}: {1}">
<Binding Source="{x:Static models:ResourceService.Current}" Path="Resources.StateDetail_MoraleRecoveryTimer" />
<Binding Path="Condition.Remaining" />
</MultiBinding>
</Setter.Value>
</Setter>
</DataTrigger>
<DataTrigger Binding="{Binding State.Situation, Converter={StaticResource HasFlagConverter}, ConverterParameter=InShortSupply}"
Value="True">
<Setter TargetName="Text"
Property="Text"
Value="{Binding Resources.FleetWindow_Status_ResupplyNeeded, Source={x:Static models:ResourceService.Current}, Mode=OneWay}" />
</DataTrigger>
<DataTrigger Binding="{Binding State.Situation, Converter={StaticResource HasFlagConverter}, ConverterParameter=Repairing}"
Value="True">
<Setter TargetName="Text"
Property="Text"
Value="{Binding Resources.Ship_Repairing, Source={x:Static models:ResourceService.Current}, Mode=OneWay}" />
</DataTrigger>
<DataTrigger Binding="{Binding State.Situation, Converter={StaticResource HasFlagConverter}, ConverterParameter=HeavilyDamaged}"
Value="True">
<Setter TargetName="Border"
Property="Background"
Expand Down

0 comments on commit 77cf85d

Please sign in to comment.