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
|
<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>
<UniformGrid Rows="3">
<Grid Margin="0 10">
<DockPanel>
<TextBlock FontSize="{StaticResource FSE_SmallFontSize}" DockPanel.Dock="Top" Text="Scanning for machines on local serial ports..."></TextBlock>
<ProgressBar DockPanel.Dock="Top" Height="2" IsIndeterminate="True" Margin="0 3 0 0" />
<ListBox ItemsSource="{Binding UsbMachines}" SelectedItem="{Binding SelectedMachine,Mode=TwoWay}" PreviewMouseDoubleClick="ListBox_PreviewMouseDoubleClick">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Image Source="/Images/Connections/external-bridge-usb.png" Height="35" RenderOptions.BitmapScalingMode="Fant"></Image>
<StackPanel Margin="10 0 0 0">
<TextBlock FontSize="{StaticResource FSE_SmallFontSize}">
<Run FontWeight="Bold">Port:</Run> <Run Text="{Binding ComPort,Mode=OneWay}"></Run>
</TextBlock>
<TextBlock FontSize="{StaticResource FSE_SmallFontSize}">
<Run FontWeight="Bold">Device:</Run> <Run Text="{Binding Device,Mode=OneWay}"></Run>
</TextBlock>
</StackPanel>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</DockPanel>
</Grid>
<Grid Margin="0 10">
<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 ItemsSource="{Binding TcpMachines}" SelectedItem="{Binding SelectedMachine,Mode=TwoWay}" PreviewMouseDoubleClick="ListBox_PreviewMouseDoubleClick">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Image Source="/Images/Connections/external-bridge-tcp.png" Height="35" RenderOptions.BitmapScalingMode="Fant"></Image>
<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">IP 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 Margin="0 10">
<DockPanel>
<TextBlock FontSize="{StaticResource FSE_SmallFontSize}" DockPanel.Dock="Top" Text="Scanning for machines over the internet..."></TextBlock>
<ProgressBar DockPanel.Dock="Top" Height="2" IsIndeterminate="True" Margin="0 3 0 0" />
<ListBox ItemsSource="{Binding SignalRMachines}" SelectedItem="{Binding SelectedMachine,Mode=TwoWay}" PreviewMouseDoubleClick="ListBox_PreviewMouseDoubleClick">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Image Source="/Images/Connections/external-bridge-signalr.png" Height="35" RenderOptions.BitmapScalingMode="Fant"></Image>
<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">Hub:</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>
</UniformGrid>
</DockPanel>
</Grid>
</UserControl>
|