-gestione interfaccia con griglia dinamica
This commit is contained in:
@@ -15,8 +15,6 @@
|
||||
</Expander.Header>
|
||||
<UniformGrid Columns="3">
|
||||
<Button x:Name="PuntoBtn" ToolTip="Punto" Style="{StaticResource DrawPanelButton}"
|
||||
ToolTipService.ShowOnDisabled="True"
|
||||
ContextMenuService.Placement="Right"
|
||||
Command="{Binding PointBaseCommand}" IsEnabled="{Binding bLayerOk}">
|
||||
<Image Source="/Resources/DrawPanel/Point+.png" Stretch="Uniform"/>
|
||||
<Button.ContextMenu>
|
||||
|
||||
@@ -454,6 +454,16 @@ Public Class DrawPanelVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_LeftTray_Visibility As Visibility = Visibility.Visible
|
||||
Public Property LeftTray_Visibility As Visibility
|
||||
Get
|
||||
Return m_LeftTray_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_LeftTray_Visibility = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Button state
|
||||
|
||||
' Definizione comandi
|
||||
|
||||
@@ -161,9 +161,6 @@
|
||||
<DependentUpon>CurrSetUpV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CurrSetUp\CurrSetUpVM.vb" />
|
||||
<Compile Include="LeftTray\GridSplitterLeft.xaml.vb">
|
||||
<DependentUpon>GridSplitterLeft.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="LeftTray\LeftTrayV.xaml.vb">
|
||||
<DependentUpon>LeftTrayV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -457,10 +454,6 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="LeftTray\GridSplitterLeft.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="LeftTray\LeftTrayV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<Grid x:Class="GridSplitterLeft"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:EgtCAM5"
|
||||
DockPanel.Dock="Left">
|
||||
|
||||
<GridSplitter Width="5"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Stretch"/>
|
||||
|
||||
</Grid>
|
||||
@@ -1,3 +0,0 @@
|
||||
Public Class GridSplitterLeft
|
||||
|
||||
End Class
|
||||
@@ -1,6 +1,6 @@
|
||||
<UserControl x:Class="DrawOptionPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity">
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<UserControl x:Class="MachiningOptionPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity">
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="OptionPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
TitleBarOrientation="Vertical"
|
||||
Visibility="{Binding Panel_Visibility}">
|
||||
|
||||
+33
-22
@@ -101,26 +101,41 @@ Public Class ProjectVM
|
||||
Dim m_SceneContentControlV As New SceneContentControlV
|
||||
|
||||
' creo colonne griglia dinamica
|
||||
Dim gridCol1 As ColumnDefinition = New ColumnDefinition()
|
||||
'gridCol1.Width = New GridLength(100)
|
||||
Dim gridCol2 As ColumnDefinition = New ColumnDefinition()
|
||||
Dim gridCol3 As ColumnDefinition = New ColumnDefinition()
|
||||
Dim gridCol1 As ColumnDefinition = New ColumnDefinition With {
|
||||
.Width = New GridLength(1, GridUnitType.Auto)
|
||||
}
|
||||
Dim gridCol2 As ColumnDefinition = New ColumnDefinition With {
|
||||
.Width = New GridLength(1, GridUnitType.Star)
|
||||
}
|
||||
Dim gridCol3 As ColumnDefinition = New ColumnDefinition With {
|
||||
.Width = New GridLength(1, GridUnitType.Auto)
|
||||
}
|
||||
' aggiungo le colonne alla griglia
|
||||
m_DynamicGrid.ColumnDefinitions.Add(gridCol1)
|
||||
m_DynamicGrid.ColumnDefinitions.Add(gridCol2)
|
||||
m_DynamicGrid.ColumnDefinitions.Add(gridCol3)
|
||||
|
||||
' creo righe griglia dinamica
|
||||
Dim gridRow1 As RowDefinition = New RowDefinition()
|
||||
gridRow1.Height = New GridLength(50, GridUnitType.Auto)
|
||||
Dim gridRow2 As RowDefinition = New RowDefinition()
|
||||
Dim gridRow3 As RowDefinition = New RowDefinition()
|
||||
Dim gridRow1 As RowDefinition = New RowDefinition With {
|
||||
.Height = New GridLength(1, GridUnitType.Auto)
|
||||
}
|
||||
Dim gridRow2 As RowDefinition = New RowDefinition With {
|
||||
.Height = New GridLength(1, GridUnitType.Star)
|
||||
}
|
||||
Dim gridRow3 As RowDefinition = New RowDefinition With {
|
||||
.Height = New GridLength(1, GridUnitType.Auto)
|
||||
}
|
||||
' aggiungo righe alla griglia
|
||||
m_DynamicGrid.RowDefinitions.Add(gridRow1)
|
||||
m_DynamicGrid.RowDefinitions.Add(gridRow2)
|
||||
m_DynamicGrid.RowDefinitions.Add(gridRow3)
|
||||
|
||||
' creo gridsplitter
|
||||
Dim gridSplitter As GridSplitter = New GridSplitter With {
|
||||
.Width = 20,
|
||||
.HorizontalAlignment = HorizontalAlignment.Right,
|
||||
.VerticalAlignment = VerticalAlignment.Stretch
|
||||
}
|
||||
|
||||
' aggiungo TopTrayV
|
||||
Grid.SetRow(m_TopTrayV, 0)
|
||||
@@ -129,31 +144,25 @@ Public Class ProjectVM
|
||||
' aggiungo LeftTrayV
|
||||
Grid.SetRow(m_LeftTrayV, 1)
|
||||
Grid.SetColumn(m_LeftTrayV, 0)
|
||||
'Grid.SetRowSpan(m_LeftTrayV, 2)
|
||||
Grid.SetRowSpan(m_LeftTrayV, 2)
|
||||
|
||||
' aggiungo RightTrayV
|
||||
Grid.SetRow(m_RightTrayV, 1)
|
||||
Grid.SetColumn(m_RightTrayV, 2)
|
||||
Grid.SetRowSpan(m_RightTrayV, 2)
|
||||
|
||||
' aggiungo RightTrayV
|
||||
'aggiungo gridSplitter
|
||||
Grid.SetRow(gridSplitter, 1)
|
||||
Grid.SetColumn(gridSplitter, 1)
|
||||
|
||||
' aggiungo BottomTrayV
|
||||
Grid.SetRow(m_BottomTrayV, 2)
|
||||
Grid.SetColumnSpan(m_TopTrayV, 3)
|
||||
Grid.SetColumn(m_BottomTrayV, 1)
|
||||
|
||||
' aggiungo Scena
|
||||
Grid.SetRow(m_SceneContentControlV, 1)
|
||||
Grid.SetColumn(m_SceneContentControlV, 1)
|
||||
|
||||
'' aggiungo TopTrayV alla griglia
|
||||
'm_DynamicGrid.Children.Add(m_TopTrayV)
|
||||
'' aggiungo LeftTrayV alla griglia
|
||||
'm_DynamicGrid.Children.Add(m_LeftTrayV)
|
||||
'' aggiungo RightTrayV alla griglia
|
||||
'm_DynamicGrid.Children.Add(m_RightTrayV)
|
||||
'' aggiungo BottomTrayV alla griglia
|
||||
'm_DynamicGrid.Children.Add(m_BottomTrayV)
|
||||
'' aggiungo SceneContentControlV alla griglia
|
||||
'm_DynamicGrid.Children.Add(m_SceneContentControlV)
|
||||
|
||||
' aggiungo componenti interfaccia
|
||||
Dim bPlugin As Boolean = False
|
||||
Dim PluginDirNameList() As String = {}
|
||||
@@ -206,6 +215,8 @@ Public Class ProjectVM
|
||||
m_DynamicGrid.Children.Add(m_TopTrayV)
|
||||
' aggiungo LeftTrayV alla griglia
|
||||
m_DynamicGrid.Children.Add(m_LeftTrayV)
|
||||
' aggiungo gridSplitter alla griglia
|
||||
m_DynamicGrid.Children.Add(gridSplitter)
|
||||
' aggiungo RightTrayV alla griglia
|
||||
m_DynamicGrid.Children.Add(m_RightTrayV)
|
||||
' aggiungo BottomTrayV alla griglia
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:EgtCAM5"
|
||||
DockPanel.Dock="Right">
|
||||
|
||||
<local:OptionPanelV DataContext="{StaticResource OptionPanelViewModel}"/>
|
||||
</Grid>
|
||||
|
||||
@@ -775,7 +775,8 @@ Public Class TopCommandBarVM
|
||||
' ProjectV
|
||||
If Not IsNothing(Map.refProjectV) Then
|
||||
If IniFile.IsActivePlugin() Then
|
||||
For Each Panel In Map.refProjectVM.PanelList
|
||||
'For Each Panel In Map.refProjectVM.PanelList
|
||||
For Each Panel In Map.refProjectVM.DynamicGridList
|
||||
If TypeOf Panel Is WinFormPluginControlV Then
|
||||
Dim WinFormPanel As WinFormPluginControlV = TryCast(Panel, WinFormPluginControlV)
|
||||
If Not IsNothing(WinFormPanel) Then
|
||||
@@ -823,7 +824,8 @@ Public Class TopCommandBarVM
|
||||
Friend Sub MachiningMode_IsChecked()
|
||||
' ProjectV
|
||||
If IniFile.IsActivePlugin() Then
|
||||
For Each Panel In Map.refProjectVM.PanelList
|
||||
'For Each Panel In Map.refProjectVM.PanelList
|
||||
For Each Panel In Map.refProjectVM.DynamicGridList
|
||||
If TypeOf Panel Is WinFormPluginControlV Then
|
||||
Dim WinFormPanel As WinFormPluginControlV = TryCast(Panel, WinFormPluginControlV)
|
||||
If Not IsNothing(WinFormPanel) Then
|
||||
|
||||
@@ -458,6 +458,10 @@
|
||||
<Style x:Key="DrawPanelButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="30"/>
|
||||
<Setter Property="ToolTipService.ShowOnDisabled" Value="True"/>
|
||||
<Setter Property="ContextMenuService.Placement" Value="Right"/>
|
||||
<Setter Property="ContextMenuService.HorizontalOffset" Value="-1.5"/>
|
||||
<Setter Property="ContextMenuService.VerticalOffset" Value="-3.5"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="MachiningsTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
|
||||
|
||||
Reference in New Issue
Block a user