03bef81707
- aggiunta gestione export immagini con dimensioni da INI.
95 lines
4.5 KiB
VB.net
95 lines
4.5 KiB
VB.net
Imports System.Collections.ObjectModel
|
|
|
|
Friend Module OptionModule
|
|
|
|
' Parametri che contengono lista delle lingue disponibili e lingua selezionata
|
|
Friend m_LanguageList As New ObservableCollection(Of Language)
|
|
Friend m_SelectedLanguage As Language
|
|
|
|
' Parametri per import
|
|
|
|
' Parametri per export
|
|
Friend m_nImgWidth As Integer
|
|
Friend m_nImgHeight As Integer
|
|
|
|
' Variabili che indicano per ogni tipo di lavorazione quale geometria è selezionabile
|
|
Friend m_SelGeomSawing As SceneSelModeOpt
|
|
Friend m_SelGeomDrilling As SceneSelModeOpt
|
|
Friend m_SelGeomMilling As SceneSelModeOpt
|
|
Friend m_SelGeomPocketing As SceneSelModeOpt
|
|
Friend m_SelGeomMortising As SceneSelModeOpt
|
|
Friend m_SelGeomSawRoughing As SceneSelModeOpt
|
|
Friend m_SelGeomSawFinishing As SceneSelModeOpt
|
|
Friend m_SelGeomGenMachining As SceneSelModeOpt
|
|
Friend m_SelGeomChiseling As SceneSelModeOpt
|
|
|
|
' Variabile che indica se quando viene creata una nuova operazione di lavorazione deve essere aggiunta in fondo
|
|
' alla fase o subito dopo la lavorazione selezionata
|
|
Friend m_bNewMachiningIsLastOne As Boolean
|
|
' Variabile che indica se usare lo script per calcolare automaticamente la disposizione quando si passa in lavorazione
|
|
Friend m_bUseDispositionScript As Boolean
|
|
|
|
' inizializzazione lettura variabili ad inizio programma
|
|
Friend Sub InitOptionModule()
|
|
' Inizializzo variabili per export
|
|
m_nImgWidth = GetPrivateProfileInt(S_EXPORT, K_IMGWIDTH, 400)
|
|
m_nImgHeight = GetPrivateProfileInt(S_EXPORT, K_IMGHEIGHT, 300)
|
|
' Inizializzo variabili che indicano per ogni tipo di lavorazione quale geometria è selezionabile
|
|
Dim Temp As Integer = 0
|
|
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMSAWING, -1)
|
|
m_SelGeomSawing = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
|
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMDRILLING, -1)
|
|
m_SelGeomDrilling = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
|
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMMILLING, -1)
|
|
m_SelGeomMilling = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
|
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMPOCKETING, -1)
|
|
m_SelGeomPocketing = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
|
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMMORTISING, -1)
|
|
m_SelGeomMortising = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
|
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMSAWROUGHING, -1)
|
|
m_SelGeomSawRoughing = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
|
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMSAWFINISHING, -1)
|
|
m_SelGeomSawFinishing = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
|
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMGENMACHINING, -1)
|
|
m_SelGeomGenMachining = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
|
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMCHISELING, -1)
|
|
m_SelGeomChiseling = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
|
' Inizializzo variabile che indica posizione nuova operazione di lavorazione
|
|
m_bNewMachiningIsLastOne = If(GetPrivateProfileInt(S_OPTIONS, K_NEWMACHININGISLASTONE, 0) <> 0, True, False)
|
|
' Inizializzo variabile che indica se usare script di disposizione
|
|
m_bUseDispositionScript = If(GetPrivateProfileInt(S_OPTIONS, K_USEDISPOSITIONSCRIPT, 0) <> 0, True, False)
|
|
End Sub
|
|
|
|
End Module
|
|
|
|
' Classe che identifica una lingua del programma con nome e path del file dei messaggi
|
|
Public Class Language
|
|
|
|
Private m_sName As String
|
|
Private m_sFilePath As String
|
|
|
|
Public Property Name As String
|
|
Get
|
|
Return m_sName
|
|
End Get
|
|
Set(value As String)
|
|
m_sName = value
|
|
End Set
|
|
End Property
|
|
|
|
Public Property FilePath As String
|
|
Get
|
|
Return m_sFilePath
|
|
End Get
|
|
Set(value As String)
|
|
m_sFilePath = value
|
|
End Set
|
|
End Property
|
|
|
|
Sub New(sName As String, sFilePath As String)
|
|
Me.Name = sName
|
|
Me.FilePath = sFilePath
|
|
End Sub
|
|
|
|
End Class
|