OmagCUT 1.6o3 :

- aggiunta gestione cornici (per ora solo disegno)
- migliorie varie.
This commit is contained in:
Dario Sassi
2016-03-29 09:10:43 +00:00
parent bff95d7eb2
commit a8cd99ebb4
29 changed files with 955 additions and 332 deletions
+25 -12
View File
@@ -77,6 +77,10 @@ Class MainWindow
Friend m_ActivePage As Pages
Friend m_PrevActivePage As Pages ' Funziona solo per tornare indietro da grezzo e foto !!
' Timer per aggiornamento interfaccia
Private m_IdleTimer As New DispatcherTimer(DispatcherPriority.ApplicationIdle)
Friend Enum Pages
WorkInProgress
DirectCut
@@ -137,7 +141,7 @@ Class MainWindow
Return m_nKeyOptions And nKeyOpt
End Function
Private Sub Window_Initialized(sender As Object, e As EventArgs)
Private Sub MainWindow_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' Verifico sia l'unica istanza
ManageSingleIstance()
' Impostazione path radice per i dati
@@ -293,14 +297,14 @@ Class MainWindow
' Disabilita la possibilità di imitare il click del tasto destro del mouse tenendo premuto il dito sul touch
' NB: Se abilitato impedisce di utilizzare lo stato Pressed dei Button che quindi non si evidenziano quando premuti
Stylus.SetIsPressAndHoldEnabled(Me, False)
' Imposto i messaggi letti dal file dei messaggi
WorkInProgressBtn.Content = EgtMsg(MSG_GENERAL + 1)
DirectCutBtn.Content = EgtMsg(MSG_GENERAL + 2)
CadCutBtn.Content = EgtMsg(MSG_GENERAL + 3)
FrameCutBtn.Content = EgtMsg(MSG_GENERAL + 4)
MachineBtn.Content = EgtMsg(MSG_GENERAL + 5)
' Imposto OnIdle
AddHandler m_IdleTimer.Tick, AddressOf OnIdle
End Sub
Private Sub ManageSingleIstance()
@@ -338,7 +342,7 @@ Class MainWindow
End If
End Sub
Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
Private Sub MainWindow_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs) Handles Me.Loaded
' Aggiungo la MachineStatusBar alla MainWindow
MainWindowGrid.Children.Add(m_MachineStatusUC)
@@ -347,12 +351,12 @@ Class MainWindow
m_WorkInProgressPageUC.Prepare()
m_WorkInProgressPageUC.UpdateTools()
' Seleziono la Tab e la Page di apertura
' Seleziono la Page di apertura
MainWindowGrid.Children.Add(m_CurrentProjectPageUC)
m_CurrentProjectPageUC.CurrentProjectPageGrid.Children.Add(m_CadCutPageUC)
m_ActivePage = Pages.CadCut
CadCutBtn.IsChecked = True
' Lancio timer per aggiornamento interfaccia
m_IdleTimer.Interval = TimeSpan.FromMilliseconds(100)
m_IdleTimer.Start()
End Sub
Private Sub WorkInProgressBtn_Click(sender As Object, e As RoutedEventArgs) Handles WorkInProgressBtn.Click
@@ -694,7 +698,7 @@ Class MainWindow
Return True
End Function
Private Sub MainWindow_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
Private Sub MainWindow_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs) Handles Me.PreviewMouseDown
' Se sto fotografando, impedisco tutte le operazioni
If m_CadCutPageUC.m_Camera.m_bBusy And Not m_CurrentProjectPageUC.m_SceneButtons.IsMouseOver Then
e.Handled = True
@@ -715,7 +719,7 @@ Class MainWindow
End If
End Sub
Private Sub MainWindow_KeyDown(sender As Object, e As KeyEventArgs)
Private Sub MainWindow_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown
'If (m_NumericKeyboardWD.IsVisible And e.Key = Key.Enter) Then
' m_NumericKeyboardWD.Visibility = Windows.Visibility.Hidden
'End If
@@ -757,7 +761,7 @@ Class MainWindow
Me.Close()
End Sub
Private Sub MainWindow_Unloaded(sender As Object, e As RoutedEventArgs)
Private Sub MainWindow_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
' Chiudo il gestore della macchina fotografica
m_CadCutPageUC.m_Camera.Close()
' Terminazione generale di EgtInterface
@@ -766,7 +770,7 @@ Class MainWindow
m_objMutex.Close()
End Sub
Private Sub Window_ContentRendered(sender As Object, e As EventArgs)
Private Sub MainWindow_ContentRendered(sender As Object, e As EventArgs) Handles Me.ContentRendered
' Verifico presenza del collegamento al CN
m_bNCLink = (GetPrivateProfileInt(S_GENERAL, K_CNLINK, 0, m_sIniFile) <> 0)
m_CNCommunication.CNCommunication_Initialization()
@@ -794,6 +798,15 @@ Class MainWindow
End Sub
' OnIdle
Private Sub OnIdle()
' Recupero il tipo di progetto
Dim nPrjType As Integer = m_CurrentProjectPageUC.GetCurrentProjectType()
' Aggiorno interfaccia
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS)
End Sub
' Evento che apre AboutBox quando viene clickato il logo
Private Sub LogoBrd_MouseDown(sender As Object, e As MouseButtonEventArgs) Handles LogoBrd.MouseDown
Dim AboutBox As New AboutBoxWD(Me)