aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Software/DB/Tango.mdfbin75497472 -> 75497472 bytes
-rw-r--r--Software/DB/Tango_log.ldfbin8388608 -> 8388608 bytes
-rw-r--r--Software/Graphics/box.pngbin0 -> 64765 bytes
-rw-r--r--Software/Graphics/glass.pngbin0 -> 17468 bytes
-rw-r--r--Software/Graphics/white-box.pngbin0 -> 56987 bytes
-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
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml4
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs10
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs8
20 files changed, 138 insertions, 26 deletions
diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf
index 8f36c9d40..5be040772 100644
--- a/Software/DB/Tango.mdf
+++ b/Software/DB/Tango.mdf
Binary files differ
diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf
index 29ebe00a1..85a0b368d 100644
--- a/Software/DB/Tango_log.ldf
+++ b/Software/DB/Tango_log.ldf
Binary files differ
diff --git a/Software/Graphics/box.png b/Software/Graphics/box.png
new file mode 100644
index 000000000..105de7979
--- /dev/null
+++ b/Software/Graphics/box.png
Binary files differ
diff --git a/Software/Graphics/glass.png b/Software/Graphics/glass.png
new file mode 100644
index 000000000..eeb67d27c
--- /dev/null
+++ b/Software/Graphics/glass.png
Binary files differ
diff --git a/Software/Graphics/white-box.png b/Software/Graphics/white-box.png
new file mode 100644
index 000000000..aee42d95a
--- /dev/null
+++ b/Software/Graphics/white-box.png
Binary files differ
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>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml
index 0f9edee55..aa8fd74ad 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml
@@ -60,14 +60,14 @@
<ColumnDefinition Width="438*"/>
</Grid.ColumnDefinitions>
- <Border BorderBrush="{StaticResource AccentColorBrush}" BorderThickness="1 1 0 1">
+ <Border BorderBrush="{StaticResource AccentColorBrush}" BorderThickness="1 1 0 1" Background="White">
<StackPanel Orientation="Horizontal">
<components:YAxisScroll x:Name="yAxis" Interval="6" Graph="{Binding ElementName=Graph}" Width="35" Foreground="{StaticResource MaterialDesignLightForeground}" VerticalOffset="-5" FontSize="8" StringFormat="#0.0"></components:YAxisScroll>
<components:YAxisTicks x:Name="yAxisTicks" SmallTickTemplate="{StaticResource graphTicksTemplate}" Width="5" SmallTicks="6" Foreground="{StaticResource MaterialDesignLightForeground}" BigTicks="10" Graph="{Binding ElementName=Graph}"></components:YAxisTicks>
</StackPanel>
</Border>
<Border Grid.Column="1" BorderThickness="1" BorderBrush="{StaticResource borderBrush}" Background="{DynamicResource graphBackground}" Margin="5 0 0 0">
- <graphEx:RealTimeGraphExLineErase x:Name="Graph" x:FieldModifier="public" Controller="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Controller}" Antialiased="True" RefreshRate="30" MarkerColor="{StaticResource graphsMarkerColor}" FillGraph="False" Stroke="DodgerBlue" Minimum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Minimum}" Maximum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Maximum}">
+ <graphEx:RealTimeGraphExLineErase x:Name="Graph" x:FieldModifier="public" Controller="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Controller}" Antialiased="True" RefreshRate="30" MarkerColor="{StaticResource graphsMarkerColor}" FillGraph="False" Stroke="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Color}" Minimum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Minimum}" Maximum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Maximum}">
<graphEx:RealTimeGraphExLineErase.Components>
<components:MouseValueToolTip ToolTipTemplate="{StaticResource graphTooltipTemplate}" />
<components:GridLines Rows="4" Columns="6" GridBrush="{DynamicResource graphGridLinesBrush}"></components:GridLines>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs
index 57d5ab88a..dd9aa1414 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs
@@ -72,6 +72,16 @@ namespace Tango.MachineStudio.Common.Controls
+ public Color Color
+ {
+ get { return (Color)GetValue(ColorProperty); }
+ set { SetValue(ColorProperty, value); }
+ }
+ public static readonly DependencyProperty ColorProperty =
+ DependencyProperty.Register("Color", typeof(Color), typeof(RealTimeGraphControl), new PropertyMetadata(Colors.DodgerBlue));
+
+
+
public void InvalidateGraph()
{
InnerGraph.Clear();
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs
index 597dfd819..daa24f087 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs
@@ -71,6 +71,14 @@ namespace Tango.MachineStudio.UI
LogManager.Categories.Clear();
LogManager.Categories.AddRange(SettingsManager.Default.MachineStudio.LoggingCategories);
+ if (LogManager.Categories.Count == 0)
+ {
+ LogManager.Categories.Add(LogCategory.Critical);
+ LogManager.Categories.Add(LogCategory.Error);
+ LogManager.Categories.Add(LogCategory.General);
+ LogManager.Categories.Add(LogCategory.Warning);
+ }
+
LogManager.RegisterLogger(new VSOutputLogger());
LogManager.RegisterLogger(new FileLogger());
}