From 85a6112d2e1eac554cc4cbdfa31cca91d87e6ded Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 15 Apr 2019 10:17:37 +0300 Subject: Implemented catalog importer.. --- .../Views/MachineTechView.xaml | 130 +++++++++++---------- .../Views/MachineTechView.xaml.cs | 20 ++++ 2 files changed, 86 insertions(+), 64 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio') 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 @@ - - - - - - - - - + + + + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + 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 _tabs_content; public MachineTechView() { InitializeComponent(); + _tabs_content = new Dictionary(); + 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]; + } + } + } } } -- cgit v1.3.1