aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Controls/TimeRuler.cs
blob: 552f8f416a1f9f15540edfacc511e0b8db9c054f (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
und-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
<UserControl x:Class="Tango.MachineStudio.MachineDesigner.Views.SpoolsView"
             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:vm="clr-namespace:Tango.MachineStudio.MachineDesigner.ViewModels"
             xmlns:global="clr-namespace:Tango.MachineStudio.MachineDesigner"
              xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
             xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:local="clr-namespace:Tango.MachineStudio.MachineDesigner.Views"
             xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
             mc:Ignorable="d" 
             d:DesignHeight="720" d:DesignWidth="1280" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">

    <UserControl.Resources>
        <converters:EmptyStringToNullConverter x:Key="EmptyStringToNullConverter" />
    </UserControl.Resources>
    
    <Grid Margin="20">
        <DockPanel>
            <Grid DockPanel.Dock="Bottom">

            </Grid>

            <Grid Margin="0 20">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="38*"/>
                    <ColumnDefinition Width="117*"/>
                </Grid.ColumnDefinitions>

                <local:MachineView Margin="30 80 0 0" DataContext="{Binding ActiveMachine}" IsHitTestVisible="False" VerticalAlignment="Top" Height="241" />

                <DockPanel Grid.Column="1" Margin="50 100">
                    <Grid DockPanel.Dock="Bottom">
                        <StackPanel VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0 0 0 0">
                            <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush300}" Command="{Binding RemoveSpoolCommand}">
                                <StackPanel Orientation="Horizontal">
                                    <materialDesign:PackIcon Kind="Delete" Width="20" Height="20" />
                                    <TextBlock Margin="5 0 0 0" FontSize="16">DELETE</TextBlock>
                                </StackPanel>
                            </Button>
                            <Button Margin="0 0 0 0" MinWidth="160" Height="50" Background="{StaticResource GreenBrush300}" BorderBrush="{StaticResource GreenBrush300}" Command="{Binding AddSpoolCommand}">
                                <StackPanel Orientation="Horizontal">
                                    <materialDesign:PackIcon Kind="Plus" Width="20" Height="20" />
                                    <TextBlock Margin="5 0 0 0" FontSize="16">NEW SPOOL</TextBlock>
                                </StackPanel>
                            </Button>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">

                        </StackPanel>
                    </Grid>
                    <Grid>
                        <DataGrid Margin="0 0 0 10" SelectionUnit="FullRow" BorderBrush="{StaticResource borderBrush }" BorderThickness="1" Background="{StaticResource TransparentBackgroundBrush}" AlternatingRowBackground="{StaticResource Transparent200}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding ActiveMachine.Spools}" SelectedItem="{Binding SelectedSpool}">
                            <DataGrid.CellStyle>
                                <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
                                    <Setter Property="BorderThickness" Value="0"/>
                                    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
                                    <Setter Property="VerticalContentAlignment" Value="Center"></Setter>
                                </Style>
                            </DataGrid.CellStyle>
                            <DataGrid.Columns>
                                <DataGridComboBoxColumn Header="SPOOL TYPE" SelectedItemBinding="{Binding SpoolType}" DisplayMemberPath="Name" Width="Auto">
                                    <DataGridComboBoxColumn.ElementStyle>
                                        <Style TargetType="ComboBox">
                                            <Setter Property="ItemsSource" Value="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid},Path=DataContext.ActiveMachineAdapter.SpoolTypes}"/>
                                        </Style>
                                    </DataGridComboBoxColumn.ElementStyle>
                                    <DataGridComboBoxColumn.EditingElementStyle>
                                        <Style TargetType="ComboBox">
                                            <Setter Property="ItemsSource" Value="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid},Path=DataContext.ActiveMachineAdapter.SpoolTypes}"/>
                                        </Style>
                                    </DataGridComboBoxColumn.EditingElementStyle>
                                </DataGridComboBoxColumn>
                                <DataGridTextColumn Header="LIMIT SWITCH START POINT OFFSET" Binding="{Binding LimitSwitchStartPointOffset,Converter={StaticResource EmptyStringToNullConverter}}" Width="1*" />
                            </DataGrid.Columns>
                        </DataGrid>
                    </Grid>
                </DockPanel>
            </Grid>
        </DockPanel>
    </Grid>
</UserControl>