OmagOFFICE 2.2h2:

-> gestione delle foto da databese OmagPHOTO con l'utilizzo della libreria EgtSTONELib.
This commit is contained in:
Nicola Pievani
2020-08-18 15:45:17 +00:00
parent c4f8ed82d5
commit ecf3821d08
25 changed files with 784 additions and 212 deletions
@@ -6,20 +6,34 @@
<DockPanel>
<UniformGrid Columns="2"
<UniformGrid Columns="3"
DockPanel.Dock="Top"
Visibility="{Binding SideEntity_Visibility}"
Margin="0,0,0,5">
<ToggleButton Content="{Binding SideAngleMsg}"
<ToggleButton Content="{Binding SideAngleMsg}"
IsChecked="{Binding SideAngle_IsChecked}"
Style="{StaticResource CompoWindow_ToggleButton}"
Margin="0,0,2.5,0"/>
<ToggleButton Content="{Binding DripMsg}"
Margin="0,0,2.5,0"
IsEnabled="{Binding SideAngle_IsEnabled}"/>
<ToggleButton
IsChecked="{Binding Engrave_IsChecked}"
Style="{StaticResource CompoWindow_ToggleButton}"
Margin="0,0,2.5,0"
IsEnabled="{Binding Engrave_IsEnabled}">
<ToggleButton.Content>
<AccessText TextWrapping="Wrap" Text="{Binding EngraveMsg}"/>
</ToggleButton.Content>
</ToggleButton>
<ToggleButton
IsChecked="{Binding Drip_IsChecked}"
Style="{StaticResource CompoWindow_ToggleButton}"
Margin="2.5,0,0,0"
IsEnabled="{Binding Drip_IsEnabled}"/>
</UniformGrid>
Margin="0,0,2.5,0"
IsEnabled="{Binding Drip_IsEnabled}">
<ToggleButton.Content>
<AccessText TextWrapping="Wrap" Text="{Binding DripMsg}" />
</ToggleButton.Content>
</ToggleButton>
</UniformGrid>
<StackPanel DockPanel.Dock="Bottom">
@@ -139,6 +139,8 @@ Public Class CompoParamPageVM
If m_Drip_IsChecked Then Return
m_SideAngle_IsChecked = value
If value Then
Drip_IsEnabled = False
Engrave_IsEnabled = False
Measure_Visibility = Visibility.Collapsed
CompoManagerControl_Visibility = Visibility.Collapsed
Back_Visibility = Visibility.Collapsed
@@ -154,6 +156,9 @@ Public Class CompoParamPageVM
SideEntityControlVM.ModeOpt.SIDEANGLE)
SideEntityControl = New SideEntityControlV(m_SideEntityControlVM)
Else
Drip_IsEnabled = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.UNDER_CUT) And
Not String.IsNullOrWhiteSpace(CurrentMachine.sCurrDripSaw)
Engrave_IsEnabled = True
m_SideEntityControlVM.Close()
m_SideEntityControlVM = Nothing
SideEntityControl = Nothing
@@ -173,6 +178,17 @@ Public Class CompoParamPageVM
End Set
End Property
Private m_SideAngle_IsEnabled As Boolean = True
Public Property SideAngle_IsEnabled As Boolean
Get
Return m_SideAngle_IsEnabled
End Get
Set(value As Boolean)
m_SideAngle_IsEnabled = value
NotifyPropertyChanged("SideAngle_IsEnabled")
End Set
End Property
Private m_Drip_IsChecked As Boolean
Public Property Drip_IsChecked As Boolean
Get
@@ -182,6 +198,8 @@ Public Class CompoParamPageVM
If m_SideAngle_IsChecked Then Return
m_Drip_IsChecked = value
If value Then
SideAngle_IsEnabled = False
Engrave_IsEnabled = False
Measure_Visibility = Visibility.Collapsed
CompoManagerControl_Visibility = Visibility.Collapsed
Back_Visibility = Visibility.Collapsed
@@ -197,6 +215,8 @@ Public Class CompoParamPageVM
SideEntityControlVM.ModeOpt.DRIP)
SideEntityControl = New SideEntityControlV(m_SideEntityControlVM)
Else
SideAngle_IsEnabled = True
Engrave_IsEnabled = True
m_SideEntityControlVM.Close()
m_SideEntityControlVM = Nothing
SideEntityControl = Nothing
@@ -223,6 +243,66 @@ Public Class CompoParamPageVM
End Get
Set(value As Boolean)
m_Drip_IsEnabled = value
NotifyPropertyChanged("Drip_IsEnabled")
End Set
End Property
Private m_Engrave_IsChecked As Boolean
Public Property Engrave_IsChecked As Boolean
Get
Return m_Engrave_IsChecked
End Get
Set(value As Boolean)
If m_SideAngle_IsChecked Then Return
m_Engrave_IsChecked = value
If value Then
SideAngle_IsEnabled = False
Drip_IsEnabled = False
Measure_Visibility = Visibility.Collapsed
CompoManagerControl_Visibility = Visibility.Collapsed
Back_Visibility = Visibility.Collapsed
' Nascondo layer delle misure
Dim PartId As Integer = EgtGetFirstPart()
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.OFF)
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.OFF)
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.OFF)
' Imposto il loop esterno, non ci possono essere loop interni
CompoWindowMap.refCompoSceneHostV.SelectedLayer = EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_OUTLOOP)
m_SideEntityControlVM = New SideEntityControlVM(SideEntityControlVM.CallingWindowOpt.COMPO,
CompoWindowMap.refCompoSceneHostV.CompoScene,
SideEntityControlVM.ModeOpt.ENGRAVE)
SideEntityControl = New SideEntityControlV(m_SideEntityControlVM)
Else
SideAngle_IsEnabled = True
Drip_IsEnabled = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.UNDER_CUT) And
Not String.IsNullOrWhiteSpace(CurrentMachine.sCurrDripSaw)
m_SideEntityControlVM.Close()
m_SideEntityControlVM = Nothing
SideEntityControl = Nothing
Measure_Visibility = Visibility.Visible
CompoManagerControl_Visibility = Visibility.Visible
Back_Visibility = Visibility.Visible
' Deseleziono tutto
CompoWindowMap.refCompoSceneHostV.SelectedLayer = GDB_ID.NULL
' Attivo layer delle misure
Dim PartId As Integer = EgtGetFirstPart()
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.ON_)
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.ON_)
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.ON_)
End If
NotifyPropertyChanged("Engrave_IsChecked")
EgtZoom(ZM.ALL)
End Set
End Property
Private m_Engrave_IsEnabled As Boolean = True
Public Property Engrave_IsEnabled As Boolean
Get
Return m_Engrave_IsEnabled
End Get
Set(value As Boolean)
m_Engrave_IsEnabled = value
NotifyPropertyChanged("Engrave_IsEnabled")
End Set
End Property
@@ -269,6 +349,11 @@ Public Class CompoParamPageVM
Return EgtMsg(MSG_IMPORTPAGEUC + 8)
End Get
End Property
Public ReadOnly Property EngraveMsg As String
Get
Return EgtMsg(MSG_DRAWPAGEUC + 17)
End Get
End Property
#End Region ' Messages
+2
View File
@@ -74,5 +74,7 @@ Module ConstGen
Public Const TOOLMAKERS_DFL_DIR As String = "ToolMakers"
' Nome file Lua con le funzioni di attrezzaggio
Public Const SETUP_LUA As String = "SetUp.lua"
' Sottodirettorio per BackUp
Public Const BACKUP_DIR As String = "BackUp"
End Module
+5
View File
@@ -34,6 +34,7 @@ Module ConstIni
Public Const K_DXFOUTDIR As String = "DxfOutDir"
Public Const K_CONTOURFROMCAMERA As String = "ContourFromCamera"
Public Const K_SUPPORT As String = "Support"
Public Const K_PHOTODIR As String = "PhotoDir"
Public Const S_LANGUAGES As String = "Languages"
Public Const K_LANGUAGE As String = "Language"
@@ -94,6 +95,10 @@ Module ConstIni
Public Const K_PARSIDE_AS_TRF As String = "ParSideAsTrf"
Public Const K_SIDEANGLE As String = "SideAngle"
Public Const K_DELTA_ANG_TG As String = "DeltaAngTg"
Public Const K_ENGRAVEOFFSET As String = "EngraveOffset"
Public Const K_ENGRAVEOFFSET2 As String = "EngraveOffset2"
Public Const K_ENGRAVEDEPTH As String = "EngraveDepth"
Public Const K_ENGRAVESHORT As String = "EngraveShort"
Public Const K_DRIPOFFSET As String = "DripOffset"
Public Const K_DRIPOFFSET2 As String = "DripOffset2"
Public Const K_DRIPDEPTH As String = "DripDepth"
+2
View File
@@ -104,6 +104,8 @@ Module ConstMach
Public Const INFO_PROJINDEX As String = "ProjIndex"
' Info per materiale progetto
Public Const INFO_PROJMAT As String = "ProjMat"
' Info per materiale foto
Public Const INFO_PHOTOMAT As String = "PhotoMat"
' Info per nome lastra
Public Const INFO_SLABNAME As String = "SlabName"
' Info per spessore lastra
+3
View File
@@ -165,6 +165,9 @@ Public Module CurrentMachine
' Materiale correntemente attivo (dell'ultimo grezzo impostato)
Private m_CurrMat As Material = Nothing
' Materiale definito nel Data Base (dell'Omag-PHOTO)
Private m_CurrMatDB As String = String.Empty
' Indica se la macchina ha il tastatore della lastra
Private m_HasRawProbe As Boolean = True
+20
View File
@@ -86,6 +86,16 @@ Module EstCalc
End If
End Function
Public Function SetMaterialPhoto(sMatDB As String) As Boolean
Dim nMGrpId As Integer = EgtGetCurrMachGroup()
' insesrisco il nome del materiale letto dal DB
If Not String.IsNullOrEmpty(sMatDB) Then
Return EgtSetInfo(nMGrpId, INFO_PHOTOMAT, sMatDB)
Else
Return False
End If
End Function
Friend Function GetMaterialName() As String
Dim nMGrpId As Integer = EgtGetCurrMachGroup()
Dim sName As String = String.Empty
@@ -93,6 +103,16 @@ Module EstCalc
Return sName
End Function
Friend Function GetMaterialPhoto() As String
Dim nMGrpId As Integer = EgtGetCurrMachGroup()
Dim sName As String = String.Empty
If EgtGetInfo(nMGrpId, INFO_PHOTOMAT, sName) Then
Return sName
Else
Return String.Empty
End If
End Function
'--------------------------------------------------------------------------------------------------
Public Function SetSlabName(sSlabName As String) As Boolean
Dim nMGrpId As Integer = EgtGetCurrMachGroup()
+1
View File
@@ -201,6 +201,7 @@ Public Class MachinePanelVM
End If
Dim MachDbWindowVM As New EgtWPFLib5.MachiningDbWindowVM(CurrentMachine.sMachIniFile, OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx(), "Stone")
Dim MachDbWindowV As New EgtWPFLib5.MachiningDbWindowV(Application.Current.MainWindow, MachDbWindowVM)
If EgtWPFLib5.MachiningTreeViewItem.m_MatType <> 0 Then
MachDbWindowV.Height = 768
MachDbWindowV.Width = 1024
+37
View File
@@ -1,12 +1,16 @@
Imports System.Threading
Imports System.Math
Imports System.IO
Imports EgtUILib
Imports EgtWPFLib5
Imports EgtSTONELib
Public Class MainWindowM
#Region "FIELDS"
Friend m_SlabDB As Boolean = False
Private m_sDataRoot As String = String.Empty
Friend ReadOnly Property sDataRoot As String
Get
@@ -119,6 +123,20 @@ Public Class MainWindowM
End Get
End Property
Private m_sPhotoDir As String
Friend ReadOnly Property sPhotoDir As String
Get
Return m_sPhotoDir
End Get
End Property
Private m_sBackUpDir As String
Friend ReadOnly Property sBackUpDir As String
Get
Return m_sBackUpDir
End Get
End Property
#End Region ' FIELDS
#Region "CONSTRUCTOR"
@@ -145,6 +163,9 @@ Public Class MainWindowM
m_sTempDir = m_sDataRoot & "\" & TEMP_DIR
' Impostazione path Ini file
IniFile.m_sIniFile = m_sConfigDir & "\" & INI_FILE_NAME
' Impostazione direttorio per backup
m_sBackUpDir = m_sDataRoot & "\" & BACKUP_DIR
Directory.CreateDirectory(m_sBackUpDir)
' Impostazione path resources dir
m_sResourcesRoot = m_sDataRoot & "\" & RES_DIR
' Impostazione direttorio per le macchine
@@ -232,8 +253,24 @@ Public Class MainWindowM
Dim sLuaBaseLib As String = String.Empty
GetMainPrivateProfileString(S_LUA, K_BASELIB, "EgtBase", sLuaBaseLib)
EgtLuaRequire(sLuaBaseLib)
' abilitazione DB
m_SlabDB = (GetMainPrivateProfileInt(S_GENERAL, "SlabDB", 0) <> 0)
' Leggo nome cartella delle foto
GetMainPrivateProfileString(S_GENERAL, K_PHOTODIR, sDataRoot & "\Data", m_sPhotoDir)
' Creo connessione al Db
If m_SlabDB And Not ManageDb.ConnectToDb(m_sPhotoDir & "\" & DB_FILENAME) Then
EgtOutLog("Error connecting to DB")
MessageBox.Show(EgtMsg(92000 + 1), EgtMsg(MSG_EGTMSGBOX + 15), MessageBoxButton.OK, MessageBoxImage.Error)
m_SlabDB = False
End If
' Info su opzioni chiave
EgtOutLog("KeyOptions : " & bKey.ToString() & " " & m_nKeyOptions.ToString() & " " & bProd.ToString())
EgtSTONELib.MainData.SetConfigDir(m_sConfigDir)
EgtSTONELib.MainData.SetKeyLevel(m_nKeyLevel)
EgtSTONELib.MainData.SetKeyOptions(m_nKeyOptions)
EgtSTONELib.MainData.SetPhotoDir(m_sPhotoDir)
EgtSTONELib.MainData.SetBackUpDir(m_sBackUpDir)
EgtSTONELib.MainData.SetIsOmagOFFICE(True)
End Sub
Private Sub ManageInstance()
+39 -1
View File
@@ -1,5 +1,6 @@
Imports EgtUILib
Imports EgtWPFLib5
Imports EgtSTONELib
Imports System.IO
Public Class MainWindowVM
@@ -67,7 +68,8 @@ Public Class MainWindowVM
' Verifico che l'inizializzazione di tutte le parti del programma sia andata a buon fine
If OmagOFFICEMap.EndInit() Then
m_bInitStatus = True
' altrimenti chiudo il programma
AddHandler OmagOFFICEMap.refSceneHostVM.MainController.OnSavedProject, AddressOf OmagOFFICEMap.refMainWindowVM.SetProjectSaved
' altrimenti chiudo il programma
Else
m_bInitStatus = False
End If
@@ -111,6 +113,25 @@ Public Class MainWindowVM
End If
End Sub
Private ProjectSaved As Boolean = False
Private Sub SetProjectSaved()
If OmagOFFICEMap.refMainWindowVM.MainWindowM.m_SlabDB Then
' quando salvo un progetto la lista corrente dievnta la lista origine
OmagOFFICEMap.refMachGroupPanelVM.SlabNameListOrig.Clear()
For Each CurrSlab In OmagOFFICEMap.refMachGroupPanelVM.SlabNameListCurr
OmagOFFICEMap.refMachGroupPanelVM.SlabNameListOrig.Add(CurrSlab)
Next
' recupero il nome del progetto corrente
Dim sFileProject As String = String.Empty
EgtGetCurrFilePath(sFileProject)
StoneMap.refOptionPanelVM.sProjectAssigned = sFileProject
For Each OrigSlab In OmagOFFICEMap.refMachGroupPanelVM.SlabNameListOrig
StoneMap.refOptionPanelVM.SetAssignedSlab(OrigSlab)
Next
End If
ProjectSaved = True
End Sub
#End Region ' METHODS
#Region "COMMANDS"
@@ -153,12 +174,29 @@ Public Class MainWindowVM
If OmagOFFICEMap.refOptionPanelVM.SelItem = OptionPanelVM.Tabs.SIMUL Then
OmagOFFICEMap.refSimulTabVM.ResetSimulation()
End If
ProjectSaved = False
' Imposto contesto principale
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
' Gestisco eventuale file corrente modificato
Dim bAllowClose As Boolean = OmagOFFICEMap.refSceneHostVM.MainController.ManageModified()
' Se non confermata chiusura, esco
If Not bAllowClose Then Return
If OmagOFFICEMap.refMainWindowVM.MainWindowM.m_SlabDB AndAlso Not ProjectSaved Then
For Each CurrSlab In OmagOFFICEMap.refMachGroupPanelVM.SlabNameListCurr
StoneMap.refOptionPanelVM.SetAvailableSlab(CurrSlab)
Next
' recupero il nome del progetto corrente
Dim sFileProject As String = String.Empty
EgtGetCurrFilePath(sFileProject)
StoneMap.refOptionPanelVM.sProjectAssigned = sFileProject
For Each OrigSlab In OmagOFFICEMap.refMachGroupPanelVM.SlabNameListOrig
StoneMap.refOptionPanelVM.SetAssignedSlab(OrigSlab)
Next
End If
' Salvo nome ultimo file (per gestire bene multi istanza)
Dim sFilePath As String = String.Empty
If EgtGetCurrFilePath(sFilePath) Then WriteMainPrivateProfileString(S_GENERAL, K_LASTPROJ, sFilePath)
+3 -2
View File
@@ -69,5 +69,6 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.2.8.2")>
<Assembly: AssemblyFileVersion("2.2.8.2")>
<Assembly: AssemblyVersion("2.2.8.3")>
<Assembly: AssemblyFileVersion("2.2.8.3")>
+71
View File
@@ -1,11 +1,34 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtUILib
Imports EgtSTONELib
Imports EgtWPFLib5
Public Class MyMachGroupPanelVM
Inherits MachGroupPanelVM
#Region "FIELDS & PROPERTIES"
' le liste devono essere svuotate iìogni volta che carico/creo un progetto
Private m_SlabNameListOrig As New List(Of String)
Public ReadOnly Property SlabNameListOrig As List(Of String)
Get
Return m_SlabNameListOrig
End Get
End Property
Private m_SlabNameListCurr As New List(Of String)
Public Property SlabNameListCurr As List(Of String)
Get
Return m_SlabNameListCurr
End Get
Set(value As List(Of String))
m_SlabNameListCurr = value
End Set
End Property
#End Region ' FIELDS & REGION
#Region "CONSTRUCTOR"
Sub New()
@@ -49,6 +72,18 @@ Public Class MyMachGroupPanelVM
EgtGetMachGroupName(nId, sName)
EgtGetMachGroupMachineName(nId, sMachine)
MachGroupList.Add(New MyMachGroup(nId, sName, sMachine, EgtGetFirstNameInGroup(nId, "Opers")))
If OmagOFFICEMap.refMainWindowVM.MainWindowM.m_SlabDB Then
Dim sSlabNameDB As String = String.Empty
EgtGetInfo(nId, INFO_SLABNAME, sSlabNameDB)
Try
If Not m_SlabNameListOrig.Exists(Function(value As String)
Return value = sSlabNameDB
End Function) Then
m_SlabNameListOrig.Add(sSlabNameDB)
End If
Catch ex As Exception
End Try
End If
nId = EgtGetNextMachGroup(nId)
End While
End Sub
@@ -208,10 +243,44 @@ Public Class MyMachGroupPanelVM
OmagOFFICEMap.refOptionPanelVM.SelItem = OptionPanelVM.Tabs.RAWPART
End If
Dim sPhotoName As String = EstPhoto.GetPhotoName
' aggiungo alla lista delle lastre correnti/orig
Dim sSlabNameDB As String = GetSlabName()
LoadSlabsList(sSlabNameDB)
Return True
End Function
Public Sub LoadSlabsList(sSlabNameDB As String)
If Not OmagOFFICEMap.refMainWindowVM.MainWindowM.m_SlabDB Then Return
Dim sFileProject As String = String.Empty
EgtGetCurrFilePath(sFileProject)
If Not String.IsNullOrEmpty(sSlabNameDB) Then
OmagOFFICEMap.refRawPartTabVM.SetMaterialFromDB(EstCalc.GetMaterialPhoto())
Try
If Not m_SlabNameListCurr.Exists(Function(value As String)
Return value = sSlabNameDB
End Function) Then
m_SlabNameListCurr.Add(sSlabNameDB)
End If
Catch ex As Exception
End Try
End If
End Sub
Public Overrides Function OnPreRemoveCurrMachGroup() As Boolean
Dim sSlabName As String = GetSlabName()
' rendo AVAILABLE la lastra nel DB dell'OMAGPhoto
If OmagOFFICEMap.refMainWindowVM.MainWindowM.m_SlabDB Then
StoneMap.refOptionPanelVM.SetAvailableSlab(sSlabName)
For Each ItemSlab In m_SlabNameListCurr
If ItemSlab = sSlabName Then
m_SlabNameListCurr.Remove(ItemSlab)
Exit For
End If
Next
End If
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
' Parcheggio tutti i pezzi presenti nella lastra
Dim nPartId As Integer = EgtGetFirstPartInRawPart(GetRawId())
@@ -225,6 +294,7 @@ Public Class MyMachGroupPanelVM
' Passo al successivo
nPartId = nNextPartId
End While
' Elimino eventuale fotografia e contorno associati
Dim nPhoto As Integer = EstPhoto.GetPhoto()
EgtErase(nPhoto)
@@ -232,6 +302,7 @@ Public Class MyMachGroupPanelVM
EgtErase(nContour)
' Elimino eventuale fotografia del VeinMatching associata
VeinMatching.RemoveUnusedPhotos()
Return True
End Function
+5
View File
@@ -2,6 +2,7 @@
Imports System.IO
Imports EgtUILib
Imports EgtWPFLib5
Imports System.Text.RegularExpressions
Public Class MySceneHostVM
Inherits EgtWPFLib5.SceneHostVM
@@ -248,6 +249,10 @@ Public Class MySceneHostVM
' Recupero il nome della lastra
Dim sSlabName As String = String.Empty
EgtGetInfo(nMchGrpId, INFO_SLABNAME, sSlabName)
' sostituisco eventuali caratteri speciali
If sSlabName.IndexOfAny("[~`!@#$%^&*()-+=|{}':;.,<>/\\?]".ToCharArray) <> -1 Then
sSlabName = Regex.Replace(sSlabName, "[~`!@#$%^&*()-+=|{}':;.,<>/\\?]", "_")
End If
' Creo path del file di salvataggio
Dim sFileDest As String = sDirDest & "\" & Path.GetFileNameWithoutExtension(sFilePath) & "_" & If(String.IsNullOrEmpty(sSlabName), sMchGrp, sSlabName) & ".nge"
' Verifico se al gruppo è associata una foto
+40 -11
View File
@@ -23,7 +23,8 @@
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>
</DocumentationFile>
<NoWarn>41999,42016</NoWarn>
<NoWarn>
</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -36,7 +37,8 @@
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>
</DocumentationFile>
<NoWarn>41999,42016</NoWarn>
<NoWarn>
</NoWarn>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
@@ -57,7 +59,8 @@
<OutputPath>bin\x86\Debug\</OutputPath>
<DocumentationFile>
</DocumentationFile>
<NoWarn>41999,42016</NoWarn>
<NoWarn>
</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
@@ -69,7 +72,8 @@
<DocumentationFile>
</DocumentationFile>
<Optimize>true</Optimize>
<NoWarn>41999,42016</NoWarn>
<NoWarn>
</NoWarn>
<DebugType>None</DebugType>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
@@ -82,7 +86,8 @@
<OutputPath>bin\x64\Debug\</OutputPath>
<DocumentationFile>
</DocumentationFile>
<NoWarn>41999,42016</NoWarn>
<NoWarn>
</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
@@ -94,7 +99,8 @@
<DocumentationFile>
</DocumentationFile>
<Optimize>true</Optimize>
<NoWarn>41999,42016</NoWarn>
<NoWarn>
</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
@@ -104,6 +110,10 @@
<ApplicationIcon>Resources\OmagOFFICE.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="EgtSTONELib, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\EgtProg\DllD32\EgtSTONELib.dll</HintPath>
</Reference>
<Reference Include="EgtUILib">
<HintPath>..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
</Reference>
@@ -114,6 +124,10 @@
<HintPath>..\..\EgtProg\OmagOFFICE\Ionic.Zip.dll</HintPath>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Data.SQLite, Version=1.0.112.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\EgtProg\DllD32\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
@@ -213,6 +227,10 @@
<Compile Include="MachOptionWindow\MachOptionWindowVM.vb" />
<Compile Include="MySceneHost\MySceneHostVM.vb" />
<Compile Include="MySetUpWindow\MySetUpWindowVM.vb" />
<Compile Include="MyToolDbWindow\MyToolDbWindowV.xaml.vb">
<DependentUpon>MyToolDbWindowV.xaml</DependentUpon>
</Compile>
<Compile Include="MyToolDbWindow\MyToolDbWindowVM.vb" />
<Compile Include="OptionPanel\MachiningTab\MachiningTabV.xaml.vb">
<DependentUpon>MachiningTabV.xaml</DependentUpon>
</Compile>
@@ -241,14 +259,17 @@
<DependentUpon>OptionPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="OptionPanel\OptionPanelVM.vb" />
<Compile Include="OptionPanel\RawPartTab\SlabIdWindowV.xaml.vb">
<DependentUpon>SlabIdWindowV.xaml</DependentUpon>
<Compile Include="OptionPanel\RawPartTab\OmagPhotoV.xaml.vb">
<DependentUpon>OmagPhotoV.xaml</DependentUpon>
</Compile>
<Compile Include="OptionPanel\RawPartTab\SlabIdWindowVM.vb" />
<Compile Include="OptionPanel\RawPartTab\RawPartTabV.xaml.vb">
<DependentUpon>RawPartTabV.xaml</DependentUpon>
</Compile>
<Compile Include="OptionPanel\RawPartTab\RawPartTabVM.vb" />
<Compile Include="OptionPanel\RawPartTab\SlabIdWindowV.xaml.vb">
<DependentUpon>SlabIdWindowV.xaml</DependentUpon>
</Compile>
<Compile Include="OptionPanel\RawPartTab\SlabIdWindowVM.vb" />
<Compile Include="OptionPanel\SimulTab\MachineAxis.vb" />
<Compile Include="OptionPanel\SimulTab\SimulTabV.xaml.vb">
<DependentUpon>SimulTabV.xaml</DependentUpon>
@@ -381,6 +402,10 @@
<DependentUpon>MainWindowV.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="MyToolDbWindow\MyToolDbWindowV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="OptionPanel\MachiningTab\MachiningTabV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -409,14 +434,18 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="OptionPanel\RawPartTab\SlabIdWindowV.xaml">
<Generator>MSBuild:Compile</Generator>
<Page Include="OptionPanel\RawPartTab\OmagPhotoV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="OptionPanel\RawPartTab\RawPartTabV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="OptionPanel\RawPartTab\SlabIdWindowV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="OptionPanel\SimulTab\SimulTabV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
+1 -1
View File
@@ -7,7 +7,7 @@
<ListBox ItemsSource="{Binding ItemList}"
SelectedItem="{Binding SelItem}"
DisplayMemberPath="Name"
SelectionMode="Single"
SelectionMode="Extended"
Height="250" Margin="0,0,0,5">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
+13
View File
@@ -0,0 +1,13 @@
<EgtWPFLib5:EgtCustomWindow x:Class="OmagPhotoV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtSTONELib="clr-namespace:EgtSTONELib;assembly=EgtSTONELib"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<EgtSTONELib:ProjectSlabV DataContext="{StaticResource ProjectSlabVM}"/>
</EgtWPFLib5:EgtCustomWindow>
@@ -0,0 +1,2 @@
Public Class OmagPhotoV
End Class
+17 -5
View File
@@ -2,6 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWpfLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtSTONELib="clr-namespace:EgtSTONELib;assembly=EgtSTONELib"
Margin="5,5,5,0">
<Border Style="{StaticResource DefaultBorder}"
@@ -56,13 +57,22 @@
</Border>
<!-- Definizione della Grid per il materiale -->
<GroupBox Header="{Binding MaterialMsg}" Margin="0,0,0,5">
<ComboBox ItemsSource="{Binding MaterialList}"
<GroupBox Header="{Binding MaterialMsg}" Margin="0,0,0,5">
<StackPanel>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<ComboBox ItemsSource="{Binding MaterialList}"
DisplayMemberPath="sName"
SelectedItem="{Binding SelMaterial}"/>
</GroupBox>
<TextBlock Grid.Row="1" Text="{Binding MaterialFromDB}"
Visibility="{Binding VisibilityMaterialFromDB}"
Margin="0,5,0,0"/>
</Grid>
</StackPanel>
</GroupBox>
<UniformGrid Columns="2" Margin="0,0,0,0">
@@ -172,4 +182,6 @@
Style="{StaticResource OptionPanel_TextButton}"
Margin="0,0,0,5"/>
<!--<EgtSTONELib:ProjectSlabV DataContext="{StaticResource ProjectSlabVM}"/>-->
</StackPanel>
+258 -140
View File
@@ -1,11 +1,15 @@
Imports System.IO
Imports System.Collections.ObjectModel
Imports EgtWPFLib5
Imports EgtSTONELib
Imports EgtUILib
Public Class RawPartTabVM
Inherits VMBase
Friend OmgaPhotoV As OmagPhotoV
Private m_bSlabIsSelectedFromDB As Boolean = False
#Region "FIELDS & PROPERTIES"
' Colori standard
@@ -186,19 +190,19 @@ Public Class RawPartTabVM
Set(value As Integer)
m_SelType = value
Select Case m_SelType
Case Type.RECTANGLE
RawModeView()
RemoveCircles()
RecalcRawPart()
Case Type.BY_POINTS
RawModeView()
UpdateCircles()
EgtDraw()
Case Type.FROM_PHOTO
RawModeView()
RemoveCircles()
CreateRawFromPhotoContour()
EgtDraw()
Case Type.RECTANGLE
RawModeView()
RemoveCircles()
RecalcRawPart()
Case Type.BY_POINTS
RawModeView()
UpdateCircles()
EgtDraw()
Case Type.FROM_PHOTO
RawModeView()
RemoveCircles()
CreateRawFromPhotoContour()
EgtDraw()
End Select
End Set
End Property
@@ -312,11 +316,11 @@ Public Class RawPartTabVM
EstCalc.SetSlabHeight(dHeight)
OmagOFFICEMap.refMachGroupPanelVM.SelectedMachGroup.NotifyPropertyChanged("MachGroupToolTip")
Else
NotifyPropertyChanged("Height")
' Non sono ammessi spessori negativi
Dim sMsg As String = EgtMsg(MSG_RAWPARTPAGEUC + 18)
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(sMsg, 3, MSG_TYPE.ERROR_)
End If
NotifyPropertyChanged("Height")
End Set
End Property
Private Sub SetHeight(value As Double)
@@ -490,6 +494,7 @@ Public Class RawPartTabVM
EstCalc.SetMaterialName()
UpdateTabState()
OmagOFFICEMap.refMachGroupPanelVM.SelectedMachGroup.NotifyPropertyChanged("MachGroupToolTip")
NotifyPropertyChanged("SelMaterial")
End If
End Set
End Property
@@ -504,23 +509,23 @@ Public Class RawPartTabVM
If value Then PhotoWithMouse = False
m_AddPoint = value
Select Case GetRawMode()
Case RAWMODE.BY_POINTS
m_RemovePoint = False
NotifyPropertyChanged("RemovePoint")
m_nPtMode = If(m_AddPoint, PTMODE.ADD, PTMODE.MOVE)
Case RAWMODE.DAMAGED
' Verifico ci sia almeno una zona rovinata
If EgtGetFirstNameInGroup(EstCalc.GetRawId(), NAME_DAMAGED) = GDB_ID.NULL Then
m_AddPoint = False
End If
m_RemovePoint = False
NotifyPropertyChanged("RemovePoint")
m_NewDA = False
NotifyPropertyChanged("NewDA")
m_DeleteDA = False
NotifyPropertyChanged("DeleteDA")
m_nPtMode = If(m_AddPoint, PTMODE.ADD, PTMODE.MOVE)
m_nPtDmgMode = DMGMODE.NONE
Case RAWMODE.BY_POINTS
m_RemovePoint = False
NotifyPropertyChanged("RemovePoint")
m_nPtMode = If(m_AddPoint, PTMODE.ADD, PTMODE.MOVE)
Case RAWMODE.DAMAGED
' Verifico ci sia almeno una zona rovinata
If EgtGetFirstNameInGroup(EstCalc.GetRawId(), NAME_DAMAGED) = GDB_ID.NULL Then
m_AddPoint = False
End If
m_RemovePoint = False
NotifyPropertyChanged("RemovePoint")
m_NewDA = False
NotifyPropertyChanged("NewDA")
m_DeleteDA = False
NotifyPropertyChanged("DeleteDA")
m_nPtMode = If(m_AddPoint, PTMODE.ADD, PTMODE.MOVE)
m_nPtDmgMode = DMGMODE.NONE
End Select
NotifyPropertyChanged("AddPoint")
End If
@@ -537,23 +542,23 @@ Public Class RawPartTabVM
If value Then PhotoWithMouse = False
m_RemovePoint = value
Select Case GetRawMode()
Case RAWMODE.BY_POINTS
m_AddPoint = False
NotifyPropertyChanged("AddPoint")
m_nPtMode = If(m_RemovePoint, PTMODE.REMOVE, PTMODE.MOVE)
Case RAWMODE.DAMAGED
' Verifico ci sia almeno una zona rovinata
If EgtGetFirstNameInGroup(EstCalc.GetRawId(), NAME_DAMAGED) = GDB_ID.NULL Then
m_RemovePoint = False
End If
m_AddPoint = False
NotifyPropertyChanged("AddPoint")
m_NewDA = False
NotifyPropertyChanged("NewDA")
m_DeleteDA = False
NotifyPropertyChanged("DeleteDA")
m_nPtMode = If(m_RemovePoint, PTMODE.REMOVE, PTMODE.MOVE)
m_nPtDmgMode = DMGMODE.NONE
Case RAWMODE.BY_POINTS
m_AddPoint = False
NotifyPropertyChanged("AddPoint")
m_nPtMode = If(m_RemovePoint, PTMODE.REMOVE, PTMODE.MOVE)
Case RAWMODE.DAMAGED
' Verifico ci sia almeno una zona rovinata
If EgtGetFirstNameInGroup(EstCalc.GetRawId(), NAME_DAMAGED) = GDB_ID.NULL Then
m_RemovePoint = False
End If
m_AddPoint = False
NotifyPropertyChanged("AddPoint")
m_NewDA = False
NotifyPropertyChanged("NewDA")
m_DeleteDA = False
NotifyPropertyChanged("DeleteDA")
m_nPtMode = If(m_RemovePoint, PTMODE.REMOVE, PTMODE.MOVE)
m_nPtDmgMode = DMGMODE.NONE
End Select
NotifyPropertyChanged("RemovePoint")
End If
@@ -654,6 +659,34 @@ Public Class RawPartTabVM
End Set
End Property
Private m_MaterialFromDB As String = String.Empty
Public ReadOnly Property MaterialFromDB As String
Get
Return m_MaterialFromDB
End Get
End Property
Public Sub SetMaterialFromDB(sMaterial As String)
m_MaterialFromDB = sMaterial
If Not String.IsNullOrEmpty(m_MaterialFromDB) Then
'EstCalc.SetMaterialPhoto(m_MaterialFromDB)
SetVisibilityMaterialFromDB(Visibility.Visible)
Else
SetVisibilityMaterialFromDB(Visibility.Collapsed)
End If
NotifyPropertyChanged("MaterialFromDB")
End Sub
Private m_VisibilityMaterialFromDB As Visibility = Visibility.Collapsed
Public ReadOnly Property VisibilityMaterialFromDB As Visibility
Get
Return m_VisibilityMaterialFromDB
End Get
End Property
Public Sub SetVisibilityMaterialFromDB(VisibilityMaterial As Visibility)
m_VisibilityMaterialFromDB = VisibilityMaterial
NotifyPropertyChanged("VisibilityMaterialFromDB")
End Sub
#Region "Messages"
Public ReadOnly Property PhotoRotMsg As String
@@ -783,6 +816,9 @@ Public Class RawPartTabVM
Sub New()
' Creo riferimento a questa classe in OmagOFFICEMap
OmagOFFICEMap.SetRefRawPartTabVM(Me)
If OmagOFFICEMap.refMainWindowVM.MainWindowM.m_SlabDB Then
Me.OmgaPhotoV = New OmagPhotoV
End If
' Aggiungo voci alla lista di tipi di definizione grezzo
m_TypeList.Add(EgtMsg(MSG_RAWPARTPAGEUC + 1))
m_TypeList.Add(EgtMsg(MSG_RAWPARTPAGEUC + 2))
@@ -852,7 +888,7 @@ Public Class RawPartTabVM
SetPhotoRot(dPhotoRot)
' aggiorno l'apparenza del grezzo
AdjustRawPartOnStart()
' Altrimenti lo definisco
' Altrimenti lo definisco
Else
' Leggo da Ini gli ultimi valori e li rendo compatibili con le dimensioni della tavola
CreateNewRawFromIniData()
@@ -981,75 +1017,75 @@ Public Class RawPartTabVM
Private Function GetRawMode() As RAWMODE
Select Case m_SelType
Case Type.RECTANGLE
Return RAWMODE.RECTANGLE
Case Type.BY_POINTS
If m_OutlineIsChecked Then
Return RAWMODE.BY_POINTS
Else
Return RAWMODE.DAMAGED
End If
Case Type.FROM_PHOTO
Return RAWMODE.FROM_PHOTO
Case Type.RECTANGLE
Return RAWMODE.RECTANGLE
Case Type.BY_POINTS
If m_OutlineIsChecked Then
Return RAWMODE.BY_POINTS
Else
Return RAWMODE.DAMAGED
End If
Case Type.FROM_PHOTO
Return RAWMODE.FROM_PHOTO
End Select
Return RAWMODE.RECTANGLE
End Function
Private Sub RawModeView()
Select Case GetRawMode()
Case RAWMODE.RECTANGLE
TypeIsEnabled = True
LengthIsEnabled = True
WidthIsEnabled = True
HeightIsEnabled = True
OffsetXIsEnabled = True
OffsetYIsEnabled = True
KerfIsEnabled = True
' Nascondo bottoni per disegno
PointsVisibility = Visibility.Collapsed
' Disattivo bottoni zone rovinate e conferma contorno da foto
DAVisibility = Visibility.Collapsed
ConfirmPhotoVisibility = Visibility.Collapsed
Case RAWMODE.BY_POINTS
TypeIsEnabled = True
LengthIsEnabled = False
WidthIsEnabled = False
HeightIsEnabled = True
OffsetXIsEnabled = False
OffsetYIsEnabled = False
KerfIsEnabled = True
' Visualizzo bottoni per disegno
PointsVisibility = Visibility.Visible
' Disattivo bottoni zone rovinate e conferma contorno da foto
DAVisibility = Visibility.Collapsed
ConfirmPhotoVisibility = Visibility.Collapsed
Case RAWMODE.DAMAGED
TypeIsEnabled = False
LengthIsEnabled = False
WidthIsEnabled = False
HeightIsEnabled = False
OffsetXIsEnabled = False
OffsetYIsEnabled = False
KerfIsEnabled = False
' Visualizzo bottoni per disegno
PointsVisibility = Visibility.Visible
' Attivo bottoni zone rovinate
DAVisibility = Visibility.Visible
' Disattivo bottone conferma contorno da foto
ConfirmPhotoVisibility = Visibility.Collapsed
Case RAWMODE.FROM_PHOTO
TypeIsEnabled = True
LengthIsEnabled = False
WidthIsEnabled = False
HeightIsEnabled = True
OffsetXIsEnabled = False
OffsetYIsEnabled = False
KerfIsEnabled = True
' Nascondo bottoni per punti e zone rovinate
PointsVisibility = Visibility.Collapsed
DAVisibility = Visibility.Collapsed
' Visualizzo bottone conferma contorno da foto
ConfirmPhotoVisibility = Visibility.Visible
Case RAWMODE.RECTANGLE
TypeIsEnabled = True
LengthIsEnabled = True
WidthIsEnabled = True
HeightIsEnabled = True
OffsetXIsEnabled = True
OffsetYIsEnabled = True
KerfIsEnabled = True
' Nascondo bottoni per disegno
PointsVisibility = Visibility.Collapsed
' Disattivo bottoni zone rovinate e conferma contorno da foto
DAVisibility = Visibility.Collapsed
ConfirmPhotoVisibility = Visibility.Collapsed
Case RAWMODE.BY_POINTS
TypeIsEnabled = True
LengthIsEnabled = False
WidthIsEnabled = False
HeightIsEnabled = True
OffsetXIsEnabled = False
OffsetYIsEnabled = False
KerfIsEnabled = True
' Visualizzo bottoni per disegno
PointsVisibility = Visibility.Visible
' Disattivo bottoni zone rovinate e conferma contorno da foto
DAVisibility = Visibility.Collapsed
ConfirmPhotoVisibility = Visibility.Collapsed
Case RAWMODE.DAMAGED
TypeIsEnabled = False
LengthIsEnabled = False
WidthIsEnabled = False
HeightIsEnabled = False
OffsetXIsEnabled = False
OffsetYIsEnabled = False
KerfIsEnabled = False
' Visualizzo bottoni per disegno
PointsVisibility = Visibility.Visible
' Attivo bottoni zone rovinate
DAVisibility = Visibility.Visible
' Disattivo bottone conferma contorno da foto
ConfirmPhotoVisibility = Visibility.Collapsed
Case RAWMODE.FROM_PHOTO
TypeIsEnabled = True
LengthIsEnabled = False
WidthIsEnabled = False
HeightIsEnabled = True
OffsetXIsEnabled = False
OffsetYIsEnabled = False
KerfIsEnabled = True
' Nascondo bottoni per punti e zone rovinate
PointsVisibility = Visibility.Collapsed
DAVisibility = Visibility.Collapsed
' Visualizzo bottone conferma contorno da foto
ConfirmPhotoVisibility = Visibility.Visible
End Select
End Sub
@@ -1069,10 +1105,10 @@ Public Class RawPartTabVM
Dim nRawId As Integer = EstCalc.GetRawId()
If nRawId = GDB_ID.NULL And m_dHeight > EPS_SMALL Then
EgtAddRawPart(Point3d.ORIG(), m_dLength + 2 * m_dKerf, m_dWidth + 2 * m_dKerf, m_dHeight, Col)
' se esiste e da cancellare
' se esiste e da cancellare
ElseIf m_dHeight < EPS_SMALL Then
EgtRemoveRawPart(nRawId)
' Altrimenti lo modifico
' Altrimenti lo modifico
Else
EgtModifyRawPart(nRawId, Point3d.ORIG(), m_dLength + 2 * m_dKerf, m_dWidth + 2 * m_dKerf, m_dHeight, Col)
End If
@@ -1140,7 +1176,7 @@ Public Class RawPartTabVM
If EstCalc.GetRawId() = GDB_ID.NULL Then
RecalcRawPart(True)
Return
' se da cancellare
' se da cancellare
ElseIf m_dHeight < EPS_SMALL Then
' Se ci sono pezzi
If EgtGetFirstPartInRawPart(EstCalc.GetRawId()) <> GDB_ID.NULL Then
@@ -1161,7 +1197,7 @@ Public Class RawPartTabVM
End If
' Elimino il grezzo
EgtRemoveRawPart(EstCalc.GetRawId())
' altrimenti da aggiornare
' altrimenti da aggiornare
Else
' Salvo vecchia altezza
Dim dOldHeight As Double = EstCalc.GetRawHeight()
@@ -1689,26 +1725,104 @@ Public Class RawPartTabVM
End Get
End Property
Public Sub ClosePhotoWnd()
m_bSlabIsSelectedFromDB = True
OmgaPhotoV.Close()
End Sub
Public Sub Photo(ByVal param As Object)
' Apro dialogo per scelta immagine
Dim PhotoDlg As New Microsoft.Win32.OpenFileDialog()
PhotoDlg.Title = "Open"
PhotoDlg.Filter = "Image file(*.jpg;*.png;*.bmp)|*.jpg;*.png;*.bmp"
PhotoDlg.FilterIndex = 1
GetMainPrivateProfileString(S_GENERAL, K_IMAGEDIR, "", PhotoDlg.InitialDirectory)
If Not Directory.Exists(PhotoDlg.InitialDirectory) Then PhotoDlg.InitialDirectory = ""
If Not PhotoDlg.ShowDialog Then Return
Dim sPhoto As String = PhotoDlg.FileName
Dim sPhoto As String = String.Empty
Dim nSlabId As Integer = 0
Dim sSlabName As String = String.Empty
Dim sSlabNameDB As String = String.Empty
Dim sMat As String = String.Empty
' recupero il nome del progetto corrente
Dim sFileProject As String = String.Empty
EgtGetCurrFilePath(sFileProject)
' devo verificare se attualmente c'è una foto di lastra nel MachGroup corrente
If Not IsNothing(OmagOFFICEMap.refMachGroupPanelVM.SelectedMachGroup) Then
Dim CurrMachGroup As MachGroup = OmagOFFICEMap.refMachGroupPanelVM.SelectedMachGroup
sSlabNameDB = GetSlabName()
End If
' cancello eventuali nome di materiali
SetMaterialFromDB(String.Empty)
If OmagOFFICEMap.refMainWindowVM.MainWindowM.m_SlabDB Then
SetMaterialFromDB(GetMaterialPhoto())
' salvo il contesto corrente del programma
Dim nCurrentContetxt As Integer = EgtGetCurrentContext()
MainData.SetPreviousContext(nCurrentContetxt)
'If Not IsNothing(MainData.ContextSTONELib) Or MainData.ContextSTONELib <> 0 Then
If MainData.ContextSTONELib <> 0 Then
EgtSetCurrentContext(MainData.ContextSTONELib)
End If
' imposto come prima pagina sempre la lista, altrimenti compare l'ultima selezione
StoneMap.refProjectVM.SelProjectMode = ProjectSlabVM.ProjectModeOpt.LIST
' assegno il nome della lastra corrente, se eseguo una nuova selezione la rendo AVAILABLE
StoneMap.refOptionPanelVM.sSlabId = sSlabNameDB
StoneMap.refOptionPanelVM.sProjectAssigned = sFileProject
' imposto la ricerca attiva
StoneMap.refSearchPanelVM.SetSearchPanel_Visibility(True)
StoneMap.refSearchPanelVM.InitSearchPanel()
' inserisco in elenco solo i materiali della macchina corrente
AddHandler StoneMap.refOptionPanelVM.SlabIsSelectedOFFICE, AddressOf OmagOFFICEMap.refRawPartTabVM.ClosePhotoWnd
Me.OmgaPhotoV = New OmagPhotoV
Me.OmgaPhotoV.ShowDialog()
EgtSetCurrentContext(EgtSTONELib.MainData.PreviousContext)
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
' se non seleziono nessun lastra esco
If Not m_bSlabIsSelectedFromDB Then Return
m_bSlabIsSelectedFromDB = False
Dim LocalSlab As Slab = EgtSTONELib.StoneMap.refOptionPanelVM.SelSlab
' rimuovo la precedente lastra dalla lista
OmagOFFICEMap.refMachGroupPanelVM.SlabNameListCurr.Remove(sSlabNameDB)
EgtSTONELib.StoneMap.refOptionPanelVM.SetAvailableSlab(sSlabNameDB)
sPhoto = LocalSlab.ImagePath
sSlabNameDB = LocalSlab.Id
' imposto lo spessore della lastra
Height = LocalSlab.Thickness
' imposto il tipo di materiale
If Not IsNothing(LocalSlab.Material) Then
Dim bMaterialExists As Boolean = False
For Each ItemMaterial In MaterialList
If LocalSlab.Material = ItemMaterial.sName Then
SelMaterial = ItemMaterial
bMaterialExists = True
Exit For
End If
Next
If Not bMaterialExists Then
EstCalc.SetMaterialPhoto(LocalSlab.Material)
SetMaterialFromDB(LocalSlab.Material)
End If
End If
' aggiungo la nuova lastra
OmagOFFICEMap.refMachGroupPanelVM.SlabNameListCurr.Add(sSlabNameDB)
EgtSTONELib.StoneMap.refOptionPanelVM.SetAssignedSlab(sSlabNameDB)
Else
' Apro dialogo per scelta immagine
Dim PhotoDlg As New Microsoft.Win32.OpenFileDialog()
PhotoDlg.Title = "Open"
PhotoDlg.Filter = "Image file(*.jpg;*.png;*.bmp)|*.jpg;*.png;*.bmp"
PhotoDlg.FilterIndex = 1
GetMainPrivateProfileString(S_GENERAL, K_IMAGEDIR, "", PhotoDlg.InitialDirectory)
If Not Directory.Exists(PhotoDlg.InitialDirectory) Then PhotoDlg.InitialDirectory = ""
If Not PhotoDlg.ShowDialog Then Return
sPhoto = PhotoDlg.FileName
End If
' Salvo nuovo direttorio corrente per immagini
WriteMainPrivateProfileString(S_GENERAL, K_IMAGEDIR, Path.GetDirectoryName(sPhoto))
' Annullo offset e rotazione foto
SetPhotoOffsetX(0)
SetPhotoOffsetY(0)
SetPhotoRot(0)
' Altri dati foto
Dim nSlabId As Integer = 0
Dim sSlabName As String = String.Empty
Dim sMat As String = String.Empty
' Carico immagine
If Not EstPhoto.LoadPhoto(sPhoto, nSlabId, sSlabName, sMat) Then
' Ripristino offset e rotazione foto
@@ -1736,9 +1850,13 @@ Public Class RawPartTabVM
nPartId = nNextPartId
End While
EstCalc.HideParkedParts()
' Imposto nome e spessore lastra
EstCalc.SetSlabName(sSlabName)
If Not String.IsNullOrEmpty(sSlabNameDB) Then
EstCalc.SetSlabName(sSlabNameDB)
End If
EstCalc.SetSlabHeight(m_dHeight)
' notifico il MachGroup Corrente
OmagOFFICEMap.refMachGroupPanelVM.SelectedMachGroup.NotifyPropertyChanged("MachGroupToolTip")
' Carico contorno
EstPhoto.LoadContour(sPhoto)
@@ -1856,7 +1974,7 @@ Public Class RawPartTabVM
' Aggiorno cerchi
UpdateCircles()
EgtDraw()
' altrimenti
' altrimenti
Else
' verifico se abbastanza vicino ad un estremo
Dim ptJoint As Point3d
@@ -1886,7 +2004,7 @@ Public Class RawPartTabVM
m_bDrag = False
End If
End If
' se drag e modalità zona danneggiata
' se drag e modalità zona danneggiata
ElseIf m_bDrag And GetRawMode() = RAWMODE.DAMAGED Then
' se aggiungi zona rovinata
If m_nPtDmgMode = DMGMODE.ADD Then
@@ -1896,7 +2014,7 @@ Public Class RawPartTabVM
NotifyPropertyChanged("NewDA")
UpdateCircles()
EgtDraw()
' se rimuovi zona rovinata
' se rimuovi zona rovinata
ElseIf m_nPtDmgMode = DMGMODE.REMOVE Then
' Verifico di essere sulla zona danneggiata
Dim ptNear As Point3d
@@ -1910,7 +2028,7 @@ Public Class RawPartTabVM
' Aggiorno cerchi
UpdateCircles()
EgtDraw()
' altrimenti eventuali operazioni di punto
' altrimenti eventuali operazioni di punto
Else
' se aggiungi punto
If m_nPtMode = PTMODE.ADD Then
@@ -1922,7 +2040,7 @@ Public Class RawPartTabVM
' Aggiorno cerchi
UpdateCircles()
EgtDraw()
' altrimenti
' altrimenti
Else
' verifico di essere abbastanza vicino ad un estremo
Dim ptJoint As Point3d
@@ -1996,7 +2114,7 @@ Public Class RawPartTabVM
NotifyPropertyChanged("OffsetX")
NotifyPropertyChanged("OffsetY")
End If
' se sposto lato sotto
' se sposto lato sotto
ElseIf m_nDragEnt = 1 Then
Dim dDelta = ptCurr.y - m_ptPrev.y
If m_dWidth - dDelta > MIN_RAW_DIM And m_dOffsetY + dDelta > m_dKerf Then
@@ -2012,7 +2130,7 @@ Public Class RawPartTabVM
NotifyPropertyChanged("Width")
NotifyPropertyChanged("OffsetY")
End If
' se sposto lato a destra
' se sposto lato a destra
ElseIf m_nDragEnt = 2 Then
Dim dDelta = ptCurr.x - m_ptPrev.x
If m_dLength + dDelta > MIN_RAW_DIM And
@@ -2024,7 +2142,7 @@ Public Class RawPartTabVM
EgtDraw()
NotifyPropertyChanged("Length")
End If
' se sposto lato sopra
' se sposto lato sopra
ElseIf m_nDragEnt = 3 Then
Dim dDelta = ptCurr.y - m_ptPrev.y
If m_dWidth + dDelta > MIN_RAW_DIM And
@@ -2036,7 +2154,7 @@ Public Class RawPartTabVM
EgtDraw()
NotifyPropertyChanged("Width")
End If
' se sposto lato a sinistra
' se sposto lato a sinistra
ElseIf m_nDragEnt = 4 Then
Dim dDelta = ptCurr.x - m_ptPrev.x
If m_dLength - dDelta > MIN_RAW_DIM And m_dOffsetX + dDelta > m_dKerf Then
@@ -2074,7 +2192,7 @@ Public Class RawPartTabVM
NotifyPropertyChanged("OffsetX")
NotifyPropertyChanged("OffsetY")
End If
' Altrimenti movimento di un singolo punto
' Altrimenti movimento di un singolo punto
Else
' Limito il punto a stare nella tavola con franco pari al kerf
If ptCurr.x < m_ptTableMin.x + m_dKerf Then ptCurr.x = m_ptTableMin.x + m_dKerf + SAFE_RAW_DIST
+1 -1
View File
@@ -256,7 +256,7 @@ Public Class OptionWindowVM
Dim sColor As String = " "
Dim sArray() As String
If GetPrivateProfileString(S_COLORTOSIDEANG, K_CTSA & index, " ", sColor, m_sIniFile) <> 0 Then
sArray = sColor.Split(",")
sArray = sColor.Split(","c)
' Leggo elenco colori disponibili da file ini
Dim ReadColor As ColorLsBxItem = New ColorLsBxItem(index,
If(sArray.Length > 5, sArray(5).Equals("1"), True),
+1 -1
View File
@@ -73,7 +73,7 @@
Grid.Column="1"/>
</Grid>
<Grid Visibility="{Binding Parameter23_Visibility}"
<Grid Visibility="{Binding Parameter1_Visibility}"
Grid.Row="3"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
+92 -29
View File
@@ -8,6 +8,7 @@ Public Class SideEntityControlVM
Public Enum ModeOpt As Integer
SIDEANGLE = 0
DRIP = 1
ENGRAVE = 2
End Enum
Public Enum CallingWindowOpt As Integer
@@ -34,6 +35,7 @@ Public Class SideEntityControlVM
Public ReadOnly Property Legenda_Visibility As Visibility
Get
If m_Mode = SideEntityControlVM.ModeOpt.DRIP OrElse
m_Mode = SideEntityControlVM.ModeOpt.ENGRAVE OrElse
SideEntityControlVM.m_SideAngleCheck OrElse
m_SideEntityList.Count() = 0 Then
Return Visibility.Collapsed
@@ -72,12 +74,18 @@ Public Class SideEntityControlVM
Private m_Parameter1 As Double
Public Property Parameter1 As String
Get
Return DoubleToString(m_Parameter1, -2)
If m_Mode = ModeOpt.SIDEANGLE Then
Return DoubleToString(m_Parameter1, 2)
Else
Return LenToString(m_Parameter1, -2)
End If
End Get
Set(value As String)
StringToDouble(value, m_Parameter1)
SideAngleEntity.m_Parameter1 = m_Parameter1
'StringToLen(value, m_Parameter1)
'SideAngleEntity.m_Parameter1 = m_Parameter1
If m_Mode = ModeOpt.SIDEANGLE Then
StringToDouble(value, m_Parameter1)
SideAngleEntity.m_Parameter1 = m_Parameter1
' ciclo sui checkbox calcolati sul numero di lati inclinabili presenti
For Index As Integer = 0 To m_SideEntityList.Count - 1
' Nuovo angolo di inclinazione
@@ -85,7 +93,7 @@ Public Class SideEntityControlVM
' Se checked lo imposto al valore letto dalla TxBx
If m_SideEntityList(Index).bIsChecked Then
StringToDouble(value, dSideAngle)
' altrimenti lo imposto a zero
' altrimenti lo imposto a zero
Else
dSideAngle = 0
End If
@@ -95,6 +103,7 @@ Public Class SideEntityControlVM
' Aggiorno tutti i testi
RefreshSideAngleText()
Else
StringToLen(value, m_Parameter1)
' Recupero il valore
StringToLen(value, m_dDripOffset)
' Creo le geometrie dei gocciolatoi
@@ -111,15 +120,44 @@ Public Class SideEntityControlVM
Private m_Parameter2 As Double
Public Property Parameter2 As String
Get
Return LenToString(m_Parameter2, -2)
If m_Mode = ModeOpt.SIDEANGLE Then
Return LenToString(m_Parameter2, 2)
Else
Return LenToString(m_Parameter2, -2)
End If
End Get
Set(value As String)
If m_Mode = ModeOpt.DRIP Then
StringToLen(value, m_Parameter2)
StringToLen(value, m_Parameter2)
If m_Mode = ModeOpt.SIDEANGLE Then
SideAngleEntity.m_Parameter2 = m_Parameter2
' ciclo sui checkbox calcolati sul numero di lati inclinabili presenti
For Index As Integer = 0 To m_SideEntityList.Count - 1
' Nuovo angolo di inclinazione
Dim dSideHeel As Double
' Se checked lo imposto al valore letto dalla TxBx
If m_SideEntityList(Index).bIsChecked Then
dSideHeel = m_Parameter2
' altrimenti lo imposto a zero
Else
dSideHeel = 0
End If
' Lo modifico nella geometria e nella lista inclinazioni
ModifySideHeel(m_SideEntityList(Index).sEntityName, dSideHeel)
Next
' Aggiorno tutti i testi
RefreshSideAngleText()
Else
m_dDripOffset2 = m_Parameter2
' Creo le geometrie dei gocciolatoi
RefreshSideAngleText()
End If
'If m_Mode <> ModeOpt.SIDEANGLE Then
' StringToLen(value, m_Parameter2)
' m_dDripOffset2 = m_Parameter2
' ' Creo le geometrie dei gocciolatoi
' RefreshSideAngleText()
'End If
End Set
End Property
Private Sub SetParameter2(value As Double)
@@ -133,7 +171,7 @@ Public Class SideEntityControlVM
Return LenToString(m_Parameter3, -2)
End Get
Set(value As String)
If m_Mode = ModeOpt.DRIP Then
If m_Mode <> ModeOpt.SIDEANGLE Then
StringToLen(value, m_Parameter3)
m_dDripDepth = m_Parameter3
' Creo le geometrie dei gocciolatoi
@@ -152,7 +190,7 @@ Public Class SideEntityControlVM
Return LenToString(m_Parameter4, -2)
End Get
Set(value As String)
If m_Mode = ModeOpt.DRIP Then
If m_Mode <> ModeOpt.SIDEANGLE Then
StringToLen(value, m_Parameter4)
m_dDripShort = m_Parameter4
' Creo le geometrie dei gocciolatoi
@@ -187,7 +225,11 @@ Public Class SideEntityControlVM
End Property
Public ReadOnly Property Parameter2Msg As String
Get
Return EgtMsg(MSG_IMPORTPAGEUC + 16) ' Offset 2
If m_Mode = ModeOpt.SIDEANGLE Then
Return EgtMsg(91002)
Else
Return EgtMsg(MSG_IMPORTPAGEUC + 16) ' Offset 2
End If
End Get
End Property
Public ReadOnly Property Parameter3Msg As String
@@ -570,12 +612,13 @@ Public Class SideEntityControlVM
' Recupero Id layer di contorno esterno
Dim nOutLoopId = EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP)
' Preparo layer con geometria gocciolatoi (svuotandolo o creandolo)
Dim DripLayer As Integer = EgtGetFirstNameInGroup(nPartId, NAME_DRIPCUT)
Dim DripName As String = If(m_Mode = ModeOpt.DRIP, NAME_DRIPCUT, NAME_ONPATH)
Dim DripLayer As Integer = EgtGetFirstNameInGroup(nPartId, DripName)
If DripLayer <> GDB_ID.NULL Then
EgtEmptyGroup(DripLayer)
Else
DripLayer = EgtCreateGroup(nPartId)
EgtSetName(DripLayer, NAME_DRIPCUT)
EgtSetName(DripLayer, DripName)
End If
' Per ogni entità con gocciolatoio, ne inserisco una copia nel layer
Dim vSelId As New List(Of Integer)
@@ -625,22 +668,33 @@ Public Class SideEntityControlVM
nCrvId = nNextCrvId
End While
End If
' Esplodo nelle curve componenti
nCrvId = EgtGetFirstInGroup(DripLayer)
While nCrvId <> GDB_ID.NULL
Dim nNextCrvId = EgtGetNext(nCrvId)
Dim nCount As Integer
EgtExplodeCurveCompo(nCrvId, nCount)
nCrvId = nNextCrvId
End While
' Assegno colore e attributi
nCrvId = EgtGetFirstInGroup(DripLayer)
While nCrvId <> GDB_ID.NULL
EgtSetColor(nCrvId, New Color3d(255, 165, 0))
EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
If m_dDripShort > EPS_SMALL Then EgtSetInfo(nCrvId, INFO_STRICT, "1")
nCrvId = EgtGetNext(nCrvId)
End While
If m_Mode = ModeOpt.DRIP Then
' Esplodo nelle curve componenti
nCrvId = EgtGetFirstInGroup(DripLayer)
While nCrvId <> GDB_ID.NULL
Dim nNextCrvId = EgtGetNext(nCrvId)
Dim nCount As Integer
EgtExplodeCurveCompo(nCrvId, nCount)
nCrvId = nNextCrvId
End While
' Assegno colore e attributi
nCrvId = EgtGetFirstInGroup(DripLayer)
While nCrvId <> GDB_ID.NULL
EgtSetColor(nCrvId, COL_MCH_DRIPCUT())
EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
If m_dDripShort > EPS_SMALL Then EgtSetInfo(nCrvId, INFO_STRICT, "1")
nCrvId = EgtGetNext(nCrvId)
End While
Else
' Assegno colore e attributi
nCrvId = EgtGetFirstInGroup(DripLayer)
While nCrvId <> GDB_ID.NULL
EgtSetColor(nCrvId, COL_MCH_DRIPCUT())
EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
EgtSetInfo(nCrvId, INFO_STRICT, If(m_dDripShort > EPS_SMALL, "3", "0"))
nCrvId = EgtGetNext(nCrvId)
End While
End If
End Sub
' Funzione che modifica l'inclinazione di un lato
@@ -761,11 +815,16 @@ Public Class SideEntityControlVM
If m_Mode = ModeOpt.SIDEANGLE Then
WriteMainPrivateProfileString(S_SIDES, K_SIDEANGLE, DoubleToString(m_Parameter1, 3))
Else
ElseIf m_Mode = ModeOpt.DRIP Then
WriteMainPrivateProfileString(S_SIDES, K_DRIPOFFSET, DoubleToString(m_dDripOffset, 3))
WriteMainPrivateProfileString(S_SIDES, K_DRIPOFFSET2, DoubleToString(m_dDripOffset2, 3))
WriteMainPrivateProfileString(S_SIDES, K_DRIPDEPTH, DoubleToString(m_dDripDepth, 3))
WriteMainPrivateProfileString(S_SIDES, K_DRIPSHORT, DoubleToString(m_dDripShort, 3))
ElseIf m_Mode = ModeOpt.ENGRAVE Then
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEOFFSET, DoubleToString(m_dDripOffset, 3))
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEOFFSET2, DoubleToString(m_dDripOffset2, 3))
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, DoubleToString(m_dDripDepth, 3))
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVESHORT, DoubleToString(m_dDripShort, 3))
End If
EgtDraw()
@@ -1086,6 +1145,7 @@ Friend Class SideAngleEntity
End Property
Friend Shared m_Parameter1 As Double
Friend Shared m_Parameter2 As Double
Friend Shared m_ModifySideAngle As Action(Of String, Double)
Friend Shared m_ModifySideHeel As Action(Of String, Double)
Friend Shared m_RefreshSideAngleText As Action
@@ -1176,14 +1236,17 @@ Friend Class SideAngleEntity
Set(value As Boolean)
If value Then
m_dSideAngle = m_Parameter1
m_dSideHeel = m_Parameter2
Else
m_dSideAngle = 0
m_dSideHeel = 0
End If
' '' Converto nome checkbox in nome elemento tenendo conto dello slittamento verso il basso
''Dim nCurrSide As Integer = m_SideAngleEntityList.Count() - (10 - CInt(CurrCheckBox.Name.Substring(1)))
''Dim sCurrSide As String = "A" & nCurrSide.ToString()
' Lo modifico nella geometria e nella lista inclinazioni
m_ModifySideAngle(sEntityName, m_dSideAngle)
m_ModifySideHeel(sEntityName, m_dSideHeel)
' Aggiorno tutti i testi
m_RefreshSideAngleText()
NotifyPropertyChanged("bIsChecked")
+17 -12
View File
@@ -2,6 +2,7 @@
Imports System.IO
Imports EgtUILib
Imports EgtWPFLib5
Imports EgtSTONELib
Public Class TopCommandBarVM
Inherits VMBase
@@ -214,18 +215,22 @@ Public Class TopCommandBarVM
''' Returns a command that do SaveAs.
''' </summary>
Public ReadOnly Property SaveAsCommand As ICommand
Get
If m_cmdSaveAs Is Nothing Then
m_cmdSaveAs = New Command(AddressOf SaveAs)
End If
Return m_cmdSaveAs
End Get
Get
If m_cmdSaveAs Is Nothing Then
m_cmdSaveAs = New Command(AddressOf SaveAs)
End If
Return m_cmdSaveAs
End Get
End Property
''' <summary>
''' Execute the SaveAs. This method is invoked by the SaveAsCommand.
''' </summary>
Public Sub SaveAs(ByVal param As Object)
' non posso avere la stessa lastra in due progetti
If OmagOFFICEMap.refMainWindowVM.MainWindowM.m_SlabDB Then
Return
End If
OmagOFFICEMap.refSceneHostVM.SaveAsProject()
End Sub
@@ -237,12 +242,12 @@ Public Class TopCommandBarVM
''' Returns a command that do Export.
''' </summary>
Public ReadOnly Property ExportCommand As ICommand
Get
If m_cmdExport Is Nothing Then
m_cmdExport = New Command(AddressOf Export)
End If
Return m_cmdExport
End Get
Get
If m_cmdExport Is Nothing Then
m_cmdExport = New Command(AddressOf Export)
End If
Return m_cmdExport
End Get
End Property
''' <summary>
+8
View File
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:OmagOFFICE="clr-namespace:OmagOFFICE"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtSTONELib="clr-namespace:EgtSTONELib;assembly=EgtSTONELib"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
<!--
@@ -26,6 +27,13 @@
<OmagOFFICE:SimulTabVM x:Key="SimulTabVM"/>
<OmagOFFICE:MyMachGroupPanelVM x:Key="MachGroupPanelVM"/>
<EgtSTONELib:ProjectSlabVM x:Key="ProjectSlabVM"/>
<EgtSTONELib:OptionPanelSlabVM x:Key="OptionPanelSlabVM"/>
<EgtSTONELib:ListPageSlabVM x:Key="ListPageSlabVM"/>
<EgtSTONELib:DetailPageSlabVM x:Key="DetailPageSlabVM"/>
<EgtSTONELib:SearchPanelSlabVM x:Key="SearchPanelSlabVM"/>
<EgtSTONELib:MyInstrumentPanelSlabVM x:Key="MyInstrumentPanelSlabVM"/>
<!--Colori predefiniti-->
<SolidColorBrush x:Key="Omag_Blue" Color="#FF095CA8" />
<SolidColorBrush x:Key="Omag_Yellow" Color="#FFFFCE5B" />
+40 -2
View File
@@ -1,4 +1,5 @@
Imports EgtWPFLib5
Imports EgtSTONELib
Module OmagOFFICEMap
@@ -15,6 +16,8 @@ Module OmagOFFICEMap
Private m_refMoveRawModeVM As MoveRawModeVM
Private m_refSimulTabVM As SimulTabVM
Private m_refSceneHostVM As SceneHostVM
#Region "Get"
Public ReadOnly Property refMainWindowVM As MainWindowVM
@@ -43,7 +46,11 @@ Module OmagOFFICEMap
Public ReadOnly Property refSceneHostVM As SceneHostVM
Get
Return LibMap.refSceneHostVM
' bisogna usare la nuova funzione dell'EgtWPFLib5 che gestisce le liste di scene
If IsNothing(m_refSceneHostVM) Then
m_refSceneHostVM = LibMap.refSceneHostVM
End If
Return m_refSceneHostVM
End Get
End Property
@@ -113,6 +120,37 @@ Module OmagOFFICEMap
End Get
End Property
'Public ReadOnly Property refProjectVM As ProjectLibVM
' Get
' Return StoneMap.refProjectVM
' End Get
'End Property
'Public ReadOnly Property refOptionPanelVM As OptionPanelLibVM
' Get
' Return StoneMap.refOptionPanelVM
' End Get
'End Property
Public ReadOnly Property refListPageVM As ListPageSlabVM
Get
Return StoneMap.refListPageVM
End Get
End Property
Public ReadOnly Property refDetailPageVM As DetailPageSlabVM
Get
Return StoneMap.refDetailPageVM
End Get
End Property
Public ReadOnly Property refSearchPanelVM As SearchPanelSlabVM
Get
Return StoneMap.refSearchPanelVM
End Get
End Property
#End Region ' Get
#Region "Set"
@@ -210,7 +248,7 @@ Module OmagOFFICEMap
Not IsNothing(m_refOptionPanelVM) AndAlso Not IsNothing(m_refRawPartTabVM) AndAlso
Not IsNothing(m_refNestingTabVM) AndAlso Not IsNothing(m_refSimulTabVM) AndAlso
Not IsNothing(m_refMachiningTabVM) AndAlso
LibMap.EndInit()
LibMap.EndInit() AndAlso StoneMap.ContninueApplication
End Function
#End Region ' Init