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
|
<UserControl x:Class="Tango.FSE.UI.Panes.MachineConnectionPane"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:local="clr-namespace:Tango.FSE.UI.Panes"
mc:Ignorable="d"
d:DesignHeight="600" d:DesignWidth="350" d:DataContext="{d:DesignInstance Type=local:MachineConnectionPaneVM, IsDesignTimeCreatable=False}">
<Grid>
<DockPanel>
<Button Command="{Binding ConnectToMachineCommand}" DockPanel.Dock="Bottom" Height="50" Margin="5" material:ButtonAssist.CornerRadius="25">
CONNECT
</Button>
<DockPanel>
<DockPanel DockPanel.Dock="Top">
<Grid Margin="0 5 0 0">
<material:PackIcon Margin="10 0 0 0" VerticalAlignment="Center" Kind="Search" HorizontalAlignment="Left" />
<TextBox Padding="25 5 5 5" Style="{StaticResource FSE_Rounded_Corners_TextBox}" Background="#12FFFFFF" Margin="5 0 0 0" material:HintAssist.Hint="Serial Number" Text="{Binding Filter,UpdateSourceTrigger=PropertyChanged}"></TextBox>
</Grid>
</DockPanel>
<Grid Margin="0 10 0 0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="{Binding Settings.MachineConnectionUsbHeight,Mode=TwoWay}" />
<RowDefinition Height="5" />
<RowDefinition Height="{Binding Settings.MachineConnectionWifiHeight,Mode=TwoWay}" />
<RowDefinition Height="5" />
<RowDefinition Height="{Binding Settings.MachineConnectionSignalRHeight,Mode=TwoWay}" />
</Grid.RowDefinitions>
<Grid Margin="0 10 0 0" Grid.Row="0" Height="60" Visibility="{Binding Settings.EnableMachineEmulator,Converter={StaticResource BooleanToVisibilityConverter}}">
<DockPanel>
<ListBox x:Name="listEmulator" ItemsSource="{Binding EmulatorMachines}" SelectedItem="{Binding SelectedMachine,Mode=OneWay}" PreviewMouseDoubleClick="ListBox_PreviewMouseDoubleClick">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<ContentControl Style="{StaticResource FSE_EmulatorMachineIcon}" Height="35"></ContentControl>
<StackPanel Margin="10 0 0 0">
<TextBlock FontSize="{StaticResource FSE_SmallFontSize}" FontWeight="SemiBold">In-Memory Emulator</TextBlock>
<TextBlock FontSize="{StaticResource FSE_SmallFontSize}">
<Run FontWeight="SemiBold">Address:</Run> <Run Text="{Binding Adapter.Address,Mode=OneWay}"></Run>
</TextBlock>
</StackPanel>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</DockPanel>
</Grid>
<Grid Margin="0 10 0 0" Grid.Row="1">
<DockPanel>
<TextBlock FontSize="{StaticResource FSE_SmallFontSize}" DockPanel.Dock="Top" Text="Scanning for machines on the local serial ports..."></TextBlock>
<ProgressBar DockPanel.Dock="Top" Height="2" IsIndeterminate="True" Margin="0 3 0 0" />
<ListBox x:Name="listUsb" Style="{StaticResource MaterialDesignListBox}" SelectedItem="{Binding SelectedMachine,Mode=OneWay}" ItemsSource="{Binding UsbMachines}" PreviewMouseDoubleClick="ListBox_PreviewMouseDoubleClick">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<ContentControl Style="{StaticResource FSE_UsbMachineIcon}" Height="35"></ContentControl>
<StackPanel Margin="10 0 0 0">
<TextBlock FontSize="{StaticResource FSE_SmallFontSize}">
<Run FontWeight="SemiBold">Port:</Run> <Run Text="{Binding ComPort,Mode=OneWay}"></Run>
</TextBlock>
<TextBlock FontSize="{StaticResource FSE_SmallFontSize}">
<Run FontWeight="SemiBold">Device:</Run> <Run Text="{Binding Device,Mode=OneWay}"></Run>
</TextBlock>
</StackPanel>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</DockPanel>
</Grid>
<GridSplitter HorizontalAlignment="Stretch" VerticalAlignment="Center" Height="5" Grid.Row="2" />
<Grid Grid.Row="3">
<DockPanel>
<TextBlock FontSize="{StaticResource FSE_SmallFontSize}" DockPanel.Dock="Top" Text="Scanning for machines on your local network..."></TextBlock>
<ProgressBar DockPanel.Dock="Top" Height="2" IsIndeterminate="True" Margin="0 3 0 0" />
<ListBox x:Name="listWifi" ItemsSource="{Binding TcpMachines}" SelectedItem="{Binding SelectedMachine,Mode=OneWay}" PreviewMouseDoubleClick="ListBox_PreviewMouseDoubleClick">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<ContentControl Style="{StaticResource FSE_WifiMachineIcon}" />
<StackPanel Margin="10 0 0 0">
<TextBlock FontSize="{StaticResource FSE_SmallFontSize}">
<Run FontWeight="SemiBold">S/N:</Run> <Run Text="{Binding SerialNumber,Mode=OneWay}"></Run>
</TextBlock>
<TextBlock FontSize="{StaticResource FSE_SmallFontSize}">
<Run FontWeight="SemiBold">IP Address:</Run> <Run Text="{Binding IPAddress,Mode=OneWay}"></Run>
</TextBlock>
<TextBlock FontSize="{StaticResource FSE_SmallFontSize}">
<Run FontWeight="SemiBold">Organization:</Run> <Run Text="{Binding Machine.Organization.Name,Mode=OneWay}"></Run>
</TextBlock>
</StackPanel>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</DockPanel>
</Grid>
<GridSplitter HorizontalAlignment="Stretch" VerticalAlignment="Center" Height="5" Grid.Row="4" />
<Grid Grid.Row="5">
<DockPanel>
<TextBlock FontSize="{StaticResource FSE_SmallFontSize}" DockPanel.Dock="Top" Text="Scanning for machines across the internet..."></TextBlock>
<ProgressBar DockPanel.Dock="Top" Height="2" IsIndeterminate="True" Margin="0 3 0 0" />
<ListBox x:Name="listSignalR" ItemsSource="{Binding SignalRMachines}" SelectedItem="{Binding SelectedMachine,Mode=OneWay}" PreviewMouseDoubleClick="ListBox_PreviewMouseDoubleClick">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<ContentControl Style="{StaticResource FSE_SignalRMachineIcon}" />
<StackPanel Margin="10 0 0 0">
<TextBlock FontSize="{StaticResource FSE_SmallFontSize}">
<Run FontWeight="Bold">S/N:</Run> <Run Text="{Binding SerialNumber,Mode=OneWay}"></Run>
</TextBlock>
<TextBlock FontSize="{StaticResource FSE_SmallFontSize}">
<Run FontWeight="Bold">Address:</Run> <Run Text="{Binding IPAddress,Mode=OneWay}"></Run>
</TextBlock>
<TextBlock FontSize="{StaticResource FSE_SmallFontSize}">
<Run FontWeight="Bold">Organization:</Run> <Run Text="{Binding Machine.Organization.Name,Mode=OneWay}"></Run>
</TextBlock>
</StackPanel>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</DockPanel>
</Grid>
</Grid>
</DockPanel>
</DockPanel>
</Grid>
</UserControl>
|