-
Notifications
You must be signed in to change notification settings - Fork 9
/
MainWindow.xaml
115 lines (108 loc) · 7.96 KB
/
MainWindow.xaml
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
<Window x:Class="Simvars.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:simco="clr-namespace:Microsoft.FlightSimulator.SimConnect;assembly=Microsoft.FlightSimulator.SimConnect"
xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:simvars="clr-namespace:Simvars" d:DataContext="{d:DesignInstance Type=simvars:SimvarsViewModel}"
mc:Ignorable="d"
Title="Enhanced Live Traffic 3.03 | Developed by Mr. Proper | optimized by Mauflo12961" Height="700" Width="1085" MinWidth="800" MinHeight="700">
<Window.Resources>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10*" />
<ColumnDefinition Width="207*" />
</Grid.ColumnDefinitions>
<Button x:Name="btn_Connection" Content="{Binding sConnectButtonLabel}" Command="{Binding cmdToggleConnect}" Margin="43,68,0,0" VerticalAlignment="Top" Height="48" HorizontalAlignment="Left" Width="146" Grid.ColumnSpan="2" />
<!--<Button x:Name="btn_LoadFile" Content="Manual Waypoint" Command="{Binding cmdLoadFiles}"
HorizontalAlignment="Left" Margin="29,156,0,0" VerticalAlignment="Top" Width="100" Height="23"
RenderTransformOrigin="0.423,0.841" Grid.ColumnSpan="2" />-->
<ListView x:Name="lv_Simvars"
Margin="219,10,10,10"
Grid.Column="1" SelectionChanged="lv_Simvars_SelectionChanged" IsEnabled="True" ItemsSource="{Binding spawnedPlanes}">
<ListView.ItemContainerStyle>
<Style TargetType="{x:Type ListViewItem}">
</Style>
</ListView.ItemContainerStyle>
<ListView.ContextMenu>
<ContextMenu>
<MenuItem Header="Remove" />
</ContextMenu>
</ListView.ContextMenu>
<ListView.View>
<GridView>
<GridViewColumn Header="Callsign" Width="80" DisplayMemberBinding="{Binding callsign}" />
<GridViewColumn Header="Speed" Width="70" DisplayMemberBinding="{Binding speed}" />
<GridViewColumn Header="Altitude Org" Width="70" DisplayMemberBinding="{Binding altimeter}" />
<GridViewColumn Header="Model Code" Width="80" DisplayMemberBinding="{Binding modelCode}" />
<GridViewColumn Header="Spawned Aircraft" Width="200" DisplayMemberBinding="{Binding matchedModel}" />
<GridViewColumn Header="Model" Width="200" DisplayMemberBinding="{Binding model}" />
<GridViewColumn Header="Airline" Width="80" DisplayMemberBinding="{Binding airline}" />
<GridViewColumn Header="Departure" Width="80" DisplayMemberBinding="{Binding airportOrigin}" />
<GridViewColumn Header="Destination" Width="80" DisplayMemberBinding="{Binding airportDestination}" />
<GridViewColumn Header="Status" Width="140" DisplayMemberBinding="{Binding infoExclude}" />
</GridView>
</ListView.View>
</ListView>
<Ellipse HorizontalAlignment="Left" Height="14" Margin="200,10,0,0" Stroke="Black" VerticalAlignment="Top"
Width="14" Grid.Column="1">
<Ellipse.Style>
<Style TargetType="Ellipse">
<Style.Triggers>
<DataTrigger Binding="{Binding bConnected}" Value="false">
<Setter Property="Fill" Value="#FFFF5030" />
</DataTrigger>
<DataTrigger Binding="{Binding bConnected}" Value="true">
<Setter Property="Fill" Value="#FF50FF30" />
</DataTrigger>
<DataTrigger Binding="{Binding bOddTick}" Value="true">
<!-- Assume bOddTick is true only when bConnected is true-->
<Setter Property="Fill" Value="#FF45E2F4" />
</DataTrigger>
</Style.Triggers>
</Style>
</Ellipse.Style>
</Ellipse>
<Label Content="Errors" HorizontalAlignment="Left" Margin="8,475,0,0" VerticalAlignment="Top" Height="27"
Width="83" Grid.ColumnSpan="2" />
<ListBox ItemsSource="{Binding lErrorMessages}" RenderTransformOrigin="0.5,0.5" Width="236"
HorizontalAlignment="Left" Margin="10,501,0,10" Grid.ColumnSpan="2">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Foreground" Value="Red" />
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel VerticalAlignment="Bottom" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
<Label Content="Excluded traffic settings" HorizontalAlignment="Left" Margin="8,145,0,0" VerticalAlignment="Top" Height="27"
Width="147" Grid.ColumnSpan="2" FontWeight="Bold" />
<Rectangle x:Name="Exclude_Frame" Grid.ColumnSpan="2" HorizontalAlignment="Left" Margin="13,171,0,0" Stroke="Black" Width="233" Opacity="0.5" Height="139" VerticalAlignment="Top"/>
<CheckBox Content="GA traffic" IsChecked="{Binding bGaTraffic, Mode=TwoWay}" Margin="20,176,0,0"
Grid.ColumnSpan="2" HorizontalAlignment="Left" Width="216" Height="16" VerticalAlignment="Top"/>
<CheckBox Content="Gliders" IsChecked="{Binding bGlidTraffic, Mode=TwoWay}" Margin="20,195,0,0"
Grid.ColumnSpan="2" HorizontalAlignment="Left" Width="216" Height="16" VerticalAlignment="Top"/>
<CheckBox Content="Airlines" IsChecked="{Binding bAirlTraffic, Mode=TwoWay}" Margin="20,214,0,0"
Grid.ColumnSpan="2" HorizontalAlignment="Left" Width="216" Height="16" VerticalAlignment="Top"/>
<CheckBox Content="Ground traffic" IsChecked="{Binding bGroundTraffic, Mode=TwoWay}" Margin="20,232,0,0" VerticalAlignment="Top"
Grid.ColumnSpan="2" HorizontalAlignment="Left" Width="216" Height="16"/>
<CheckBox Content="Low traffic (< FL 100)" IsChecked="{Binding bLowAltTraffic, Mode=TwoWay}" Margin="20,251,0,0" VerticalAlignment="Top"
Grid.ColumnSpan="2" HorizontalAlignment="Left" Width="216" Height="16" Checked="CheckBox_Checked"/>
<CheckBox Content="Mid traffic (>FL 100 <FL 200)" IsChecked="{Binding bMidAltTraffic, Mode=TwoWay}" Margin="20,270,0,0" VerticalAlignment="Top"
Grid.ColumnSpan="2" HorizontalAlignment="Left" Width="216" Height="16" Checked="CheckBox_Checked"/>
<CheckBox Content="High traffic (>FL 200)" IsChecked="{Binding bHigAltTraffic, Mode=TwoWay}" Margin="20,289,0,0" VerticalAlignment="Top"
Grid.ColumnSpan="2" HorizontalAlignment="Left" Width="216" Height="16" Checked="CheckBox_Checked"/>
<Rectangle Grid.ColumnSpan="2" HorizontalAlignment="Left" Height="24" Margin="13,338,0,0" Stroke="Black" VerticalAlignment="Top" Width="233"/>
<CheckBox Content="High altitude traffic mode" IsChecked="{Binding bHigAltTrafficMode, Mode=TwoWay}" Margin="20,342,0,0"
Grid.ColumnSpan="2" Checked="CheckBox_Checked" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" Height="16" VerticalAlignment="Top" HorizontalAlignment="Left" Width="215"/>
<Label Content="Performance setting" HorizontalAlignment="Left" Margin="8,312,0,0" VerticalAlignment="Top" RenderTransformOrigin="1.067,0.314" Grid.ColumnSpan="2" Width="164" Height="28" FontWeight="Bold"/>
</Grid>
</Window>