From 1595b9c2a81e272305c093f45eb45fb08e0378ed Mon Sep 17 00:00:00 2001 From: Emmanuele Sassi Date: Fri, 9 Sep 2016 11:39:17 +0000 Subject: [PATCH] EgtCAM5 : - Chiusura automatica expander nel DrawPanel e nel OperationParameters Expander. - Migliorie varie. --- AboutBoxWindow/AboutBoxView.xaml.vb | 7 +- AttachedBehaviours/AutomaticCloseExpander.vb | 151 ++++++++++++++++++ EgtCAM5.vbproj | 1 + MainWindow/MainWindowViewModel.vb | 4 + ProjectPage/DrawPanel/DrawPanelView.xaml | 29 ++-- .../OperationExpanderView.xaml | 22 +-- .../OperationExpanderView.xaml.vb | 101 +++++++++++- .../SimulationExpanderView.xaml | 139 ++++++++-------- .../SimulationExpanderViewModel.vb | 38 ++++- ProjectPage/OptionPanel/OptionPanelView.xaml | 3 +- .../OptionPanel/OptionPanelView.xaml.vb | 6 +- ToolsDbWindow/ToolTreeView2.vb | 4 +- ToolsDbWindow/ToolsDbViewModel.vb | 15 +- 13 files changed, 417 insertions(+), 103 deletions(-) create mode 100644 AttachedBehaviours/AutomaticCloseExpander.vb diff --git a/AboutBoxWindow/AboutBoxView.xaml.vb b/AboutBoxWindow/AboutBoxView.xaml.vb index 1cab8fb..60844cd 100644 --- a/AboutBoxWindow/AboutBoxView.xaml.vb +++ b/AboutBoxWindow/AboutBoxView.xaml.vb @@ -17,17 +17,18 @@ Public Class AboutBoxView End Sub Private Sub AboutBoxView_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded - Me.Owner = Application.Current.MainWindow - Me.Owner = Owner + 'Me.Owner = Application.Current.MainWindow + 'Me.Owner = Owner Me.Top = Owner.Top + (Owner.Height / 2 - Me.Height / 2) Me.Left = Owner.Left + (Owner.Width / 2 - Me.Width / 2) End Sub Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click - Me.Close() + Me.Visibility = Windows.Visibility.Hidden End Sub Private Sub AboutBoxWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized + Me.Owner = Application.Current.MainWindow DescriptionLbl.Text = My.Application.Info.Description.ToString() VersionLbl.Text = "Version : " & My.Application.Info.Version.Major.ToString() & "." & My.Application.Info.Version.Minor.ToString() & diff --git a/AttachedBehaviours/AutomaticCloseExpander.vb b/AttachedBehaviours/AutomaticCloseExpander.vb new file mode 100644 index 0000000..fc44883 --- /dev/null +++ b/AttachedBehaviours/AutomaticCloseExpander.vb @@ -0,0 +1,151 @@ +'---------------------------------------------------------------------------- +' EgalTech 2016-2016 +'---------------------------------------------------------------------------- +' File : AutomaticCloseExpander.vb Data : 8.9.16 Versione : 1 +' Content : AutomatiCloseExpander Behavior (see detailed description below) +' +' Created by : Emmanuele Sassi +' Edited by : +' +' Changes : +' +'---------------------------------------------------------------------------- +' +' Behavior description: permit to close other Expander when one is about to expand if they have to use more space than how many the StackPanel offers. +' Control that can use this behavior: StackPanel +' Internal structure of the control that can use it (example): +' +' +' +' +' @@ -56,7 +53,7 @@ - + @@ -85,7 +82,7 @@ - + @@ -129,7 +126,7 @@ - + @@ -157,5 +154,9 @@ - + + + + + diff --git a/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderView.xaml b/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderView.xaml index c78b61a..67c0437 100644 --- a/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderView.xaml +++ b/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderView.xaml @@ -3,11 +3,11 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" - xmlns:local="clr-namespace:EgtCAM5" + xmlns:EgtCAM5="clr-namespace:EgtCAM5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"> - + 0 1 2 @@ -25,9 +25,9 @@ - + - + @@ -39,7 +39,7 @@ - + @@ -64,9 +64,10 @@ - - - + + @@ -86,7 +87,7 @@ IsSynchronizedWithCurrentItem="True"> - + - + - + - + - + - - + + + +