aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-07-17 09:21:38 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-07-17 09:21:38 +0300
commit2d5eb6eee8013b5089a43256bdf9bbe540431958 (patch)
treed9829ae5e63e1e16436a316da9280b95e552a88d /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views
parent1c8ed5078d97519d22db9a3c3ab4d9e1d70bdf1b (diff)
parentc5a54597a0a02da5b3cf942fff95586a9dfe836d (diff)
downloadTango-2d5eb6eee8013b5089a43256bdf9bbe540431958.tar.gz
Tango-2d5eb6eee8013b5089a43256bdf9bbe540431958.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml54
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs23
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml8
3 files changed, 76 insertions, 9 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
index fc62c0128..e350f966b 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
@@ -5,7 +5,10 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:global="clr-namespace:Tango.MachineStudio.Developer"
xmlns:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop"
+ xmlns:brushPicker="clr-namespace:Tango.BrushPicker;assembly=Tango.BrushPicker"
xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:colorConversion="clr-namespace:Tango.BL.ColorConversion;assembly=Tango.BL"
+ xmlns:hive="clr-namespace:Tango.Hive;assembly=Tango.Hive"
xmlns:automation="clr-namespace:Tango.MachineStudio.Common.Automation;assembly=Tango.MachineStudio.Common"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:techViews="clr-namespace:Tango.MachineStudio.Technician.Views;assembly=Tango.MachineStudio.Technician"
@@ -66,6 +69,7 @@
<converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter" />
<converters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter" />
<converters:IsNotConverter x:Key="IsNotConverter" />
+ <converters:ObjectToObjectTypeConverter x:Key="ObjectToObjectTypeConverter" />
<ObjectDataProvider x:Key="dispenserDivisions" MethodName="GetValues" ObjectType="{x:Type sys:Enum}">
@@ -136,7 +140,7 @@
<Setter.Value>
<ControlTemplate>
<Grid>
- <ToggleButton Cursor="Hand" x:Name="PopupButton" BorderThickness="0" Height="30" Background="Transparent" Foreground="{StaticResource AccentColorBrush}" VerticalAlignment="Center" Margin="30 0 0 0" IsChecked="{Binding ElementName=Popup, Path=IsOpen}">
+ <ToggleButton Cursor="Hand" x:Name="PopupButton" Checked="PopupButton_Checked" Unchecked="PopupButton_Unchecked" BorderThickness="0" Height="30" Background="Transparent" Foreground="{StaticResource AccentColorBrush}" VerticalAlignment="Center" Margin="30 0 0 0" IsChecked="{Binding ElementName=Popup, Path=IsOpen}">
<ToggleButton.Style>
<Style TargetType="ToggleButton" BasedOn="{StaticResource emptyToggleButton}">
<Style.Triggers>
@@ -163,7 +167,47 @@
</Border.Effect>
<Grid>
<Grid Margin="10">
- <commonControls:HiveColorPickerControl SelectedHiveColorChanged="HiveColorPickerControl_SelectedColorChanged" SelectedColor="{Binding Color,Mode=OneWay}" SelectedHiveColor="{Binding Color,Mode=OneWayToSource}" DemoMode="True" />
+ <DockPanel>
+ <DockPanel>
+ <TextBlock DockPanel.Dock="Top" HorizontalAlignment="Center">SOURCE</TextBlock>
+ <Viewbox Width="300" Height="180" VerticalAlignment="Center" Stretch="Fill">
+ <colorPicker:ColorCanvas SelectedColor="{Binding Color,Mode=TwoWay}" SelectedColorChanged="ColorCanvas_SelectedColorChanged" Background="Transparent" BorderThickness="0" Height="150" Width="230" ></colorPicker:ColorCanvas>
+ </Viewbox>
+ </DockPanel>
+ <Image DockPanel.Dock="Left" Source="../Images/arrow-long-right.png" VerticalAlignment="Center" Width="30" Margin="10 0"></Image>
+
+ <DockPanel>
+ <TextBlock DockPanel.Dock="Top" HorizontalAlignment="Center">SUGGESTIONS</TextBlock>
+ <hive:HexList VerticalAlignment="Center" Margin="0 10 0 0" Width="220" Height="270" UseHexItemHasContainer="True" Grid.Column="2" Grid.Row="1" RowCount="6" ColumnCount="5" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.HiveSuggestions}" SelectedItem="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.SelectedSuggestion,Mode=TwoWay}">
+ <hive:HexList.ItemContainerStyle>
+ <Style TargetType="hive:HexItem" BasedOn="{StaticResource {x:Type hive:HexItem}}">
+ <Setter Property="Background" Value="{Binding Brush}"></Setter>
+ <Setter Property="Grid.Column" Value="0"></Setter>
+ <Setter Property="Grid.Row" Value="0"></Setter>
+ <Setter Property="Background" Value="Transparent"></Setter>
+ <Setter Property="BorderThickness" Value="1"></Setter>
+
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self},Path=DataContext,Converter={StaticResource ObjectToObjectTypeConverter}}" Value="{x:Type colorConversion:ColorConversionSuggestion}">
+ <Setter Property="Grid.Column" Value="{Binding Column}"></Setter>
+ <Setter Property="Grid.Row" Value="{Binding Row}"></Setter>
+ <Setter Property="Background" Value="{Binding Brush}"></Setter>
+ </DataTrigger>
+ <Trigger Property="IsSelected" Value="True">
+ <Setter Property="BorderThickness" Value="2"></Setter>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </hive:HexList.ItemContainerStyle>
+
+ <hive:HexList.ItemTemplate>
+ <DataTemplate>
+
+ </DataTemplate>
+ </hive:HexList.ItemTemplate>
+ </hive:HexList>
+ </DockPanel>
+ </DockPanel>
</Grid>
</Grid>
</Border>
@@ -1085,7 +1129,7 @@
<Grid Margin="0 -18 0 0">
<Border VerticalAlignment="Center" Height="55" Margin="30 0 40 0" ClipToBounds="False">
<Grid ClipToBounds="False">
- <ItemsControl x:Name="jobBrushList" ClipToBounds="False">
+ <ItemsControl x:Name="jobBrushList" ClipToBounds="False" Margin="40 0 50 0">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" ClipToBounds="False"></StackPanel>
@@ -1129,7 +1173,7 @@
</ItemsControl.ItemTemplate>
</ItemsControl>
- <StackPanel Margin="-20 -5 0 0" HorizontalAlignment="Left">
+ <StackPanel Margin="-30 -5 0 0" HorizontalAlignment="Left">
<TextBlock FontSize="12" Foreground="Black">
<Run Text="0"></Run>
<Run Foreground="Gray" FontSize="10" Text="m"></Run>
@@ -1149,7 +1193,7 @@
</materialDesign:PackIcon>
</StackPanel>
- <Border BorderBrush="Gainsboro" BorderThickness="1" VerticalAlignment="Bottom" Height="20">
+ <Border BorderBrush="Gainsboro" BorderThickness="1" VerticalAlignment="Bottom" Height="20" Margin="40 0 50 0">
</Border>
</Grid>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs
index b48e91f31..bb17a502d 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs
@@ -242,5 +242,28 @@ namespace Tango.MachineStudio.Developer.Views
editor.ParameterizedObject = draggedItem.ParameterizedObject;
}
}
+
+ private void PopupButton_Checked(object sender, RoutedEventArgs e)
+ {
+ _vm.OnHivePopupOpened();
+ }
+
+ private void BrushPicker_ColorChanged(object sender, BrushPicker.ColorChangedEventArgs e)
+ {
+
+ }
+
+ private void ColorCanvas_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs<Color?> e)
+ {
+ if (e.NewValue.HasValue)
+ {
+ _vm.OnSelectedBrushColorChanged((Color)e.NewValue);
+ }
+ }
+
+ private void PopupButton_Unchecked(object sender, RoutedEventArgs e)
+ {
+ _vm.OnHivePopupClosed();
+ }
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml
index 2ece5c76b..fd3b2289d 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml
@@ -110,7 +110,7 @@
<Border Margin="0 10 0 0" VerticalAlignment="Bottom" Width="1200" BorderBrush="#404040" BorderThickness="0" ClipToBounds="False">
<Grid ClipToBounds="False" >
- <ItemsControl ClipToBounds="False" x:Name="runningJobBrushList" ItemsSource="{Binding RunningJobSegments}">
+ <ItemsControl ClipToBounds="False" x:Name="runningJobBrushList" ItemsSource="{Binding RunningJobSegments}" Margin="0 0 60 0">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" ClipToBounds="False"></StackPanel>
@@ -179,7 +179,7 @@
</Canvas>
</StackPanel>
- <Rectangle HorizontalAlignment="Right" Stroke="White" Margin="0 35 0 25"></Rectangle>
+ <Rectangle HorizontalAlignment="Right" Stroke="White" Margin="0 35 0 25" ></Rectangle>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
@@ -195,7 +195,7 @@
</materialDesign:PackIcon>
</StackPanel>
- <StackPanel Margin="0 -5 -40 0" HorizontalAlignment="Right">
+ <StackPanel Margin="0 -5 -70 0" HorizontalAlignment="Right">
<TextBlock FontSize="14">
<Run Text="{Binding RunningJob.Length,Mode=OneWay,StringFormat=N2}"></Run>
<Run FontSize="13" Text="m"></Run>
@@ -207,7 +207,7 @@
</materialDesign:PackIcon>
</StackPanel>
- <Border BorderBrush="#404040" BorderThickness="1" VerticalAlignment="Center" Height="30" Margin="0 11 0 0">
+ <Border BorderBrush="#404040" BorderThickness="1" VerticalAlignment="Center" Height="30" Margin="0 11 60 0">
</Border>