OmagOFFICE :
- Migliorata gestione scelta lavorazioni. - Aggiunto MessageBox per uscita senza chiave.
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@
|
||||
' can be handled in this file.
|
||||
Protected Overrides Sub OnStartup(e As StartupEventArgs)
|
||||
MyBase.OnStartup(e)
|
||||
'ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose
|
||||
ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose
|
||||
' Creo la View principale
|
||||
Me.MainWindow = New MainWindowV
|
||||
' Mostro la View principale
|
||||
|
||||
@@ -167,8 +167,6 @@ Public Class MainWindowM
|
||||
EgtSetIniFile(m_sIniFile)
|
||||
' Info su opzioni chiave
|
||||
EgtOutLog("KeyOptions : " & bKey.ToString() & " " & m_nKeyOptions.ToString() & " " & bProd.ToString())
|
||||
' Se prodotto non abilitato, esco dal programma
|
||||
If Not bProd Then End
|
||||
End Sub
|
||||
|
||||
Private Sub ManageSingleIstance()
|
||||
|
||||
@@ -17,6 +17,11 @@
|
||||
<TabItem.Content>
|
||||
<OmagOFFICE:NestingTabV DataContext="{StaticResource NestingTabVM}"/>
|
||||
</TabItem.Content>
|
||||
<TabItem.Style>
|
||||
<Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
|
||||
<EventSetter Event="PreviewMouseDown" Handler="NestingTab_Click"/>
|
||||
</Style>
|
||||
</TabItem.Style>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding MachiningTabMsg}" IsEnabled="{Binding MachTabIsEnabled}">
|
||||
<TabItem.Content>
|
||||
|
||||
@@ -1,17 +1,28 @@
|
||||
Public Class OptionPanelV
|
||||
|
||||
'Sub New()
|
||||
Private m_OptionPanelVM As OptionPanelVM
|
||||
|
||||
' ' This call is required by the designer.
|
||||
' InitializeComponent()
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
' ' Add any initialization after the InitializeComponent() call.
|
||||
' Dim TabView As ComponentModel.ICollectionView = CollectionViewSource.GetDefaultView(Tabs.ItemsSource)
|
||||
' AddHandler TabView.CurrentChanging, AddressOf TabChanging
|
||||
'End Sub
|
||||
Sub New()
|
||||
' Funzione che interpreta l'xaml
|
||||
InitializeComponent()
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_OptionPanelVM = DirectCast(Me.DataContext, OptionPanelVM)
|
||||
End Sub
|
||||
|
||||
'Private Sub TabChanging(sender As Object, e As ComponentModel.CurrentChangingEventArgs)
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
'End Sub
|
||||
#Region "EVENTS"
|
||||
|
||||
Public Sub NestingTab_Click(sender As Object, e As MouseButtonEventArgs)
|
||||
' Se non sono in RawPartTab proseguo
|
||||
If Tabs.SelectedIndex <> 0 Then Return
|
||||
' Tolgo il fuoco dalle textbox per averne i valori aggiornati e per costringere ad eseguire UpdateTabState
|
||||
Keyboard.Focus(Tabs)
|
||||
' Se non consentito passaggio ad altro tab interrompo l'evento
|
||||
If Not OmagOFFICEMap.refOptionPanelVM.NestTabIsEnabled Then e.Handled = True
|
||||
End Sub
|
||||
#End Region ' EVENTS
|
||||
|
||||
End Class
|
||||
|
||||
@@ -20,7 +20,21 @@ Public Class SceneHostV
|
||||
OmagOFFICEMap.SetRefSceneHostV(Me)
|
||||
' Inizializzazione Scena
|
||||
PreInitializeScene()
|
||||
OmagOFFICEScene.Init()
|
||||
If Not OmagOFFICEScene.Init() Then
|
||||
EgtOutLog("Error in Project scene creation")
|
||||
'SceneHost.Child = Nothing
|
||||
' Box di avviso chiave mancante
|
||||
MessageBox.Show(EgtMsg(MSG_MISSINGKEYWD + 2) & Environment.NewLine & EgtMsg(MSG_MISSINGKEYWD + 3), EgtMsg(MSG_MISSINGKEYWD + 1), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' Chiudo il programma
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.Close()
|
||||
Application.Current.Shutdown()
|
||||
' Verifico abilitazione prodotto
|
||||
ElseIf Not OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.OFFICE_BASE) Then
|
||||
MessageBox.Show(EgtMsg(MSG_MISSINGKEYWD + 5), EgtMsg(MSG_MISSINGKEYWD + 1), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' Chiudo il programma
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.Close()
|
||||
Application.Current.Shutdown()
|
||||
Else
|
||||
PostInitializeScene()
|
||||
' Imposto stato gestione mouse diretto della scena a nessuno
|
||||
OmagOFFICEScene.SetStatusNull()
|
||||
@@ -29,6 +43,7 @@ Public Class SceneHostV
|
||||
EgtSetMainWindowHandle(hMainWnd)
|
||||
' inizializzo gestore lavorazioni
|
||||
EgtInitMachMgr(OmagOFFICEMap.refMachinePanelVM.sMachinesRoot)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub PreInitializeScene()
|
||||
|
||||
Reference in New Issue
Block a user