aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-04-23 22:25:54 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-04-23 22:25:54 +0300
commitebcb9ce27131e4bbd14c96b5f897a67bc752aaeb (patch)
tree293aee8b1751ce7fce542645722c0f1a96b73097 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician
parent52967e858bd52621208f6360e84f4c47ec435816 (diff)
parent636ad730569dfef1a4ee04c8d716d510bcc47ee1 (diff)
downloadTango-ebcb9ce27131e4bbd14c96b5f897a67bc752aaeb.tar.gz
Tango-ebcb9ce27131e4bbd14c96b5f897a67bc752aaeb.zip
merge alarm handling from remote
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml2
-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/Tango.MachineStudio.Technician.csproj14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechGraphController.cs15
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs3
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs3
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs15
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml130
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml.cs20
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/app.config26
10 files changed, 127 insertions, 105 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml
index 22fd8eaa8..9b9334355 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml
@@ -32,7 +32,7 @@
<!--Content-->
<Grid>
<!--<Viewbox Stretch="Fill">-->
- <controls:RealTimeGraphControl x:Name="InnerGraph" IsHitTestVisible="{Binding RelativeSource={RelativeSource AncestorType=local:ElementsEditor},Path=IsEditable,Converter={StaticResource BooleanInverseConverter}}" x:FieldModifier="public" DisplayName="{Binding TechMonitor.Description}" DisplayUnits="{Binding TechMonitor.Units}" StringFormat="{Binding DecimalPlaces,Converter={StaticResource DecimalPlacesToStringFormatConverter}}" />
+ <controls:WpfGraphControl x:Name="InnerGraph" IsHitTestVisible="{Binding RelativeSource={RelativeSource AncestorType=local:ElementsEditor},Path=IsEditable,Converter={StaticResource BooleanInverseConverter}}" x:FieldModifier="public" DisplayName="{Binding TechMonitor.Description}" DisplayUnits="{Binding TechMonitor.Units}" StringFormat="{Binding DecimalPlaces,Converter={StaticResource DecimalPlacesToStringFormatConverter}}" />
<!--</Viewbox>-->
</Grid>
<!--Content-->
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 ca2481de6..622ddfa8b 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
@@ -32,9 +32,9 @@
<!--Content-->
<Grid>
<!--<Viewbox Stretch="Fill">-->
- <controls:RealTimeGraphControl x:Name="InnerGraph" IsHitTestVisible="{Binding RelativeSource={RelativeSource AncestorType=local:ElementsEditor},Path=IsEditable,Converter={StaticResource BooleanInverseConverter}}" x:FieldModifier="public" DisplayName="{Binding TechMonitor.Description}" DisplayUnits="{Binding TechMonitor.Units}" StringFormat="{Binding DecimalPlaces,Converter={StaticResource DecimalPlacesToStringFormatConverter}}">
+ <controls:WpfGraphControl x:Name="InnerGraph" IsHitTestVisible="{Binding RelativeSource={RelativeSource AncestorType=local:ElementsEditor},Path=IsEditable,Converter={StaticResource BooleanInverseConverter}}" x:FieldModifier="public" DisplayName="{Binding TechMonitor.Description}" DisplayUnits="{Binding TechMonitor.Units}" StringFormat="{Binding DecimalPlaces,Converter={StaticResource DecimalPlacesToStringFormatConverter}}">
- </controls:RealTimeGraphControl>
+ </controls:WpfGraphControl>
<!--</Viewbox>-->
</Grid>
<!--Content-->
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 7e6f4e111..ff45bcbf9 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
@@ -522,16 +522,12 @@
</None>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\..\..\SideChains\RealTimeGraphEx\RealTimeGraphEx.csproj">
- <Project>{b9ae25d6-be35-492f-9079-21a7f3e6f7cc}</Project>
- <Name>RealTimeGraphEx</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\..\SideChains\RealTimeGraphX.WPF\RealTimeGraphX.WPF.csproj">
- <Project>{99d233c5-fee7-418e-9c25-d4584cb52e28}</Project>
+ <ProjectReference Include="..\..\..\SideChains\RealTimeGraphX-master\RealTimeGraphX.WPF\RealTimeGraphX.WPF.csproj">
+ <Project>{6b9774f7-960d-438e-ad81-c6b9be328d50}</Project>
<Name>RealTimeGraphX.WPF</Name>
</ProjectReference>
- <ProjectReference Include="..\..\..\SideChains\RealTimeGraphX\RealTimeGraphX.csproj">
- <Project>{6d55a3b8-46d3-493a-a143-aebd2b98d683}</Project>
+ <ProjectReference Include="..\..\..\SideChains\RealTimeGraphX-master\RealTimeGraphX\RealTimeGraphX.csproj">
+ <Project>{f13a489c-80ee-4cd0-bdd4-92d959215646}</Project>
<Name>RealTimeGraphX</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\Tango.BL\Tango.BL.csproj">
@@ -728,7 +724,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
+ <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechGraphController.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechGraphController.cs
index 28c75f79f..ca132095c 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechGraphController.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechGraphController.cs
@@ -1,8 +1,7 @@
using RealTimeGraphX;
using RealTimeGraphX.DataPoints;
using RealTimeGraphX.Renderers;
-using RealTimeGraphX.WPF.DataSeries;
-using RealTimeGraphX.WPF.Painters;
+using RealTimeGraphX.WPF;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -11,19 +10,11 @@ using System.Threading.Tasks;
namespace Tango.MachineStudio.Technician
{
- public class TechGraphController : GraphControllerBase<WpfDataSeries, TimeSpanDataPoint, DoubleDataPoint>
+ public class TechGraphController : WpfGraphController<TimeSpanDataPoint, DoubleDataPoint>
{
public TechGraphController(int refreshRate = 50)
{
- var renderer = new GraphScrollingRenderer<WpfDataSeries, TimeSpanDataPoint, DoubleDataPoint>()
- {
- RefreshRate = TimeSpan.FromMilliseconds(refreshRate)
- };
-
- var painter = new WpfScrollingGraphPainter();
-
- ConnectOutput(renderer);
- renderer.ConnectOutput(painter);
+ RefreshRate = TimeSpan.FromMilliseconds(50);
}
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs
index 377738d09..1412175a0 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs
@@ -1,4 +1,5 @@
using RealTimeGraphX.DataPoints;
+using RealTimeGraphX.WPF;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -213,7 +214,7 @@ namespace Tango.MachineStudio.Technician.TechItems
{
if (Editor != null)
{
- var controller = Editor.InnerGraph.Controller;
+ var controller = Editor.InnerGraph.Controller as WpfGraphController<TimeSpanDataPoint,DoubleDataPoint>;
controller.Range.MaximumX = new TimeSpanDataPoint(TimeSpan.FromSeconds(_duration));
controller.Range.MinimumY = new DoubleDataPoint(_min);
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs
index 808dadb68..8ccd5e718 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs
@@ -1,4 +1,5 @@
using RealTimeGraphX.DataPoints;
+using RealTimeGraphX.WPF;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -217,7 +218,7 @@ namespace Tango.MachineStudio.Technician.TechItems
{
if (Editor != null)
{
- var controller = Editor.InnerGraph.Controller;
+ var controller = Editor.InnerGraph.Controller as WpfGraphController<TimeSpanDataPoint, DoubleDataPoint>; ;
controller.Range.MaximumX = new TimeSpanDataPoint(TimeSpan.FromSeconds(_duration));
controller.Range.MinimumY = new DoubleDataPoint(_min);
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 666a56704..72e43d7b0 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
@@ -1,6 +1,5 @@
using Google.Protobuf.Collections;
using Microsoft.Win32;
-using RealTimeGraphEx.Controllers;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -36,9 +35,9 @@ using Tango.MachineStudio.Technician.Models;
using Tango.Logging;
using Microsoft.WindowsAPICodePack.Dialogs;
using RealTimeGraphX;
-using RealTimeGraphX.WPF.DataSeries;
using RealTimeGraphX.DataPoints;
using Tango.MachineStudio.Technician.Views;
+using RealTimeGraphX.WPF;
namespace Tango.MachineStudio.Technician.ViewModels
{
@@ -1024,7 +1023,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
var editor = element as SingleGraphElementEditor;
TechGraphController controller = new TechGraphController();
- controller.AddDataSeries(new WpfDataSeries()
+ controller.DataSeriesCollection.Add(new WpfGraphDataSeries()
{
Stroke = Colors.DodgerBlue,
});
@@ -1043,7 +1042,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
for (int i = 0; i < graphItem.TechMonitor.ChannelCount; i++)
{
- controller.AddDataSeries(new WpfDataSeries()
+ controller.DataSeriesCollection.Add(new WpfGraphDataSeries()
{
Stroke = ColorHelper.GetRandomColor(),
Name = graphItem.TechMonitor.Name.First() + (i + 1).ToString(),
@@ -1437,7 +1436,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
controller.Range.MaximumY = item.TechMonitor.Max;
controller.Range.MaximumX = TimeSpan.FromSeconds(10);
- controller.AddDataSeries(new WpfDataSeries()
+ controller.DataSeriesCollection.Add(new WpfGraphDataSeries()
{
Stroke = Colors.DodgerBlue,
});
@@ -1498,7 +1497,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
for (int i = 0; i < item.TechMonitor.ChannelCount; i++)
{
- controller.AddDataSeries(new WpfDataSeries()
+ controller.DataSeriesCollection.Add(new WpfGraphDataSeries()
{
Stroke = ColorHelper.GetRandomColor(),
Name = item.TechMonitor.Name.First() + (i + 1).ToString(),
@@ -1749,13 +1748,13 @@ namespace Tango.MachineStudio.Technician.ViewModels
/// <exception cref="NotImplementedException"></exception>
private void InitJobRunnerItem(JobRunnerItem item)
{
- item.StartJob += () =>
+ item.StartJob += async () =>
{
try
{
CheckMachineOperator();
- var handler = MachineOperator.Print(item.Job, item.ProcessParameters);
+ var handler = await MachineOperator.Print(item.Job, item.ProcessParameters);
item.JobHandler = handler;
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 92e2b292a..8820fcd4d 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
@@ -26,9 +26,9 @@
<localConverters:SecondsToTimeSpanConverter x:Key="SecondsToTimeSpanConverter" />
<DataTemplate x:Key="TabTemplate">
- <Grid>
- <Grid.Style>
- <Style TargetType="Grid">
+ <Border IsVisibleChanged="Border_IsVisibleChanged">
+ <Border.Style>
+ <Style TargetType="Border">
<Setter Property="Visibility" Value="Visible"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding IsSelected}" Value="False">
@@ -36,12 +36,13 @@
</DataTrigger>
</Style.Triggers>
</Style>
- </Grid.Style>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
- <editors:ElementsEditor
+ </Border.Style>
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="1*"/>
+ <ColumnDefinition Width="Auto"/>
+ </Grid.ColumnDefinitions>
+ <editors:ElementsEditor
x:Name="editor"
Elements="{Binding Elements}"
Loaded="Editor_Loaded"
@@ -61,63 +62,64 @@
BorderBrush="#1EA9FF"
BorderThickness="1">
- <editors:ElementsEditor.Style>
- <Style TargetType="editors:ElementsEditor">
- <Setter Property="IsEditable" Value="True"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding ElementName=listMode,Path=SelectedIndex}" Value="1">
- <Setter Property="IsEditable" Value="False"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </editors:ElementsEditor.Style>
+ <editors:ElementsEditor.Style>
+ <Style TargetType="editors:ElementsEditor">
+ <Setter Property="IsEditable" Value="True"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding ElementName=listMode,Path=SelectedIndex}" Value="1">
+ <Setter Property="IsEditable" Value="False"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </editors:ElementsEditor.Style>
- <editors:ElementsEditor.ContextMenu>
- <ContextMenu DataContext="{Binding Path=PlacementTarget, RelativeSource={RelativeSource Self}}">
- <MenuItem Header="Cut (Ctrl+X)" Command="{Binding CutCommand}" MinWidth="210">
- <MenuItem.Icon>
- <fa:ImageAwesome Icon="Cut" Width="16" />
- </MenuItem.Icon>
- </MenuItem>
- <MenuItem Header="Copy (Ctrl+C)" Command="{Binding CopyCommand}">
- <MenuItem.Icon>
- <fa:ImageAwesome Icon="Copy" Width="16" />
- </MenuItem.Icon>
- </MenuItem>
- <MenuItem Header="Paste (Ctrl+V)" Command="{Binding PasteCommand}">
- <MenuItem.Icon>
- <fa:ImageAwesome Icon="Paste" Width="16" />
- </MenuItem.Icon>
- </MenuItem>
- <Separator/>
- <MenuItem Header="Undo (Ctrl+Z)" Command="{Binding UndoCommand}">
- <MenuItem.Icon>
- <fa:ImageAwesome Icon="Undo" Width="16" />
- </MenuItem.Icon>
- </MenuItem>
- <MenuItem Header="Redo (Ctrl+Y)" Command="{Binding RedoCommand}">
- <MenuItem.Icon>
- <fa:ImageAwesome Icon="RotateRight" Width="16"></fa:ImageAwesome>
- </MenuItem.Icon>
- </MenuItem>
- <Separator/>
- <MenuItem Header="Delete (DELETE)" Command="{Binding DeleteCommand}">
- <MenuItem.Icon>
- <fa:ImageAwesome Icon="Recycle" Width="16" />
- </MenuItem.Icon>
- </MenuItem>
- <Separator/>
- <MenuItem Header="Select All (Ctrl+A)" Command="{Binding SelectAllCommand}">
- <MenuItem.Icon>
- <fa:ImageAwesome Icon="Th" Width="16" />
- </MenuItem.Icon>
- </MenuItem>
- </ContextMenu>
- </editors:ElementsEditor.ContextMenu>
- </editors:ElementsEditor>
+ <editors:ElementsEditor.ContextMenu>
+ <ContextMenu DataContext="{Binding Path=PlacementTarget, RelativeSource={RelativeSource Self}}">
+ <MenuItem Header="Cut (Ctrl+X)" Command="{Binding CutCommand}" MinWidth="210">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="Cut" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <MenuItem Header="Copy (Ctrl+C)" Command="{Binding CopyCommand}">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="Copy" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <MenuItem Header="Paste (Ctrl+V)" Command="{Binding PasteCommand}">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="Paste" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <Separator/>
+ <MenuItem Header="Undo (Ctrl+Z)" Command="{Binding UndoCommand}">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="Undo" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <MenuItem Header="Redo (Ctrl+Y)" Command="{Binding RedoCommand}">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="RotateRight" Width="16"></fa:ImageAwesome>
+ </MenuItem.Icon>
+ </MenuItem>
+ <Separator/>
+ <MenuItem Header="Delete (DELETE)" Command="{Binding DeleteCommand}">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="Recycle" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <Separator/>
+ <MenuItem Header="Select All (Ctrl+A)" Command="{Binding SelectAllCommand}">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="Th" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
+ </ContextMenu>
+ </editors:ElementsEditor.ContextMenu>
+ </editors:ElementsEditor>
- <Slider Grid.Column="1" Orientation="Vertical" Margin="5" Maximum="3" Minimum="0.2" Value="{Binding ElementName=editor,Path=ScaleFactor}"></Slider>
- </Grid>
+ <Slider Grid.Column="1" Orientation="Vertical" Margin="5" Maximum="3" Minimum="0.2" Value="{Binding ElementName=editor,Path=ScaleFactor}"></Slider>
+ </Grid>
+ </Border>
</DataTemplate>
</UserControl.Resources>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml.cs
index 694debd26..e4ebe2424 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml.cs
@@ -23,11 +23,14 @@ namespace Tango.MachineStudio.Technician.Views
public partial class MachineTechView : UserControl
{
private MachineTechViewVM _vm;
+ private Dictionary<Border, UIElement> _tabs_content;
public MachineTechView()
{
InitializeComponent();
+ _tabs_content = new Dictionary<Border, UIElement>();
+
this.Loaded += (x, y) =>
{
_vm = DataContext as MachineTechViewVM;
@@ -67,5 +70,22 @@ namespace Tango.MachineStudio.Technician.Views
(editor.UndoRedoStatesProvider as ElementsEditorUndoRedoStatesProvider).StateExecuted += MachineTechView_StateExecuted;
}
+
+ private void Border_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
+ {
+ Border border = sender as Border;
+ if (border.Visibility != Visibility.Visible)
+ {
+ _tabs_content[border] = border.Child;
+ border.Child = null;
+ }
+ else
+ {
+ if (_tabs_content.ContainsKey(border))
+ {
+ border.Child = _tabs_content[border];
+ }
+ }
+ }
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/app.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/app.config
index 96b77fa8f..8d0c46fa1 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/app.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/app.config
@@ -20,7 +20,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
@@ -28,27 +28,27 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
@@ -74,6 +74,18 @@
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
</dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Xml.ReaderWriter" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Text.Encoding.CodePages" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
+ </dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>