aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml
blob: 4f846a46dde808b774f52666769a727a4059070a (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
<UserControl x:Class="Tango.PPC.MachineSettings.Views.MainView"
             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:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL"
             xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
             xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
             xmlns:vm="clr-namespace:Tango.PPC.MachineSettings.ViewModels"
             xmlns:connectivity="clr-namespace:Tango.PPC.Common.Connectivity;assembly=Tango.PPC.Common"
             xmlns:global="clr-namespace:Tango.PPC.MachineSettings"
             xmlns:local="clr-namespace:Tango.PPC.MachineSettings.Views"
             mc:Ignorable="d" 
             d:DesignHeight="2000" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">

    <Grid Background="{StaticResource TangoMidBackgroundBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="1*"/>
        </Grid.RowDefinitions>

        <Border Padding="20" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}">
            <Border.Effect>
                <DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" />
            </Border.Effect>
            <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold">Settings</TextBlock>
        </Border>

        <Grid Grid.Row="1">
            <DockPanel>
                <Grid Background="{StaticResource TangoPrimaryBackgroundBrush}" DockPanel.Dock="Bottom">
                    <StackPanel Margin="50 20" Orientation="Horizontal" HorizontalAlignment="Right">
                        <!--<touch:TouchButton Style="{StaticResource TangoHollowButton}" Width="200" Height="60" CornerRadius="30" Margin="0 0 30 0" Command="{Binding DiscardCommand}">DISCARD</touch:TouchButton>-->
                        <touch:TouchButton Width="200" Height="60" CornerRadius="30" Command="{Binding SaveCommand}">SAVE</touch:TouchButton>
                    </StackPanel>
                </Grid>

                <Grid ClipToBounds="True">
                    <Grid x:Name="Container">
                        <touch:LightTouchScrollViewer>
                            <StackPanel Margin="50">
                                <!--WIFI-->
                                <touch:TouchExpander Header="Connectivity" IsExpanded="True" FontSize="{StaticResource TangoExpanderHeaderFontSize}">
                                    <StackPanel Margin="10 30 10 10">
                                        <connectivity:AvailableWiFiConnectionsControl DataContext="{Binding ConnectivityProvider}" />

                                        <controls:TableGrid Margin="10" RowHeight="60" MakeFirstColumnVerticalAlignmentBottom="False" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
                                            <TextBlock VerticalAlignment="Center">Enable Hot Spot</TextBlock>
                                            <touch:TouchToggleSlider Style="{StaticResource TangoToggleButtonGrayAccent}" HorizontalAlignment="Right" Margin="0 0 110 0" Width="90" IsChecked="{Binding EnableHotSpot}"></touch:TouchToggleSlider>


                                            <TextBlock VerticalAlignment="Bottom">Hot Spot Password</TextBlock>
                                            <touch:TouchTextBox IsPassword="True" Watermark="•••••••" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="200" Text="{Binding HotSpotPassword}" KeyboardContainer="{Binding ElementName=Container}"></touch:TouchTextBox>
                                        </controls:TableGrid>

                                        <DockPanel Margin="10 -40 0 0">
                                            <touch:TouchIcon VerticalAlignment="Top" Icon="InformationOutline" Foreground="{StaticResource TangoGrayTextBrush}"></touch:TouchIcon>
                                            <TextBlock Margin="10 0 0 0" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="{StaticResource TangoSmallFontSize}" Foreground="{StaticResource TangoGrayTextBrush}">
                                                Enabling a hot-spot will create a wireless network dedicated to this machine.
                                            </TextBlock>
                                        </DockPanel>
                                    </StackPanel>
                                </touch:TouchExpander>

                                <!--EXTERNAL BRIDGE-->
                                <touch:TouchExpander Margin="0 20 0 0" Header="External Bridge" IsExpanded="True" FontSize="{StaticResource TangoExpanderHeaderFontSize}">
                                    <StackPanel>
                                        <controls:TableGrid Margin="10" RowHeight="70" MakeFirstColumnVerticalAlignmentBottom="False" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
                                            <TextBlock VerticalAlignment="Center">Enable External Bridge Service</TextBlock>
                                            <touch:TouchToggleSlider Style="{StaticResource TangoToggleButtonGrayAccent}" HorizontalAlignment="Right" Margin="0 0 110 0" Width="90" IsChecked="{Binding EnableExternalBridge}"></touch:TouchToggleSlider>

                                            <TextBlock VerticalAlignment="Bottom">External Bridge Password</TextBlock>
                                            <touch:TouchTextBox IsPassword="True" Watermark="•••••••" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="200" Text="{Binding ExternalBridgePassword}" KeyboardContainer="{Binding ElementName=Container}"></touch:TouchTextBox>
                                        </controls:TableGrid>

                                        <DockPanel Margin="10 -50 0 0">
                                            <touch:TouchIcon VerticalAlignment="Top" Icon="InformationOutline" Foreground="{StaticResource TangoGrayTextBrush}"></touch:TouchIcon>
                                            <TextBlock Margin="10 0 0 0" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="{StaticResource TangoSmallFontSize}" Foreground="{StaticResource TangoGrayTextBrush}">
                                                Enabling the external bridge service allows external Twine applications to interact with this machine over the local network.
                                            </TextBlock>
                                        </DockPanel>
                                    </StackPanel>
                                </touch:TouchExpander>

                                <!--JOBS-->
                                <touch:TouchExpander Margin="0 20 0 0" Header="JOBS" IsExpanded="True" FontSize="{StaticResource TangoExpanderHeaderFontSize}">
                                    <StackPanel>
                                        <controls:TableGrid Margin="10" RowHeight="70" MakeFirstColumnVerticalAlignmentBottom="False" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
                                            <TextBlock VerticalAlignment="Center">Supported Job Types</TextBlock>
                                            <ItemsControl ItemsSource="{Binding SelectedJobTypes}">
                                                <ItemsControl.ItemsPanel>
                                                    <ItemsPanelTemplate>
                                                        <WrapPanel IsItemsHost="True" Orientation="Horizontal" />
                                                    </ItemsPanelTemplate>
                                                </ItemsControl.ItemsPanel>
                                                <ItemsControl.ItemTemplate>
                                                    <DataTemplate>
                                                        <touch:TouchToggleButton IsChecked="{Binding IsSelected}" Content="{Binding Data}" CornerRadius="5" CheckedContent="{Binding Data}" Padding="10" Margin="5">
                                                            <touch:TouchToggleButton.Style>
                                                                <Style TargetType="touch:TouchToggleButton">
                                                                    <Setter Property="Background" Value="{StaticResource TangoGrayBrush}"></Setter>
                                                                    <Style.Triggers>
                                                                        <Trigger Property="IsChecked" Value="True">
                                                                            <Setter Property="Background" Value="{StaticResource TangoMidAccentBrush}"></Setter>
                                                                        </Trigger>
                                                                    </Style.Triggers>
                                                                </Style>
                                                            </touch:TouchToggleButton.Style>
                                                        </touch:TouchToggleButton>
                                                    </DataTemplate>
                                                </ItemsControl.ItemTemplate>
                                            </ItemsControl>

                                            <TextBlock VerticalAlignment="Center">Supported Color Spaces/Catalogs</TextBlock>
                                            <ItemsControl ItemsSource="{Binding SelectedColorSpaces}">
                                                <ItemsControl.ItemsPanel>
                                                    <ItemsPanelTemplate>
                                                        <WrapPanel IsItemsHost="True" Orientation="Horizontal" />
                                                    </ItemsPanelTemplate>
                                                </ItemsControl.ItemsPanel>
                                                <ItemsControl.ItemTemplate>
                                                    <DataTemplate>
                                                        <touch:TouchToggleButton IsChecked="{Binding IsSelected}" Content="{Binding Data}" CornerRadius="5" CheckedContent="{Binding Data}" Padding="10" Margin="5">
                                                            <touch:TouchToggleButton.Style>
                                                                <Style TargetType="touch:TouchToggleButton">
                                                                    <Setter Property="Background" Value="{StaticResource TangoGrayBrush}"></Setter>
                                                                    <Style.Triggers>
                                                                        <Trigger Property="IsChecked" Value="True">
                                                                            <Setter Property="Background" Value="{StaticResource TangoMidAccentBrush}"></Setter>
                                                                        </Trigger>
                                                                    </Style.Triggers>
                                                                </Style>
                                                            </touch:TouchToggleButton.Style>
                                                        </touch:TouchToggleButton>
                                                    </DataTemplate>
                                                </ItemsControl.ItemTemplate>
                                            </ItemsControl>

                                            <TextBlock VerticalAlignment="Bottom">Default Thread Type</TextBlock>
                                            <touch:TouchComboBox HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="200" ItemsSource="{Binding Adapter.Rmls}" SelectedItem="{Binding Machine.DefaultRml}" DisplayMemberPath="Name" ValuePath="Guid"></touch:TouchComboBox>

                                            <!--<TextBlock VerticalAlignment="Bottom">Default Spool</TextBlock>
                                        <touch:TouchComboBox HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="200" ItemsSource="{Binding Adapter.SpoolTypes}" SelectedItem="{Binding Machine.DefaultSpoolType}" DisplayMemberPath="Name"></touch:TouchComboBox>-->

                                            <TextBlock VerticalAlignment="Bottom">Default Segment Length</TextBlock>
                                            <touch:TouchNumericTextBox HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="200" Minimum="1" Maximum="1000" Value="{Binding Machine.DefaultSegmentLength}" HasDecimalPoint="True" KeyboardContainer="{Binding ElementName=Container}"></touch:TouchNumericTextBox>

                                        </controls:TableGrid>

                                        <DockPanel Margin="10 -50 0 0">
                                            <touch:TouchIcon VerticalAlignment="Top" Icon="InformationOutline" Foreground="{StaticResource TangoGrayTextBrush}"></touch:TouchIcon>
                                            <TextBlock Margin="10 0 0 0" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="{StaticResource TangoSmallFontSize}" Foreground="{StaticResource TangoGrayTextBrush}">
                                                Job settings allows you to set the default configuration for new jobs.
                                            </TextBlock>
                                        </DockPanel>
                                    </StackPanel>
                                </touch:TouchExpander>

                                <!--REMOTE ASSISTANCE-->
                                <touch:TouchExpander Margin="0 20 0 0" Header="Remote Assistance" IsExpanded="True" FontSize="{StaticResource TangoExpanderHeaderFontSize}">
                                    <StackPanel>
                                        <controls:TableGrid Margin="10" RowHeight="70" MakeFirstColumnVerticalAlignmentBottom="False" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
                                            <TextBlock VerticalAlignment="Center">Enable Remote Assistance</TextBlock>
                                            <touch:TouchToggleSlider Style="{StaticResource TangoToggleButtonGrayAccent}" HorizontalAlignment="Right" Margin="0 0 110 0" Width="90" IsChecked="{Binding EnableRemoteAssistance}"></touch:TouchToggleSlider>
                                        </controls:TableGrid>

                                        <DockPanel Margin="10 -50 0 0">
                                            <touch:TouchIcon VerticalAlignment="Top" Icon="InformationOutline" Foreground="{StaticResource TangoGrayTextBrush}"></touch:TouchIcon>
                                            <TextBlock Margin="10 0 0 0" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="{StaticResource TangoSmallFontSize}" Foreground="{StaticResource TangoGrayTextBrush}">
                                                Enable remote assistance for Twine's technicians.
                                            </TextBlock>
                                        </DockPanel>
                                    </StackPanel>
                                </touch:TouchExpander>
                            </StackPanel>
                        </touch:LightTouchScrollViewer>
                    </Grid>
                </Grid>
            </DockPanel>
        </Grid>
    </Grid>
</UserControl>