aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml
blob: bc319367cb65ec329fa2e4316ca9ecdd6be4ab76 (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
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
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
<UserControl x:Class="Tango.PPC.UI.Views.LayoutEurekaView"
             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:local="clr-namespace:Tango.PPC.UI.Views"
			 xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
			 xmlns:fa="http://schemas.fontawesome.io/icons/"
			 xmlns:vm="clr-namespace:Tango.PPC.UI.ViewModels"
			 xmlns:global="clr-namespace:Tango.PPC.UI"
             xmlns:localConverters="clr-namespace:Tango.PPC.UI.Converters"
             xmlns:operations="clr-namespace:Tango.Integration.Operation;assembly=Tango.Integration"
             xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
             xmlns:commonControls="clr-namespace:Tango.PPC.Common.Controls;assembly=Tango.PPC.Common"
			 xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
             xmlns:components="clr-namespace:Tango.Touch.Components;assembly=Tango.Touch"
             xmlns:locaControls="clr-namespace:Tango.PPC.UI.Controls"
			 xmlns:keyboard="clr-namespace:Tango.Touch.Keyboard;assembly=Tango.Touch"
             mc:Ignorable="d" 
             d:DesignHeight="1080" d:DesignWidth="1920" d:DataContext="{d:DesignInstance Type=vm:LayoutViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.LayoutViewVM}">

    <UserControl.Resources>
        <localConverters:ItemBaseConverter x:Key="NotificationItemConverter" />
        <localConverters:AppBarItemConverter x:Key="AppBarItemConverter" />
        <localConverters:ItemBaseConverter x:Key="ItemBaseConverter" />
        <localConverters:ComapareModulNameConverter x:Key="ComapareModulNameConverter"/>
    </UserControl.Resources>


    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>

        <Grid Background="{StaticResource TangoPrimaryBackgroundBrush}">
            <Viewbox Stretch="Fill" Width="350">
                <Grid Width="204" Height="750" >
                    <Border TextElement.FontSize="16" x:Name="border" BorderThickness="0 0 0 0" BorderBrush="{StaticResource TangoDarkForegroundBrush}" TextElement.Foreground="{StaticResource TangoDarkForegroundBrush}">
                        <Grid Background="{StaticResource TangoMenuPanelDarkBrush}" >
                            <StackPanel VerticalAlignment="Top">
                                <Border Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 0" >
                                    <Grid >
                                        <Border Height="71" Background="{StaticResource TangoPrimaryBackgroundBrush}">
                                            <Border.Effect>
                                                <DropShadowEffect Color="Silver" ShadowDepth="0"  BlurRadius="20" Opacity="1" />
                                            </Border.Effect>
                                        </Border>
                                        <StackPanel >
                                            <DockPanel Background="{StaticResource TangoMenuPanelDarkBrush}">
                                               <Image Source="/Images/logo.png" Stretch="Uniform" HorizontalAlignment="Center" Margin="0 10 10 10" Width="157" Height="51"></Image>
                                            </DockPanel>
                                        </StackPanel>
                                    </Grid>
                                </Border>
                                <touch:TouchButton  Command="{Binding MenuOrBackCommand}" Padding="8" Style="{StaticResource TangoFlatButton}" Width="164" Height="32" IsHitTestVisible="{Binding NavigationManager.IsNavigating,Converter={StaticResource BooleanInverseConverter}}" 
                                                   IsEnabled="{Binding NavigationManager.CanNavigateBack}" BorderThickness="0"
                                                   Foreground="{StaticResource TangoLightForegroundBrush}" Background="{StaticResource TangoMidAccentBrush}" CornerRadius="18" Margin="0 8 0 8">
                                   
                                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                                            <touch:TouchIcon Icon="ArrowLeft" Background="Transparent" Width="30" BorderThickness="0" >
                                                <touch:TouchIcon.Style>
                                                <Style TargetType="touch:TouchIcon" BasedOn="{StaticResource {x:Type touch:TouchIcon}}">
                                                    <Style.Triggers>
                                                    <Trigger Property="IsEnabled" Value="False">
                                                        <Setter Property="Foreground" Value="{StaticResource TangoDisabledBackgroundBrush}"></Setter>
                                                    </Trigger>
                                                </Style.Triggers>
                                                    </Style>
                                            </touch:TouchIcon.Style>
                                                </touch:TouchIcon>
                                            <TextBox BorderThickness="0" Background="Transparent" Height="32" FontSize="{StaticResource TangoComboBoxItemFontSize}" VerticalAlignment="Center" Foreground="{StaticResource TangoLightForegroundBrush}"  Margin="0 0 0 0" VerticalContentAlignment="Center" >Back</TextBox>
                                        </StackPanel>
                                   
                                </touch:TouchButton>
                               
                                <ItemsControl ItemsSource="{Binding ModuleLoader.UserModules}" Margin="0 0 0 0">
                                    <ItemsControl.ItemTemplate>
                                        <DataTemplate>
                                            <Border Visibility="{Binding DockToBottom,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
                                                <Border BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 0" Visibility="{Binding IsVisibleInMenu,Converter={StaticResource BooleanToVisibilityConverter}}">
                                                    <touch:TouchButton Height="45" Margin="0 0 0 0" Padding="10 0"  Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ModuleNavigationCommand}" CommandParameter="{Binding Name}" >
                                                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                                                            <Image VerticalAlignment="Center" Source="{Binding Image}" Width="20" Height="20"></Image>
                                                            <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" Text="{Binding Name}"  FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="Light"></TextBlock>
                                                        </StackPanel>
                                                        <touch:TouchButton.Style>
                                                            <Style TargetType="touch:TouchButton" BasedOn="{StaticResource TangoFlatButton}" >
                                                                <Setter Property="Foreground" Value="{StaticResource TangoLightForegroundBrush}"></Setter>
                                                                <Setter Property="Background" Value="Transparent"/>
                                                                <Style.Triggers>
                                                                    <DataTrigger  Value="True">
                                                                        <DataTrigger.Binding>
                                                                            <MultiBinding Converter="{StaticResource ComapareModulNameConverter}" Delay="100">
                                                                                <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.NavigationManager.CurrentModule"></Binding>
                                                                                <Binding Path="Name"></Binding>
                                                                            </MultiBinding>
                                                                        </DataTrigger.Binding>
                                                                        <DataTrigger.Setters>
                                                                            <Setter Property="Foreground" Value="{StaticResource TangoDarkForegroundBrush}"></Setter>
                                                                            <Setter Property="Background" Value="{StaticResource TangoMidBackgroundBrush}"></Setter>
                                                                        </DataTrigger.Setters>
                                                                    </DataTrigger>
                                                                </Style.Triggers>
                                                            </Style>
                                                        </touch:TouchButton.Style>
                                                    </touch:TouchButton>
                                                </Border>
                                            </Border>
                                        </DataTemplate>
                                    </ItemsControl.ItemTemplate>
                                </ItemsControl>

                                <StackPanel Margin="0 5 0 0">
                                    <Border BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 0">
                                        <touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="10 0" Height="45" Foreground="{StaticResource TangoDarkForegroundBrush}" Command="{Binding UpdateCommand}">
                                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                                                <Image Source="/Images/Menu/update.png" VerticalAlignment="Center" Width="20" Height="20"></Image>
                                                <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" Foreground="{StaticResource TangoLightForegroundBrush}" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="Light">Update</TextBlock>
                                            </StackPanel>
                                        </touch:TouchButton>
                                    </Border>
                                </StackPanel>
                                <StackPanel Margin="0 5 0 0">
                                    <Border BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 0">
                                        <touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="10 0" Height="45" Foreground="{StaticResource TangoDarkForegroundBrush}" Command="{Binding PowerCommand}">
                                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                                                <Image Source="/Images/menu/power.png" VerticalAlignment="Center" Width="20" Height="20" ></Image>
                                                <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" Foreground="{StaticResource TangoLightForegroundBrush}" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="Light">Power</TextBlock>
                                            </StackPanel>
                                        </touch:TouchButton>
                                    </Border>
                                </StackPanel>
                            </StackPanel>

                            <Grid VerticalAlignment="Bottom">

                                <StackPanel Orientation="Vertical">
                                    <Border  Background="Transparent" Padding="5">
                                        <UniformGrid Columns="5" Rows="1">
                                           
                                            <touch:TouchIcon Width="20" Height="20" VerticalAlignment="Center">
                                                <touch:TouchIcon.Style>
                                                    <Style TargetType="touch:TouchIcon" BasedOn="{StaticResource {x:Type touch:TouchIcon}}">
                                                        <Setter Property="Icon" Value="WifiStrengthOff"></Setter>
                                                        <Setter Property="Foreground" Value="{StaticResource TangoGrayBrush}"></Setter>
                                                        <Style.Triggers>
                                                            <DataTrigger Binding="{Binding ConnectivityProvider.IsConnected}" Value="True">
                                                                <Setter Property="Icon" Value="Wifi"></Setter>
                                                                <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"></Setter>
                                                            </DataTrigger>
                                                        </Style.Triggers>
                                                    </Style>
                                                </touch:TouchIcon.Style>
                                            </touch:TouchIcon>

                                            <touch:TouchIcon Margin="10 0 0 0" Width="18" Height="18" VerticalAlignment="Center">
                                                <touch:TouchIcon.Style>
                                                    <Style TargetType="touch:TouchIcon" BasedOn="{StaticResource {x:Type touch:TouchIcon}}">
                                                        <Setter Property="Icon" Value="LanDisconnect"></Setter>
                                                        <Setter Property="Foreground" Value="{StaticResource TangoGrayBrush}"></Setter>
                                                        <Style.Triggers>
                                                            <DataTrigger Binding="{Binding ConnectivityProvider.IsLanConnected}" Value="True">
                                                                <Setter Property="Icon" Value="LanConnect"></Setter>
                                                                <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"></Setter>
                                                            </DataTrigger>
                                                        </Style.Triggers>
                                                    </Style>
                                                </touch:TouchIcon.Style>
                                            </touch:TouchIcon>

                                            <touch:TouchIcon Margin="10 0 0 0" Width="18" Height="18" VerticalAlignment="Center" Icon="Bridge" Visibility="{Binding ExternalBridgeService.Enabled,Converter={StaticResource BooleanToVisibilityConverter}}">
                                                <touch:TouchIcon.Style>
                                                    <Style TargetType="touch:TouchIcon">
                                                        <Setter Property="Foreground" Value="{StaticResource TangoGrayBrush}"></Setter>
                                                        <Style.Triggers>
                                                            <DataTrigger Binding="{Binding ExternalBridgeService.HasSessions}" Value="True">
                                                                <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"></Setter>
                                                            </DataTrigger>
                                                        </Style.Triggers>
                                                    </Style>
                                                </touch:TouchIcon.Style>
                                            </touch:TouchIcon>

                                            <touch:TouchIcon Margin="10 0 0 0" Width="18" Height="18" VerticalAlignment="Center" Foreground="{StaticResource TangoSuccessBrush}" Icon="RemoteDesktop" /> 
                                            <!--Visibility="{Binding RemoteDesktopService.InSession,Converter={StaticResource BooleanToVisibilityConverter}}"-->

                                            <touch:TouchIcon Margin="10 0 0 0" Width="20" Height="20" Icon="HddSolid">
                                                <touch:TouchIcon.Style>
                                                    <Style TargetType="touch:TouchIcon" BasedOn="{StaticResource {x:Type touch:TouchIcon}}">
                                                        <Setter Property="Foreground" Value="{StaticResource TangoGrayBrush}"></Setter>
                                                        <Style.Triggers>
                                                            <DataTrigger Binding="{Binding StorageProvider.IsConnected}" Value="True">
                                                                <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"></Setter>
                                                            </DataTrigger>
                                                        </Style.Triggers>
                                                    </Style>
                                                </touch:TouchIcon.Style>
                                            </touch:TouchIcon>

                                        </UniformGrid>
                                    </Border>
                                    <Border Height="1"  Margin="10" Background="{StaticResource TangoDividerBrush}"></Border>
                                    <TextBlock VerticalAlignment="Center"  Text="{Binding CurrentDateTime, StringFormat='{}{0:HH:mm  MM/dd/yyyy}'}" FontSize="18" Foreground="{StaticResource TangoPrimaryBackgroundBrush}" HorizontalAlignment="Center" Margin="0 0 0 16" FontWeight="Light"></TextBlock>
                                </StackPanel>
                               
                                
                            </Grid>
                        </Grid>
                    </Border>
                </Grid>
            </Viewbox>

            <Grid Background="{StaticResource TangoPanelMaskBrushLight}" Visibility="{Binding NotificationProvider.HasDialogOrMessage,Converter={StaticResource BooleanToVisibilityConverter}}">

            </Grid>
        </Grid>

        <Grid Background="Gainsboro" Grid.Column="2">
            <Viewbox Stretch="Fill" Width="1246" Height="1400">
                <local:MachineStatusView />
            </Viewbox>
        </Grid>

        <Grid Grid.Column="1" Background="{StaticResource TangoPrimaryBackgroundBrush}">
            <Grid>
                <!--<Viewbox>-->
                    <touch:TouchPanelEureka Margin="0 -40 0 0" Width="900" Height="1445" 
            HasMessageBox="{Binding NotificationProvider.HasMessageBox}" 
            CurrentMessageBox="{Binding NotificationProvider.CurrentMessageBox}" 
            HasDialog="{Binding NotificationProvider.HasDialog}"
            CurrentDialog="{Binding NotificationProvider.CurrentDialog}"
            IsBusy="{Binding NotificationProvider.IsInGlobalBusyState}"
            BusyMessage="{Binding NotificationProvider.GlobalBusyMessage}">
                        <Grid>
                            <DockPanel>
                                <Border BorderThickness="0 0 0 0" BorderBrush="{StaticResource TangoDividerBrush}" DockPanel.Dock="Top" Height="41">
                                    <DockPanel Visibility="Collapsed">
                                        <Border Height="101" BorderThickness="0 0 0 0" BorderBrush="{StaticResource TangoDividerBrush}">
                                            <!--<touch:TouchHamburgerButton IsHitTestVisible="{Binding NavigationManager.IsNavigating,Converter={StaticResource BooleanInverseConverter}}" IsEnabled="{Binding NavigationManager.IsBackEnabled}" Width="100" Height="100" Padding="15" Command="{Binding MenuOrBackCommand}" EnableDropShadow="False" Foreground="{StaticResource TangoPrimaryAccentBrush}" IsBack="{Binding NavigationManager.CanNavigateBack}"/>-->
                                        </Border>

                                        <Grid DockPanel.Dock="Right" Margin="0 0 20 0">
                                            <StackPanel Orientation="Horizontal">
                                                <Grid>
                                                    <StackPanel Visibility="Hidden" x:Name="techPressElement" VerticalAlignment="Center" Background="Transparent">
                                                        <locaControls:MachineStatusControl HorizontalAlignment="Center" DataContext="{Binding MachineProvider.MachineOperator}" />
                                                        <TextBlock Margin="0 10 0 0" Text="{Binding MachineProvider.MachineOperator.Status,Converter={StaticResource EnumToDescriptionConverter}}"></TextBlock>
                                                    </StackPanel>

                                                    <Grid Visibility="Hidden" IsHitTestVisible="False" HorizontalAlignment="Center">
                                                        <Grid.Style>
                                                            <Style TargetType="Grid">
                                                                <Setter Property="Visibility" Value="Hidden"></Setter>
                                                                <Style.Triggers>
                                                                    <DataTrigger Binding="{Binding MachineProvider.MachineOperator.MachineStatus.AutoInkFillingEnabled}" Value="True">
                                                                        <Setter Property="Visibility" Value="Visible"></Setter>
                                                                    </DataTrigger>
                                                                    <DataTrigger Binding="{Binding MachineProvider.MachineOperator.IsConnected}" Value="False">
                                                                        <Setter Property="Visibility" Value="Hidden"></Setter>
                                                                    </DataTrigger>
                                                                </Style.Triggers>
                                                            </Style>
                                                        </Grid.Style>
                                                        <touch:TouchIcon Icon="InvertColors" Foreground="#151515" Width="18" Height="18" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 6 -30 0"></touch:TouchIcon>
                                                    </Grid>
                                                </Grid>
                                            </StackPanel>
                                        </Grid>

                                        <Grid>

                                            <Grid Margin="20 0 60 0" Height="80" Visibility="{Binding NotificationProvider.HasAppBarItems,Converter={StaticResource BooleanToVisibilityConverter}}">
                                                <ItemsControl ItemsSource="{Binding NotificationProvider.AppBarItems}">
                                                    <ItemsControl.ItemsPanel>
                                                        <ItemsPanelTemplate>
                                                            <Grid IsItemsHost="True" />
                                                        </ItemsPanelTemplate>
                                                    </ItemsControl.ItemsPanel>
                                                    <ItemsControl.ItemTemplate>
                                                        <DataTemplate>
                                                            <Grid Background="{StaticResource TangoPrimaryBackgroundBrush}">
                                                                <ContentControl Content="{Binding Converter={StaticResource AppBarItemConverter}}"></ContentControl>
                                                            </Grid>
                                                        </DataTemplate>
                                                    </ItemsControl.ItemTemplate>
                                                </ItemsControl>
                                            </Grid>
                                        </Grid>
                                    </DockPanel>
                                </Border>

                                <Border Margin="0 0 0 0" DockPanel.Dock="Top" Visibility="{Binding IsInkFillingOrWasteEmptying,Converter={StaticResource BooleanToVisibilityConverter}}">
                                    <ItemsControl ItemsSource="{Binding Cartridges}">
                                        <ItemsControl.ItemTemplate>
                                            <DataTemplate>
                                                <Border Margin="0 5 0 0" Visibility="{Binding InProgress,Converter={StaticResource BooleanToVisibilityConverter}}">
                                                    <StackPanel>
                                                        <DockPanel Margin="2 0 0 0">
                                                            <touch:TouchIcon>
                                                                <touch:TouchIcon.Style>
                                                                    <Style TargetType="touch:TouchIcon" BasedOn="{StaticResource {x:Type touch:TouchIcon}}">
                                                                        <Setter Property="Icon" Value="Recycle"></Setter>
                                                                        <Style.Triggers>
                                                                            <DataTrigger Binding="{Binding Status.Cartridge.Slot}" Value="Ink">
                                                                                <Setter Property="Icon" Value="FormatColorFill"></Setter>
                                                                            </DataTrigger>
                                                                        </Style.Triggers>
                                                                    </Style>
                                                                </touch:TouchIcon.Style>
                                                            </touch:TouchIcon>
                                                            <TextBlock VerticalAlignment="Center" Margin="5 0 0 0" Text="{Binding Message,Mode=OneWay}" FontSize="{StaticResource TangoSmallFontSize}"></TextBlock>
                                                        </DockPanel>
                                                        <touch:TouchProgressBar Foreground="{Binding Brush,Mode=OneWay}" Background="#DBDBDB" Height="3" Margin="0 2 0 0" Minimum="0" Maximum="100" Value="{Binding Status.ProgressPercentage}" />
                                                    </StackPanel>
                                                </Border>
                                            </DataTemplate>
                                        </ItemsControl.ItemTemplate>
                                    </ItemsControl>
                                </Border>

                                <Grid Background="{StaticResource TangoPrimaryBackgroundBrush}">
                                    <controls:NavigationControl x:Name="NavigationControl" x:FieldModifier="public" TransitionAlwaysFades="False" TransitionType="Fade" KeepElementsAttached="False" UseDefferedRendering="True">
                                        <!--MODULES GOES HERE-->
                                    </controls:NavigationControl>
                                </Grid>
                            </DockPanel>
                        </Grid>
                    </touch:TouchPanelEureka>
                <!--</Viewbox>-->
            </Grid>
        </Grid>

        <Grid PreviewMouseUp="Grid_PreviewMouseUp" IsHitTestVisible="True" Background="Transparent" Visibility="{Binding ApplicationManager.IsScreenLocked,Converter={StaticResource BooleanToVisibilityConverter}}" Grid.ColumnSpan="3">
            <touch:TouchIcon HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="40" Icon="Lock" Width="60" Height="60" Opacity="0.5" Foreground="{StaticResource TangoSuccessBrush}" />
        </Grid>
    </Grid>

</UserControl>