blob: f69606e292d91c18c21b0bbd7e49c8280fe7c5dc (
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
|
<UserControl x:Class="Tango.MachineStudio.MachineDesigner.Views.MachineCreationDialog"
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:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:vm="clr-namespace:Tango.MachineStudio.MachineDesigner.ViewModels"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:local="clr-namespace:Tango.MachineStudio.MachineDesigner.Views"
mc:Ignorable="d"
d:DesignHeight="400" d:DesignWidth="700" Height="460" Width="750" Background="{StaticResource Dialog.Background}" d:DataContext="{d:DesignInstance Type=vm:MachineCreationDialogVM, IsDesignTimeCreatable=False}" Foreground="{StaticResource Dialog.Foreground}">
<UserControl.Resources>
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"></converters:BooleanToVisibilityConverter>
</UserControl.Resources>
<Grid Margin="10">
<DockPanel>
<Grid DockPanel.Dock="Top">
<StackPanel Orientation="Horizontal">
<Grid>
<Image Source="../Images/machine-full-fx.png" Width="120" RenderOptions.BitmapScalingMode="Fant"></Image>
<materialDesign:PackIcon HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 -10 -10" Kind="PlusCircle" Foreground="#15C315" Width="42" Height="42" />
</Grid>
<TextBlock Margin="30 0 0 0" VerticalAlignment="Bottom" FontSize="22">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Text" Value="CLONE MACHINE"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding IsNewMachine}" Value="True">
<Setter Property="Text" Value="NEW MACHINE"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</StackPanel>
</Grid>
<Grid DockPanel.Dock="Bottom">
<StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right" DockPanel.Dock="Bottom">
<Button Command="{Binding CloseCommand}" Width="140" Height="40" Margin="0 0 10 0">
CANCEL
</Button>
<Button Command="{Binding OKCommand}" IsDefault="True" Width="140" Height="40">
CREATE
</Button>
</StackPanel>
</Grid>
<Grid>
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Top" Margin="20 20 0 0" Width="400">
<TextBlock TextWrapping="Wrap" Visibility="{Binding IsNewMachine,Converter={StaticResource BooleanToVisibilityConverter}}">
<Run>Specify a machine prototype to create the new machine with default settings and configuration.</Run>
</TextBlock>
<ComboBox Visibility="{Binding IsNewMachine,Converter={StaticResource BooleanToVisibilityConverter}}" ItemsSource="{Binding Prototypes}" SelectedItem="{Binding SelectedPrototype}" DisplayMemberPath="Name" Margin="0 10 0 0" FontSize="16" materialDesign:HintAssist.Hint="NONE"></ComboBox>
<TextBlock Margin="0 20 0 0" FontSize="10">Serial Number</TextBlock>
<TextBox Margin="0 2 0 0" Text="{Binding SerialNumber,UpdateSourceTrigger=PropertyChanged}"></TextBox>
<TextBlock Margin="0 20 0 0" FontSize="10">Name</TextBlock>
<TextBox Margin="0 2 0 0" Text="{Binding Name,UpdateSourceTrigger=PropertyChanged}"></TextBox>
</StackPanel>
</Grid>
</DockPanel>
</Grid>
</UserControl>
|