aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml
blob: 5b26b789162d8a8d7569f01e9236af184bbbedd7 (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
<UserControl x:Class="Tango.MachineStudio.Developer.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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:global="clr-namespace:Tango.MachineStudio.Developer"
             xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
             xmlns:db="clr-namespace:Tango.MachineStudio.DB.Views.DBViews;assembly=Tango.MachineStudio.DB"
             xmlns:commonControls="clr-namespace:Tango.MachineStudio.Common.Controls;assembly=Tango.MachineStudio.Common"
             xmlns:designer="clr-namespace:Tango.MachineStudio.MachineDesigner.Views;assembly=Tango.MachineStudio.MachineDesigner"
             xmlns:vm="clr-namespace:Tango.MachineStudio.Developer.ViewModels"
             xmlns:localConverters="clr-namespace:Tango.MachineStudio.Developer.Converters"
             xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
             xmlns:local="clr-namespace:Tango.MachineStudio.Developer.Views"
             mc:Ignorable="d" 
             d:DesignHeight="720" d:DesignWidth="1280" Background="White" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">

    <UserControl.Resources>
        <Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
            <Setter Property="mahapps:ControlsHelper.HeaderFontSize" Value="18" />
            <Setter Property="Margin" Value="2" />
        </Style>

        <converters:ColorToIntegerConverter x:Key="ColorToIntegerConverter"></converters:ColorToIntegerConverter>
        <localConverters:DbRmlViewToEntityConverter x:Key="DbRmlViewToEntityConverter"></localConverters:DbRmlViewToEntityConverter>
    </UserControl.Resources>

    <Grid Margin="10">

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


            <Grid>
                <!--<Grid.RowDefinitions>
                    <RowDefinition Height="90"/>
                    <RowDefinition Height="319*"/>
                    <RowDefinition Height="333*"/>
                    <RowDefinition Height="60*"/>
                </Grid.RowDefinitions>-->

                <TabControl>
                    <TabItem Header="MACHINE" >
                        <StackPanel Margin="0 40 0 0">
                            <ComboBox ItemsSource="{Binding Adapter.Machines}" SelectedItem="{Binding SelectedMachine}" materialDesign:HintAssist.IsFloating="True" materialDesign:HintAssist.Hint="Selected machine" Margin="40 0 40 0">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <StackPanel>
                                            <TextBlock Text="{Binding SerialNumber}" FontWeight="Bold" FontStyle="Italic"></TextBlock>
                                            <TextBlock FontSize="11" Text="{Binding Name}" Foreground="Gray"></TextBlock>
                                        </StackPanel>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>
                            <designer:MachineView IsHitTestVisible="False" Margin="0 40 0 0" DataContext="{Binding SelectedMachine}" />
                            <Button Command="{Binding EditMachineCommand}" HorizontalAlignment="Right" Margin="0 10 30 0" Style="{StaticResource MaterialDesignFlatButton}">
                                <StackPanel Orientation="Horizontal">
                                    <materialDesign:PackIcon VerticalAlignment="Center" Kind="Pencil"></materialDesign:PackIcon>
                                    <TextBlock Margin="10 0 0 0">EDIT</TextBlock>
                                </StackPanel>
                            </Button>
                        </StackPanel>
                    </TabItem>
                    <TabItem Header="MEDIA">
                        <DockPanel Margin="0 40 0 0">
                            <ComboBox DockPanel.Dock="Top" ItemsSource="{Binding Adapter.Rmls}" SelectedItem="{Binding SelectedRML,Converter={StaticResource DbRmlViewToEntityConverter}}" materialDesign:HintAssist.IsFloating="True" materialDesign:HintAssist.Hint="Selected RML" Margin="40 0 40 0">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <StackPanel>
                                            <TextBlock Text="{Binding Name}" FontWeight="Bold" FontStyle="Italic"></TextBlock>
                                            <TextBlock FontSize="11" Text="{Binding Manufacturer}" Foreground="Gray"></TextBlock>
                                        </StackPanel>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>

                            <ScrollViewer Margin="30 10 30 0">
                                <db:RmlView Margin="0 0 10 0" IsEnabled="False" DataContext="{Binding SelectedRML,Converter={StaticResource DbRmlViewToEntityConverter}}"  />
                            </ScrollViewer>
                        </DockPanel>
                    </TabItem>
                    <TabItem Header="PROCESS">

                    </TabItem>
                    <TabItem Header="CONTROL">

                    </TabItem>
                </TabControl>

                <!--<materialDesign:Card Background="{DynamicResource MaterialDesignBackground}">
                    <StackPanel>
                        <Expander Header="MACHINE">

                        </Expander>

                        <Separator Foreground="{StaticResource MaterialDesignDivider}" Background="{StaticResource MaterialDesignDivider}" />

                        <Expander Header="MEDIA">

                        </Expander>

                        <Separator Foreground="{StaticResource MaterialDesignDivider}" Background="{StaticResource MaterialDesignDivider}" />

                        <Expander Header="PROCESS">

                        </Expander>

                        <Separator Foreground="{StaticResource MaterialDesignDivider}" Background="{StaticResource MaterialDesignDivider}" />

                        <Expander Header="CONTROL">

                        </Expander>
                    </StackPanel>
                </materialDesign:Card>-->

                <!--<Grid>
                    <GroupBox Header="MEDIA" Margin="5"></GroupBox>
                </Grid>

                <Grid Grid.Row="1">
                    <GroupBox Header="PROCESS PARAMETERS" Margin="5"></GroupBox>
                </Grid>

                <Grid Grid.Row="2">
                    <GroupBox Header="CONTROL PARAMETERS" Margin="5"></GroupBox>
                </Grid>-->

                <!--<Grid Grid.Row="3">
                    <Button Height="40">EXPORT</Button>
                </Grid>-->
            </Grid>

        </Grid>

    </Grid>
</UserControl>