blob: 7276d7d4c490b46292747653a0c97cf966dea67a (
plain)
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
|
<UserControl x:Class="Tango.PPC.UI.Views.ExternalBridgeView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:global="clr-namespace:Tango.PPC.UI"
xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:Tango.PPC.UI.ViewModels"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:localControls="clr-namespace:Tango.PPC.UI.Controls"
xmlns:local="clr-namespace:Tango.PPC.UI.Views"
mc:Ignorable="d"
d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:ExternalBridgeViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.ExternalBridgeViewVM}" Background="{StaticResource TangoPrimaryBackgroundBrush}">
<Grid>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<Grid HorizontalAlignment="Center" VerticalAlignment="Center" >
<Ellipse Stroke="{StaticResource TangoDarkForegroundBrush}" Width="50" Height="50"/>
<localControls:MachineStatusControl Margin="0 0 0 -1" VerticalAlignment="Center" DataContext="{Binding MachineProvider.MachineOperator}" />
</Grid>
<Grid HorizontalAlignment="Center" Margin="0 20 0 0">
<Image Stretch="None" RenderOptions.BitmapScalingMode="Fant">
<Image.Style>
<Style TargetType="{x:Type Image}">
<Setter Property="Source" Value="/Images/machine.png"/>
<Style.Triggers>
<DataTrigger Binding="{Binding BuildProvider.IsEureka}" Value="true">
<Setter Property="Source" Value="/Images/machine-X4.png"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
<touch:TouchIcon Icon="Wifi" Foreground="{StaticResource TangoGreenBrush}" Width="30" Height="30" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 40 45">
<touch:TouchIcon.Style>
<Style TargetType="touch:TouchIcon">
<Style.Triggers>
<DataTrigger Binding="{Binding ExternalBridgeService.HasSessions}" Value="True">
<DataTrigger.EnterActions>
<BeginStoryboard x:Name="Blink">
<Storyboard>
<DoubleAnimationUsingKeyFrames RepeatBehavior="Forever" Storyboard.TargetProperty="Opacity">
<DiscreteDoubleKeyFrame KeyTime="00:00:00" Value="0" />
<DiscreteDoubleKeyFrame KeyTime="00:00:0.5" Value="1" />
<DiscreteDoubleKeyFrame KeyTime="00:00:1" Value="1" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
<DataTrigger.ExitActions>
<RemoveStoryboard BeginStoryboardName="Blink"/>
</DataTrigger.ExitActions>
</DataTrigger>
</Style.Triggers>
</Style>
</touch:TouchIcon.Style>
</touch:TouchIcon>
</Grid>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 50 0 0" FontSize="{StaticResource TangoTitleFontSize}">This machine is currently being controlled by a remote client</TextBlock>
<controls:TableGrid Margin="0 30 0 0" HorizontalAlignment="Center" RowHeight="30" Width="280">
<TextBlock FontWeight="Bold">Address:</TextBlock>
<TextBlock Text="{Binding Connection.Address}"></TextBlock>
<TextBlock FontWeight="Bold">Host Name:</TextBlock>
<TextBlock Text="{Binding Connection.Request.HostName}"></TextBlock>
<TextBlock FontWeight="Bold">App ID:</TextBlock>
<TextBlock Text="{Binding Connection.Request.AppID}"></TextBlock>
<TextBlock FontWeight="Bold">User:</TextBlock>
<TextBlock Text="{Binding User.Contact.FullName,TargetNullValue='Unknown',FallbackValue='Unknown'}"></TextBlock>
<TextBlock FontWeight="Bold" Text="Transfer Rate:" />
<TextBlock>
<Run Text="{Binding ExternalBridgeService.FullControlSessionReceiver.Adapter.TransferRate,Converter={StaticResource ByteArrayToFileSizeConverter},Mode=OneWay}"></Run>
<Run Text="/ sec"></Run>
</TextBlock>
</controls:TableGrid>
<touch:TouchButton Padding="30 25" Width="300" CornerRadius="40" Margin="0 100 0 0" Command="{Binding CloseSessionCommand}">CLOSE SESSION</touch:TouchButton>
</StackPanel>
</Grid>
</UserControl>
|