Merge branch 'develop' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtstone3d into develop
This commit is contained in:
@@ -211,6 +211,9 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ProjManager\save.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ProjManager\folder.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtStone3D\EgtStone3DR32.exe
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<!--apertura file-->
|
||||
<Button Command="{Binding OpenFileCmd}">
|
||||
<Image Source="/Resources/ProjManager/save.png"/>
|
||||
<Image Source="/Resources/ProjManager/folder.png"/>
|
||||
</Button>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
@@ -1,42 +1,87 @@
|
||||
<UserControl x:Class="SceneButtonV"
|
||||
xmlns:local="clr-namespace:EgtStone3D"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<DockPanel>
|
||||
<StackPanel Orientation="Horizontal" DockPanel.Dock="Top">
|
||||
<ListView ItemsSource="{Binding TopListBtn}">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate x:Name="SingleLineDataTemplate">
|
||||
<StackPanel Orientation="Horizontal" Height="44">
|
||||
<Button Content="{Binding Name}" VerticalAlignment="Center"
|
||||
Command="{Binding CmdBtn}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" DockPanel.Dock="Bottom">
|
||||
<Button Content="BOTTOM BUTTON" Height="50" Width="50"/>
|
||||
<Button Content="BOTTOM BUTTON" Height="50" Width="50"/>
|
||||
<Button Content="BOTTOM BUTTON" Height="50" Width="50"/>
|
||||
<Button Content="BOTTOM BUTTON" Height="50" Width="50"/>
|
||||
<Button Content="BOTTOM BUTTON" Height="50" Width="50"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Vertical" DockPanel.Dock="Right">
|
||||
<Button Content="RIGHT BUTTON" Height="50" Width="50"/>
|
||||
<Button Content="RIGHT BUTTON" Height="50" Width="50"/>
|
||||
<Button Content="RIGHT BUTTON" Height="50" Width="50"/>
|
||||
<Button Content="RIGHT BUTTON" Height="50" Width="50"/>
|
||||
<Button Content="RIGHT BUTTON" Height="50" Width="50"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Vertical" DockPanel.Dock="Left">
|
||||
<Button Content="LEFT BUTTON" Height="50" Width="50"/>
|
||||
<Button Content="LEFT BUTTON" Height="50" Width="50"/>
|
||||
<Button Content="LEFT BUTTON" Height="50" Width="50"/>
|
||||
<Button Content="LEFT BUTTON" Height="50" Width="50"/>
|
||||
</StackPanel>
|
||||
|
||||
<Canvas Width="50" Height="50" Background="Transparent"/>
|
||||
</DockPanel>
|
||||
|
||||
<DockPanel>
|
||||
<ItemsControl ItemsSource="{Binding TopListBtn}" DockPanel.Dock="Top" HorizontalAlignment="left">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type local:_Button}">
|
||||
<Button Content="{Binding Name}" VerticalAlignment="Center"
|
||||
Command="{Binding CmdBtn}"/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type local:_ToggleButton}">
|
||||
<ToggleButton Content="{Binding Name}" VerticalAlignment="Center"
|
||||
Command="{Binding CmdBtn}" IsChecked="{Binding IsChecked}"/>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
|
||||
</ItemsControl>
|
||||
|
||||
<ItemsControl ItemsSource="{Binding BottomListBtn}" DockPanel.Dock="Bottom" HorizontalAlignment="Left">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type local:_Button}">
|
||||
<Button Content="{Binding Name}" VerticalAlignment="Center"
|
||||
Command="{Binding CmdBtn}"/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type local:_ToggleButton}">
|
||||
|
||||
<ToggleButton Content="{Binding Name}" VerticalAlignment="Center"
|
||||
Command="{Binding CmdBtn}" IsChecked="{Binding IsChecked}"/>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
|
||||
<ItemsControl ItemsSource="{Binding RightListBtn}" DockPanel.Dock="Right" HorizontalAlignment="Right">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Vertical"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type local:_Button}">
|
||||
<Button Content="{Binding Name}" VerticalAlignment="Center"
|
||||
Command="{Binding CmdBtn}"/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type local:_ToggleButton}">
|
||||
<ToggleButton Content="{Binding Name}" VerticalAlignment="Center"
|
||||
Command="{Binding CmdBtn}" IsChecked="{Binding IsChecked}"/>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
|
||||
</ItemsControl>
|
||||
|
||||
<ItemsControl ItemsSource="{Binding LeftListBtn}" DockPanel.Dock="Left" HorizontalAlignment="Right">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Vertical"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type local:_Button}">
|
||||
<Button Content="{Binding Name}" VerticalAlignment="Center"
|
||||
Command="{Binding CmdBtn}"/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type local:_ToggleButton}">
|
||||
|
||||
<ToggleButton Content="{Binding Name}" VerticalAlignment="Center"
|
||||
Command="{Binding CmdBtn}" IsChecked="{Binding IsChecked}"/>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
|
||||
</ItemsControl>
|
||||
|
||||
<Canvas Width="50" Height="50" Background="Transparent"/>
|
||||
</DockPanel>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -22,10 +22,8 @@ Public Class SceneButtonV
|
||||
#Region "METHODS"
|
||||
|
||||
Private Sub Init()
|
||||
'Me.Width = Map.refMainWindowV.ActualWidth
|
||||
'Me.Height = Map.refMainWindowV.ActualHeight
|
||||
Me.Width = 1920
|
||||
Me.Height = 600
|
||||
Me.Width = Map.refMainWindowV.ActualWidth
|
||||
Me.Height = Map.refMainWindowV.ActualHeight - 50
|
||||
End Sub
|
||||
|
||||
Private Sub SceneButtonV_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib.EgtInterface
|
||||
Imports EgtUILib.EgtInterface
|
||||
Imports System.Windows.Forms.AxHost
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class SceneButtonVM
|
||||
@@ -44,10 +45,30 @@ Public Class SceneButtonVM
|
||||
End Property
|
||||
|
||||
Sub New()
|
||||
SetButtonsLocation("TopListBtn", m_TopListBtn)
|
||||
SetButtonsLocation("LeftListBtn", m_LeftListBtn)
|
||||
SetButtonsLocation("RightListBtn", m_RightListBtn)
|
||||
SetButtonsLocation("BottomListBtn", m_BottomListBtn)
|
||||
End Sub
|
||||
|
||||
Private Sub SetButtonsLocation(PositionList As String, ListBtn As List(Of ScenaBtn))
|
||||
Dim Index As Integer = 1
|
||||
Dim sBtnString As String = String.Empty
|
||||
While GetMainPrivateProfileString("LeftListBtn", "Btn_" & Index.ToString, "", sBtnString) > 0
|
||||
m_TopListBtn.Add(New ScenaBtn(0, "Btn 1", "Img 1"))
|
||||
While GetMainPrivateProfileString(PositionList, "Btn_" & Index.ToString, "", sBtnString) > 0
|
||||
Dim sItems As String() = Split(sBtnString, ",")
|
||||
If sItems.Count < 3 Then
|
||||
' Errore di configurazione comando: mancano dei parametri
|
||||
'...
|
||||
Else
|
||||
Dim nType As Integer = 0
|
||||
If sItems(0) = "Button" Then
|
||||
' Button
|
||||
ListBtn.Add(New _Button(sItems(1), sItems(2), sItems(3)))
|
||||
ElseIf sItems(0) = "ToggleButton" Then
|
||||
' ToggelButton
|
||||
ListBtn.Add(New _ToggleButton(sItems(1), sItems(2), sItems(3)))
|
||||
End If
|
||||
End If
|
||||
Index = Index + 1
|
||||
sBtnString = String.Empty
|
||||
End While
|
||||
@@ -57,16 +78,6 @@ End Class
|
||||
|
||||
Public Class ScenaBtn
|
||||
|
||||
Private m_Type As Integer
|
||||
Public Property Type As Integer
|
||||
Get
|
||||
Return m_Type
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_Type = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Name As String
|
||||
Public Property Name As String
|
||||
Get
|
||||
@@ -87,10 +98,20 @@ Public Class ScenaBtn
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(_Type As Integer, _Name As String, _Img As String)
|
||||
m_Type = _Type
|
||||
Private m_Flag As String
|
||||
Public Property Flag As String
|
||||
Get
|
||||
Return m_Flag
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Flag = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(_Name As String, _Img As String, _Flag As String)
|
||||
m_Name = _Name
|
||||
m_Img = _Img
|
||||
m_Flag = _Flag
|
||||
End Sub
|
||||
|
||||
Private m_CmdBtn As ICommand
|
||||
@@ -109,12 +130,41 @@ Public Class ScenaBtn
|
||||
|
||||
End Class
|
||||
|
||||
Public Class _Button
|
||||
Inherits ScenaBtn
|
||||
|
||||
Sub New(_Name As String, _Img As String, _Flag As String)
|
||||
MyBase.New(_Name, _Img, _Flag)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class _ToggleButton
|
||||
Inherits ScenaBtn
|
||||
|
||||
Private m_IsChecked As Boolean
|
||||
Public Property IsChecked As Boolean
|
||||
Get
|
||||
Return m_IsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_IsChecked = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Sub New(_Name As String, _Img As String, _Flag As String)
|
||||
MyBase.New(_Name, _Img, _Flag)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Module SceneCmd
|
||||
Public Sub Exec(Name)
|
||||
Public Sub Exec(Flag)
|
||||
Dim _SceneHostVM As SceneHostVM = DirectCast(Map.refSceneHostV.DataContext, SceneHostVM)
|
||||
Dim nVeinCtx As Integer = _SceneHostVM.MainScene.GetCtx()
|
||||
Select Case Name
|
||||
Case "Btn 1"
|
||||
Select Case Flag
|
||||
Case "Pair"
|
||||
EgtSetCurrentContext(nVeinCtx)
|
||||
|
||||
EgtLuaSetGlobIntVar("ASS.nVeinCtx", nVeinCtx)
|
||||
|
||||
Reference in New Issue
Block a user