aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Modules/Tango.FSE.MachineConfiguration/Views/SettingsView.xaml
blob: 50e1d1d5c27ef39e3c8f9de54527f27aadb62ad4 (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
<UserControl x:Class="Tango.FSE.MachineConfiguration.Views.SettingsView"
             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.FSE.MachineConfiguration.Views"
             xmlns:global="clr-namespace:Tango.FSE.MachineConfiguration"
             xmlns:auth="clr-namespace:Tango.FSE.Common.Authorization;assembly=Tango.FSE.Common"
             xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:vm="clr-namespace:Tango.FSE.MachineConfiguration.ViewModels"
             xmlns:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL"
             xmlns:commonControls="clr-namespace:Tango.FSE.Common.Controls;assembly=Tango.FSE.Common"
             xmlns:resolution="clr-namespace:Tango.FSE.Common.Resolution;assembly=Tango.FSE.Common"
             xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
             xmlns:autoComplete="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete"
             mc:Ignorable="d" 
             d:DesignHeight="2000" d:DesignWidth="1920" d:DataContext="{d:DesignInstance Type=vm:SettingsViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.SettingsViewVM}" d:DesignStyle="{StaticResource FSE_User_Control_Designer}">

    <Grid Margin="0 20">

        <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Padding="0 0 20 0" FocusVisualStyle="{x:Null}">

            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="4*" />
                    <ColumnDefinition Width="5*" />
                </Grid.ColumnDefinitions>

                <!--<Grid Grid.Column="1">
                    <commonControls:MachineView Opacity="0.6" DataContext="{Binding EditingComposition.Machine}" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="50 100 50 50" MaxWidth="600" />
                </Grid>-->

                <StackPanel Grid.Column="0" >

                    <GroupBox Margin="0 20" Style="{StaticResource FSE_Game_GroupBox}" Header="Provisioning" auth:AuthorizationHelper.Mode="Disabled" auth:AuthorizationHelper.Permission="FSE_ModifyMachineProvisioning">
                        <StackPanel Margin="0 0 0 5">
                            <DockPanel VerticalAlignment="Top" Margin="0 10 0 0" ToolTip="Activate the windows operating system license">
                                <ToggleButton IsChecked="{Binding EditingComposition.Machine.SetupActivation}" />
                                <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">Activate Windows License</TextBlock>
                            </DockPanel>

                            <StackPanel Margin="43 0 0 0">
                                <TextBlock Foreground="{StaticResource FSE_GrayBrush}" FontSize="{StaticResource FSE_SmallerFontSize}">License Key</TextBlock>
                                <TextBox Foreground="{StaticResource FSE_GrayBrush}" Text="{Binding EditingComposition.Machine.OsKey,UpdateSourceTrigger=PropertyChanged}" FontSize="{StaticResource FSE_SmallFontSize}" VerticalAlignment="Center" Style="{StaticResource FSE_Rounded_Corners_TextBox}" Margin="0 2 0 0" Width="250" HorizontalAlignment="Left"></TextBox>
                            </StackPanel>

                            <DockPanel Margin="0 20 0 0" ToolTip="Install Team Viewer for remote desktop support">
                                <ToggleButton IsChecked="{Binding EditingComposition.Machine.SetupRemoteAssistance}" />
                                <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">Setup Team Viewer</TextBlock>
                            </DockPanel>

                            <DockPanel Margin="0 20 0 0" ToolTip="Perform UWF activation for protecting the disk by resetting file system changes after each system restart">
                                <ToggleButton IsChecked="{Binding EditingComposition.Machine.SetupUwf}" />
                                <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">Activate Disk Protection (TS-1800)</TextBlock>
                            </DockPanel>

                            <DockPanel Margin="0 20 0 0" ToolTip="Connect the panel PC application to an in-memory emulator (for testing purpose only)">
                                <ToggleButton IsChecked="{Binding EditingComposition.Machine.IsDemo}" />
                                <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">Use Firmware Emulator (Demo Machine)</TextBlock>
                            </DockPanel>

                            <DockPanel Margin="0 20 0 0" ToolTip="Enables sending text messages to mobile phones. (requires machine database update)">
                                <ToggleButton IsChecked="{Binding EditingComposition.Machine.AllowSmsNotifications}" />
                                <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">Allow SMS Notifications</TextBlock>
                            </DockPanel>

                            <StackPanel Margin="2 40 0 0">

                                <Separator Margin="0 10" />

                                <TextBlock FontWeight="SemiBold" Foreground="{StaticResource FSE_RedBrush}">Device Registration</TextBlock>

                                <DockPanel>
                                    <StackPanel>

                                        <TextBlock Margin="0 5 0 0" FontSize="{StaticResource FSE_SmallFontSize}">
                            <Run>Registered:</Run>
                            <Run Foreground="{StaticResource FSE_GrayBrush}" Text="{Binding EditingComposition.Machine.IsDeviceRegistered,Mode=OneWay,Converter={StaticResource BooleanToYesNoConverter},FallbackValue='No'}"></Run>
                                        </TextBlock>

                                        <TextBlock Margin="0 5 0 0" FontSize="{StaticResource FSE_SmallFontSize}">
                            <Run>Device ID:</Run>
                            <Run Foreground="{StaticResource FSE_GrayBrush}" Text="{Binding EditingComposition.Machine.DeviceId,Mode=OneWay,FallbackValue='N/A',TargetNullValue='N/A'}"></Run>
                                        </TextBlock>

                                        <TextBlock Margin="0 5 0 0" FontSize="{StaticResource FSE_SmallFontSize}">
                            <Run>Device Name:</Run>
                            <Run Foreground="{StaticResource FSE_GrayBrush}" Text="{Binding EditingComposition.Machine.DeviceName,Mode=OneWay,FallbackValue='N/A',TargetNullValue='N/A'}"></Run>
                                        </TextBlock>
                                    </StackPanel>

                                    <Button Width="180" Command="{Binding ResetDeviceRegistrationCommand}" Margin="0 0 10 0" ToolTip="Device registration protects the system from provisioning of the same machine on multiple devices (panel PC's). Use this reset option when replacing an existing panel PC with a new one." IsEnabled="{Binding Machine.IsDeviceRegistered}" Cursor="Hand" HorizontalAlignment="Right" FontSize="{StaticResource FSE_SmallFontSize}" VerticalAlignment="Bottom" Style="{StaticResource FSE_Button_Red}">Reset Device Registration</Button>
                                </DockPanel>
                            </StackPanel>

                            <StackPanel Margin="2 40 0 0">

                                <Separator Margin="0 10" />

                                <TextBlock FontWeight="SemiBold" Foreground="{StaticResource FSE_RedBrush}">Machine Counters</TextBlock>

                                <DockPanel>
                                    <StackPanel>

                                        <TextBlock Margin="0 5 0 0" FontSize="{StaticResource FSE_SmallFontSize}">
                                            <Run>Total Dye Time:</Run>
                                            <Run Foreground="{StaticResource FSE_GrayBrush}" Text="{Binding EditingComposition.TotalDyeTime,Mode=OneWay,FallbackValue='N/A',TargetNullValue='N/A'}"></Run>
                                        </TextBlock>

                                        <TextBlock Margin="0 5 0 0" FontSize="{StaticResource FSE_SmallFontSize}">
                                            <Run>Total Dye Meters:</Run>
                                            <Run Foreground="{StaticResource FSE_GrayBrush}" Text="{Binding EditingComposition.TotalDyeMeters,Mode=OneWay,FallbackValue='N/A',TargetNullValue='N/A'}"></Run>
                                        </TextBlock>
                                    </StackPanel>

                                    <Button Width="180" Command="{Binding ResetCountersCommand}" Margin="0 0 10 0" ToolTip="Reset the entire job runs history for this machine" IsEnabled="{Binding Machine.IsDeviceRegistered}" Cursor="Hand" HorizontalAlignment="Right" FontSize="{StaticResource FSE_SmallFontSize}" VerticalAlignment="Bottom" Style="{StaticResource FSE_Button_Red}">Reset Machine Counters</Button>
                                </DockPanel>
                            </StackPanel>
                        </StackPanel>
                    </GroupBox>

                    <GroupBox Margin="0 20" Style="{StaticResource FSE_Game_GroupBox}" Header="Machine Update" auth:AuthorizationHelper.Mode="Disabled" auth:AuthorizationHelper.Permission="FSE_ModifyMachineUpdate">
                        <StackPanel Margin="0 10 0 5">
                            <DockPanel ToolTip="Prevent firmware upgrade when updating">
                                <ToggleButton material:ToggleButtonAssist.SwitchTrackOnBackground="{StaticResource FSE_PrimaryBackgroundLighterBrush}"  IsChecked="{Binding EditingComposition.Machine.SetupFirmware,Converter={StaticResource BooleanInverseConverter}}" />
                                <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">Disable Firmware Upgrade</TextBlock>
                            </DockPanel>

                            <DockPanel Margin="0 20 0 0" ToolTip="Force the machine to perform an update even if there is no update available">
                                <ToggleButton IsChecked="{Binding EditingComposition.Machine.ForceVersionUpdate}" />
                                <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">Force Version Update</TextBlock>
                            </DockPanel>

                            <DockPanel Margin="0 20 0 0" ToolTip="Prevent this machine from updating software">
                                <ToggleButton IsChecked="{Binding EditingComposition.Machine.SuspendVersionUpdate}" />
                                <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">Suspend Version Update</TextBlock>
                            </DockPanel>
                        </StackPanel>
                    </GroupBox>

                    <GroupBox Margin="0 20" Style="{StaticResource FSE_Game_GroupBox}" Header="Machine Identity" auth:AuthorizationHelper.Mode="Disabled" auth:AuthorizationHelper.Permission="FSE_ModifyMachineIdentity">
                        <StackPanel Margin="0 0 0 5">

                            <StackPanel Margin="0 10 0 0">
                                <TextBlock FontSize="{StaticResource FSE_SmallFontSize}" Foreground="{StaticResource FSE_GrayBrush}">Serial Number</TextBlock>
                                <TextBox Margin="0 2 0 0" Text="{Binding EditingComposition.Machine.SerialNumber}" Width="250" HorizontalAlignment="Left"></TextBox>
                            </StackPanel>

                            <StackPanel Margin="0 20 0 0">
                                <TextBlock FontSize="{StaticResource FSE_SmallFontSize}" Foreground="{StaticResource FSE_GrayBrush}">Name</TextBlock>
                                <TextBox Margin="0 2 0 0" Text="{Binding EditingComposition.Machine.Name}" Width="250" HorizontalAlignment="Left"></TextBox>
                            </StackPanel>

                            <StackPanel Margin="0 20 0 0">
                                <TextBlock FontSize="{StaticResource FSE_SmallFontSize}" Foreground="{StaticResource FSE_GrayBrush}">Organization</TextBlock>
                                <ComboBox Width="250" HorizontalAlignment="Left" ItemsSource="{Binding EditingComposition.Organizations}" SelectedItem="{Binding EditingComposition.Machine.Organization}" DisplayMemberPath="Name" />
                            </StackPanel>

                            <StackPanel Margin="0 20 0 0">
                                <TextBlock FontSize="{StaticResource FSE_SmallFontSize}" Foreground="{StaticResource FSE_GrayBrush}">Site</TextBlock>
                                <ComboBox Width="250" HorizontalAlignment="Left" ItemsSource="{Binding Sites}" SelectedItem="{Binding SelectedSite}" DisplayMemberPath="Name" />
                            </StackPanel>

                            <StackPanel Margin="0 20 0 0">
                                <TextBlock FontSize="{StaticResource FSE_SmallFontSize}" Foreground="{StaticResource FSE_GrayBrush}">Version Tag</TextBlock>
                                <ComboBox Width="250" HorizontalAlignment="Left" ItemsSource="{Binding EditingComposition.Tags}" SelectedItem="{Binding EditingComposition.Machine.VersionTag}" />
                            </StackPanel>
                        </StackPanel>
                    </GroupBox>

                    <GroupBox Margin="0 20" Style="{StaticResource FSE_Game_GroupBox}" Header="Hardware" auth:AuthorizationHelper.Mode="Disabled" auth:AuthorizationHelper.Permission="FSE_ModifyMachineHardware">
                        <StackPanel>
                            <StackPanel Margin="0 10 0 0">
                                <TextBlock FontSize="{StaticResource FSE_SmallFontSize}" Foreground="{StaticResource FSE_GrayBrush}">Head Type</TextBlock>
                                <ComboBox Width="250" HorizontalAlignment="Left" ItemsSource="{Binding Source={x:Type enumerations:HeadTypes},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding EditingComposition.Machine.MachineHeadType}" SelectedValuePath="Value" DisplayMemberPath="DisplayName" />
                            </StackPanel>

                            <StackPanel Margin="0 20 0 0">
                                <TextBlock FontSize="{StaticResource FSE_SmallFontSize}" Foreground="{StaticResource FSE_GrayBrush}">Hardware Version</TextBlock>
                                <controls:SearchComboBox MinWidth="250" HorizontalAlignment="Left" ItemsSource="{Binding EditingComposition.HardwareVersions}" SelectedItem="{Binding EditingComposition.Machine.Configuration.HardwareVersion}" SearchProperty="FullName" />
                            </StackPanel>

                            <DockPanel Margin="0 20 0 0" ToolTip="Determines whether this machine supports light inks">
                                <ToggleButton IsChecked="{Binding EditingComposition.Machine.LightInksInstalled}" />
                                <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">Light Inks Installed</TextBlock>
                            </DockPanel>

                            <DockPanel Margin="0 20 0 0" ToolTip="Determines whether this machine supports BTSR">
                                <ToggleButton IsChecked="{Binding EditingComposition.Machine.BtsrInstalled}" />
                                <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">BTSR Installed</TextBlock>
                            </DockPanel>
                        </StackPanel>
                    </GroupBox>
                </StackPanel>
            </Grid>
        </ScrollViewer>

        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="4*" />
                <ColumnDefinition Width="5*" />
            </Grid.ColumnDefinitions>

            <Grid Grid.Column="1" Margin="0 0 50 0">
                <DockPanel>
                    <Button Command="{Binding SaveCommand}" DockPanel.Dock="Bottom" VerticalAlignment="Top" HorizontalAlignment="Center" Width="250" Height="50" Margin="0 -40 0 0" material:ButtonAssist.CornerRadius="25">
                        <DockPanel>
                            <material:PackIcon Kind="ContentSave" />
                            <TextBlock Margin="5 0 0 0">SAVE</TextBlock>
                        </DockPanel>
                    </Button>
                    <commonControls:MachineView Opacity="0.6" DataContext="{Binding EditingComposition.Machine}" HorizontalAlignment="Center" VerticalAlignment="Top" resolution:ResolutionHelper.HighResolutionMargin="50 50 50 50" resolution:ResolutionHelper.LowResolutionMargin="50 0 50 50" MaxWidth="600" />
                </DockPanel>
            </Grid>
        </Grid>
    </Grid>
</UserControl>