68fecfb24e
- modifiche per interfaccia con EgtBeamWall.
39 lines
1.4 KiB
VB.net
39 lines
1.4 KiB
VB.net
Imports System.ComponentModel
|
|
Imports EgtWPFLib5
|
|
|
|
Class MainWindowV
|
|
Inherits EgtCustomWindow
|
|
|
|
Private Sub Me_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
|
If Not ProjectVM.GetAppToShow() Then
|
|
Me.ShowInTaskbar = False
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub EgtCustomWindow_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
|
' Posizione e dimensioni del Form
|
|
Dim WinPos As New WinPos
|
|
If ProjectVM.GetAppToShow() Then
|
|
GetPrivateProfileWinPos(S_GENERAL, K_WINPLACE, WinPos.nFlag, WinPos.nLeft, WinPos.nTop, WinPos.nWidth, WinPos.nHeight)
|
|
Else
|
|
GetPrivateProfileWinPos(S_GENERAL, K_HIDEPLACE, WinPos.nFlag, WinPos.nLeft, WinPos.nTop, WinPos.nWidth, WinPos.nHeight)
|
|
End If
|
|
WinPosToWindow(Me, WinPos)
|
|
End Sub
|
|
|
|
Private Sub MainWindow_Drop(sender As Object, e As DragEventArgs)
|
|
' Se drag di file
|
|
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
|
|
' Attivo il programma
|
|
Me.Activate()
|
|
' Recupero l'array di stringhe con i nomi del file
|
|
Dim sFiles() As String = DirectCast(e.Data.GetData(DataFormats.FileDrop), String())
|
|
' Apro il primo come file standard
|
|
If Map.refProjectVM.OpenStdFile(sFiles(0)) Then Return
|
|
' Riprovo come file descrizione porta
|
|
Map.refProjectVM.OpenDoorFile(sFiles(0))
|
|
End If
|
|
End Sub
|
|
|
|
End Class
|