blob: d9ff176d991f4ad8be93129c18f9649d8a5f574c (
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
|
<UserControl x:Class="Tango.MachineStudio.Developer.Views.EmbroideryImportView"
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:emb="clr-namespace:Tango.EmbroideryUI;assembly=Tango.EmbroideryUI"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:vm="clr-namespace:Tango.MachineStudio.Developer.ViewModels"
xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:brushPicker="clr-namespace:Tango.BrushPicker;assembly=Tango.BrushPicker"
xmlns:local="clr-namespace:Tango.MachineStudio.Developer.Views"
mc:Ignorable="d"
Height="720" Width="1280" Background="{StaticResource WhiteBackgroundBrush}" d:DataContext="{d:DesignInstance Type=vm:EmbroideryImportViewVM, IsDesignTimeCreatable=False}">
<Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="250"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="60"/>
<RowDefinition Height="593*"/>
<RowDefinition Height="60"/>
</Grid.RowDefinitions>
<Grid>
<StackPanel Orientation="Horizontal">
<Image Source="../Images/sewing-machine.png" Width="48"></Image>
<TextBlock VerticalAlignment="Center" Margin="10 0 0 0" FontSize="20">Import Embroidery File</TextBlock>
</StackPanel>
</Grid>
<Grid Grid.ColumnSpan="2">
<Rectangle VerticalAlignment="Bottom" Stroke="Silver"></Rectangle>
</Grid>
<Grid Grid.Row="1" x:Name="gridEditor">
<Grid.Background>
<ImageBrush ImageSource="../Images/seamless-grid.jpg" Stretch="None" Opacity="0.5" TileMode="Tile" ViewportUnits="Absolute" Viewport="0,0,32,32"></ImageBrush>
</Grid.Background>
<Rectangle HorizontalAlignment="Left" Stroke="Silver"></Rectangle>
<emb:EmbroideryFileEditor x:Name="editor" Background="Transparent" FileName="{Binding FileName}" EmbroideryFile="{Binding EmbroideryFile,Mode=OneWayToSource}" Paths="{Binding Paths,Mode=OneWayToSource}" />
</Grid>
<Grid Grid.Column="1" Grid.Row="1">
<StackPanel>
<TextBlock Margin="5">Region Brush</TextBlock>
<Border Margin="5" BorderThickness="1" BorderBrush="Silver">
<brushPicker:BrushPicker Background="White" BorderThickness="0" Brush="{Binding ElementName=editor,Path=SelectedPath.Brush,Mode=TwoWay}" Height="220" />
</Border>
<Border BorderThickness="1" BorderBrush="Silver" Padding="5 0 5 5" Margin="5">
<Border.Resources>
<Style TargetType="TextBlock">
<Setter Property="Margin" Value="0 10 0 5"></Setter>
</Style>
</Border.Resources>
<StackPanel>
<TextBlock Text="Material"></TextBlock>
<ComboBox ItemsSource="{Binding EmbroideryMaterials}" SelectedItem="{Binding SelectedEmbroideryMaterial}" DisplayMemberPath="Name" Margin="5 0"></ComboBox>
<TextBlock Text="Material Thickness"></TextBlock>
<mahApps:NumericUpDown Minimum="0" Maximum="100" StringFormat="# mm" Value="{Binding EmbroideryMaterialThickness}" HasDecimals="False" HorizontalContentAlignment="Center" />
<Grid Margin="0 20 0 5">
<TextBlock Text="Stabilizer" Margin="0" HorizontalAlignment="Left"></TextBlock>
<ToggleButton HorizontalAlignment="Right" IsChecked="{Binding HasStabilizer}"></ToggleButton>
</Grid>
<ComboBox IsEnabled="{Binding HasStabilizer}" ItemsSource="{Binding EmbroideryMaterials}" SelectedItem="{Binding SelectedStabilizer}" DisplayMemberPath="Name" Margin="5 0"></ComboBox>
<TextBlock Text="Stabilizer Thickness"></TextBlock>
<mahApps:NumericUpDown IsEnabled="{Binding HasStabilizer}" Minimum="1" Maximum="100" StringFormat="# mm" Value="{Binding StabilizerThickness}" HasDecimals="False" HorizontalContentAlignment="Center" />
</StackPanel>
</Border>
</StackPanel>
<Rectangle HorizontalAlignment="Left" Stroke="Silver" />
</Grid>
<Grid Grid.Row="2" Grid.ColumnSpan="2">
<Rectangle VerticalAlignment="Top" Stroke="Silver"></Rectangle>
</Grid>
<Grid Grid.Row="2" Grid.Column="1">
<Button Height="50" Click="OnImportClick" Command="{Binding ImportCommand}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="Import" Width="24" Height="24" />
<TextBlock Margin="5 0 0 0" FontSize="16">IMPORT</TextBlock>
</StackPanel>
</Button>
</Grid>
</Grid>
</Grid>
</UserControl>
|