<Page
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:System="clr-namespace:System;assembly=mscorlib"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:local="clr-namespace:ForzaUI"
    xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
    mc:Ignorable="d"
	x:Class="DigitalGauge.HON_S2000CR_09"
	 >
	
    <Page.Resources>
        <Style x:Key="TextBlockStyle" TargetType="{x:Type local:FastTextBlock}">
            <Setter Property="FontFamily" Value="DG5_QuartzMS"/>
            <Setter Property="Foreground" Value="#FFFFE971"/>
        	 
            <Setter Property="TextAlignment" Value="Right"/>
        </Style>
		
		<local:DigitalGaugeConfig x:Key="Config" HasClock="True" HasExternalTemp="True" UseDegreesF="True" UseMPH="True" UsePsi="True" MaxBoost="0" MinBoost="0" MaxSpeed="00" HasAbsLight="False" HasStmLight="False" HasTcsLight="False" HasGAccelX="False" HasGAccelY="False" HasShiftLights="False" HasTextTach="False" HasLapPlaceInfo="False" HasTextBoost="False" HasTextGAccel="False" HasTextOdometer="True" HasTextFuel="False" MaxFuel="00" MinGear="0" MaxGear="0" MaxRpm="9000.0"/>
		
		<Storyboard x:Key="Fuel Gauge">
			<PointAnimationUsingKeyFrames Storyboard.TargetProperty="(Path.Data).(PathGeometry.Figures)[0].(PathFigure.Segments)[1].(LineSegment.Point)" Storyboard.TargetName="GaugeFill_FuelMask">
				<EasingPointKeyFrame KeyTime="0" Value="123.5,93.5"/>
				<EasingPointKeyFrame KeyTime="0:0:0.5" Value="80.8,48.5"/>
				<EasingPointKeyFrame KeyTime="0:0:1" Value="38.5,3.5"/>
			</PointAnimationUsingKeyFrames>
			<PointAnimationUsingKeyFrames Storyboard.TargetProperty="(Path.Data).(PathGeometry.Figures)[0].(PathFigure.Segments)[2].(LineSegment.Point)" Storyboard.TargetName="GaugeFill_FuelMask">
				<EasingPointKeyFrame KeyTime="0" Value="78.5,96.5"/>
				<EasingPointKeyFrame KeyTime="0:0:0.5" Value="43.5,60.5"/>
				<EasingPointKeyFrame KeyTime="0:0:1" Value="3.5,19.8"/>
			</PointAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="LowFuelIcon">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.25" Value="{x:Static Visibility.Hidden}"/>
		    </ObjectAnimationUsingKeyFrames>
		</Storyboard>
		          
        <Storyboard x:Key="Tach">
			<SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(local:CircularProgressEffect.EndAngle)" Storyboard.TargetName="GaugeFill_TachRedzone">
				<EasingSingleKeyFrame KeyTime="0:0:0.889" Value="110"/>
				<EasingSingleKeyFrame KeyTime="0:0:1" Value="136"/>
			</SingleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="TachFillCover">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.111" Value="14.7"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.222" Value="25.2"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.556" Value="65.2"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.889" Value="102"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="TachFillCover">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.111" Value="39.304"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.222" Value="105.18"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.333" Value="161.591"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.556" Value="264.805"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.667" Value="316.286"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.778" Value="371.768"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.889" Value="435"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="TachFillCover">
				<EasingDoubleKeyFrame KeyTime="0" Value="-16"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.111" Value="15.963"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.222" Value="4.354"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.333" Value="21.547"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.556" Value="56.089"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.778" Value="61.863"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.889" Value="64"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="TachFillCover">
				<EasingDoubleKeyFrame KeyTime="0" Value="1.105"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.111" Value="1.058"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.222" Value="1.184"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ShiftLight">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.781" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Shift Lights Flash" RepeatBehavior="Forever">
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ShiftLight_ON">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.25" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Start Up Animation">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Start_Up_Mask">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</Page.Resources>
	<Page.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="LayoutRoot">
			<BeginStoryboard Storyboard="{StaticResource Shift Lights Flash}"/>
		</EventTrigger>
	</Page.Triggers>

	<Canvas x:Name="LayoutRoot" Background="Transparent" Width="1280" Height="720">
		<Rectangle Fill="#FF730100" Height="260" Canvas.Left="103" Canvas.Top="208" Width="1000"/>
		<Image x:Name="Fill_Tach" Height="240" Canvas.Left="115.5" Source="game:/media/cars/HON_S2000CR_09/UI/Textures/HON_S2000CR_09_Fill_Tach.png" Stretch="Fill" Canvas.Top="215" Width="556"/>
		<Rectangle x:Name="TachFillCover" Fill="#FF730100" Height="303.5" Canvas.Left="99" Canvas.Top="144" Width="572.5" RenderTransformOrigin="0.5,0.5">
			<Rectangle.RenderTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform/>
					<TranslateTransform/>
				</TransformGroup>
			</Rectangle.RenderTransform>
		</Rectangle>
		<Image x:Name="GaugeFill_WaterTemp" Height="66" Canvas.Left="832" Source="game:/media/cars/HON_S2000CR_09/UI/Textures/HON_S2000CR_09_Fill_WaterTemp.png" Stretch="Fill" Canvas.Top="281.5" Width="113"/>
		<Path x:Name="GaugeFill_WaterTempMask" Data="M0.5,35.25 L27.75,0.5 L72.5,28.75 L48.5,53.25 z" Fill="#FF730100" Height="53.75" Canvas.Left="823.5" Stroke="Black" Canvas.Top="271.5" Width="73"/>
		<Image x:Name="GaugeFill_Fuel" Height="86" Canvas.Left="961.5" Source="game:/media/cars/HON_S2000CR_09/UI/Textures/HON_S2000CR_09_Fill_FuelGauge.png" Stretch="Fill" Canvas.Top="361.5" Width="107"/>
		<Path x:Name="GaugeFill_FuelMask" Fill="#FF730100" Height="97" Canvas.Left="956.5" Stroke="Black" Canvas.Top="351.5" Width="124">
			<Path.Data>
				<PathGeometry>
					<PathFigure IsClosed="True" StartPoint="0.5,20">
						<LineSegment Point="35.5,0.5"/>
						<LineSegment Point="123.5,93.5"/>
						<LineSegment Point="78.5,96.5"/>
					</PathFigure>
				</PathGeometry>
			</Path.Data>
		</Path>
		<Rectangle x:Name="Mask_Top" Fill="Black" Height="208" Canvas.Left="71.5" Stroke="Black" Width="1064.5"/>
		<Rectangle x:Name="Mask_Bottom" Fill="Black" Height="244" Canvas.Left="71.5" Stroke="Black" Canvas.Top="468" Width="1064.5"/>
		<Rectangle x:Name="Mask_Left" Fill="Black" Height="376" Canvas.Left="71.5" Stroke="Black" Canvas.Top="144" Width="31.5"/>
		<Rectangle x:Name="Mask_Right" Fill="Black" Height="376" Canvas.Left="1103" Stroke="Black" Canvas.Top="144" Width="33"/>
		<Image x:Name="MergedBG" Height="260" Canvas.Left="103" Source="game:/media/cars/HON_S2000CR_09/UI/Textures/HON_S2000CR_09_BGmerged.png" Stretch="Fill" Canvas.Top="208" Width="1000"/>
		<Rectangle x:Name="GaugeFill_TachRedzone" Fill="Transparent" Height="700" Canvas.Left="447" Canvas.Top="202" Width="327">
			<Rectangle.Effect>
				<local:CircularProgressEffect EndAngle="110" OutsideColor="#00000000">
					<local:CircularProgressEffect.Input>
						<ImageBrush ImageSource="game:/media/cars/HON_S2000CR_09/UI/Textures/HON_S2000CR_09_Fill_TachRedzone.png" Stretch="Uniform"/>
					</local:CircularProgressEffect.Input>
				</local:CircularProgressEffect>
			</Rectangle.Effect>
		</Rectangle>
		<Image x:Name="ShiftLight_OFF" Source="game:/media/cars/HON_S2000CR_09/UI/Textures/ShiftLight_Green_Off.png" Stretch="Fill" Opacity="0.5" Canvas.Left="774" Canvas.Top="329"/>
		
		<Canvas x:Name="ShiftLight" Canvas.Left="774" Canvas.Top="329"  Height="96" Width="96" Visibility="Hidden">
			<Image x:Name="ShiftLight_ON"  Source="game:/media/cars/HON_S2000CR_09/UI/Textures/ShiftLight_Green_Off.png" Stretch="Fill" Visibility="Hidden"/>
		</Canvas>
		<Image x:Name="LowFuelIcon" Height="30" Canvas.Left="952" Source="game:/media/cars/HON_S2000CR_09/UI/Textures/HON_S2000CR_09_LowFuelIcon.png" Stretch="Fill" Canvas.Top="405.25" Width="28"/>
		<Canvas x:Name="Text" Height="720" Width="1280">
			<local:FastTextBlock x:Name="Text_Speed" Canvas.Left="502" Canvas.Top="287.875" Text="{Binding Speed}" Width="191" FontSize="112" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" FontFamily="DG2_LCD" Height="108.963">
				<local:FastTextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleY="0.8"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</local:FastTextBlock.RenderTransform>
			</local:FastTextBlock>
			<local:FastTextBlock x:Name="Text_External_Temp" Canvas.Left="461" Canvas.Top="395" Text="{Binding ExternalTemp}" FontSize="29.333" Style="{StaticResource TextBlockStyle}" FontFamily="DG5_QuartzMS" Width="83" RenderTransformOrigin="0.5,0.5"/>
			
			<local:FastTextBlock x:Name="Text_Clock" Canvas.Left="641" Canvas.Top="395" Text="{Binding Time}" FontSize="29.333" Style="{StaticResource TextBlockStyle}" Width="80" RenderTransformOrigin="0.5,0.5" Height="30.36"/>
			<local:FastTextBlock x:Name="Text_Odometer" Canvas.Left="457" Canvas.Top="423.5" Text="{Binding Odometer}" Width="140" FontSize="29.333" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" FontFamily="DG5_QuartzMS">
				<local:FastTextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="0.9"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</local:FastTextBlock.RenderTransform>
			</local:FastTextBlock>
			<local:FastTextBlock x:Name="Text_Trip_Odo" Canvas.Left="654" Canvas.Top="423.5" Text="{Binding TripMeter}" Width="80.052" FontSize="29.333" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" FontFamily="DG5_QuartzMS"/>
			
		</Canvas>
		<Rectangle x:Name="Start_Up_Mask" Fill="Black" Height="668" Stroke="Black" Width="1186" Canvas.Left="62" Canvas.Top="52" Opacity="0" />
	
		<!-- Storyboard binding controllers -->
		<local:StoryboardController SeekPct="{Binding Tach}" Target="{StaticResource Tach}"/>
		<local:StoryboardController SeekPct="{Binding Fuel}" Target="{StaticResource Fuel Gauge}"/>
	</Canvas>
</Page>