1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-29 09:10:09 +00:00
msfs-popout-panel-manager/MainApp/AppUserControl/DynamicLodPreference.xaml

280 lines
16 KiB
Text
Raw Permalink Normal View History

2024-02-28 02:44:21 +00:00
<UserControl
x:Class="MSFSPopoutPanelManager.MainApp.AppUserControl.DynamicLodPreference"
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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:system="clr-namespace:System;assembly=System.Runtime"
xmlns:viewModel="clr-namespace:MSFSPopoutPanelManager.MainApp.ViewModel"
d:DesignHeight="800"
d:DesignWidth="800"
mc:Ignorable="d">
<UserControl.Resources>
<system:Double x:Key="IconSize">22</system:Double>
<system:Double x:Key="ButtonSize">22</system:Double>
<Style
2024-03-14 22:50:32 +00:00
x:Key="TextBlockHeading"
2024-02-28 02:44:21 +00:00
BasedOn="{StaticResource {x:Type TextBlock}}"
TargetType="TextBlock">
2024-03-14 22:50:32 +00:00
<Setter Property="TextWrapping" Value="Wrap" />
<Setter Property="Width" Value="Auto" />
<Setter Property="Margin" Value="0,5,0,0" />
2024-02-28 02:44:21 +00:00
<Setter Property="FontSize" Value="14" />
2024-03-14 22:50:32 +00:00
<Setter Property="FontWeight" Value="Bold" />
</Style>
<Style
x:Key="TextBlockLabel"
BasedOn="{StaticResource {x:Type TextBlock}}"
TargetType="TextBlock">
<Setter Property="FontSize" Value="12" />
2024-02-28 02:44:21 +00:00
<Setter Property="TextWrapping" Value="Wrap" />
2024-03-14 22:50:32 +00:00
<Setter Property="Margin" Value="0,7,0,0" />
2024-02-28 02:44:21 +00:00
<Setter Property="LineHeight" Value="20" />
</Style>
<Style
x:Key="ToggleButton"
BasedOn="{StaticResource MaterialDesignSwitchToggleButton}"
TargetType="ToggleButton">
<Setter Property="Margin" Value="4,0,4,0" />
</Style>
</UserControl.Resources>
<Grid d:DataContext="{d:DesignInstance viewModel:ApplicationViewModel}">
2024-03-14 22:50:32 +00:00
<WrapPanel Orientation="Vertical">
<WrapPanel Margin="120,10,0,0">
<GroupBox
2024-02-28 02:44:21 +00:00
Margin="0"
2024-03-14 22:50:32 +00:00
Padding="5,2,5,2"
Header="Sim Values"
Style="{StaticResource MaterialDesignGroupBox}">
<GroupBox.HeaderTemplate>
<HierarchicalDataTemplate>
<Label
Height="12"
Margin="10,1,1,1"
Padding="0"
FontSize="12">
Sim Values
</Label>
</HierarchicalDataTemplate>
</GroupBox.HeaderTemplate>
<WrapPanel Margin="3">
<TextBox
Width="75"
Margin="20,0,0,0"
materialDesign:HintAssist.FloatingScale="0.75"
materialDesign:HintAssist.Hint="FPS"
IsHitTestVisible="False"
IsReadOnly="True"
PreviewTextInput="TxtBox_NumbersOnly"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Text="{Binding FlightSimData.DynamicLodSimData.Fps, StringFormat='{}{0:0}'}" />
<TextBox
Width="75"
Margin="20,0,0,0"
materialDesign:HintAssist.FloatingScale="0.75"
materialDesign:HintAssist.Hint="TLOD"
IsHitTestVisible="False"
IsReadOnly="True"
PreviewTextInput="TxtBox_NumbersOnly"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Text="{Binding FlightSimData.DynamicLodSimData.Tlod}" />
<TextBox
Width="75"
Margin="20,0,0,0"
materialDesign:HintAssist.FloatingScale="0.75"
materialDesign:HintAssist.Hint="OLOD"
IsHitTestVisible="False"
IsReadOnly="True"
PreviewTextInput="TxtBox_NumbersOnly"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Text="{Binding FlightSimData.DynamicLodSimData.Olod}" />
<TextBox
Width="75"
Margin="20,0,0,0"
materialDesign:HintAssist.FloatingScale="0.75"
materialDesign:HintAssist.Hint="AGL"
IsHitTestVisible="False"
IsReadOnly="True"
PreviewTextInput="TxtBox_NumbersOnly"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Text="{Binding FlightSimData.DynamicLodSimData.Agl, StringFormat='{}{0:0}'}" />
<TextBox
Width="75"
Margin="20,0,0,0"
materialDesign:HintAssist.FloatingScale="0.75"
materialDesign:HintAssist.Hint="Clouds"
IsHitTestVisible="False"
IsReadOnly="True"
PreviewTextInput="TxtBox_NumbersOnly"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Text="{Binding FlightSimData.DynamicLodSimData.CloudQuality}" />
</WrapPanel>
</GroupBox>
2024-02-28 02:44:21 +00:00
</WrapPanel>
2024-03-14 22:50:32 +00:00
<WrapPanel Margin="47,10,0,0" Orientation="Vertical">
<WrapPanel Margin="0,0,0,0">
<TextBlock Style="{StaticResource TextBlockHeading}">General Options</TextBlock>
<Line
Stretch="Fill"
Stroke="Gray"
X2="1" />
2024-02-28 02:44:21 +00:00
<TextBox
Width="100"
2024-03-14 22:50:32 +00:00
Margin="0,0,0,0"
Padding="5,5,0,0"
materialDesign:HintAssist.FloatingScale="0.75"
materialDesign:HintAssist.Foreground="White"
materialDesign:HintAssist.Hint="Targeted FPS"
Background="#607D8B"
PreviewTextInput="TxtBox_NumbersOnly"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Text="{Binding AppSettingData.ApplicationSetting.DynamicLodSetting.TargetedFps, Mode=TwoWay}" />
<TextBox
Width="75"
Margin="40,0,0,0"
materialDesign:HintAssist.FloatingScale="0.75"
materialDesign:HintAssist.Hint="FPS Tolerance"
materialDesign:TextFieldAssist.SuffixText="%"
PreviewTextInput="TxtBox_NumbersOnly"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Text="{Binding AppSettingData.ApplicationSetting.DynamicLodSetting.FpsTolerance, Mode=TwoWay}" />
<WrapPanel Margin="40,10,0,0">
<ToggleButton IsChecked="{Binding AppSettingData.ApplicationSetting.DynamicLodSetting.PauseWhenMsfsLoseFocus, Mode=TwoWay}" Style="{StaticResource ToggleButton}" />
<TextBlock Style="{StaticResource TextBlockLabel}">Pause when MSFS loses focus</TextBlock>
</WrapPanel>
<WrapPanel Margin="20,10,0,0">
<ToggleButton IsChecked="{Binding AppSettingData.ApplicationSetting.DynamicLodSetting.PauseOutsideCockpitView, Mode=TwoWay}" Style="{StaticResource ToggleButton}" />
<TextBlock Style="{StaticResource TextBlockLabel}">Pause when not in cockpit view</TextBlock>
</WrapPanel>
</WrapPanel>
<WrapPanel Margin="0,15,0,0">
<TextBlock Style="{StaticResource TextBlockHeading}">TLOD Options</TextBlock>
<Line
Stretch="Fill"
Stroke="Gray"
X2="1" />
<TextBox
Width="75"
Margin="0,0,0,0"
materialDesign:HintAssist.FloatingScale="0.75"
materialDesign:HintAssist.Hint="TLOD Minimum"
PreviewTextInput="TxtBox_NumbersOnly"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Text="{Binding AppSettingData.ApplicationSetting.DynamicLodSetting.TlodMin, Mode=TwoWay}" />
<TextBox
Width="75"
Margin="40,0,0,0"
materialDesign:HintAssist.FloatingScale="0.75"
materialDesign:HintAssist.Hint="TLOD Maximum"
PreviewTextInput="TxtBox_NumbersOnly"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Text="{Binding AppSettingData.ApplicationSetting.DynamicLodSetting.TlodMax, Mode=TwoWay}" />
<TextBox
Width="75"
Margin="40,0,0,0"
materialDesign:HintAssist.FloatingScale="0.75"
materialDesign:HintAssist.Hint="TLOD Base Alt"
materialDesign:TextFieldAssist.SuffixText="ft"
PreviewTextInput="TxtBox_NumbersOnly"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Text="{Binding AppSettingData.ApplicationSetting.DynamicLodSetting.AltTlodBase, Mode=TwoWay}" />
<WrapPanel Margin="40,10,0,0">
<ToggleButton IsChecked="{Binding AppSettingData.ApplicationSetting.DynamicLodSetting.TlodMinOnGround, Mode=TwoWay}" Style="{StaticResource ToggleButton}" />
<TextBlock Style="{StaticResource TextBlockLabel}">TLOD minimum on ground/TLOD Base Altitude</TextBlock>
</WrapPanel>
</WrapPanel>
<WrapPanel Margin="0,15,0,0">
<TextBlock Style="{StaticResource TextBlockHeading}">OLOD Options</TextBlock>
<Line
Stretch="Fill"
Stroke="Gray"
X2="1" />
<TextBox
Width="75"
Margin="0,0,0,0"
materialDesign:HintAssist.FloatingScale="0.75"
materialDesign:HintAssist.Hint="OLOD at Base Alt"
PreviewTextInput="TxtBox_NumbersOnly"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Text="{Binding AppSettingData.ApplicationSetting.DynamicLodSetting.OlodBase, Mode=TwoWay}" />
<TextBox
Width="75"
Margin="40,0,0,0"
materialDesign:HintAssist.FloatingScale="0.75"
materialDesign:HintAssist.Hint="OLOD at Top Alt"
PreviewTextInput="TxtBox_NumbersOnly"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Text="{Binding AppSettingData.ApplicationSetting.DynamicLodSetting.OlodTop, Mode=TwoWay}" />
<TextBox
Width="75"
Margin="40,0,0,0"
materialDesign:HintAssist.FloatingScale="0.75"
materialDesign:HintAssist.Hint="OLOD Base Alt"
materialDesign:TextFieldAssist.SuffixText="ft"
PreviewTextInput="TxtBox_NumbersOnly"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Text="{Binding AppSettingData.ApplicationSetting.DynamicLodSetting.AltOlodBase, Mode=TwoWay}" />
<TextBox
Width="75"
Margin="40,0,0,0"
materialDesign:HintAssist.FloatingScale="0.75"
materialDesign:HintAssist.Hint="OLOD Top Alt"
materialDesign:TextFieldAssist.SuffixText="ft"
PreviewTextInput="TxtBox_NumbersOnly"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Text="{Binding AppSettingData.ApplicationSetting.DynamicLodSetting.AltOlodTop, Mode=TwoWay}" />
</WrapPanel>
<WrapPanel Margin="0,15,0,0">
<TextBlock Style="{StaticResource TextBlockHeading}">Cloud Options</TextBlock>
<Line
Stretch="Fill"
Stroke="Gray"
X2="1" />
2024-02-28 02:44:21 +00:00
<TextBox
Width="100"
2024-03-14 22:50:32 +00:00
Margin="0,0,0,0"
materialDesign:HintAssist.FloatingScale="0.75"
materialDesign:HintAssist.Hint="Cloud Adjust at TLOD"
PreviewTextInput="TxtBox_NumbersOnly"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Text="{Binding AppSettingData.ApplicationSetting.DynamicLodSetting.CloudRecoveryTlod, Mode=TwoWay}" />
<WrapPanel Margin="20,10,0,0">
<ToggleButton IsChecked="{Binding AppSettingData.ApplicationSetting.DynamicLodSetting.DecreaseCloudQuality, Mode=TwoWay}" Style="{StaticResource ToggleButton}" />
<TextBlock Style="{StaticResource TextBlockLabel}">Decrease cloud quality by one level to archive desired FPS</TextBlock>
</WrapPanel>
</WrapPanel>
<WrapPanel Margin="0,15,0,0">
<TextBlock Style="{StaticResource TextBlockHeading}">Reset TLOD and OLOD on Exit</TextBlock>
<Line
Stretch="Fill"
Stroke="Gray"
X2="1" />
<WrapPanel Margin="0,0,0,0">
<WrapPanel Margin="0,7,0,0">
<ToggleButton IsChecked="{Binding AppSettingData.ApplicationSetting.DynamicLodSetting.ResetEnabled, Mode=TwoWay}" Style="{StaticResource ToggleButton}" />
<TextBlock Style="{StaticResource TextBlockLabel}">Reset on Exit</TextBlock>
</WrapPanel>
<TextBox
Width="75"
Margin="40,0,0,0"
materialDesign:HintAssist.FloatingScale="0.75"
materialDesign:HintAssist.Hint="TLOD"
PreviewTextInput="TxtBox_NumbersOnly"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Text="{Binding AppSettingData.ApplicationSetting.DynamicLodSetting.ResetTlod, Mode=TwoWay}" />
<TextBox
Width="75"
Margin="40,0,0,0"
materialDesign:HintAssist.FloatingScale="0.75"
materialDesign:HintAssist.Hint="OLOD"
PreviewTextInput="TxtBox_NumbersOnly"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Text="{Binding AppSettingData.ApplicationSetting.DynamicLodSetting.ResetOlod, Mode=TwoWay}" />
</WrapPanel>
2024-02-28 02:44:21 +00:00
</WrapPanel>
</WrapPanel>
</WrapPanel>
</Grid>
</UserControl>