Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| de11954066 |
@@ -567,6 +567,7 @@ Class MainWindow
|
||||
|
||||
Private Sub WorkInProgressBtn_Click(sender As Object, e As RoutedEventArgs) Handles WorkInProgressBtn.Click
|
||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
|
||||
' disbilito Test
|
||||
TestOff()
|
||||
Select Case m_ActivePage
|
||||
|
||||
@@ -49,7 +49,7 @@ Public Class CurrentProjectPageUC
|
||||
m_MainWindow.m_FrameCutPageUC.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
|
||||
'Assegno SceneButtons alla pagina
|
||||
UpperButtonGrid.Children.Add(m_SceneButtons)
|
||||
Me.UpperButtonGrid.Children.Add(m_SceneButtons)
|
||||
|
||||
'Assegnazione scena all'host e posizionamento nella PlacePageGrid
|
||||
CurrentProjectSceneHost.Child = CurrentProjectScene
|
||||
@@ -66,6 +66,7 @@ Public Class CurrentProjectPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub CurrentProjectPage_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
|
||||
' Impostazioni MruLists: carico la lista degli ultimi file caricati/aperti
|
||||
m_MruFiles.Init(S_MRUFILES, 8)
|
||||
If m_bFirst Then
|
||||
|
||||
@@ -33,6 +33,7 @@ Public Class ProjectMgrUC
|
||||
End Sub
|
||||
|
||||
Private Sub ProjectMgrUC_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
|
||||
' Impostazioni
|
||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
m_CurrMachine = m_MainWindow.m_CurrentMachine
|
||||
@@ -269,6 +270,7 @@ Public Class ProjectMgrUC
|
||||
End If
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.Simulation
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub WorkBtn_Click(sender As Object, e As RoutedEventArgs) Handles WorkBtn.Click
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="85.3" d:DesignWidth="597.1">
|
||||
d:DesignHeight="85.3">
|
||||
|
||||
<!-- Definizione del controllo SceneButton -->
|
||||
<Grid Name="SceneButtonsGrid">
|
||||
@@ -16,7 +16,9 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="MeasureBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource MeasureImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
@@ -39,7 +41,15 @@
|
||||
<Button Name="TopViewBtn" Grid.Column="6" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource LookFromTOPImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Button Name="FrontViewBtn" Grid.Column="7" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource LookFromTOPImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="LeftViewBtn" Grid.Column="8" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource LookFromTOPImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -72,25 +72,56 @@ Public Class SceneButtonsUC
|
||||
EgtSetView(VT.TOP)
|
||||
End Sub
|
||||
|
||||
Private Sub LeftViewBtn_Click(sender As Object, e As RoutedEventArgs) Handles LeftViewBtn.Click
|
||||
EgtSetView(VT.LEFT)
|
||||
End Sub
|
||||
|
||||
Private Sub FrontViewBtn_Click(sender As Object, e As RoutedEventArgs) Handles FrontViewBtn.Click
|
||||
EgtSetView(VT.FRONT)
|
||||
End Sub
|
||||
|
||||
Private Function GetCurrScene() As EgtUILib.Scene
|
||||
Select Case m_MainWindow.m_ActivePage
|
||||
Case MainWindow.Pages.WorkInProgress
|
||||
Return m_MainWindow.m_WorkInProgressPageUC.WorkInProgressScene
|
||||
Case MainWindow.Pages.DirectCut
|
||||
Return m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene
|
||||
Case MainWindow.Pages.CadCut
|
||||
Return m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene
|
||||
Case MainWindow.Pages.Open
|
||||
Return m_MainWindow.m_OpenPage.OpenScene
|
||||
Case MainWindow.Pages.FrameCut
|
||||
Return m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene
|
||||
Case MainWindow.Pages.Draw
|
||||
Return m_MainWindow.m_DrawPageUC.DrawScene
|
||||
Case MainWindow.Pages.Import
|
||||
Return m_MainWindow.m_ImportPageUC.ImportScene
|
||||
Case Else
|
||||
Return m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene
|
||||
End Select
|
||||
Select Case m_MainWindow.m_ActivePage
|
||||
Case MainWindow.Pages.WorkInProgress
|
||||
Return m_MainWindow.m_WorkInProgressPageUC.WorkInProgressScene
|
||||
Case MainWindow.Pages.DirectCut
|
||||
Return m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene
|
||||
Case MainWindow.Pages.CadCut
|
||||
Return m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene
|
||||
Case MainWindow.Pages.Open
|
||||
Return m_MainWindow.m_OpenPage.OpenScene
|
||||
Case MainWindow.Pages.FrameCut
|
||||
Return m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene
|
||||
Case MainWindow.Pages.Draw
|
||||
Return m_MainWindow.m_DrawPageUC.DrawScene
|
||||
Case MainWindow.Pages.Import
|
||||
Return m_MainWindow.m_ImportPageUC.ImportScene
|
||||
Case Else
|
||||
Return m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Sub New(Optional ByVal bActiveViewBtn As Boolean = False)
|
||||
' La chiamata è richiesta dalla finestra di progettazione.
|
||||
InitializeComponent()
|
||||
|
||||
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||
If bActiveViewBtn Then
|
||||
If Not SceneButtonsGrid.Children.Contains(LeftViewBtn) Then
|
||||
Dim Row As New RowDefinition
|
||||
SceneButtonsGrid.RowDefinitions.Add(Row)
|
||||
SceneButtonsGrid.Children.Add(FrontViewBtn)
|
||||
SceneButtonsGrid.Children.Add(LeftViewBtn)
|
||||
End If
|
||||
Else
|
||||
If SceneButtonsGrid.Children.Contains(LeftViewBtn) Then
|
||||
SceneButtonsGrid.Children.RemoveAt(7)
|
||||
SceneButtonsGrid.Children.RemoveAt(7)
|
||||
SceneButtonsGrid.Width = 721.2
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
<!-- Definizione della Grid superiore -->
|
||||
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
<ColumnDefinition Width="9*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="MachViewModeBtn" Grid.Column="1"
|
||||
|
||||
@@ -5,7 +5,8 @@ Public Class SimulationPageUC
|
||||
' Riferimenti a pagine
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private m_CurrProjPage As CurrentProjectPageUC
|
||||
|
||||
' Dichiarazione delle Page UserControl
|
||||
Friend m_SceneButtons As SceneButtonsUC
|
||||
' Funzioni di callback per output in interfaccia da LUA
|
||||
Private m_ProcEventsCallback As New ProcessEventsCallback(AddressOf ProcessEvents)
|
||||
Private m_OutTextCallback As New OutTextCallback(AddressOf ProcessOutText)
|
||||
@@ -48,6 +49,12 @@ Public Class SimulationPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub SimulationPage_Initialized(sender As Object, e As EventArgs)
|
||||
'Creazione delle Page UserControl
|
||||
m_SceneButtons = New SceneButtonsUC(True)
|
||||
|
||||
'Posizionemento nella griglia delle Page UserControl
|
||||
m_SceneButtons.SetValue(Grid.ColumnProperty, 5)
|
||||
|
||||
' Impostazioni box stime
|
||||
m_bEstim = (GetPrivateProfileInt(S_MACH_ESTIMATIONS, K_ENABLEEST, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
If Not m_bEstim Then EstimGrid.Visibility = Windows.Visibility.Hidden
|
||||
@@ -74,12 +81,16 @@ Public Class SimulationPageUC
|
||||
StopBtn.SetValue(Grid.RowProperty, 4)
|
||||
SpeedSlider.SetValue(Grid.RowProperty, 5)
|
||||
End If
|
||||
|
||||
Me.UpperButtonGrid.Children.Add(m_SceneButtons)
|
||||
|
||||
' Pulsante Play
|
||||
PlayPauseImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/Play.png", UriKind.Relative))
|
||||
End Sub
|
||||
|
||||
Private Sub SimulationPage_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
|
||||
Dim bOk As Boolean = True
|
||||
' Elimino eventuale attrezzaggio da OmagOFFICE
|
||||
EgtEraseCurrSetup()
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
|
||||
<Grid Name="UpperButtonsGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
<ColumnDefinition Width="9*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="MachViewModeBtn" Grid.Column="1"
|
||||
|
||||
@@ -31,7 +31,7 @@ Public Class WorkInProgressPageUC
|
||||
Private Sub WorkInProgressPage_Initialized(sender As Object, e As EventArgs)
|
||||
|
||||
' Creazione delle Page UserControl
|
||||
m_SceneButtons = New SceneButtonsUC
|
||||
m_SceneButtons = New SceneButtonsUC(True)
|
||||
m_MachineButtons = New MachineButtonsUC
|
||||
|
||||
' Posizionemento nella griglia dei bottoni di vista
|
||||
|
||||
Reference in New Issue
Block a user