aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules
diff options
context:
space:
mode:
authorRoy <roy.mail.net@gmail.com>2018-02-08 23:53:00 +0200
committerRoy <roy.mail.net@gmail.com>2018-02-08 23:53:00 +0200
commit1b74cee6e9073f3542b4733574ab304f40fc033b (patch)
treeac81e731a6062494203942d0321a54bae6354890 /Software/Visual_Studio/MachineStudio/Modules
parent6103db0f792e396583929c08117e07fb6b9aa389 (diff)
downloadTango-1b74cee6e9073f3542b4733574ab304f40fc033b.tar.gz
Tango-1b74cee6e9073f3542b4733574ab304f40fc033b.zip
Working on MachineTechView..
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorElementEditor.xaml24
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml4
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/box.pngbin0 -> 64765 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/seamless-grid.jpgbin0 -> 12022 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/white-box.pngbin0 -> 56987 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MonitorTemplate.xaml18
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml12
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj13
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorItem.cs18
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs10
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs12
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml31
12 files changed, 118 insertions, 24 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorElementEditor.xaml
index 84eae5f75..8e4520cc5 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorElementEditor.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorElementEditor.xaml
@@ -3,10 +3,11 @@
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:items="clr-namespace:Tango.MachineStudio.Technician.TechItems"
xmlns:converters="clr-namespace:Tango.Editors.Converters;assembly=Tango.Editors"
xmlns:local="clr-namespace:Tango.Editors;assembly=Tango.Editors"
mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300" Background="Transparent" ClipToBounds="False" BorderThickness="0" MinWidth="1" MinHeight="1" RenderTransformOrigin="0.5,0.5">
+ d:DesignHeight="250" d:DesignWidth="300" Background="Transparent" ClipToBounds="False" BorderThickness="0" MinWidth="1" MinHeight="1" RenderTransformOrigin="0.5,0.5" d:DataContext="{d:DesignInstance Type=items:MonitorItem, IsDesignTimeCreatable=False}">
<UserControl.Resources>
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"></converters:BoolToVisibilityConverter>
@@ -28,12 +29,27 @@
<Viewbox Stretch="Fill">
<StackPanel>
<Grid Grid.Column="1" Grid.Row="1" Width="200" Height="120">
- <Border BorderThickness="1" BorderBrush="#878787" CornerRadius="5">
+ <Border BorderThickness="1" BorderBrush="{StaticResource AccentColorBrush}" CornerRadius="3">
<Border.Background>
- <ImageBrush ImageSource="../Images/black-screen.jpg" />
+ <ImageBrush ImageSource="../Images/box.png" Opacity="0.8" />
</Border.Background>
- <TextBlock FontFamily="../Fonts/#digital-7" TextAlignment="Center" VerticalAlignment="Center" Foreground="Gainsboro" FontSize="90" Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=MonitorItem.Value,FallbackValue='0000'}"></TextBlock>
+ <Grid>
+ <TextBlock FontFamily="../Fonts/#digital-7" TextAlignment="Center" VerticalAlignment="Center" FontSize="90" Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=MonitorItem.Value,FallbackValue='0000'}">
+ <TextBlock.Foreground>
+ <SolidColorBrush Color="{Binding Color}"></SolidColorBrush>
+ </TextBlock.Foreground>
+ </TextBlock>
+
+ <Border CornerRadius="3">
+ <Border.Background>
+ <LinearGradientBrush Opacity="0.2">
+ <GradientStop Color="White"/>
+ <GradientStop Color="#FFB8B8B8" Offset="1"/>
+ </LinearGradientBrush>
+ </Border.Background>
+ </Border>
+ </Grid>
</Border>
</Grid>
</StackPanel>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml
index eafc7b5d3..02acf5883 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml
@@ -8,7 +8,7 @@
xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems"
xmlns:local="clr-namespace:Tango.Editors;assembly=Tango.Editors"
mc:Ignorable="d"
- d:DesignHeight="150" d:DesignWidth="400" Background="Transparent" ClipToBounds="False" BorderThickness="0" MinWidth="1" MinHeight="1" RenderTransformOrigin="0.5,0.5" d:DataContext="{d:DesignInstance Type=items:MonitorItem, IsDesignTimeCreatable=False}">
+ d:DesignHeight="150" d:DesignWidth="400" Background="Transparent" ClipToBounds="False" BorderThickness="0" MinWidth="1" MinHeight="1" RenderTransformOrigin="0.5,0.5" d:DataContext="{d:DesignInstance Type=items:SingleGraphItem, IsDesignTimeCreatable=False}">
<UserControl.Resources>
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"></converters:BoolToVisibilityConverter>
@@ -28,7 +28,7 @@
<!--Content-->
<Grid>
<!--<Viewbox Stretch="Fill">-->
- <controls:RealTimeGraphControl x:Name="InnerGraph" x:FieldModifier="public" IsHitTestVisible="False" EnableToolBar="False" SensorName="{Binding TechMonitor.Description}" SensorUnits="{Binding TechMonitor.Units}" Minimum="{Binding TechMonitor.Min}" Maximum="{Binding TechMonitor.Max}" />
+ <controls:RealTimeGraphControl x:Name="InnerGraph" x:FieldModifier="public" IsHitTestVisible="False" EnableToolBar="False" SensorName="{Binding TechMonitor.Description}" Color="{Binding Color,Mode=TwoWay}" SensorUnits="{Binding TechMonitor.Units}" Minimum="{Binding TechMonitor.Min}" Maximum="{Binding TechMonitor.Max}" />
<!--</Viewbox>-->
<Border Margin="0 0 0 -23" VerticalAlignment="Bottom">
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/box.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/box.png
new file mode 100644
index 000000000..105de7979
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/box.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/seamless-grid.jpg b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/seamless-grid.jpg
new file mode 100644
index 000000000..59bb9c370
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/seamless-grid.jpg
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/white-box.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/white-box.png
new file mode 100644
index 000000000..aee42d95a
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/white-box.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MonitorTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MonitorTemplate.xaml
index 66e0e5cba..f87926d28 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MonitorTemplate.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MonitorTemplate.xaml
@@ -5,18 +5,34 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:converters="clr-namespace:Tango.MachineStudio.Technician.Converters"
xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker"
xmlns:local="clr-namespace:Tango.MachineStudio.Technician.PropertiesTemplates"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="200" d:DataContext="{d:DesignInstance Type=items:MonitorItem, IsDesignTimeCreatable=False}">
<UserControl.Resources>
<converters:MonitorsToSingleChannleMonitorsConverter x:Key="MonitorsToSingleChannleMonitorsConverter" />
+
+ <Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
+ <Setter Property="mahapps:ControlsHelper.HeaderFontSize" Value="14" />
+ <Setter Property="Margin" Value="2" />
+ </Style>
</UserControl.Resources>
-
+
<Grid>
<StackPanel>
<TextBlock FontSize="10">Selected Input</TextBlock>
<ComboBox Margin="0 5 0 0" ItemsSource="{Binding Adapter.TechMonitors,Converter={StaticResource MonitorsToSingleChannleMonitorsConverter}}" SelectedItem="{Binding TechMonitor,Mode=TwoWay}" DisplayMemberPath="Description" />
+
+ <TextBlock FontSize="10" Margin="0 20 0 0">Update Interval</TextBlock>
+ <Slider Margin="0 5 0 0" Minimum="1" Maximum="1000" Value="{Binding UpdateInterval,Mode=TwoWay}"></Slider>
+
+ <TextBlock FontSize="10" Margin="0 20 0 0">Color</TextBlock>
+
+ <Viewbox Margin="0 5 0 0">
+ <colorPicker:ColorCanvas SelectedColor="{Binding Color,Mode=TwoWay}" Background="Transparent" />
+ </Viewbox>
</StackPanel>
</Grid>
</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml
index 098e7a3dd..bc31f8b31 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml
@@ -3,6 +3,8 @@
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:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker"
xmlns:converters="clr-namespace:Tango.MachineStudio.Technician.Converters"
xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems"
xmlns:local="clr-namespace:Tango.MachineStudio.Technician.PropertiesTemplates"
@@ -11,12 +13,22 @@
<UserControl.Resources>
<converters:MonitorsToSingleChannleMonitorsConverter x:Key="MonitorsToSingleChannleMonitorsConverter" />
+
+ <Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
+ <Setter Property="mahapps:ControlsHelper.HeaderFontSize" Value="14" />
+ <Setter Property="Margin" Value="2" />
+ </Style>
</UserControl.Resources>
<Grid>
<StackPanel>
<TextBlock FontSize="10">Selected Input</TextBlock>
<ComboBox Margin="0 5 0 0" ItemsSource="{Binding Adapter.TechMonitors,Converter={StaticResource MonitorsToSingleChannleMonitorsConverter}}" SelectedItem="{Binding TechMonitor,Mode=TwoWay}" DisplayMemberPath="Description" />
+
+ <TextBlock FontSize="10" Margin="0 20 0 0">Color</TextBlock>
+ <Viewbox Margin="0 5 0 0">
+ <colorPicker:ColorCanvas SelectedColor="{Binding Color,Mode=TwoWay}" Background="Transparent" />
+ </Viewbox>
</StackPanel>
</Grid>
</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj
index 05ab7cc38..502ec398d 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj
@@ -193,6 +193,10 @@
<Project>{b9ae25d6-be35-492f-9079-21a7f3e6f7cc}</Project>
<Name>RealTimeGraphEx</Name>
</ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.ColorPicker\Tango.ColorPicker.csproj">
+ <Project>{a2f5af44-29ff-45d6-9d25-ecda5cce88b5}</Project>
+ <Name>Tango.ColorPicker</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\..\Tango.Core\Tango.Core.csproj">
<Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project>
<Name>Tango.Core</Name>
@@ -245,5 +249,14 @@
<ItemGroup>
<Resource Include="Images\single-graph.png" />
</ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\white-box.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\seamless-grid.jpg" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\box.png" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorItem.cs
index cc1ca4083..e04cdf675 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorItem.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Windows.Media;
using System.Xml.Serialization;
using Tango.Integration.Observables;
using Tango.SharedUI.Helpers;
@@ -24,16 +25,29 @@ namespace Tango.MachineStudio.Technician.TechItems
public double Value
{
get { return _value; }
- set { _value = value; RaisePropertyChanged(nameof(Value)); }
+ set { _value = value; RaisePropertyChanged(nameof(Value)); LastUpdateTime = DateTime.Now; }
}
+ private int _updateInterval;
+ public int UpdateInterval
+ {
+ get { return _updateInterval; }
+ set { _updateInterval = value; RaisePropertyChangedAuto(); }
+ }
+
+ [XmlIgnore]
+ public DateTime LastUpdateTime { get; set; }
+
public override object Data => TechMonitor;
public MonitorItem() : base()
{
Name = "Monitor";
+ Color = Color.FromRgb(20, 20, 20);
Description = "Simple analogue like monitor";
Image = ResourceHelper.GetImageFromResources("Images/analog.png");
+ LastUpdateTime = DateTime.Now;
+ UpdateInterval = 10;
}
public MonitorItem(TechMonitor techMonitor) : this()
@@ -43,7 +57,7 @@ namespace Tango.MachineStudio.Technician.TechItems
public override TechItem Clone()
{
- MonitorItem cloned = base.Clone() as MonitorItem;
+ MonitorItem cloned = base.Clone() as MonitorItem;
cloned.TechMonitor = TechMonitor;
return cloned;
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs
index 820c765cc..75296561a 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Xml.Serialization;
using Tango.Core;
@@ -17,6 +18,7 @@ namespace Tango.MachineStudio.Technician.TechItems
ID = Guid.NewGuid().ToString();
Name = "Untitled";
Adapter = ObservablesEntitiesAdapter.Instance;
+ _color = Colors.DodgerBlue;
}
private String _description;
@@ -112,6 +114,14 @@ namespace Tango.MachineStudio.Technician.TechItems
[XmlIgnore]
public abstract object Data { get; }
+ private Color _color;
+ [XmlIgnore]
+ public Color Color
+ {
+ get { return _color; }
+ set { _color = value; RaisePropertyChangedAuto(); }
+ }
+
public virtual TechItem Clone()
{
TechItem cloned = Activator.CreateInstance(this.GetType()) as TechItem;
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs
index 4420aa4c9..2be98e619 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs
@@ -101,11 +101,14 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
MonitorItem monitorItem = item as MonitorItem;
- var prop = _diagnoticsDataProperties.SingleOrDefault(x => x.Name == monitorItem.TechMonitor.Name);
-
- if (prop != null)
+ if (DateTime.Now > monitorItem.LastUpdateTime.AddMilliseconds(monitorItem.UpdateInterval))
{
- monitorItem.Value = GetLastMonitorValue(monitorItem.TechMonitor, prop.GetValue(data));
+ var prop = _diagnoticsDataProperties.SingleOrDefault(x => x.Name == monitorItem.TechMonitor.Name);
+
+ if (prop != null)
+ {
+ monitorItem.Value = GetLastMonitorValue(monitorItem.TechMonitor, prop.GetValue(data));
+ }
}
}
else if (item.GetType() == typeof(SingleGraphItem))
@@ -155,6 +158,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
var monitorItem = new MonitorItem(Adapter.TechMonitors.FirstOrDefault());
MonitorElementEditor editor = new MonitorElementEditor(monitorItem, bounds);
+ editor.DataContext = monitorItem;
Elements.Add(editor);
}
else if (SelectedTechItem is SingleGraphItem)
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
index 371caf5d7..2c895a789 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
@@ -4,6 +4,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:Tango.MachineStudio.Technician.ViewModels"
xmlns:global="clr-namespace:Tango.MachineStudio.Technician"
+ xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:editors="clr-namespace:Tango.Editors;assembly=Tango.Editors"
xmlns:techItems="clr-namespace:Tango.MachineStudio.Technician.TechItems"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
@@ -14,7 +15,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Tango.MachineStudio.Technician.Views"
mc:Ignorable="d"
- d:DesignHeight="720" d:DesignWidth="1280" Background="White" d:DataContext="{d:DesignInstance Type=vm:MachineTechViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MachineTechViewVM}">
+ d:DesignHeight="720" d:DesignWidth="1280" d:DataContext="{d:DesignInstance Type=vm:MachineTechViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MachineTechViewVM}">
<UserControl.Resources>
<ResourceDictionary Source="pack://application:,,,/Tango.MachineStudio.Common;component/Resources/MaterialDesign.xaml"></ResourceDictionary>
@@ -33,7 +34,7 @@
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
- <Menu Padding="5">
+ <Menu Padding="5" Background="Transparent">
<MenuItem Header="File"></MenuItem>
<MenuItem Header="Edit"></MenuItem>
<MenuItem Header="View"></MenuItem>
@@ -78,29 +79,34 @@
</Grid.ColumnDefinitions>
<Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="1*"/>
+ <ColumnDefinition Width="Auto"/>
+ </Grid.ColumnDefinitions>
<editors:ElementsEditor
x:Name="editor"
Elements="{Binding Elements}"
- ElementCreation="ElementsEditor_ElementCreation"
- Margin="0 0 5 0"
+ ElementCreation="ElementsEditor_ElementCreation"
RulerHeight="32"
EditorWidth="1920"
EditorHeight="1080"
FontSize="10"
- Background="#F1F1F1"
- EditorBackground="White"
- RulerBackground="White"
+ Background="Transparent"
+ EditorBackground="#70FFFFFF"
+ RulerBackground="Transparent"
Foreground="{StaticResource AccentColorBrush}"
SelectionFillBrush="#338D8D8D"
SelectionStrokeBrush="{StaticResource AccentColorBrush}"
BorderBrush="{StaticResource AccentColorBrush}"
BorderThickness="1" />
+
+ <Slider Grid.Column="1" Orientation="Vertical" Margin="5" Maximum="3" Minimum="0.2" Value="{Binding ElementName=editor,Path=ScaleFactor}"></Slider>
</Grid>
<Grid Grid.Column="1">
- <StackPanel>
- <TextBlock Margin="0 -30 0 0" DataContext="{Binding ElementName=editor,Path=SelectedElement.HostedElement.Data}" Text="{Binding Description}" FontSize="16" FontWeight="Bold" FontStyle="Italic"></TextBlock>
- <GroupBox Header="BOUNDS" Padding="5">
+ <DockPanel>
+ <TextBlock DockPanel.Dock="Top" Margin="0 -30 0 0" DataContext="{Binding ElementName=editor,Path=SelectedElement.HostedElement.Data}" Text="{Binding Description}" FontSize="16" FontWeight="Bold" FontStyle="Italic"></TextBlock>
+ <GroupBox DockPanel.Dock="Top" Header="BOUNDS" Padding="5">
<StackPanel>
<!--Position-->
<UniformGrid Columns="2" Margin="0 5 0 0">
@@ -142,6 +148,9 @@
<GroupBox Header="PROPERTIES" Margin="0 10 0 0">
<ContentControl DataContext="{Binding ElementName=editor,Path=SelectedElement.HostedElement}" Content="{Binding ElementName=editor,Path=SelectedElement.HostedElement}">
<ContentControl.Resources>
+ <DataTemplate DataType="{x:Type sys:Nullable}">
+
+ </DataTemplate>
<DataTemplate DataType="{x:Type items:MonitorItem}">
<templates:MonitorTemplate/>
</DataTemplate>
@@ -151,7 +160,7 @@
</ContentControl.Resources>
</ContentControl>
</GroupBox>
- </StackPanel>
+ </DockPanel>
</Grid>
</Grid>
</Grid>