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

Fixed the quick status of the fleet #72

Merged
merged 1 commit into from
Aug 7, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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