GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — fs2ff/MainWindow.xaml at master · astenlund/fs2ff Expand file tree/ Copy pathMainWindow.xamlMore file actions 268 lines (268 loc) · 12.6 KB / Copy pathMainWindow.xamlFile metadata and controls268 lines (268 loc) · 12.6 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 <Window x:Class="fs2ff.MainWindow" 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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ui="http://schemas.modernwpf.com/2019" xmlns:i="http://schemas.microsoft.com/xaml/behaviors" xmlns:b="clr-namespace:fs2ff.Behaviors" xmlns:c="clr-namespace:fs2ff.Converters" ui:WindowHelper.UseModernWindowStyle="True" mc:Ignorable="d" Title="{Binding WindowTitle}" Icon="img\icon.ico" Width="555" Height="430" MinWidth="555" MinHeight="430" Closing="Window_Closing" Loaded="Window_Loaded" DataContext="{Binding Main, Source={StaticResource Locator}}"> <Window.Resources> <Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}"> <Setter Property="FontFamily" Value="Segoe UI" /> <Setter Property="FocusVisualStyle" Value="{x:Null}" /> </Style> <Style TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}"> <Setter Property="Focusable" Value="False" /> <Setter Property="FontFamily" Value="Segoe UI" /> <Setter Property="FontSize" Value="12" /> </Style> <Style TargetType="Hyperlink" BasedOn="{StaticResource {x:Type Hyperlink}}"> <Setter Property="Focusable" Value="False" /> <Setter Property="FontFamily" Value="Segoe UI" /> <Setter Property="FontSize" Value="12" /> </Style> <Style TargetType="Label" BasedOn="{StaticResource {x:Type Label}}"> <Setter Property="FontFamily" Value="Segoe UI" /> <Setter Property="FontSize" Value="12" /> <Setter Property="FontWeight" Value="SemiBold" /> <Setter Property="Foreground" Value="DarkGray" /> </Style> <Style TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}"> <Setter Property="FontFamily" Value="Segoe UI" /> <Setter Property="FontSize" Value="12" /> </Style> <Style TargetType="ToggleButton" BasedOn="{StaticResource {x:Type ToggleButton}}"> <Setter Property="Focusable" Value="False" /> <Setter Property="FontFamily" Value="Segoe UI" /> <Setter Property="FontSize" Value="12" /> </Style> </Window.Resources> <Window.InputBindings> <KeyBinding Key="Tab" Command="{Binding ToggleSettingsPaneCommand}" /> </Window.InputBindings> <ui:SplitView FocusManager.FocusedElement="{Binding ElementName=ConnectButton}" IsPaneOpen="{Binding SettingsPaneVisible}" DisplayMode="Inline" OpenPaneLength="185" PanePlacement="Right"> <i:Interaction.Triggers> <i:KeyTrigger Key="Escape"> <i:Interaction.Behaviors> <i:ConditionBehavior> <i:ConditionalExpression> <i:ComparisonCondition LeftOperand="{ Binding IsPaneOpen, RelativeSource={RelativeSource FindAncestor, AncestorType=ui:SplitView}}" RightOperand="True" /> </i:ConditionalExpression> </i:ConditionBehavior> </i:Interaction.Behaviors> <i:InvokeCommandAction Command="{Binding DismissSettingsPaneCommand}" /> </i:KeyTrigger> </i:Interaction.Triggers> <ui:SplitView.Pane> <StackPanel Orientation="Vertical" Margin="15,0,15,0"> <CheckBox Margin="0,20,0,5" IsChecked="{Binding AutoConnectEnabled, Mode=TwoWay}" Content="Auto connect" ToolTip="Automatically connects to Flight Simulator when it launches" /> <Label Content="DEVICE IP" Margin="0,20,0,5" /> <CheckBox IsChecked="{Binding AutoDetectIpEnabled, Mode=TwoWay}" Content="Auto-detect*" ToolTip="Requires ForeFlight running in the foreground" /> <TextBox Text="{ Binding IpAddress, Mode=TwoWay, Converter={c:IpAddressToStringConverter}, UpdateSourceTrigger=PropertyChanged, Delay=5000}" Template="{StaticResource WatermarkTextBoxTemplate}" Tag="255.255.255.255" Margin="0,10,0,0"> <i:Interaction.Behaviors> <b:MoveFocusOnEnterBehavior /> <b:UpdateSourceOnLostFocusBehavior /> </i:Interaction.Behaviors> </TextBox> <Label Content="DATA SELECTION" Margin="0,20,0,5" /> <CheckBox IsChecked="{Binding DataPositionEnabled, Mode=TwoWay}" Content="Position" /> <CheckBox IsChecked="{Binding DataTrafficEnabled, Mode=TwoWay}" Content="Traffic" /> <CheckBox IsChecked="{Binding DataAttitudeEnabled, Mode=TwoWay}" Content="Attitude" /> <Label Content="{Binding Value, ElementName=Slider, Converter={c:FormatStringConverter}, ConverterParameter='ATTITUDE FREQ: {0} Hz'}" Margin="0,14,0,5" /> <Slider Name="Slider" IsEnabled="{Binding DataAttitudeEnabled}" Value="{Binding AttitudeFrequency, Mode=TwoWay, Delay=2000, Converter={c:UIntToDoubleConverter}}" Minimum="{Binding AttitudeFrequencyMin, Converter={c:UIntToDoubleConverter}}" Maximum="{Binding AttitudeFrequencyMax, Converter={c:UIntToDoubleConverter}}" Focusable="False" TickPlacement="Both" IsSnapToTickEnabled="True" /> </StackPanel> </ui:SplitView.Pane> <Grid> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="40" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <Label Grid.Row="0" Grid.Column="0" Visibility="{Binding IpHintVisible, Converter={c:BooleanToVisibilityConverter}}" HorizontalAlignment="Center" VerticalAlignment="Top" FontStyle="Italic" Margin="0,30,0,0"> <StackPanel Orientation="Vertical"> <TextBlock HorizontalAlignment="Center"> Device IP not set. Please set it manually or enable </TextBlock> <TextBlock HorizontalAlignment="Center"> auto-detect for improved performance. <Hyperlink Command="{Binding OpenSettingsCommand}">Open settings.</Hyperlink> </TextBlock> </StackPanel> </Label> <Button Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Name="ConnectButton" Content="{Binding ConnectButtonText, FallbackValue='Connect'}" Command="{Binding ToggleConnectCommand}" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" Width="144" Height="60" IsEnabled="{Binding ConnectButtonEnabled}" /> <Ellipse Grid.Row="1" Grid.Column="0" Fill="LawnGreen" Stroke="ForestGreen" StrokeThickness="1" Width="10" Height="10" VerticalAlignment="Center" HorizontalAlignment="Left" Visibility="{Binding IndicatorVisible, Converter={c:BooleanToVisibilityConverter}}" Margin="27,0,0,0" /> <Label Grid.Row="1" Grid.Column="0" Content="NOT" Foreground="DarkGray" VerticalAlignment="Center" HorizontalAlignment="Left" Visibility="{Binding NotLabelVisible, Converter={c:BooleanToVisibilityConverter}}" Margin="17,0,0,0" /> <Label Grid.Row="1" Grid.Column="0" Content="CONNECTED" Foreground="DarkGray" VerticalAlignment="Center" HorizontalAlignment="Left" Visibility="{Binding ConnectedLabelVisible, Converter={c:BooleanToVisibilityConverter}}" Margin="45,0,0,0" /> <Label Grid.Row="1" Grid.Column="0" Content="AUTO CONNECTING..." Foreground="DarkGray" VerticalAlignment="Center" HorizontalAlignment="Left" Visibility="{Binding AutoConnectLabelVisible, Converter={c:BooleanToVisibilityConverter}}" Margin="10,0,0,0" /> <Label Grid.Row="1" Grid.Column="0" Content="UNABLE TO CONNECT TO FLIGHT SIMULATOR" Foreground="OrangeRed" VerticalAlignment="Center" HorizontalAlignment="Left" Visibility="{Binding ErrorLabelVisible, Converter={c:BooleanToVisibilityConverter}}" Margin="17,0,0,0" /> <Label Grid.Row="1" Grid.Column="0" Visibility="{Binding UpdateMsgVisible, Converter={c:BooleanToVisibilityConverter}}" VerticalAlignment="Center" HorizontalAlignment="Right" FontStyle="Italic" Margin="15,0,25,0"> <Hyperlink Command="{Binding GotoNewReleaseCommand}">Update available</Hyperlink> </Label> <ToggleButton Grid.Row="0" Grid.Column="1" Grid.RowSpan="2" IsChecked="{Binding SettingsPaneVisible, Mode=TwoWay}" VerticalAlignment="Stretch" Width="47"> <ToggleButton.ContentTemplate> <DataTemplate> <Label Content="S E T T I N G S" Foreground="White"> <Label.LayoutTransform> <TransformGroup> <RotateTransform x:Name="RotateTransform" Angle="90" /> </TransformGroup> </Label.LayoutTransform> <i:Interaction.Triggers> <i:PropertyChangedTrigger Binding="{ Binding IsPaneOpen, RelativeSource={ RelativeSource FindAncestor, AncestorType=ui:SplitView}}"> <i:ChangePropertyAction TargetName="RotateTransform" PropertyName="Angle"> <i:ChangePropertyAction.Value> <Binding Path="IsPaneOpen" RelativeSource="{ RelativeSource FindAncestor, AncestorType=ui:SplitView}" Converter="{c:BooleanToDoubleConverter}" ConverterParameter="270,90" /> </i:ChangePropertyAction.Value> </i:ChangePropertyAction> </i:PropertyChangedTrigger> </i:Interaction.Triggers> </Label> </DataTemplate> </ToggleButton.ContentTemplate> </ToggleButton> </Grid> </ui:SplitView> </Window> |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |