aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/EmbroideryDisplayView.xaml10
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/EmbroideryImportView.xaml16
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/EmbroideryImportView.xaml.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml4
4 files changed, 25 insertions, 7 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/EmbroideryDisplayView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/EmbroideryDisplayView.xaml
index a753453f9..22414b4b2 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/EmbroideryDisplayView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/EmbroideryDisplayView.xaml
@@ -9,7 +9,7 @@
xmlns:converters="clr-namespace:Tango.MachineStudio.Developer.Converters"
xmlns:local="clr-namespace:Tango.MachineStudio.Developer.Views"
mc:Ignorable="d"
- Width="600" Height="350" Background="White" d:DataContext="{d:DesignInstance Type=vm:EmbroideryDisplayViewVM, IsDesignTimeCreatable=False}">
+ Width="1280" Height="720" Background="White" d:DataContext="{d:DesignInstance Type=vm:EmbroideryDisplayViewVM, IsDesignTimeCreatable=False}">
<UserControl.Resources>
<converters:ByteArrayToBitmapSourceConverter x:Key="ByteArrayToBitmapSourceConverter" />
@@ -33,12 +33,18 @@
</Grid>
<Grid Grid.Row="1">
+ <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>
+ <Rectangle HorizontalAlignment="Right" Stroke="Silver"></Rectangle>
<Image HorizontalAlignment="Center" VerticalAlignment="Center" Source="{Binding Job.EmbroideryJpeg,Converter={StaticResource ByteArrayToBitmapSourceConverter}}"></Image>
</Grid>
<Grid Grid.Row="2">
+ <Rectangle VerticalAlignment="Top" Stroke="Silver"></Rectangle>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
- <Button Height="40" Command="{Binding ExportCommand}">
+ <Button Height="50" Command="{Binding ExportCommand}" Width="180">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="Export" Width="24" Height="24" />
<TextBlock Margin="5 0 0 0" FontSize="16">EXPORT</TextBlock>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/EmbroideryImportView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/EmbroideryImportView.xaml
index d084aabcf..17a5a5b8c 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/EmbroideryImportView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/EmbroideryImportView.xaml
@@ -6,6 +6,7 @@
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"
@@ -33,19 +34,30 @@
<Rectangle VerticalAlignment="Bottom" Stroke="Silver"></Rectangle>
</Grid>
- <Grid Grid.Row="1">
- <emb:EmbroideryFileEditor x:Name="editor" Background="White" FileName="{Binding FileName}" EmbroideryFile="{Binding EmbroideryFile,Mode=OneWayToSource}" Paths="{Binding Paths,Mode=OneWayToSource}" />
+ <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>
<brushPicker:BrushPicker Margin="0 10 0 0" Background="White" BorderThickness="0" Brush="{Binding ElementName=editor,Path=SelectedPath.Brush,Mode=TwoWay}" />
+
+ <TextBlock Text="Stitch Length" Margin="5"></TextBlock>
+ <mahApps:NumericUpDown Margin="5" Minimum="1" Maximum="20" StringFormat="# mm" Value="{Binding StitchLength}" HasDecimals="False" HorizontalContentAlignment="Center" />
</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">
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/EmbroideryImportView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/EmbroideryImportView.xaml.cs
index ce481a87b..0b368a809 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/EmbroideryImportView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/EmbroideryImportView.xaml.cs
@@ -30,7 +30,7 @@ namespace Tango.MachineStudio.Developer.Views
private void OnImportClick(object sender, RoutedEventArgs e)
{
- var source = UIHelper.TakeSnapshot(editor);
+ var source = UIHelper.TakeSnapshot(gridEditor);
EmbroideryImageBytes = source.ToJpegBytes(50);
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml
index ebacd122c..a8274a4f7 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml
@@ -14,7 +14,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Tango.MachineStudio.Developer.Views"
mc:Ignorable="d"
- d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
+ x:Name="control" d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
<UserControl.Resources>
<localConverters:SegmentToBrushConverterMulti x:Key="SegmentToBrushConverterMulti" />
@@ -144,7 +144,7 @@
<DataTrigger Binding="{Binding HasEmbroideryFile}" Value="True">
<Setter Property="Content">
<Setter.Value>
- <Button ToolTip="Press to display the embroidery file information." Style="{StaticResource emptyButton}" Cursor="Hand" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.DisplayJobEmbroideryFileCommand}" CommandParameter="{Binding}">
+ <Button ToolTip="Press to display the attached embroidery file information" Style="{StaticResource emptyButton}" Cursor="Hand" Command="{Binding DataContext.DisplayJobEmbroideryFileCommand, Source={x:Reference control}}" CommandParameter="{Binding}">
<Image Source="../Images/job-emb.png" Width="40" Margin="5"></Image>
</Button>
</Setter.Value>