OmagOFFICE 1.8d1 :
- primo rilascio.
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
@@ -0,0 +1,9 @@
|
||||
<Application x:Class="Application"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Application.Resources>
|
||||
<ResourceDictionary Source="Utility/OmagOfficeDictionary.xaml"/>
|
||||
</Application.Resources>
|
||||
|
||||
</Application>
|
||||
@@ -0,0 +1,14 @@
|
||||
Class Application
|
||||
|
||||
' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
|
||||
' can be handled in this file.
|
||||
Protected Overrides Sub OnStartup(e As StartupEventArgs)
|
||||
MyBase.OnStartup(e)
|
||||
'ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose
|
||||
' Creo la View principale
|
||||
Me.MainWindow = New MainWindowV
|
||||
' Mostro la View principale
|
||||
Me.MainWindow.Show()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,196 @@
|
||||
'----------------------------------------------------------------------------
|
||||
' EgalTech 2015-2015
|
||||
'----------------------------------------------------------------------------
|
||||
' File : ConstGen.vb Data : 12.02.15 Versione : 1.6b3
|
||||
' Contenuto : Modulo costanti generali.
|
||||
'
|
||||
'
|
||||
'
|
||||
' Modifiche : 12.02.15 DS Creazione modulo.
|
||||
'
|
||||
'
|
||||
'----------------------------------------------------------------------------
|
||||
Imports EgtUILib
|
||||
|
||||
Module ConstGen
|
||||
|
||||
' File con direttorio radice dei dati
|
||||
Public Const DAT_FILE_NAME As String = "DataRoot.Ini"
|
||||
Public Const S_DATA As String = "Data"
|
||||
Public Const K_DATAROOT As String = "DataRoot"
|
||||
|
||||
' File con dati di licenza
|
||||
Public Const LIC_FILE_NAME As String = "OmagOFFICE.lic"
|
||||
Public Const S_LICENCE As String = "Licence"
|
||||
Public Const K_KEY As String = "Key"
|
||||
|
||||
' File di log generale
|
||||
Public Const GENLOG_FILE_NAME As String = "OmagOFFICELog.txt"
|
||||
' File di log dei comandi
|
||||
Public Const CMDLOG_FILE_NAME As String = "OmagOFICELog.tua"
|
||||
|
||||
' Sottodirettorio di configurazione
|
||||
Public Const CONF_DIR As String = "Config"
|
||||
' Sottodirettorio delle risorse
|
||||
Public Const RES_DIR As String = "Resources"
|
||||
' Sottodirettorio temporaneo
|
||||
Public Const TEMP_DIR As String = "Temp"
|
||||
' Sottodirettorio per Cam automatico
|
||||
Public Const CAMAUTO_DIR As String = "CamAuto"
|
||||
' Sottodirettorio per Csv automatico
|
||||
Public Const CSVAUTO_DIR As String = "CsvAuto"
|
||||
' Sottodirettorio di default per il salvataggio con nome
|
||||
Public Const SAVE_DFL_NAMEDIR As String = "MyProjects"
|
||||
' Sottodirettorio di default per le macchine
|
||||
Public Const MACHINES_DFL_DIR As String = "Machines"
|
||||
|
||||
'' Delta Z sovratavola per evitare problemi di visualizzazione texture
|
||||
'Public Const DELTAZ_ADDTAB As Double = 0.1
|
||||
'' Nome gruppo dei sottopezzi
|
||||
'Public Const MACH_FIXT_GROUP As String = "Fixt"
|
||||
'' Nome tavola addizionale nel gruppo dei sottopezzi
|
||||
'Public Const MACH_ADD_TABLE As String = "AddTab"
|
||||
'' Info altezza tavola addizionale nella tavola
|
||||
'Public Const KEY_ADD_TABLE As String = "AddTab"
|
||||
|
||||
'' Nome testa con ventose per spostamento pezzi
|
||||
'Public Const VACUUM_HEAD As String = "H4"
|
||||
'' Nome gruppo layout in testa con ventose
|
||||
'Public Const VACUUM_HEAD_LAYOUT As String = "LAYOUT"
|
||||
'' Nome oggetto frame prima uscita di una testa
|
||||
'Public Const HEAD_FIRST_EXIT As String = "_T1"
|
||||
|
||||
'' Costanti per lavorazioni
|
||||
'Public Const MACH_GROUP As String = "Mach01"
|
||||
'Public Const MAIN_TAB As String = "MainTab"
|
||||
'Public Const SECOND_TAB As String = "2ndTab"
|
||||
'Public Const PHOTO_GRP As String = "Photos"
|
||||
'Public Const PHOTO_NAME As String = "Raw"
|
||||
|
||||
'' Nome della superficie del grezzo
|
||||
'Public Const NAME_RAW_SOLID As String = "RawSolid"
|
||||
'' Nome del centro del grezzo
|
||||
'Public Const NAME_RAW_CENTER As String = "RawCenter"
|
||||
'' Nome del contorno di kerf nel grezzo
|
||||
'Public Const NAME_KERF As String = "Kerf"
|
||||
'' Chiave per info di kerf nel grezzo
|
||||
'Public Const KEY_KERF As String = "Kerf"
|
||||
'' Nome del contorno del grezzo
|
||||
'Public Const NAME_RAW_OUTLINE As String = "RawOutline"
|
||||
'' Nome della regione del kerf grezzo
|
||||
'Public Const NAME_KERF_REGION As String = "KerfRegion"
|
||||
'' Nome della regione fuori kerf nel grezzo
|
||||
'Public Const NAME_OUTKERF_REG As String = "SheetOut"
|
||||
'' Nome della regione di riferimento nel grezzo
|
||||
'Public Const NAME_REF_REG As String = "RefReg"
|
||||
'' Chiave per disabilitare la regione di riferimento
|
||||
'Public Const KEY_REF_REG_OFF As String = "Off"
|
||||
'' Chiave per definizione del grezzo per punti
|
||||
'Public Const KEY_RAWBYPOINTS As String = "Rbp"
|
||||
'' Nome del contorno di un'area rovinata
|
||||
'Public Const NAME_DAMAGED As String = "Damaged"
|
||||
'' Nome della regione di un'area rovinata
|
||||
'Public Const NAME_DAMAGED_REG As String = "DmgReg"
|
||||
'' Nome gruppo contorno grezzo da fotografia
|
||||
'Public Const NAME_RAW_PHOTO_OUTLINE As String = "RawPhotoOutline"
|
||||
|
||||
'' Contrassegno di progetto OmagCut
|
||||
'Public Const NAME_PROJMARK As String = "OmagCut"
|
||||
'' Info per stato flag taglio ridotto
|
||||
'Public Const INFO_REDUCEDCUT = "ReducedCut"
|
||||
'' Info per lavaggio prima di spostamento pezzi con ventosa
|
||||
'Public Const INFO_WASHING As String = "Washing"
|
||||
'' Info per lavorazioni già ordinate
|
||||
'Public Const INFO_MACHORDER As String = "MachOrder"
|
||||
'' Info per indice progetto
|
||||
'Public Const INFO_PROJINDEX As String = "ProjIndex"
|
||||
'' Info per materiale progetto
|
||||
'Public Const INFO_PROJMAT As String = "ProjMat"
|
||||
'' Info per programma di linea inviato
|
||||
'Public Const INFO_NCPROGSENT As String = "NcProgSent"
|
||||
|
||||
'' Nome layer delle regioni
|
||||
'Public Const NAME_REGION As String = "Region"
|
||||
'' Delta Z regioni di pezzi per evitare problemi di visualizzazione con grezzi
|
||||
'Public Const DELTAZ_REG As Double = 0.1
|
||||
'' Nome layer contorni esterni
|
||||
'Public Const NAME_OUTLOOP As String = "OutLoop"
|
||||
'' Nome layer contorni interni
|
||||
'Public Const NAME_INLOOP As String = "InLoop"
|
||||
'' Nome layer percorsi sul pezzo
|
||||
'Public Const NAME_ONPATH As String = "OnPath"
|
||||
'' Nome layer preview
|
||||
'Public Const NAME_PREVIEW As String = "PV"
|
||||
'' Info in entità da tagliare per affondamento
|
||||
'Public Const INFO_DEPTH As String = "Depth"
|
||||
'' Info in entità da tagliare per angolo di lato
|
||||
'Public Const INFO_SIDE_ANGLE As String = "SideAng"
|
||||
'' Info in entità da tagliare per direzione che varia a seconda del tipo (una via o zigzag)
|
||||
'Public Const INFO_DIR As String = "Dir"
|
||||
'' Info in entità da tagliare per abilitare possibilità di inversione
|
||||
'Public Const INFO_ENABLE_INVERT As String = "EnInv"
|
||||
'' Info in preview lavorazione con identificativo layer preview spostato nel pezzo
|
||||
'Public Const INFO_PV_ONPART_ID As String = "PvId"
|
||||
'' Info in lavorazione con identificativo lavorazioni inglobate
|
||||
'Public Const INFO_MCH_OTHMID As String = "OthMIds"
|
||||
'' Info lavorazione disabilitata dall'utente
|
||||
'Public Const INFO_MCH_USER_OFF As String = "UserOff"
|
||||
'' Nome contorno taglio
|
||||
'Public Const NAME_PV_CUT As String = "CUT"
|
||||
'' Nome contorno pre-taglio
|
||||
'Public Const NAME_PV_PRECUT As String = "PRC"
|
||||
'' Nome contorno post-taglio
|
||||
'Public Const NAME_PV_POSTCUT As String = "POC"
|
||||
'' Nome contorno in basso taglio
|
||||
'Public Const NAME_PV_DOWN_CUT As String = "DCUT"
|
||||
'' Nome contorno in basso pre-taglio
|
||||
'Public Const NAME_PV_DOWN_PRECUT As String = "DPRC"
|
||||
'' Nome contorno in basso post-taglio
|
||||
'Public Const NAME_PV_DOWN_POSTCUT As String = "DPOC"
|
||||
'' Nome regione taglio
|
||||
'Public Const NAME_PV_RCUT As String = "RCUT"
|
||||
'' Nome regione pre-taglio (attacco)
|
||||
'Public Const NAME_PV_RLICUT As String = "RLICUT"
|
||||
'' Nome regione post-taglio (uscita)
|
||||
'Public Const NAME_PV_RLOCUT As String = "RLOCUT"
|
||||
'' Info in lavorazione taglio per attacco originale
|
||||
'Public Const INFO_MCH_ORILEADIN As String = "OriLI"
|
||||
'' Info in lavorazione taglio per uscita originale
|
||||
'Public Const INFO_MCH_ORILEADOUT As String = "OriLO"
|
||||
'' Info in pezzo con path di Csv di provenienza
|
||||
'Public Const INFO_CSV_PATH As String = "CsvPath"
|
||||
'' Info in pezzo con suo nome in Csv
|
||||
'Public Const INFO_CSV_PART As String = "CsvPart"
|
||||
'' Nome layer per valori angoli di inclinazione dei lati
|
||||
'Public Const SIDE_ANGLE_LAYER As String = "SideAngle"
|
||||
|
||||
'' Nome di pezzo temporaneo che serve per copia dime
|
||||
'Public Const NAME_COPYTEMPLATE As String = "CopyTemplate"
|
||||
|
||||
'' Chiave per Id originale del pezzo per VeinMatch
|
||||
'Public Const KEY_ORI_ID As String = "OriId"
|
||||
|
||||
'' Costante per flag di BBox
|
||||
'Public Const BBFLAG As Integer = GDB_BB.ONLY_VISIBLE + GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM
|
||||
|
||||
' Colori per lavorazioni
|
||||
Public Function COL_MCH_CUT() As Color3d
|
||||
Return New Color3d(0, 255, 0)
|
||||
End Function
|
||||
Public Function COL_MCH_FREE() As Color3d
|
||||
Return New Color3d(0, 0, 255)
|
||||
End Function
|
||||
Public Function COL_MCH_INTERF() As Color3d
|
||||
Return New Color3d(255, 0, 0)
|
||||
End Function
|
||||
Public Function COL_MCH_DISABLED() As Color3d
|
||||
Return New Color3d(96, 96, 96)
|
||||
End Function
|
||||
Public Function COL_MCH_DIS_NUMBER() As Color3d
|
||||
Return New Color3d(32, 32, 128)
|
||||
End Function
|
||||
Public Function COL_MCH_DIS_INTERF() As Color3d
|
||||
Return New Color3d(224, 64, 64)
|
||||
End Function
|
||||
|
||||
End Module
|
||||
@@ -0,0 +1,135 @@
|
||||
'----------------------------------------------------------------------------
|
||||
' EgalTech 2015-2015
|
||||
'----------------------------------------------------------------------------
|
||||
' File : ConstIni.vb Data : 12.02.15 Versione : 1.6b3
|
||||
' Contenuto : Modulo costanti sezione e chiavi per file Ini.
|
||||
'
|
||||
'
|
||||
'
|
||||
' Modifiche : 12.02.15 DS Creazione modulo.
|
||||
'
|
||||
'
|
||||
'----------------------------------------------------------------------------
|
||||
|
||||
Module ConstIni
|
||||
|
||||
Public Const INI_FILE_NAME As String = "OmagOFFICE.ini"
|
||||
|
||||
Public Const S_GENERAL As String = "General"
|
||||
Public Const K_DEBUG As String = "Debug"
|
||||
Public Const K_LICENCE As String = "Licence"
|
||||
Public Const K_COMMANDLOG As String = "CommandLog"
|
||||
Public Const K_MESSAGESDIR As String = "MessagesDir"
|
||||
Public Const K_MESSAGES As String = "Messages"
|
||||
Public Const K_WINPLACE As String = "WinPlace"
|
||||
Public Const K_MMUNITS As String = "MmUnits"
|
||||
Public Const K_LASTPROJ As String = "LastProj"
|
||||
Public Const K_AUTOLOADLASTPROJ As String = "AutoLoadLastProj"
|
||||
Public Const K_IMAGEDIR As String = "ImageDir"
|
||||
Public Const K_CONTOURFROMCAMERA As String = "ContourFromCamera"
|
||||
Public Const K_SUPPORT As String = "Support"
|
||||
|
||||
Public Const S_LANGUAGES As String = "Languages"
|
||||
Public Const K_LANGUAGE As String = "Language"
|
||||
|
||||
Public Const S_LUA As String = "Lua"
|
||||
Public Const K_LIBSDIR As String = "LibsDir"
|
||||
Public Const K_BASELIB As String = "BaseLib"
|
||||
|
||||
Public Const S_GEOMDB As String = "GeomDB"
|
||||
Public Const K_DEFAULTFONT As String = "DefaultFont"
|
||||
Public Const K_NFEFONTDIR As String = "NfeFontDir"
|
||||
Public Const K_DEFAULTCOLOR As String = "DefaultColor"
|
||||
Public Const K_SAVETYPE As String = "SaveType"
|
||||
|
||||
Public Const S_OPENGL As String = "OpenGL"
|
||||
Public Const K_DOUBLEBUFFER As String = "DoubleBuffer"
|
||||
Public Const K_COLORBITS As String = "ColorBits"
|
||||
Public Const K_DEPTHBITS As String = "DepthBits"
|
||||
Public Const K_DRIVER As String = "Driver"
|
||||
|
||||
Public Const S_SCENE As String = "Scene"
|
||||
Public Const K_BACKTOP As String = "BackTop"
|
||||
Public Const K_BACKBOTTOM As String = "BackBottom"
|
||||
Public Const K_SHOWGFRAME As String = "ShowGFrame"
|
||||
Public Const K_MARK As String = "Mark"
|
||||
Public Const K_SELSURF As String = "SelSurf"
|
||||
Public Const K_SHOWMODE As String = "ShowMode"
|
||||
Public Const K_CURVEDIR As String = "CurveDir"
|
||||
Public Const K_SHOWTRIAADV As String = "ShowTriaAdv"
|
||||
Public Const K_ZOOMWIN As String = "ZoomWin"
|
||||
Public Const K_DISTLINE As String = "DistLine"
|
||||
|
||||
Public Const S_GRID As String = "Grid"
|
||||
Public Const K_SHOWGRID As String = "ShowGrid"
|
||||
Public Const K_SHOWFRAME As String = "ShowFrame"
|
||||
Public Const K_SNAPSTEP As String = "SnapStep"
|
||||
Public Const K_SNAPSTEPINCH As String = "SnapStepInch"
|
||||
Public Const K_MINLINESSTEP As String = "MinLineSStep"
|
||||
Public Const K_MAJLINESSTEP As String = "MajLineSStep"
|
||||
Public Const K_EXTSSTEP As String = "ExtSStep"
|
||||
Public Const K_MINLNCOLOR As String = "MinLnColor"
|
||||
Public Const K_MAJLNCOLOR As String = "MajLnColor"
|
||||
|
||||
Public Const S_COMPO As String = "Compo"
|
||||
Public Const K_COMPODIR As String = "CompoDir"
|
||||
|
||||
Public Const S_FLATPARTS As String = "FlatParts"
|
||||
Public Const K_FLPCURRDIR As String = "CurrDir"
|
||||
|
||||
Public Const S_NEST As String = "Nest"
|
||||
Public Const K_DIRECT As String = "Direct"
|
||||
Public Const K_STEP As String = "Step"
|
||||
Public Const K_ANGSTEP As String = "AngStep"
|
||||
Public Const K_RESTRADIUS As String = "RestRadius"
|
||||
Public Const K_SNAPDIST As String = "SnapDist"
|
||||
|
||||
Public Const S_CSV As String = "Csv"
|
||||
Public Const K_MAXDIMONX As String = "MaxDimOnX"
|
||||
Public Const K_CSVCURRDIR As String = "CurrDir"
|
||||
Public Const K_CSVLASTFILE As String = "LastFile"
|
||||
|
||||
Public Const S_RAWPART As String = "RawPart"
|
||||
Public Const K_RAWCOLOR As String = "RawColor"
|
||||
Public Const K_KERFCOLOR As String = "KerfColor"
|
||||
Public Const K_RAWLENGTH As String = "Length"
|
||||
Public Const K_RAWWIDTH As String = "Width"
|
||||
Public Const K_RAWHEIGHT As String = "Height"
|
||||
Public Const K_RAWOFFSX As String = "OffsX"
|
||||
Public Const K_RAWOFFSY As String = "OffsY"
|
||||
Public Const K_RAWKERF As String = "Kerf"
|
||||
|
||||
Public Const S_RAWMOVE As String = "RawMove"
|
||||
Public Const K_RAWSTEP As String = "Step"
|
||||
Public Const K_PERPENDICULAR As String = "Perpendicular"
|
||||
|
||||
Public Const S_CAMERA As String = "Camera"
|
||||
Public Const K_CAM_COUNT As String = "Count"
|
||||
Public Const K_CAM_EXEPATH As String = "ExePath"
|
||||
Public Const K_CAM_IMAGE As String = "Image"
|
||||
Public Const K_CAM_INFO As String = "Info"
|
||||
Public Const K_CAM_RESULT As String = "Result"
|
||||
Public Const K_CAM_CONTOUR As String = "Contour"
|
||||
Public Const K_CAM_EXEPATH2 As String = "ExePath2"
|
||||
Public Const K_CAM_IMAGE2 As String = "Image2"
|
||||
Public Const K_CAM_INFO2 As String = "Info2"
|
||||
Public Const K_CAM_RESULT2 As String = "Result2"
|
||||
Public Const K_CAM_CONTOUR2 As String = "Contour2"
|
||||
Public Const K_CAM_THRESHOLD As String = "Threshold"
|
||||
Public Const K_CAM_TOLERANCE As String = "Tolerance"
|
||||
Public Const K_CAM_TIMEOUT As String = "Timeout"
|
||||
|
||||
Public Const S_MACH As String = "Mach"
|
||||
Public Const K_MACHINESDIR As String = "MachinesDir"
|
||||
Public Const K_TOOLMAKERSDIR As String = "ToolMakersDir"
|
||||
Public Const K_CURRMACH As String = "CurrMach"
|
||||
|
||||
Public Const S_SIMUL As String = "Simul"
|
||||
Public Const K_SLIDERX As String = "SliderX"
|
||||
Public Const K_SLIDERVAL As String = "SliderVal"
|
||||
|
||||
Public Const S_VEINMATCHING As String = "VeinMatching"
|
||||
Public Const K_VEINMA_ENABLE As String = "Enable"
|
||||
Public Const K_VEINMA_PLACE As String = "WinPlace"
|
||||
|
||||
End Module
|
||||
@@ -0,0 +1,137 @@
|
||||
'----------------------------------------------------------------------------
|
||||
' EgalTech 2015-2015
|
||||
'----------------------------------------------------------------------------
|
||||
' File : ConstIni.vb Data : 12.02.15 Versione : 1.6b3
|
||||
' Contenuto : Modulo costanti sezione e chiavi per file Ini.
|
||||
'
|
||||
'
|
||||
'
|
||||
' Modifiche : 12.02.15 DS Creazione modulo.
|
||||
'
|
||||
'
|
||||
'----------------------------------------------------------------------------
|
||||
|
||||
Module ConstIni
|
||||
|
||||
Public Const INI_FILE_NAME As String = "OmagOFFICE.ini"
|
||||
|
||||
Public Const S_GENERAL As String = "General"
|
||||
Public Const K_DEBUG As String = "Debug"
|
||||
Public Const K_LICENCE As String = "Licence"
|
||||
Public Const K_MESSAGESDIR As String = "MessagesDir"
|
||||
Public Const K_MESSAGES As String = "Messages"
|
||||
Public Const K_WINPLACE As String = "WinPlace"
|
||||
Public Const K_MMUNITS As String = "MmUnits"
|
||||
Public Const K_MAXPROJ As String = "MaxProj"
|
||||
Public Const K_LASTPROJ As String = "LastProj"
|
||||
Public Const K_LASTNAMEPROJ As String = "LastNameProj"
|
||||
Public Const K_AUTOLOADLASTPROJ As String = "AutoLoadLastProj"
|
||||
Public Const K_SAVEDIR As String = "SaveDir"
|
||||
Public Const K_SAVENAMEDIR As String = "SaveNameDir"
|
||||
Public Const K_IMAGEDIR As String = "ImageDir"
|
||||
Public Const K_CONTOURFROMCAMERA As String = "ContourFromCamera"
|
||||
|
||||
Public Const S_LANGUAGES As String = "Languages"
|
||||
Public Const K_LANGUAGE As String = "Language"
|
||||
|
||||
Public Const S_LUA As String = "Lua"
|
||||
Public Const K_LIBSDIR As String = "LibsDir"
|
||||
Public Const K_BASELIB As String = "BaseLib"
|
||||
|
||||
Public Const S_GEOMDB As String = "GeomDB"
|
||||
Public Const K_DEFAULTFONT As String = "DefaultFont"
|
||||
Public Const K_NFEFONTDIR As String = "NfeFontDir"
|
||||
Public Const K_DEFAULTCOLOR As String = "DefaultColor"
|
||||
Public Const K_SAVETYPE As String = "SaveType"
|
||||
|
||||
Public Const S_OPENGL As String = "OpenGL"
|
||||
Public Const K_DOUBLEBUFFER As String = "DoubleBuffer"
|
||||
Public Const K_COLORBITS As String = "ColorBits"
|
||||
Public Const K_DEPTHBITS As String = "DepthBits"
|
||||
Public Const K_DRIVER As String = "Driver"
|
||||
|
||||
Public Const S_SCENE As String = "Scene"
|
||||
Public Const K_BACKTOP As String = "BackTop"
|
||||
Public Const K_BACKBOTTOM As String = "BackBottom"
|
||||
Public Const K_SHOWGFRAME As String = "ShowGFrame"
|
||||
Public Const K_MARK As String = "Mark"
|
||||
Public Const K_SELSURF As String = "SelSurf"
|
||||
Public Const K_SHOWMODE As String = "ShowMode"
|
||||
Public Const K_CURVEDIR As String = "CurveDir"
|
||||
Public Const K_SHOWTRIAADV As String = "ShowTriaAdv"
|
||||
Public Const K_ZOOMWIN As String = "ZoomWin"
|
||||
Public Const K_DISTLINE As String = "DistLine"
|
||||
|
||||
Public Const S_GRID As String = "Grid"
|
||||
Public Const K_SHOWGRID As String = "ShowGrid"
|
||||
Public Const K_SHOWFRAME As String = "ShowFrame"
|
||||
Public Const K_SNAPSTEP As String = "SnapStep"
|
||||
Public Const K_SNAPSTEPINCH As String = "SnapStepInch"
|
||||
Public Const K_MINLINESSTEP As String = "MinLineSStep"
|
||||
Public Const K_MAJLINESSTEP As String = "MajLineSStep"
|
||||
Public Const K_EXTSSTEP As String = "ExtSStep"
|
||||
Public Const K_MINLNCOLOR As String = "MinLnColor"
|
||||
Public Const K_MAJLNCOLOR As String = "MajLnColor"
|
||||
|
||||
Public Const S_COMPO As String = "Compo"
|
||||
Public Const K_COMPODIR As String = "CompoDir"
|
||||
|
||||
Public Const S_FLATPARTS As String = "FlatParts"
|
||||
Public Const K_FLPCURRDIR As String = "CurrDir"
|
||||
|
||||
Public Const S_NEST As String = "Nest"
|
||||
Public Const K_DIRECT As String = "Direct"
|
||||
Public Const K_STEP As String = "Step"
|
||||
Public Const K_ANGSTEP As String = "AngStep"
|
||||
Public Const K_RESTRADIUS As String = "RestRadius"
|
||||
Public Const K_SNAPDIST As String = "SnapDist"
|
||||
|
||||
Public Const S_CSV As String = "Csv"
|
||||
Public Const K_MAXDIMONX As String = "MaxDimOnX"
|
||||
Public Const K_CSVCURRDIR As String = "CurrDir"
|
||||
Public Const K_CSVLASTFILE As String = "LastFile"
|
||||
|
||||
Public Const S_RAWPART As String = "RawPart"
|
||||
Public Const K_RAWCOLOR As String = "RawColor"
|
||||
Public Const K_KERFCOLOR As String = "KerfColor"
|
||||
Public Const K_RAWLENGTH As String = "Length"
|
||||
Public Const K_RAWWIDTH As String = "Width"
|
||||
Public Const K_RAWHEIGHT As String = "Height"
|
||||
Public Const K_RAWOFFSX As String = "OffsX"
|
||||
Public Const K_RAWOFFSY As String = "OffsY"
|
||||
Public Const K_RAWKERF As String = "Kerf"
|
||||
|
||||
Public Const S_RAWMOVE As String = "RawMove"
|
||||
Public Const K_RAWSTEP As String = "Step"
|
||||
Public Const K_PERPENDICULAR As String = "Perpendicular"
|
||||
|
||||
Public Const S_CAMERA As String = "Camera"
|
||||
Public Const K_CAM_COUNT As String = "Count"
|
||||
Public Const K_CAM_EXEPATH As String = "ExePath"
|
||||
Public Const K_CAM_IMAGE As String = "Image"
|
||||
Public Const K_CAM_INFO As String = "Info"
|
||||
Public Const K_CAM_RESULT As String = "Result"
|
||||
Public Const K_CAM_CONTOUR As String = "Contour"
|
||||
Public Const K_CAM_EXEPATH2 As String = "ExePath2"
|
||||
Public Const K_CAM_IMAGE2 As String = "Image2"
|
||||
Public Const K_CAM_INFO2 As String = "Info2"
|
||||
Public Const K_CAM_RESULT2 As String = "Result2"
|
||||
Public Const K_CAM_CONTOUR2 As String = "Contour2"
|
||||
Public Const K_CAM_THRESHOLD As String = "Threshold"
|
||||
Public Const K_CAM_TOLERANCE As String = "Tolerance"
|
||||
Public Const K_CAM_TIMEOUT As String = "Timeout"
|
||||
|
||||
Public Const S_MACH As String = "Mach"
|
||||
Public Const K_MACHINESDIR As String = "MachinesDir"
|
||||
Public Const K_TOOLMAKERSDIR As String = "ToolMakersDir"
|
||||
Public Const K_CURRMACH As String = "CurrMach"
|
||||
|
||||
Public Const S_SIMUL As String = "Simul"
|
||||
Public Const K_SLIDERX As String = "SliderX"
|
||||
Public Const K_SLIDERVAL As String = "SliderVal"
|
||||
|
||||
Public Const S_VEINMATCHING As String = "VeinMatching"
|
||||
Public Const K_VEINMA_ENABLE As String = "Enable"
|
||||
Public Const K_VEINMA_PLACE As String = "WinPlace"
|
||||
|
||||
End Module
|
||||
@@ -0,0 +1,33 @@
|
||||
Module ConstMsg
|
||||
|
||||
Public Const MSG_MISSINGKEYWD As Integer = 10100
|
||||
Public Const MSG_NUMERICKEYBOARDWD As Integer = 10200
|
||||
|
||||
Public Const MSG_OMAGOFFICE As Integer = 90000
|
||||
Public Const MSG_GENERAL As Integer = MSG_OMAGOFFICE
|
||||
Public Const MSG_WORKINPROGRESSPAGEUC As Integer = MSG_OMAGOFFICE + 100
|
||||
Public Const MSG_DIRECTCUTPAGEUC As Integer = MSG_OMAGOFFICE + 200
|
||||
Public Const MSG_MANUALAXESMOVEPAGEUC As Integer = MSG_OMAGOFFICE + 220
|
||||
Public Const MSG_CADCUTPAGEUC As Integer = MSG_OMAGOFFICE + 300
|
||||
Public Const MSG_NESTPAGEUC As Integer = MSG_OMAGOFFICE + 330
|
||||
Public Const MSG_SPLITPAGEUC As Integer = MSG_OMAGOFFICE + 340
|
||||
Public Const MSG_MOVERAWPAGEUC As Integer = MSG_OMAGOFFICE + 360
|
||||
Public Const MSG_DRAWPAGEUC As Integer = MSG_OMAGOFFICE + 380
|
||||
Public Const MSG_COMPONENTPAGEUC As Integer = MSG_OMAGOFFICE + 400
|
||||
Public Const MSG_IMPORTPAGEUC As Integer = MSG_OMAGOFFICE + 450
|
||||
Public Const MSG_OPENPAGEUC As Integer = MSG_OMAGOFFICE + 490
|
||||
Public Const MSG_RAWPARTPAGEUC As Integer = MSG_OMAGOFFICE + 500
|
||||
Public Const MSG_CHOOSEMACHININGPAGEUC As Integer = MSG_OMAGOFFICE + 535
|
||||
Public Const MSG_SIMULATIONPAGEUC As Integer = MSG_OMAGOFFICE + 550
|
||||
Public Const MSG_FRAMECUTPAGEUC As Integer = MSG_OMAGOFFICE + 600
|
||||
Public Const MSG_MACHINEPAGEUC As Integer = MSG_OMAGOFFICE + 700
|
||||
Public Const MSG_TOOLSDBPAGEUC As Integer = MSG_OMAGOFFICE + 720
|
||||
Public Const MSG_MACHININGSDBPAGEUC As Integer = MSG_OMAGOFFICE + 760
|
||||
Public Const MSG_COMBOBOXPARAM As Integer = MSG_OMAGOFFICE + 800
|
||||
Public Const MSG_ALARMSPAGEUC As Integer = MSG_OMAGOFFICE + 900
|
||||
Public Const MSG_MACHINECNPAGEUC As Integer = MSG_OMAGOFFICE + 950
|
||||
Public Const MSG_OPTIONSPAGEUC As Integer = MSG_OMAGOFFICE + 980
|
||||
Public Const MSG_EGTMSGBOX As Integer = MSG_OMAGOFFICE + 1100
|
||||
Public Const MSG_CSVPAGEUC As Integer = MSG_OMAGOFFICE + 1200
|
||||
|
||||
End Module
|
||||
@@ -0,0 +1,20 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="DrawPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
IsTopDockable="True" IsBottomDockable="False" IsLeftDockable="False"
|
||||
IsRightDockable="False" IsFloating="False"
|
||||
Background="{StaticResource Omag_Gray}" BorderBrush="{StaticResource Omag_Gray}">
|
||||
|
||||
<Button ToolTip="{Binding DrawToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}"
|
||||
Command="{Binding DrawCommand}">
|
||||
<Image Source="/Resources/DrawPanel/Draw.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding ImportDxfToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}"
|
||||
Command="{Binding ImportDxfCommand}">
|
||||
<Image Source="/Resources/DrawPanel/ImportDxf.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class DrawPanelV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class DrawPanelVM
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,15 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="InstrumentPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
IsTopDockable="True" IsBottomDockable="False" IsLeftDockable="False"
|
||||
IsRightDockable="False" IsFloating="False"
|
||||
Background="{StaticResource Omag_Gray}" BorderBrush="{StaticResource Omag_Gray}">
|
||||
|
||||
<ToggleButton ToolTip="{Binding GetDistToolTip}"
|
||||
Style="{StaticResource ToolBar_ToggleButton}"
|
||||
IsChecked="{Binding GetDistIsChecked}">
|
||||
<Image Source="/Resources/InstrumentPanel/GetDist.png" Stretch="Uniform"/>
|
||||
</ToggleButton>
|
||||
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class InstrumentPanelV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,47 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class InstrumentPanelVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
#Region "ToolTip"
|
||||
|
||||
Public ReadOnly Property GetDistToolTip As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_GRIDVIEWPANEL + 18)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' ToolTip
|
||||
|
||||
Private m_GetDistIsChecked As Boolean
|
||||
Public Property GetDistIsChecked As Boolean
|
||||
Get
|
||||
Return m_GetDistIsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value <> m_GetDistIsChecked Then
|
||||
m_GetDistIsChecked = value
|
||||
If value Then
|
||||
OmagOFFICEMap.refSceneHostV.GetDistanceON()
|
||||
Else
|
||||
OmagOFFICEMap.refSceneHostV.GetDistanceOFF()
|
||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
End If
|
||||
NotifyPropertyChanged("GetDistIsChecked")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,20 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MachGroupPanelVM
|
||||
Inherits EgtWPFLib5.EgtMachGroupPanelVM
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
MyBase.New()
|
||||
' Creo riferimento a questa classe in OmagOFFICEMap
|
||||
OmagOFFICEMap.SetRefMachGroupPanelVM(Me)
|
||||
InitMachGroups(True, OmagOFFICEMap.refMachinePanelVM.MachineList.ToList())
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,22 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="MachinePanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
IsTopDockable="True" IsBottomDockable="False" IsLeftDockable="False"
|
||||
IsRightDockable="False" IsFloating="False"
|
||||
Background="{StaticResource Omag_Gray}" BorderBrush="{StaticResource Omag_Gray}">
|
||||
|
||||
<!--Combobox per selezionare la macchina corrente--><!--
|
||||
<ComboBox ItemsSource="{Binding Path=MachineList}" DisplayMemberPath="Name"
|
||||
SelectedItem="{Binding Path=SelectedMachine}" SelectedValuePath="Name"
|
||||
Height="20" Width="150"/>-->
|
||||
|
||||
<Button Command="{Binding ToolDbCommand}" ToolTip="{Binding ToolDBToolTip}"
|
||||
Style="{StaticResource ToolBar_TextButton}" Width="55" Content="{Binding ToolDBMsg}"/>
|
||||
<Button Command="{Binding MachDbCommand}" ToolTip="{Binding MachiningDbToolTip}"
|
||||
Style="{StaticResource ToolBar_TextButton}" Width="55" Content="{Binding MachiningDbMsg}"/>
|
||||
<Button Command="{Binding MachOptionsCommand}" ToolTip="{Binding OptionsToolTip}">
|
||||
<Image Source="/Resources/TopCommandBar/Options.png" Height="22" />
|
||||
</Button>
|
||||
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class MachinePanelV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,210 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MachinePanelVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
' Radice del direttorio delle macchine
|
||||
Private m_sMachinesRoot As String
|
||||
Friend ReadOnly Property sMachinesRoot As String
|
||||
Get
|
||||
Return m_sMachinesRoot
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Lista delle macchine disponibili
|
||||
Private m_MachineList As ObservableCollection(Of Machine)
|
||||
Public Property MachineList As ObservableCollection(Of Machine)
|
||||
Get
|
||||
Return m_MachineList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of Machine))
|
||||
m_MachineList = value
|
||||
End Set
|
||||
End Property
|
||||
' Macchina correntemente selezionata e quindi attiva
|
||||
Private m_SelectedMachine As Machine
|
||||
Public Property SelectedMachine As Machine
|
||||
Get
|
||||
Return m_SelectedMachine
|
||||
End Get
|
||||
Set(value As Machine)
|
||||
If value IsNot m_SelectedMachine Then
|
||||
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
||||
If EgtSetCurrMachine(value.Name) Then
|
||||
m_SelectedMachine = value
|
||||
'IniFile.m_sMachineName = m_SelectedMachine.Name
|
||||
'IniFile.m_sCurrMachIniFilePath = m_SelectedMachine.MachineDirPath & "\" & m_SelectedMachine.Name & ".ini"
|
||||
'IniFile.m_sCurrMachToolsDirPath = m_SelectedMachine.MachineDirPath & "\Tools"
|
||||
'IniFile.m_sCurrMachSetUpDirPath = m_SelectedMachine.MachineDirPath & "\SetUp"
|
||||
'IniFile.m_sCurrMachScriptsDirPath = m_SelectedMachine.MachineDirPath & "\Scripts"
|
||||
'UpdateToolAndMachDbParamVisibility()
|
||||
NotifyPropertyChanged("SelectedMachine")
|
||||
End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdToolDb As ICommand
|
||||
Private m_cmdMachDb As ICommand
|
||||
Private m_cmdMachOptions As ICommand
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property ToolDBMsg As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_MAINWINDOW + 6)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property MachiningDbMsg As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_MAINWINDOW + 7)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
#Region "ToolTip"
|
||||
|
||||
Public ReadOnly Property ToolDBToolTip As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_MAINWINDOW + 3)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property MachiningDbToolTip As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_MAINWINDOW + 4)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' ToolTip
|
||||
|
||||
#End Region 'FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in OmagOFFICEMap
|
||||
OmagOFFICEMap.SetRefMachinePanelVM(Me)
|
||||
' recupero cartella radice delle macchine
|
||||
m_sMachinesRoot = OmagOFFICE.refMainWindowVM.MainWindowM.sMachinesRoot
|
||||
' Carica macchine da cartella delle macchine
|
||||
Dim MachineList As New List(Of Machine)
|
||||
If Machine.MachineListInit(sMachinesRoot, MachineList) Then 'OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, MachineList) Then
|
||||
m_MachineList = New ObservableCollection(Of Machine)(MachineList)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "ToolDbCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Exec.
|
||||
''' </summary>
|
||||
Public ReadOnly Property ToolDbCommand As ICommand
|
||||
Get
|
||||
If m_cmdToolDb Is Nothing Then
|
||||
m_cmdToolDb = New Command(AddressOf ToolDb)
|
||||
End If
|
||||
Return m_cmdToolDb
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub ToolDb(ByVal param As Object)
|
||||
'If Not EgtVerifyMachinesDir() Then Return
|
||||
'' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa)
|
||||
'If Not EgtTdbReload() Then
|
||||
' EgtOutLog("Impossible reloading tool Db")
|
||||
' MessageBox.Show(EgtMsg(MSG_TOOLSERRORS + 30), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' Return
|
||||
'End If
|
||||
'Dim ToolDbWindow As New ToolsDbView
|
||||
'ToolDbWindow.Height = 640
|
||||
'ToolDbWindow.Width = 1024
|
||||
'ToolDbWindow.DataContext = New ToolsDbViewModel
|
||||
'ToolDbWindow.Owner = Application.Current.MainWindow
|
||||
'ToolDbWindow.ShowDialog()
|
||||
End Sub
|
||||
|
||||
#End Region ' ToolDbCommand
|
||||
|
||||
#Region "MachDbCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Exec.
|
||||
''' </summary>
|
||||
Public ReadOnly Property MachDbCommand As ICommand
|
||||
Get
|
||||
If m_cmdMachDb Is Nothing Then
|
||||
m_cmdMachDb = New Command(AddressOf MachDb)
|
||||
End If
|
||||
Return m_cmdMachDb
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub MachDb(ByVal param As Object)
|
||||
'If Not EgtVerifyMachinesDir() Then Return
|
||||
'' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa)
|
||||
'If Not EgtMdbReload() Then
|
||||
' EgtOutLog("Impossible reloading machining Db")
|
||||
' MessageBox.Show(EgtMsg(MSG_MACHININGSERRORS + 7), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' Return
|
||||
'End If
|
||||
'Dim MachDbWindow As New MachiningsDbView
|
||||
'MachDbWindow.Height = 614
|
||||
'MachDbWindow.Width = 1024
|
||||
'MachDbWindow.DataContext = New MachiningsDbViewModel
|
||||
'MachDbWindow.Owner = Application.Current.MainWindow
|
||||
'MachDbWindow.ShowDialog()
|
||||
End Sub
|
||||
|
||||
#End Region ' MachDbCommand
|
||||
|
||||
#Region "MachOptionsCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Exec.
|
||||
''' </summary>
|
||||
Public ReadOnly Property MachOptionsCommand As ICommand
|
||||
Get
|
||||
If m_cmdMachOptions Is Nothing Then
|
||||
m_cmdMachOptions = New Command(AddressOf MachOptions)
|
||||
End If
|
||||
Return m_cmdMachOptions
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub MachOptions(ByVal param As Object)
|
||||
'Dim MachOptionWindow As New MachOptionsView
|
||||
''MachOptionWindow.Height = 614
|
||||
''MachOptionWindow.Width = 256
|
||||
'MachOptionWindow.DataContext = New MachOptionsViewModel
|
||||
'MachOptionWindow.Owner = Application.Current.MainWindow
|
||||
'MachOptionWindow.ShowDialog()
|
||||
End Sub
|
||||
|
||||
#End Region ' MachOptionsCommand
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,186 @@
|
||||
Imports System.Threading
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class MainWindowM
|
||||
|
||||
#Region "FIELDS"
|
||||
|
||||
Friend Enum KEY_OPT As UInteger
|
||||
BASE = 1
|
||||
DOORS = 2
|
||||
GUNSTOCK = 4
|
||||
End Enum
|
||||
|
||||
Private m_sDataRoot As String = String.Empty
|
||||
Private m_sConfigDir As String = String.Empty
|
||||
Private m_nDebug As Integer = 0
|
||||
Private m_objMutex As New Mutex
|
||||
|
||||
Private m_nInstance As Integer = 0
|
||||
Private m_nUserLevel As Integer = 1
|
||||
Private m_nKeyLevel As Integer = 0
|
||||
Private m_nKeyOptions As UInteger = 0
|
||||
Private m_sTempDir As String
|
||||
Private m_sMachinesRoot As String
|
||||
Friend ReadOnly Property sMachinesRoot As String
|
||||
Get
|
||||
Return m_sMachinesRoot
|
||||
End Get
|
||||
End Property
|
||||
Private m_sResourcesRoot As String
|
||||
Private m_sTablesRoot As String
|
||||
Private m_sLogFile As String
|
||||
|
||||
#End Region ' FIELDS
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
InitializeEgtEnvironment()
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Private Sub InitializeEgtEnvironment()
|
||||
'' Abilito drag and drop
|
||||
'Me.AllowDrop = True
|
||||
'' Title
|
||||
'Application.Msn.NotifyColleagues(Application.EMITTITLE)
|
||||
' Impostazione path radice per i dati
|
||||
m_sDataRoot = System.AppDomain.CurrentDomain.BaseDirectory
|
||||
If EgtUILib.GetPrivateProfileString(S_DATA, K_DATAROOT, "", m_sDataRoot, m_sDataRoot & "\" & DAT_FILE_NAME) = 0 Then
|
||||
m_sDataRoot = System.AppDomain.CurrentDomain.BaseDirectory
|
||||
End If
|
||||
' Impostazione direttorio di configurazione
|
||||
m_sConfigDir = m_sDataRoot & "\" & CONF_DIR
|
||||
' Impostazione direttorio per file temporanei
|
||||
m_sTempDir = m_sDataRoot & "\" & TEMP_DIR
|
||||
' Impostazione path Ini file
|
||||
IniFile.m_sIniFile = m_sConfigDir & "\" & INI_FILE_NAME
|
||||
' Impostazione path resources dir
|
||||
m_sResourcesRoot = m_sDataRoot & "\" & RES_DIR
|
||||
' Impostazione direttorio per le macchine
|
||||
If GetPrivateProfileString(S_MACH, K_MACHINESDIR, "", m_sMachinesRoot) = 0 Then
|
||||
m_sMachinesRoot = m_sDataRoot & "\" & MACHINES_DFL_DIR
|
||||
End If
|
||||
' Verifico indice di istanza
|
||||
'' '' '' ''ManageIstance()
|
||||
' Imposto tipo di chiave
|
||||
EgtSetLockType(KEY_TYPE.HW)
|
||||
' Leggo e imposto chiave di protezione
|
||||
Dim sLicFileName As String = String.Empty
|
||||
GetPrivateProfileString(S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName)
|
||||
Dim sLicFile As String = m_sConfigDir & "\" & sLicFileName
|
||||
Dim sKey As String = String.Empty
|
||||
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
|
||||
EgtSetKey(sKey)
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(3279, 18, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(3279, 18, 1, m_nKeyOptions)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
Dim sLogMsg As String = "User " & Environment.UserName & "\" & Environment.MachineName & " (" & m_nInstance.ToString() & ")" & vbLf &
|
||||
My.Application.Info.Description.ToString() & " ver. " &
|
||||
My.Application.Info.Version.Major.ToString() &
|
||||
"." & My.Application.Info.Version.Minor.ToString() &
|
||||
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
|
||||
My.Application.Info.Version.Revision.ToString()
|
||||
EgtInit(m_nDebug, m_sLogFile, sLogMsg)
|
||||
' Leggo direttorio dei messaggi (se manca uso direttorio di configurazione)
|
||||
Dim sMsgDir As String = String.Empty
|
||||
If GetPrivateProfileString(S_GENERAL, K_MESSAGESDIR, "", sMsgDir) = 0 Then
|
||||
sMsgDir = m_sConfigDir
|
||||
End If
|
||||
' Leggo elenco lingue disponibili da file ini
|
||||
'' ''Dim nIndex As Integer = 1
|
||||
'' ''Dim ReadLanguage As Language = GetPrivateProfileLanguage(S_LANGUAGES, K_LANGUAGE & nIndex)
|
||||
'' ''While Not IsNothing(ReadLanguage)
|
||||
'' '' OptionModule.m_LanguageList.Add(ReadLanguage)
|
||||
'' '' nIndex += 1
|
||||
'' '' ReadLanguage = GetPrivateProfileLanguage(S_LANGUAGES, K_LANGUAGE & nIndex)
|
||||
'' ''End While
|
||||
' '' '' Inizializzo OptionModule
|
||||
'' ''OptionModule.InitOptionModule()
|
||||
' Leggo file messaggi
|
||||
'' ''Dim sMsgName As String = String.Empty
|
||||
'' ''GetPrivateProfileString(S_GENERAL, K_MESSAGES, "", sMsgName)
|
||||
'' ''Dim sMsgFilePath As String = sMsgDir & "\EgalTechIta.txt"
|
||||
'' ''For Each Language In OptionModule.m_LanguageList
|
||||
'' '' If Language.Name = sMsgName Then
|
||||
'' '' OptionModule.m_SelectedLanguage = Language
|
||||
'' '' sMsgFilePath = sMsgDir & "\" & Language.FilePath
|
||||
'' '' End If
|
||||
'' ''Next
|
||||
'' ''If Not EgtLoadMessages(sMsgFilePath) Then
|
||||
'' '' EgtOutLog("Error in EgtLoadMessages")
|
||||
'' ''End If
|
||||
' '' '' '' '' '' '' Leggo e imposto livello utilizzatore
|
||||
'' '' '' '' '' ''m_nUserLevel = Math.Min(m_nKeyLevel, GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
|
||||
' imposto dir font Nfe e font default
|
||||
Dim sNfeDir As String = String.Empty
|
||||
GetPrivateProfileString(S_GEOMDB, K_NFEFONTDIR, "", sNfeDir)
|
||||
Dim sDefFont As String = String.Empty
|
||||
GetPrivateProfileString(S_GEOMDB, K_DEFAULTFONT, "", sDefFont)
|
||||
EgtSetFont(sNfeDir, sDefFont)
|
||||
' imposto dir di default per libreria Lua e lancio libreria di base
|
||||
Dim sLuaLibsDir As String = String.Empty
|
||||
GetPrivateProfileString(S_LUA, K_LIBSDIR, "", sLuaLibsDir)
|
||||
EgtSetLuaLibs(sLuaLibsDir)
|
||||
Dim sLuaBaseLib As String = String.Empty
|
||||
GetPrivateProfileString(S_LUA, K_BASELIB, "EgtBase", sLuaBaseLib)
|
||||
EgtLuaRequire(sLuaBaseLib)
|
||||
' imposto IniFile a EgtInterface
|
||||
EgtSetIniFile(m_sIniFile)
|
||||
' Info su opzioni chiave
|
||||
EgtOutLog("KeyOptions : " & bKey.ToString() & " " & m_nKeyOptions.ToString())
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ManageSingleIstance()
|
||||
Dim bCreated As Boolean
|
||||
Try
|
||||
m_objMutex = New Mutex(False, "Global\OmagOFFICE", bCreated)
|
||||
Catch
|
||||
bCreated = False
|
||||
End Try
|
||||
If Not bCreated Then
|
||||
' porto in primo piano la prima istanza
|
||||
Dim bFound As Boolean = False
|
||||
' processi del programma a 32 bit
|
||||
Dim localProc As Process() = Process.GetProcessesByName("OmagOFFICER32")
|
||||
For Each p As Process In localProc
|
||||
If p.Id <> Process.GetCurrentProcess().Id Then
|
||||
bFound = True
|
||||
ShowWindow(p.MainWindowHandle, 1)
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
' se non trovati processi a 32 bit provo a 64 bit
|
||||
If Not bFound Then
|
||||
localProc = Process.GetProcessesByName("OmagOFFICER64")
|
||||
For Each p As Process In localProc
|
||||
If p.Id <> Process.GetCurrentProcess().Id Then
|
||||
bFound = True
|
||||
ShowWindow(p.MainWindowHandle, SW.RESTORE)
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
' esco dal programma
|
||||
End
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub Close()
|
||||
' Terminazione generale di EgtInterface
|
||||
EgtExit()
|
||||
' Rilascio mutex
|
||||
m_objMutex.Close()
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,26 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="MainWindowV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:OmagOFFICE="clr-namespace:OmagOFFICE"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
DataContext="{StaticResource MainWindowVM}"
|
||||
Title="{Binding Title}" Icon="/Resources/OmagCUT.ico"
|
||||
TitleBarBrush="{StaticResource Omag_LightGray}"
|
||||
BorderBrush="{StaticResource Omag_Gray}" BorderThickness="2"
|
||||
MinHeight="600" MinWidth="800"
|
||||
AboutBox="{Binding AboutBox}" WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="32">
|
||||
<EgtWPFLib5:EgtCustomWindow.TitleUserControl>
|
||||
<OmagOFFICE:TopCommandBarV DataContext="{StaticResource TopCommandBarVM}"/>
|
||||
</EgtWPFLib5:EgtCustomWindow.TitleUserControl>
|
||||
<!--Pannello principale -->
|
||||
<DockPanel>
|
||||
|
||||
<!--StatusBar -->
|
||||
<OmagOFFICE:StatusBarV DataContext="{StaticResource StatusBarVM}"
|
||||
DockPanel.Dock="Bottom"/>
|
||||
<!--Controllo che gestisce il progetto corrente -->
|
||||
<OmagOFFICE:ProjectV DataContext="{StaticResource ProjectVM}"/>
|
||||
|
||||
</DockPanel>
|
||||
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,24 @@
|
||||
Class MainWindowV
|
||||
|
||||
Private m_MainWindowVM As MainWindowVM
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
' Funzione che interpreta l'xaml
|
||||
InitializeComponent()
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_MainWindowVM = DirectCast(Me.DataContext, MainWindowVM)
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub MainWindowV_ContentRendered(sender As Object, e As EventArgs) Handles Me.ContentRendered
|
||||
m_MainWindowVM.ContentRendered()
|
||||
End Sub
|
||||
|
||||
#End Region ' EVENTS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,59 @@
|
||||
Public Class MainWindowVM
|
||||
|
||||
' Riferimento al Model della MainWindow
|
||||
Private m_MainWindowM As MainWindowM
|
||||
Friend ReadOnly Property MainWindowM As MainWindowM
|
||||
Get
|
||||
Return m_MainWindowM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' variabile che indica che il programma è stato avviato correttamente (sia la mappa che l'ambiente Egt)
|
||||
Private m_bInitStatus As Boolean
|
||||
Friend ReadOnly Property bInitStatus As Boolean
|
||||
Get
|
||||
Return m_bInitStatus
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
' Avvio l'inizializzazione della mappa passandogli il riferimento al MainWindowVM
|
||||
OmagOFFICEMap.BeginInit(Me)
|
||||
' Creo Model della MainWindow
|
||||
m_MainWindowM = New MainWindowM
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Sub ContentRendered()
|
||||
' Verifico che l'inizializzazione di tutte le parti del programma sia andata a buon fine
|
||||
If OmagOFFICEMap.EndInit() Then
|
||||
m_bInitStatus = True
|
||||
Else
|
||||
'altrimenti chiudo il programma
|
||||
m_bInitStatus = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OnApplicationClose()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CloseApplication(bOnApplicationStart As Boolean)
|
||||
If Not bOnApplicationStart Then
|
||||
OnApplicationClose()
|
||||
End If
|
||||
' Termino il Model
|
||||
m_MainWindowM.Close()
|
||||
' Termino il programma
|
||||
Application.Current.Shutdown()
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,73 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.Globalization
|
||||
Imports System.Resources
|
||||
Imports System.Windows
|
||||
|
||||
' General Information about an assembly is controlled through the following
|
||||
' set of attributes. Change these attribute values to modify the information
|
||||
' associated with an assembly.
|
||||
|
||||
' Review the values of the assembly attributes
|
||||
|
||||
#If PLATFORM = "x64" Then
|
||||
#If DEBUG Then
|
||||
<Assembly: AssemblyTitle("OmagOFFICE Debug 64 bit")>
|
||||
<Assembly: AssemblyDescription("OmagOFFICED64.exe")>
|
||||
#Else
|
||||
<Assembly: AssemblyTitle("OmagOFFICE Release 64 bit")>
|
||||
<Assembly: AssemblyDescription("OmagOFFICER64.exe")>
|
||||
#End if
|
||||
#Else
|
||||
#If DEBUG Then
|
||||
<Assembly: AssemblyTitle("OmagOFFICE Debug 32 bit")>
|
||||
<Assembly: AssemblyDescription("OmagOFFICED32.exe")>
|
||||
#Else
|
||||
<Assembly: AssemblyTitle("OmagOFFICE Release 32 bit")>
|
||||
<Assembly: AssemblyDescription("OmagOFFICER32.exe")>
|
||||
#End If
|
||||
#End If
|
||||
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyProduct("OmagOFFICE")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2017 by EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
'In order to begin building localizable applications, set
|
||||
'<UICulture>CultureYouAreCodingWith</UICulture> in your .vbproj file
|
||||
'inside a <PropertyGroup>. For example, if you are using US english
|
||||
'in your source files, set the <UICulture> to "en-US". Then uncomment the
|
||||
'NeutralResourceLanguage attribute below. Update the "en-US" in the line
|
||||
'below to match the UICulture setting in the project file.
|
||||
|
||||
'<Assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)>
|
||||
|
||||
|
||||
'The ThemeInfo attribute describes where any theme specific and generic resource dictionaries can be found.
|
||||
'1st parameter: where theme specific resource dictionaries are located
|
||||
'(used if a resource is not found in the page,
|
||||
' or application resource dictionaries)
|
||||
|
||||
'2nd parameter: where the generic resource dictionary is located
|
||||
'(used if a resource is not found in the page,
|
||||
'app, and any theme specific resource dictionaries)
|
||||
<Assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)>
|
||||
|
||||
|
||||
|
||||
'The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
<Assembly: Guid("10b7a7cb-bf7f-4d3e-ac30-3095ed77eb70")>
|
||||
|
||||
' Version information for an assembly consists of the following four values:
|
||||
'
|
||||
' Major Version
|
||||
' Minor Version
|
||||
' Build Number
|
||||
' Revision
|
||||
'
|
||||
' You can specify all the values or you can default the Build and Revision Numbers
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.8.4.1")>
|
||||
<Assembly: AssemblyFileVersion("1.8.4.1")>
|
||||
@@ -0,0 +1,121 @@
|
||||
#If _MyType <> "Empty" Then
|
||||
|
||||
Namespace My
|
||||
''' <summary>
|
||||
''' Module used to define the properties that are available in the My Namespace for WPF
|
||||
''' </summary>
|
||||
''' <remarks></remarks>
|
||||
<Global.Microsoft.VisualBasic.HideModuleName()> _
|
||||
Module MyWpfExtension
|
||||
Private s_Computer As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Devices.Computer)
|
||||
Private s_User As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.ApplicationServices.User)
|
||||
Private s_Windows As New ThreadSafeObjectProvider(Of MyWindows)
|
||||
Private s_Log As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Logging.Log)
|
||||
''' <summary>
|
||||
''' Returns the application object for the running application
|
||||
''' </summary>
|
||||
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
|
||||
Friend ReadOnly Property Application() As Application
|
||||
Get
|
||||
Return CType(Global.System.Windows.Application.Current, Application)
|
||||
End Get
|
||||
End Property
|
||||
''' <summary>
|
||||
''' Returns information about the host computer.
|
||||
''' </summary>
|
||||
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
|
||||
Friend ReadOnly Property Computer() As Global.Microsoft.VisualBasic.Devices.Computer
|
||||
Get
|
||||
Return s_Computer.GetInstance()
|
||||
End Get
|
||||
End Property
|
||||
''' <summary>
|
||||
''' Returns information for the current user. If you wish to run the application with the current
|
||||
''' Windows user credentials, call My.User.InitializeWithWindowsUser().
|
||||
''' </summary>
|
||||
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
|
||||
Friend ReadOnly Property User() As Global.Microsoft.VisualBasic.ApplicationServices.User
|
||||
Get
|
||||
Return s_User.GetInstance()
|
||||
End Get
|
||||
End Property
|
||||
''' <summary>
|
||||
''' Returns the application log. The listeners can be configured by the application's configuration file.
|
||||
''' </summary>
|
||||
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
|
||||
Friend ReadOnly Property Log() As Global.Microsoft.VisualBasic.Logging.Log
|
||||
Get
|
||||
Return s_Log.GetInstance()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Returns the collection of Windows defined in the project.
|
||||
''' </summary>
|
||||
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
|
||||
Friend ReadOnly Property Windows() As MyWindows
|
||||
<Global.System.Diagnostics.DebuggerHidden()> _
|
||||
Get
|
||||
Return s_Windows.GetInstance()
|
||||
End Get
|
||||
End Property
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
<Global.Microsoft.VisualBasic.MyGroupCollection("System.Windows.Window", "Create__Instance__", "Dispose__Instance__", "My.MyWpfExtenstionModule.Windows")> _
|
||||
Friend NotInheritable Class MyWindows
|
||||
<Global.System.Diagnostics.DebuggerHidden()> _
|
||||
Private Shared Function Create__Instance__(Of T As {New, Global.System.Windows.Window})(ByVal Instance As T) As T
|
||||
If Instance Is Nothing Then
|
||||
If s_WindowBeingCreated IsNot Nothing Then
|
||||
If s_WindowBeingCreated.ContainsKey(GetType(T)) = True Then
|
||||
Throw New Global.System.InvalidOperationException("The window cannot be accessed via My.Windows from the Window constructor.")
|
||||
End If
|
||||
Else
|
||||
s_WindowBeingCreated = New Global.System.Collections.Hashtable()
|
||||
End If
|
||||
s_WindowBeingCreated.Add(GetType(T), Nothing)
|
||||
Return New T()
|
||||
s_WindowBeingCreated.Remove(GetType(T))
|
||||
Else
|
||||
Return Instance
|
||||
End If
|
||||
End Function
|
||||
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1822:MarkMembersAsStatic")> _
|
||||
<Global.System.Diagnostics.DebuggerHidden()> _
|
||||
Private Sub Dispose__Instance__(Of T As Global.System.Windows.Window)(ByRef instance As T)
|
||||
instance = Nothing
|
||||
End Sub
|
||||
<Global.System.Diagnostics.DebuggerHidden()> _
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
End Sub
|
||||
<Global.System.ThreadStatic()> Private Shared s_WindowBeingCreated As Global.System.Collections.Hashtable
|
||||
<Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Never)> Public Overrides Function Equals(ByVal o As Object) As Boolean
|
||||
Return MyBase.Equals(o)
|
||||
End Function
|
||||
<Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Never)> Public Overrides Function GetHashCode() As Integer
|
||||
Return MyBase.GetHashCode
|
||||
End Function
|
||||
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1822:MarkMembersAsStatic")> _
|
||||
<Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
Friend Overloads Function [GetType]() As Global.System.Type
|
||||
Return GetType(MyWindows)
|
||||
End Function
|
||||
<Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Never)> Public Overrides Function ToString() As String
|
||||
Return MyBase.ToString
|
||||
End Function
|
||||
End Class
|
||||
End Module
|
||||
End Namespace
|
||||
Partial Class Application
|
||||
Inherits Global.System.Windows.Application
|
||||
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
|
||||
<Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1822:MarkMembersAsStatic")> _
|
||||
Friend ReadOnly Property Info() As Global.Microsoft.VisualBasic.ApplicationServices.AssemblyInfo
|
||||
<Global.System.Diagnostics.DebuggerHidden()> _
|
||||
Get
|
||||
Return New Global.Microsoft.VisualBasic.ApplicationServices.AssemblyInfo(Global.System.Reflection.Assembly.GetExecutingAssembly())
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
#End If
|
||||
@@ -0,0 +1,63 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.42000
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
'class via a tool like ResGen or Visual Studio.
|
||||
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
'with the /str option, or rebuild your VS project.
|
||||
'''<summary>
|
||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' Returns the cached ResourceManager instance used by this class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("OmagOFFICE.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Overrides the current thread's CurrentUICulture property for all
|
||||
''' resource lookups using this strongly typed resource class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,71 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.42000
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||
|
||||
#Region "My.Settings Auto-Save Functionality"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.OmagOFFICE.MySettings
|
||||
Get
|
||||
Return Global.OmagOFFICE.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1,28 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.40629.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "OmagOFFICE", "OmagOFFICE.vbproj", "{E8825288-E02F-4B17-AC39-142886068D0A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E8825288-E02F-4B17-AC39-142886068D0A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E8825288-E02F-4B17-AC39-142886068D0A}.Debug|x64.Build.0 = Debug|x64
|
||||
{E8825288-E02F-4B17-AC39-142886068D0A}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{E8825288-E02F-4B17-AC39-142886068D0A}.Debug|x86.Build.0 = Debug|x86
|
||||
{E8825288-E02F-4B17-AC39-142886068D0A}.Release|x64.ActiveCfg = Release|x64
|
||||
{E8825288-E02F-4B17-AC39-142886068D0A}.Release|x64.Build.0 = Release|x64
|
||||
{E8825288-E02F-4B17-AC39-142886068D0A}.Release|x86.ActiveCfg = Release|x86
|
||||
{E8825288-E02F-4B17-AC39-142886068D0A}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,358 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{E8825288-E02F-4B17-AC39-142886068D0A}</ProjectGuid>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>OmagOFFICE</RootNamespace>
|
||||
<AssemblyName>OmagOFFICE</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<MyType>Custom</MyType>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<IncrementalBuild>true</IncrementalBuild>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>OmagOFFICE.xml</DocumentationFile>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<IncrementalBuild>false</IncrementalBuild>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>OmagOFFICE.xml</DocumentationFile>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DocumentationFile>OmagOFFICE.xml</DocumentationFile>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DocumentationFile>OmagOFFICE.xml</DocumentationFile>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DocumentationFile>OmagOFFICE.xml</DocumentationFile>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DocumentationFile>OmagOFFICE.xml</DocumentationFile>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="EgtUILib">
|
||||
<HintPath>..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtWPFLib5">
|
||||
<HintPath>..\..\EgtProg\DllD32\EgtWPFLib5.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Xaml">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="WindowsFormsIntegration" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="Application.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Compile Include="Constants\ConstGen.vb" />
|
||||
<Compile Include="Constants\ConstIni.vb" />
|
||||
<Compile Include="Constants\ConstMsg.vb" />
|
||||
<Compile Include="DrawPanel\DrawPanelV.xaml.vb">
|
||||
<DependentUpon>DrawPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DrawPanel\DrawPanelVM.vb" />
|
||||
<Compile Include="MachGroupPanel\MachGroupPanelVM.vb" />
|
||||
<Compile Include="MachinePanel\MachinePanelV.xaml.vb">
|
||||
<DependentUpon>MachinePanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MachinePanel\MachinePanelVM.vb" />
|
||||
<Compile Include="InstrumentPanel\InstrumentPanelV.xaml.vb">
|
||||
<DependentUpon>InstrumentPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="InstrumentPanel\InstrumentPanelVM.vb" />
|
||||
<Compile Include="OptionPanel\MachiningTab\MachiningTabV.xaml.vb">
|
||||
<DependentUpon>MachiningTabV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OptionPanel\MachiningTab\MachiningTabVM.vb" />
|
||||
<Compile Include="OptionPanel\NestingTab\NestingTabV.xaml.vb">
|
||||
<DependentUpon>NestingTabV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OptionPanel\NestingTab\NestingTabVM.vb" />
|
||||
<Compile Include="OptionPanel\OptionPanelV.xaml.vb">
|
||||
<DependentUpon>OptionPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OptionPanel\OptionPanelVM.vb" />
|
||||
<Compile Include="OptionPanel\RawPartTab\RawPartTabV.xaml.vb">
|
||||
<DependentUpon>RawPartTabV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OptionPanel\RawPartTab\RawPartTabVM.vb" />
|
||||
<Compile Include="ShowPanel\ShowPanelV.xaml.vb">
|
||||
<DependentUpon>ShowPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ShowPanel\ShowPanelVM.vb" />
|
||||
<Compile Include="Utility\Command.vb" />
|
||||
<Compile Include="Utility\IniFile.vb" />
|
||||
<Compile Include="MainWindow\MainWindowM.vb" />
|
||||
<Compile Include="Utility\OmagOFFICEMap.vb" />
|
||||
<Compile Include="Project\ProjectV.xaml.vb">
|
||||
<DependentUpon>ProjectV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Project\ProjectVM.vb" />
|
||||
<Compile Include="SceneHost\SceneHostVM.vb" />
|
||||
<Compile Include="SceneHost\SceneHostV.xaml.vb">
|
||||
<DependentUpon>SceneHostV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="StatusBar\StatusBarV.xaml.vb">
|
||||
<DependentUpon>StatusBarV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="StatusBar\StatusBarVM.vb" />
|
||||
<Compile Include="TopCommandBar\TopCommandBarV.xaml.vb">
|
||||
<DependentUpon>TopCommandBarV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="TopCommandBar\TopCommandBarVM.vb" />
|
||||
<Compile Include="Utility\VMBase.vb" />
|
||||
<Compile Include="ViewPanel\ViewPanelV.xaml.vb">
|
||||
<DependentUpon>ViewPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ViewPanel\ViewPanelVM.vb" />
|
||||
<Page Include="DrawPanel\DrawPanelV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="MachinePanel\MachinePanelV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="InstrumentPanel\InstrumentPanelV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="MainWindow\MainWindowV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Compile Include="Application.xaml.vb">
|
||||
<DependentUpon>Application.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow\MainWindowV.xaml.vb">
|
||||
<DependentUpon>MainWindowV.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Page Include="OptionPanel\MachiningTab\MachiningTabV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="OptionPanel\NestingTab\NestingTabV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="OptionPanel\OptionPanelV.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="ShowPanel\ShowPanelV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Utility\OmagOFFICEDictionary.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Project\ProjectV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="SceneHost\SceneHostV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="StatusBar\StatusBarV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="TopCommandBar\TopCommandBarV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="ViewPanel\ViewPanelV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Windows" />
|
||||
<Import Include="System.Windows.Controls" />
|
||||
<Import Include="System.Windows.Data" />
|
||||
<Import Include="System.Windows.Documents" />
|
||||
<Import Include="System.Windows.Input" />
|
||||
<Import Include="System.Windows.Shapes" />
|
||||
<Import Include="System.Windows.Media" />
|
||||
<Import Include="System.Windows.Media.Imaging" />
|
||||
<Import Include="System.Windows.Navigation" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MainWindow\MainWindowVM.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="My Project\MyExtensions\MyWpfExtension.vb">
|
||||
<VBMyExtensionTemplateID>Microsoft.VisualBasic.WPF.MyExtension</VBMyExtensionTemplateID>
|
||||
<VBMyExtensionTemplateVersion>1.0.0.0</VBMyExtensionTemplateVersion>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
</EmbeddedResource>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<AppDesigner Include="My Project\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\TopCommandBar\New.png" />
|
||||
<Resource Include="Resources\TopCommandBar\Open.png" />
|
||||
<Resource Include="Resources\TopCommandBar\Options.png" />
|
||||
<Resource Include="Resources\TopCommandBar\Save.png" />
|
||||
<Resource Include="Resources\TopCommandBar\SaveAs.png" />
|
||||
<Resource Include="Resources\TopCommandBar\Send.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\LogoOmag.jpg" />
|
||||
<Resource Include="Resources\OmagCUT.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ShowPanel\RenderingHL.png" />
|
||||
<Resource Include="Resources\ShowPanel\RenderingSH.png" />
|
||||
<Resource Include="Resources\ShowPanel\RenderingWF.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ViewPanel\LookFromBACK.png" />
|
||||
<Resource Include="Resources\ViewPanel\LookFromBOTTOM.png" />
|
||||
<Resource Include="Resources\ViewPanel\LookFromFRONT.png" />
|
||||
<Resource Include="Resources\ViewPanel\LookFromISO_NE.png" />
|
||||
<Resource Include="Resources\ViewPanel\LookFromISO_NW.png" />
|
||||
<Resource Include="Resources\ViewPanel\LookFromISO_SE.png" />
|
||||
<Resource Include="Resources\ViewPanel\LookFromISO_SW.png" />
|
||||
<Resource Include="Resources\ViewPanel\LookFromLEFT.png" />
|
||||
<Resource Include="Resources\ViewPanel\LookFromRIGHT.png" />
|
||||
<Resource Include="Resources\ViewPanel\LookFromTOP.png" />
|
||||
<Resource Include="Resources\ViewPanel\ZoomAll.png" />
|
||||
<Resource Include="Resources\ViewPanel\ZoomIn.png" />
|
||||
<Resource Include="Resources\ViewPanel\ZoomOut.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\InstrumentPanel\GetDist.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\DrawPanel\Draw.png" />
|
||||
<Resource Include="Resources\DrawPanel\ImportDxf.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagOFFICE\OmagOFFICER32.exe
|
||||
IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\OmagOFFICE\OmagOFFICED32.exe
|
||||
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagOFFICE\OmagOFFICER64.exe
|
||||
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\OmagOFFICE\OmagOFFICED64.exe</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,9 @@
|
||||
<Grid x:Class="MachiningTabV"
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
|
||||
</Grid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class MachiningTabV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,12 @@
|
||||
Public Class MachiningTabVM
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in OmagOFFICEMap
|
||||
OmagOFFICEMap.SetRefMachiningTabVM(Me)
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,9 @@
|
||||
<Grid x:Class="NestingTabV"
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
|
||||
</Grid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class NestingTabV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,12 @@
|
||||
Public Class NestingTabVM
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in OmagOFFICEMap
|
||||
OmagOFFICEMap.SetRefNestingTabVM(Me)
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,31 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="OptionPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
xmlns:OmagOFFICE="clr-namespace:OmagOFFICE"
|
||||
IsToolBar="False" TitleBarOrientation="Vertical"
|
||||
IsTopDockable="False" IsBottomDockable="False" IsLeftDockable="True"
|
||||
IsRightDockable="False" IsFloating="False"
|
||||
Background="{StaticResource Omag_Gray}" BorderBrush="{StaticResource Omag_Gray}">
|
||||
|
||||
<Grid Height="500">
|
||||
<TabControl>
|
||||
<TabItem Header="Grezzo">
|
||||
<TabItem.Content>
|
||||
<OmagOFFICE:RawPartTabV DataContext="{StaticResource RawPartTabVM}"/>
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
<TabItem Header="Disposizione">
|
||||
<TabItem.Content>
|
||||
<OmagOFFICE:NestingTabV DataContext="{StaticResource NestingTabVM}"/>
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
<TabItem Header="Lavorazione">
|
||||
<TabItem.Content>
|
||||
<OmagOFFICE:MachiningTabV DataContext="{StaticResource MachiningTabVM}"/>
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class OptionPanelV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,36 @@
|
||||
Public Class OptionPanelVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property RawPartTabMsg As String
|
||||
Get
|
||||
'Return
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property NestingTabMsg As String
|
||||
Get
|
||||
'Return
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property MachiningTabMsg As String
|
||||
Get
|
||||
'Return
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in OmagOFFICEMap
|
||||
OmagOFFICEMap.SetRefOptionPanelVM(Me)
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,14 @@
|
||||
<Grid x:Class="RawPartTabV"
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
</Grid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class RawPartTabV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,12 @@
|
||||
Public Class RawPartTabVM
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in OmagOFFICEMap
|
||||
OmagOFFICEMap.SetRefRawPartTabVM(Me)
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,47 @@
|
||||
<EgtFloating:EgtFloatingManager x:Class="ProjectV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:OmagOFFICE="clr-namespace:OmagOFFICE">
|
||||
|
||||
<EgtFloating:EgtFloatingTray x:Name="LEFTTRAY" DockPanel.Dock="Left">
|
||||
<OmagOFFICE:OptionPanelV DataContext="{StaticResource OptionPanelVM}"/>
|
||||
</EgtFloating:EgtFloatingTray>
|
||||
|
||||
<EgtFloating:EgtFloatingTray x:Name="TOPTRAY" DockPanel.Dock="Top">
|
||||
<OmagOFFICE:ShowPanelV DataContext="{StaticResource ShowPanelVM}"/>
|
||||
<OmagOFFICE:ViewPanelV DataContext="{StaticResource ViewPanelVM}"/>
|
||||
<OmagOFFICE:InstrumentPanelV DataContext="{StaticResource InstrumentPanelVM}"/>
|
||||
<OmagOFFICE:DrawPanelV DataContext="{StaticResource DrawPanelVM}"/>
|
||||
<OmagOFFICE:MachinePanelV DataContext="{StaticResource MachinePanelVM}"/>
|
||||
<!--<EgtFloating:EgtFloatingPanel Name="ViewPanel"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
<local:ViewPanelView DataContext="{StaticResource ViewPanelViewModel}"/>
|
||||
<local:PopUpViewPanelView DataContext="{StaticResource PopUpViewPanelViewModel}" EgtFloating:EgtFloatingPanel.IsInPopUp="True"/>
|
||||
</EgtFloating:EgtFloatingPanel>-->
|
||||
<!--<EgtFloating:EgtFloatingPanel Name="InstrumentPanel"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
<local:InstrumentPanelView DataContext="{StaticResource InstrumentPanelViewModel}"/>
|
||||
</EgtFloating:EgtFloatingPanel>-->
|
||||
<!--<EgtFloating:EgtFloatingPanel Name="DbPanel"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
<local:DbPanelView DataContext="{StaticResource DbPanelViewModel}"/>
|
||||
</EgtFloating:EgtFloatingPanel>-->
|
||||
</EgtFloating:EgtFloatingTray>
|
||||
|
||||
<EgtFloating:EgtFloatingTray x:Name="BOTTOMTRAY" DockPanel.Dock="Bottom">
|
||||
<EgtWPFLib5:EgtMachGroupPanelV DataContext="{StaticResource MachGroupPanelVM}"
|
||||
Background="{StaticResource Omag_Gray}"
|
||||
BorderBrush="{StaticResource Omag_Gray}"
|
||||
RepaetButtonStyle="{StaticResource CustomScrollBarButton}"
|
||||
MachGroupButtonStyle="{StaticResource {x:Type ToggleButton}}"
|
||||
IsToolBar="False"
|
||||
IsTopDockable="False" IsBottomDockable="True" IsLeftDockable="False"
|
||||
IsRightDockable="False" IsFloating="False"/>
|
||||
</EgtFloating:EgtFloatingTray>
|
||||
|
||||
<!--ContentControl che ospita la scena restituita sotto forma di WindowsFormsHost-->
|
||||
<OmagOFFICE:SceneHostV DataContext="{StaticResource SceneHostVM}"/>
|
||||
|
||||
</EgtFloating:EgtFloatingManager>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class ProjectV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,12 @@
|
||||
Public Class ProjectVM
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in OmagOFFICEMap
|
||||
OmagOFFICEMap.SetRefProjectVM(Me)
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
End Class
|
||||
|
After Width: | Height: | Size: 760 B |
|
After Width: | Height: | Size: 620 B |
|
After Width: | Height: | Size: 331 B |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 413 B |
|
After Width: | Height: | Size: 418 B |
|
After Width: | Height: | Size: 510 B |
|
After Width: | Height: | Size: 538 B |
|
After Width: | Height: | Size: 647 B |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 610 B |
|
After Width: | Height: | Size: 951 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 547 B |
|
After Width: | Height: | Size: 570 B |
|
After Width: | Height: | Size: 528 B |
|
After Width: | Height: | Size: 619 B |
|
After Width: | Height: | Size: 694 B |
|
After Width: | Height: | Size: 684 B |
|
After Width: | Height: | Size: 677 B |
|
After Width: | Height: | Size: 563 B |
|
After Width: | Height: | Size: 564 B |
|
After Width: | Height: | Size: 552 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 689 B |
|
After Width: | Height: | Size: 648 B |
@@ -0,0 +1,8 @@
|
||||
<WindowsFormsHost x:Class="SceneHostV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtUILib="clr-namespace:EgtUILib;assembly=EgtUILib">
|
||||
|
||||
<EgtUILib:Scene x:Name="OmagOFFICEScene"/>
|
||||
|
||||
</WindowsFormsHost>
|
||||
@@ -0,0 +1,225 @@
|
||||
Imports System.Windows.Interop
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class SceneHostV
|
||||
|
||||
' Scene controller
|
||||
Private WithEvents m_Controller As New Controller
|
||||
|
||||
Sub New()
|
||||
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
' Creo riferimento a questa classe in OmagOFFICEMap
|
||||
OmagOFFICEMap.SetRefSceneHostV(Me)
|
||||
' Add any initialization after the InitializeComponent() call.
|
||||
PreInitializeScene()
|
||||
OmagOFFICEScene.Init()
|
||||
' Impostazione Controller
|
||||
m_Controller.SetScene(OmagOFFICEScene)
|
||||
' Recupero e imposto handle finestra principale
|
||||
Dim hMainWnd As IntPtr = New WindowInteropHelper(Application.Current.MainWindow).Handle
|
||||
EgtSetMainWindowHandle(hMainWnd)
|
||||
' inizializzo gestore lavorazioni
|
||||
EgtInitMachMgr(OmagOFFICEMap.refMachinePanelVM.sMachinesRoot)
|
||||
End Sub
|
||||
|
||||
Private Sub PreInitializeScene()
|
||||
' imposto colore di default
|
||||
Dim DefColor As New Color3d(0, 0, 0)
|
||||
GetPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
|
||||
OmagOFFICEScene.SetDefaultMaterial(DefColor)
|
||||
' imposto colori sfondo
|
||||
Dim BackTopColor As New Color3d(192, 192, 192)
|
||||
GetPrivateProfileColor(S_SCENE, K_BACKTOP, BackTopColor)
|
||||
Dim BackBotColor As New Color3d(BackTopColor)
|
||||
GetPrivateProfileColor(S_SCENE, K_BACKBOTTOM, BackBotColor)
|
||||
OmagOFFICEScene.SetViewBackground(BackTopColor, BackBotColor)
|
||||
' imposto colore di evidenziazione
|
||||
Dim MarkColor As New Color3d(255, 255, 0)
|
||||
GetPrivateProfileColor(S_SCENE, K_MARK, MarkColor)
|
||||
OmagOFFICEScene.SetMarkMaterial(MarkColor)
|
||||
' imposto colore per superfici selezionate
|
||||
Dim SelSurfColor As New Color3d(255, 255, 192)
|
||||
GetPrivateProfileColor(S_SCENE, K_SELSURF, SelSurfColor)
|
||||
OmagOFFICEScene.SetSelSurfMaterial(SelSurfColor)
|
||||
' imposto tipo e colore del rettangolo di zoom
|
||||
Dim bOutline As Boolean = True
|
||||
Dim ZwColor As New Color3d(0, 0, 0)
|
||||
GetPrivateProfileZoomWin(S_SCENE, K_ZOOMWIN, bOutline, ZwColor)
|
||||
OmagOFFICEScene.SetZoomWinAttribs(bOutline, ZwColor)
|
||||
' imposto colore della linea di distanza
|
||||
Dim DstLnColor As New Color3d(255, 0, 0)
|
||||
GetPrivateProfileColor(S_SCENE, K_DISTLINE, DstLnColor)
|
||||
OmagOFFICEScene.SetDistLineMaterial(DstLnColor)
|
||||
' imposto parametri OpenGL
|
||||
Dim nDriver As Integer = GetPrivateProfileInt(S_OPENGL, K_DRIVER, 3)
|
||||
Dim b2Buff As Boolean = (GetPrivateProfileInt(S_OPENGL, K_DOUBLEBUFFER, 1) <> 0)
|
||||
Dim nColorBits As Integer = GetPrivateProfileInt(S_OPENGL, K_COLORBITS, 32)
|
||||
Dim nDepthBits As Integer = GetPrivateProfileInt(S_OPENGL, K_DEPTHBITS, 32)
|
||||
OmagOFFICEScene.SetViewAttributes(nDriver, b2Buff, nColorBits, nDepthBits)
|
||||
End Sub
|
||||
|
||||
Private Sub PostInitializeScene()
|
||||
' Impostazioni Controller
|
||||
m_Controller.SetScene(OmagOFFICEScene)
|
||||
'' imposto unità di misura per interfaccia utente
|
||||
'IniFile.m_bMmUnits = (GetPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0)
|
||||
'Application.Msn.NotifyColleagues(Application.UPDATESTATUSUNITS, IniFile.m_bMmUnits)
|
||||
'' imposto visualizzazione riferimento globale
|
||||
'Dim bShowGlobFrame As Boolean = (GetPrivateProfileInt(S_SCENE, K_SHOWGFRAME, 1) <> 0)
|
||||
'EgtSetGlobFrameShow(bShowGlobFrame)
|
||||
'' imposto i dati della griglia
|
||||
'LoadGridData()
|
||||
'' imposto stato di visualizzazione della griglia
|
||||
'IniFile.m_bDrawShowGrid = (GetPrivateProfileInt(S_GRID, K_DRAWSHOWGRID, 1) <> 0)
|
||||
'IniFile.m_bMachiningShowGrid = (GetPrivateProfileInt(S_GRID, K_MACHININGSHOWGRID, 1) <> 0)
|
||||
'IniFile.m_bShowGridFrame = (GetPrivateProfileInt(S_GRID, K_SHOWFRAME, 1) <> 0)
|
||||
'Application.Msn.NotifyColleagues(Application.UPDATESTATUSGRID, New UpdateStatusGridParam(IniFile.m_bDrawShowGrid, IniFile.m_bShowGridFrame))
|
||||
'' imposto tipo coordinate
|
||||
'm_bCPlaneTypePos = True
|
||||
'Application.Msn.NotifyColleagues(Application.STATUSCURRPOSTYPETEXT, "GRID")
|
||||
'm_ProjectScene.SetGridCursorPos(m_bCPlaneTypePos)
|
||||
'' modo di visualizzazione
|
||||
'Dim nShowMode As Integer = GetPrivateProfileInt(S_SCENE, K_SHOWMODE, SM.SHADING)
|
||||
'Application.Msn.NotifyColleagues(Application.SHOWMODESTATE, nShowMode)
|
||||
'' visualizzazione direzione curve
|
||||
'Dim nShowCurveDir As Integer = GetPrivateProfileInt(S_SCENE, K_CURVEDIR, 0)
|
||||
'Application.Msn.NotifyColleagues(Application.SHOWCURVEDIR, nShowCurveDir)
|
||||
'' visualizzazione avanzata dei triangoli costituenti le superfici
|
||||
'Dim bShowTriaAdv As Boolean = (GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0)
|
||||
'EgtSetShowTriaAdv(bShowTriaAdv)
|
||||
'' tipo visualizzazione per Zmap
|
||||
'Dim nShowZmap As Integer = GetPrivateProfileInt(S_SCENE, K_SHOWZMAP, 1)
|
||||
'EgtSetShowZmap(nShowZmap, False)
|
||||
'' lettura da ini della variabile che abilita i gruppi di lavorazione
|
||||
'IniFile.m_bMachiningGroup = (GetPrivateProfileInt(S_MACH, K_MACHININGGROUP, 0) <> 0)
|
||||
'Application.Msn.NotifyColleagues(Application.DRAWMODE_ISCHECKED)
|
||||
'' ObjTree non selezionato
|
||||
'Application.Msn.NotifyColleagues(Application.UPDATEOBJTREEOLDID, GDB_ID.NULL)
|
||||
'' nascondo input box
|
||||
'Application.Msn.NotifyColleagues(Application.RESETINPUTBOX)
|
||||
End Sub
|
||||
|
||||
#Region "ProjectManager"
|
||||
|
||||
Friend Sub NewProject()
|
||||
m_Controller.NewProject(True)
|
||||
End Sub
|
||||
|
||||
Friend Sub OpenProject(sFilePath As String)
|
||||
If String.IsNullOrEmpty(sFilePath) Then
|
||||
' Recupero cartella dell'ultimo progetto aperto
|
||||
Dim sDir As String = m_Controller.GetCurrFile()
|
||||
If String.IsNullOrWhiteSpace(sDir) Then
|
||||
GetPrivateProfileString(S_GENERAL, K_LASTPROJ, "", sDir)
|
||||
End If
|
||||
If Not String.IsNullOrWhiteSpace(sDir) Then
|
||||
sDir = Path.GetDirectoryName(sDir)
|
||||
End If
|
||||
m_Controller.OpenProject(sDir)
|
||||
Else
|
||||
m_Controller.OpenProject(sFilePath, False)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub SaveProject()
|
||||
Dim nType As NGE = DirectCast(GetPrivateProfileInt(S_GEOMDB, K_SAVETYPE, NGE.CMPTEXT), NGE)
|
||||
Dim sFile As String = m_Controller.GetCurrFile()
|
||||
If String.IsNullOrWhiteSpace(sFile) Then
|
||||
GetPrivateProfileString(S_GENERAL, K_LASTPROJ, "", sFile)
|
||||
If Not String.IsNullOrWhiteSpace(sFile) Then
|
||||
sFile = Path.GetDirectoryName(sFile)
|
||||
End If
|
||||
sFile.TrimEnd("\"c)
|
||||
sFile += "\New.nge"
|
||||
End If
|
||||
m_Controller.SaveAsProject(sFile, nType)
|
||||
End Sub
|
||||
|
||||
#End Region ' ProjectManager
|
||||
|
||||
#Region "ShowMode"
|
||||
|
||||
Friend Sub ShowMode(nType As SM)
|
||||
Select Case nType
|
||||
Case SM.WIREFRAME
|
||||
OmagOFFICEScene.WireFrame()
|
||||
Case SM.HIDDENLINE
|
||||
OmagOFFICEScene.HiddenLine()
|
||||
Case SM.SHADING
|
||||
OmagOFFICEScene.Shading()
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
#End Region ' ShowMode
|
||||
|
||||
#Region "Zoom"
|
||||
|
||||
Friend Sub ZoomMode(nType As ZM)
|
||||
Select Case nType
|
||||
Case ZM.ALL
|
||||
OmagOFFICEScene.ZoomAll()
|
||||
Case ZM.IN_
|
||||
OmagOFFICEScene.ZoomIn()
|
||||
Case ZM.OUT
|
||||
OmagOFFICEScene.ZoomOut()
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
#End Region ' Zoom
|
||||
|
||||
#Region "ViewMode"
|
||||
|
||||
Friend Sub ViewMode(nType As VT)
|
||||
Select Case nType
|
||||
Case VT.TOP
|
||||
OmagOFFICEScene.TopView()
|
||||
Case VT.FRONT
|
||||
OmagOFFICEScene.FrontView()
|
||||
Case VT.RIGHT
|
||||
OmagOFFICEScene.RightView()
|
||||
Case VT.BACK
|
||||
OmagOFFICEScene.BackView()
|
||||
Case VT.LEFT
|
||||
OmagOFFICEScene.LeftView()
|
||||
Case VT.BOTTOM
|
||||
OmagOFFICEScene.BottomView()
|
||||
Case VT.ISO_SW
|
||||
OmagOFFICEScene.IsoViewSW()
|
||||
Case VT.ISO_SE
|
||||
OmagOFFICEScene.IsoViewSE()
|
||||
Case VT.ISO_NE
|
||||
OmagOFFICEScene.IsoViewNE()
|
||||
Case VT.ISO_NW
|
||||
OmagOFFICEScene.IsoViewNW()
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
#End Region ' ViewMode
|
||||
|
||||
#Region "GetDistance"
|
||||
|
||||
Friend Sub GetDistanceON()
|
||||
OmagOFFICEScene.SetStatusGetDistance()
|
||||
End Sub
|
||||
Friend Sub GetDistanceOFF()
|
||||
OmagOFFICEScene.ResetStatusGetDistance()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub OnCursorPos(ByVal sender As Object, ByVal sCursorPos As String) Handles OmagOFFICEScene.OnCursorPos
|
||||
OmagOFFICEMap.refStatusBarVM.SetCurrPos(sCursorPos)
|
||||
End Sub
|
||||
|
||||
Private Sub OnShowDistance(ByVal sender As Object, ByVal sDistance As String) Handles OmagOFFICEScene.OnShowDistance
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(sDistance)
|
||||
End Sub
|
||||
|
||||
#End Region ' EVENTS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,13 @@
|
||||
Public Class SceneHostVM
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in OmagOFFICEMap
|
||||
OmagOFFICEMap.SetRefSceneHostVM(Me)
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,25 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="ShowPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
IsTopDockable="True" IsBottomDockable="False" IsLeftDockable="False"
|
||||
IsRightDockable="False" IsFloating="False"
|
||||
Background="{StaticResource Omag_Gray}" BorderBrush="{StaticResource Omag_Gray}">
|
||||
|
||||
<RadioButton ToolTip="{Binding RenderingWFToolTip}"
|
||||
Style="{StaticResource ToolBar_ToggleButton}"
|
||||
IsChecked="{Binding WireframeIsChecked}">
|
||||
<Image Source="/Resources/ShowPanel/RenderingWF.png" Stretch="Uniform"/>
|
||||
</RadioButton>
|
||||
<RadioButton ToolTip="{Binding RenderingHLToolTip}"
|
||||
Style="{StaticResource ToolBar_ToggleButton}"
|
||||
IsChecked="{Binding HiddenLineIsChecked}">
|
||||
<Image Source="/Resources/ShowPanel/RenderingHL.png" Stretch="Uniform"/>
|
||||
</RadioButton>
|
||||
<RadioButton ToolTip="{Binding RenderingSHToolTip}"
|
||||
Style="{StaticResource ToolBar_ToggleButton}"
|
||||
IsChecked="{Binding ShadingIsChecked}">
|
||||
<Image Source="/Resources/ShowPanel/RenderingSH.png" Stretch="Uniform"/>
|
||||
</RadioButton>
|
||||
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class ShowPanelV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,114 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class ShowPanelVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdWireframe As ICommand
|
||||
Private m_cmdHiddenLine As ICommand
|
||||
Private m_cmdShading As ICommand
|
||||
Private m_cmdCurveDir As ICommand
|
||||
|
||||
#Region "ToolTip"
|
||||
|
||||
Public ReadOnly Property RenderingWFToolTip As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_GRIDVIEWPANEL + 1)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property RenderingHLToolTip As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_GRIDVIEWPANEL + 2)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property RenderingSHToolTip As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_GRIDVIEWPANEL + 3)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property CurveDirToolTip As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_GRIDVIEWPANEL + 16)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Private m_WireframeIsChecked As Boolean
|
||||
Public Property WireframeIsChecked As Boolean
|
||||
Get
|
||||
Return m_WireframeIsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value <> m_WireframeIsChecked Then
|
||||
m_WireframeIsChecked = value
|
||||
If value Then
|
||||
OmagOFFICEMap.refSceneHostV.ShowMode(SM.WIREFRAME)
|
||||
NotifyPropertyChanged("WireframeIsChecked")
|
||||
End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_HiddenLineIsChecked As Boolean
|
||||
Public Property HiddenLineIsChecked As Boolean
|
||||
Get
|
||||
Return m_HiddenLineIsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value <> m_HiddenLineIsChecked Then
|
||||
m_HiddenLineIsChecked = value
|
||||
If value Then
|
||||
OmagOFFICEMap.refSceneHostV.ShowMode(SM.HIDDENLINE)
|
||||
NotifyPropertyChanged("HiddenLineIsChecked")
|
||||
End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_ShadingIsChecked As Boolean
|
||||
Public Property ShadingIsChecked As Boolean
|
||||
Get
|
||||
Return m_ShadingIsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value <> m_ShadingIsChecked Then
|
||||
m_ShadingIsChecked = value
|
||||
If value Then
|
||||
OmagOFFICEMap.refSceneHostV.ShowMode(SM.SHADING)
|
||||
NotifyPropertyChanged("ShadingIsChecked")
|
||||
End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Sub SetShowMode(nShowModeType As SM)
|
||||
Select Case nShowModeType
|
||||
Case SM.WIREFRAME
|
||||
WireframeIsChecked = True
|
||||
Case SM.HIDDENLINE
|
||||
HiddenLineIsChecked = True
|
||||
Case SM.SHADING
|
||||
ShadingIsChecked = True
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,36 @@
|
||||
<StatusBar x:Class="StatusBarV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{StaticResource Omag_LightGray}">
|
||||
|
||||
<StatusBar.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
</Grid>
|
||||
</ItemsPanelTemplate>
|
||||
</StatusBar.ItemsPanel>
|
||||
|
||||
<!--Stringa di output messaggi-->
|
||||
<StatusBarItem Grid.Column="0">
|
||||
<TextBlock Text="{Binding OutputMessage}" Foreground="{StaticResource Omag_White}"/>
|
||||
</StatusBarItem>
|
||||
<!--Indica il tipo di punto notevole selezionato-->
|
||||
<StatusBarItem Grid.Column="1">
|
||||
<Button Content="{Binding SnapPointTypeText}" Background="{Binding SnapPointTypeBackground}" Width="80"/>
|
||||
</StatusBarItem>
|
||||
<!--Indica l'unità di misura-->
|
||||
<StatusBarItem Grid.Column="2">
|
||||
<TextBlock Text="{Binding StatusUnitsText}" Foreground="{StaticResource Omag_White}" Width="35"/>
|
||||
</StatusBarItem>
|
||||
<!--Indica la posizione del mouse quando è sulla scena-->
|
||||
<StatusBarItem Grid.Column="7">
|
||||
<TextBlock Text="{Binding CurrPos}" Foreground="{StaticResource Omag_White}"/>
|
||||
</StatusBarItem>
|
||||
|
||||
</StatusBar>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class StatusBarV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,93 @@
|
||||
Public Class StatusBarVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private WithEvents OutputMessageTimer As New System.Windows.Threading.DispatcherTimer
|
||||
|
||||
' GRAPHICAL ELEMENTS
|
||||
Private m_OutputMessage As String
|
||||
Public Property OutputMessage As String
|
||||
Get
|
||||
Return m_OutputMessage
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_OutputMessage = value
|
||||
'NotifyPropertyChanged("OutputMessage")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Private m_StatusUnitsText As String
|
||||
'Public Property StatusUnitsText As String
|
||||
' Get
|
||||
' Return m_StatusUnitsText
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_StatusUnitsText = value
|
||||
' 'NotifyPropertyChanged("StatusUnitsText")
|
||||
' End Set
|
||||
'End Property
|
||||
Private m_CurrPos As String
|
||||
Public Property CurrPos As String
|
||||
Get
|
||||
Return m_CurrPos
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_CurrPos = value
|
||||
'NotifyPropertyChanged("StatusCurrPos")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in OmagOFFICEMap
|
||||
OmagOFFICEMap.SetRefStatusBarVM(Me)
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Overloads Sub SetOutputMessage(sMessage As String)
|
||||
m_OutputMessage = sMessage
|
||||
NotifyPropertyChanged("OutputMessage")
|
||||
End Sub
|
||||
|
||||
Friend Overloads Sub SetOutputMessage(sMessage As String, nTime As Integer)
|
||||
m_OutputMessage = sMessage
|
||||
NotifyPropertyChanged("OutputMessage")
|
||||
OutputMessageTimer.Interval = TimeSpan.FromSeconds(nTime)
|
||||
OutputMessageTimer.IsEnabled = True
|
||||
OutputMessageTimer.Start()
|
||||
End Sub
|
||||
|
||||
Friend Sub ClearOutputMessage()
|
||||
m_OutputMessage = String.Empty
|
||||
NotifyPropertyChanged("OutputMessage")
|
||||
If OutputMessageTimer.IsEnabled Then
|
||||
OutputMessageTimer.Stop()
|
||||
OutputMessageTimer.IsEnabled = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Overloads Sub SetCurrPos(sCurrPos As String)
|
||||
m_CurrPos = sCurrPos
|
||||
NotifyPropertyChanged("CurrPos")
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub OutputMessageTimer_Tick(source As Object, e As EventArgs) Handles OutputMessageTimer.Tick
|
||||
ClearOutputMessage()
|
||||
OutputMessageTimer.Stop()
|
||||
OutputMessageTimer.IsEnabled = False
|
||||
End Sub
|
||||
|
||||
#End Region ' EVENTS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,42 @@
|
||||
<UserControl x:Class="TopCommandBarV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<!--Barra superiore dei comandi-->
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Command="{Binding NewCommand}" ToolTip="{Binding NewToolTip}"
|
||||
IsEnabled="{Binding DrawIsChecked}">
|
||||
<Image Source="/Resources/TopCommandBar/New.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding OpenCommand}" ToolTip="{Binding OpenToolTip}"
|
||||
ContextMenuService.Placement="Bottom" IsEnabled="{Binding DrawIsChecked}"
|
||||
Tag="{Binding}">
|
||||
<!--<Button.ContextMenu>
|
||||
<ContextMenu ItemsSource="{Binding MruFileNames}">
|
||||
<ContextMenu.Resources>
|
||||
<Style TargetType="{x:Type MenuItem}">
|
||||
<Setter Property="Command"
|
||||
Value="{Binding PlacementTarget.Tag.OpenMruFileCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}" />
|
||||
<Setter Property="CommandParameter" Value="{Binding}" />
|
||||
</Style>
|
||||
</ContextMenu.Resources>
|
||||
</ContextMenu>
|
||||
</Button.ContextMenu>-->
|
||||
<Image Source="/Resources/TopCommandBar/Open.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding SaveCommand}" ToolTip="{Binding SaveToolTip}">
|
||||
<Image Source="/Resources/TopCommandBar/Save.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding SaveAsCommand}" ToolTip="{Binding SaveAsToolTip}">
|
||||
<Image Source="/Resources/TopCommandBar/SaveAs.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding OptionsCommand}" ToolTip="{Binding OptionsToolTip}">
|
||||
<Image Source="/Resources/TopCommandBar/Options.png" Height="22" />
|
||||
</Button>
|
||||
<Button Command="{Binding SendFeedbackCommand}" ToolTip="{Binding SendFeedbackToolTip}">
|
||||
<Image Source="/Resources/TopCommandBar/Send.png" Height="22" Margin="3,0,3,0" />
|
||||
</Button>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
</UserControl>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class TopCommandBarV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,371 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class TopCommandBarVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
'Public ReadOnly Property MruFileNames As ObservableCollection(Of String)
|
||||
' Get
|
||||
' Return IniFile.m_MruFiles.m_FileNames
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdNew As ICommand
|
||||
Private m_cmdOpen As ICommand
|
||||
'Private Shared m_cmdOpenMruFile As ICommand
|
||||
Private m_cmdSave As ICommand
|
||||
Private m_cmdSaveAs As ICommand
|
||||
Private m_cmdOptions As ICommand
|
||||
Private m_cmdSendFeedback As ICommand
|
||||
|
||||
#Region "ToolTip"
|
||||
|
||||
'Proprietà ToolTip
|
||||
Public ReadOnly Property NewToolTip As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_TOPCOMMANDBAR + 1)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property OpenToolTip As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_TOPCOMMANDBAR + 2)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property SaveToolTip As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_TOPCOMMANDBAR + 3)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property SaveAsToolTip As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_TOPCOMMANDBAR + 4)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property InsertToolTip As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_TOPCOMMANDBAR + 5)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ImportToolTip As String
|
||||
Get
|
||||
' Return EgtMsg(MSG_TOPCOMMANDBAR + 6)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ExportToolTip As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_TOPCOMMANDBAR + 7)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property OptionsToolTip As String
|
||||
Get
|
||||
' Return EgtMsg(MSG_TOPCOMMANDBAR + 9)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property SendFeedbackToolTip As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_TOPCOMMANDBAR + 13)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' ToolTip
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in OmagOFFICEMap
|
||||
OmagOFFICEMap.SetRefTopCommandBarVM(Me)
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "NewCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do New.
|
||||
''' </summary>
|
||||
Public ReadOnly Property NewCommand As ICommand
|
||||
Get
|
||||
If m_cmdNew Is Nothing Then
|
||||
m_cmdNew = New Command(AddressOf NewCmd)
|
||||
End If
|
||||
Return m_cmdNew
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the New. This method is invoked by the NewCommand.
|
||||
''' </summary>
|
||||
Friend Sub NewCmd()
|
||||
OmagOFFICEMap.refSceneHostV.NewProject()
|
||||
End Sub
|
||||
|
||||
#End Region ' NewCommand
|
||||
|
||||
#Region "OpenCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Open.
|
||||
''' </summary>
|
||||
Public ReadOnly Property OpenCommand As ICommand
|
||||
Get
|
||||
If m_cmdOpen Is Nothing Then
|
||||
m_cmdOpen = New Command(AddressOf Open)
|
||||
End If
|
||||
Return m_cmdOpen
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Open. This method is invoked by the OpenCommand.
|
||||
''' </summary>
|
||||
Friend Sub Open()
|
||||
OpenProject(String.Empty)
|
||||
End Sub
|
||||
|
||||
Friend Sub OpenProject(sFilePath As String)
|
||||
OmagOFFICEMap.refSceneHostV.OpenProject(sFilePath)
|
||||
OmagOFFICEMap.refMachGroupPanelVM.LoadMachGroups()
|
||||
End Sub
|
||||
|
||||
#End Region ' OpenCommand
|
||||
|
||||
'#Region "OpenMruFileCommand"
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Returns a command that do Open.
|
||||
' ''' </summary>
|
||||
' Public ReadOnly Property OpenMruFileCommand As ICommand
|
||||
' Get
|
||||
' If m_cmdOpenMruFile Is Nothing Then
|
||||
' m_cmdOpenMruFile = New RelayCommand(AddressOf OpenMruFile)
|
||||
' End If
|
||||
' Return m_cmdOpenMruFile
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Execute the Open. This method is invoked by the OpenCommand.
|
||||
' ''' </summary>
|
||||
' Public Sub OpenMruFile(ByVal param As Object)
|
||||
' OpenProject(DirectCast(param, String).Replace("__", "_"))
|
||||
' End Sub
|
||||
|
||||
'#End Region ' OpenMruFileCommand
|
||||
|
||||
#Region "SaveCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Save.
|
||||
''' </summary>
|
||||
Public ReadOnly Property SaveCommand As ICommand
|
||||
Get
|
||||
If m_cmdSave Is Nothing Then
|
||||
m_cmdSave = New Command(AddressOf Save)
|
||||
End If
|
||||
Return m_cmdSave
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Save. This method is invoked by the SaveCommand.
|
||||
''' </summary>
|
||||
Public Sub Save(ByVal param As Object)
|
||||
OmagOFFICEMap.refSceneHostV.SaveProject()
|
||||
End Sub
|
||||
|
||||
#End Region ' SaveCommand
|
||||
|
||||
'#Region "SaveAsCommand"
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Returns a command that do SaveAs.
|
||||
' ''' </summary>
|
||||
' Public ReadOnly Property SaveAsCommand As ICommand
|
||||
' Get
|
||||
' If m_cmdSaveAs Is Nothing Then
|
||||
' m_cmdSaveAs = New RelayCommand(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)
|
||||
' Application.Msn.NotifyColleagues(Application.SAVEASPROJECT)
|
||||
' End Sub
|
||||
|
||||
'#End Region ' SaveAsCommand
|
||||
|
||||
'#Region "OptionsCommand"
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Returns a command that do Export.
|
||||
' ''' </summary>
|
||||
' Public ReadOnly Property OptionsCommand As ICommand
|
||||
' Get
|
||||
' If m_cmdOptions Is Nothing Then
|
||||
' m_cmdOptions = New RelayCommand(AddressOf Options)
|
||||
' End If
|
||||
' Return m_cmdOptions
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Execute the Export. This method is invoked by the ExportCommand.
|
||||
' ''' </summary>
|
||||
' Public Sub Options(ByVal param As Object)
|
||||
' Dim OptionsWindow As New OptionsView
|
||||
' OptionsWindow.Height = 614
|
||||
' OptionsWindow.Width = 1024
|
||||
' OptionsWindow.DataContext = New OptionsViewModel
|
||||
' OptionsWindow.Owner = Application.Current.MainWindow
|
||||
' OptionsWindow.ShowDialog()
|
||||
' End Sub
|
||||
|
||||
'#End Region ' OptionsCommand
|
||||
|
||||
'#Region "SendFeedbackCommand"
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Returns a command that do SendFeedback.
|
||||
' ''' </summary>
|
||||
' Public ReadOnly Property SendFeedbackCommand As ICommand
|
||||
' Get
|
||||
' If m_cmdSendFeedback Is Nothing Then
|
||||
' m_cmdSendFeedback = New RelayCommand(AddressOf SendFeedback)
|
||||
' End If
|
||||
' Return m_cmdSendFeedback
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Execute the SendFeedback. This method is invoked by the SendFeedbackCommand.
|
||||
' ''' </summary>
|
||||
' Public Sub SendFeedback(ByVal param As Object)
|
||||
' ' Recupero indirizzo a cui spedire la mail
|
||||
' Dim sSupportAddress As String = String.Empty
|
||||
' GetPrivateProfileString(S_GENERAL, K_SUPPORT, "support@egaltech.com", sSupportAddress)
|
||||
' ' se vuoto do messaggio di errore ed esco
|
||||
' If String.IsNullOrWhiteSpace(sSupportAddress) Then
|
||||
' MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 10), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' Return
|
||||
' End If
|
||||
' ' Recupero numero chiave
|
||||
' Dim sKey As String = String.Empty
|
||||
' EgtGetKeyInfo(sKey)
|
||||
' ' Recupero file del progetto corrente
|
||||
' Dim sCurrProject As String = String.Empty
|
||||
' EgtGetCurrFilePath(sCurrProject)
|
||||
' ' se nome file vuoto, chiedo se si vuole salvare
|
||||
' If String.IsNullOrWhiteSpace(sCurrProject) Then
|
||||
' If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
' Application.Msn.NotifyColleagues(Application.SAVEPROJECT)
|
||||
' End If
|
||||
' EgtGetCurrFilePath(sCurrProject)
|
||||
' ' se modificato, chiedo se si vuole salvare
|
||||
' Else
|
||||
' If EgtGetModified() Then
|
||||
' If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
' Application.Msn.NotifyColleagues(Application.SAVEPROJECT)
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' ' Verifico se il progetto corrente è una porta
|
||||
' Dim nPartId As Integer = EgtGetFirstPart()
|
||||
' If nPartId = GDB_ID.NULL Then
|
||||
' nPartId = EgtGetFirstPartInRawPart(EgtGetFirstRawPart())
|
||||
' End If
|
||||
' Dim sPartName As String = String.Empty
|
||||
' EgtGetName(nPartId, sPartName)
|
||||
' Dim bPrjIsDoor As Boolean = (String.Compare(sPartName, "DOOR") = 0)
|
||||
' ' Recupero macchine dei gruppi di lavoro del progetto
|
||||
' Dim Machines As New List(Of String)
|
||||
' Dim nMchGrpId As Integer = EgtGetFirstMachGroup()
|
||||
' While nMchGrpId <> GDB_ID.NULL
|
||||
' Dim sMachineName As String = String.Empty
|
||||
' EgtGetMachGroupMachineName(nMchGrpId, sMachineName)
|
||||
' If Not String.IsNullOrWhiteSpace(sMachineName) Then
|
||||
' Machines.Add(sMachineName)
|
||||
' End If
|
||||
' nMchGrpId = EgtGetNextMachGroup(nMchGrpId)
|
||||
' End While
|
||||
' ' Recupero altri file con lo stesso nome del progetto
|
||||
' Dim OtherFiles As New List(Of String)
|
||||
' If Not String.IsNullOrWhiteSpace(sCurrProject) Then
|
||||
' Dim sCurrProjectDir As String = Path.GetDirectoryName(sCurrProject)
|
||||
' If Not String.IsNullOrWhiteSpace(sCurrProjectDir) Then
|
||||
' Dim TempFiles() As String = Directory.GetFiles(sCurrProjectDir)
|
||||
' For FileIndex = 0 To TempFiles.Count - 1
|
||||
' If Path.GetFileNameWithoutExtension(TempFiles(FileIndex)).Contains(Path.GetFileNameWithoutExtension(sCurrProject)) AndAlso TempFiles(FileIndex) <> sCurrProject Then
|
||||
' OtherFiles.Add(TempFiles(FileIndex))
|
||||
' End If
|
||||
' Next
|
||||
' End If
|
||||
' End If
|
||||
' ' Creo zip file da allegare
|
||||
' Dim sZipToCreate As String = IniFile.m_sTempDir & "\Feedback.zip"
|
||||
' If File.Exists(sZipToCreate) Then
|
||||
' File.Delete(sZipToCreate)
|
||||
' End If
|
||||
' Try
|
||||
' Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out)
|
||||
' ' aggiungo file macchine
|
||||
' For Each sMachineName As String In Machines
|
||||
' Dim sMachineDir As String = IniFile.m_sMachinesRoot & "\" & sMachineName
|
||||
' If Directory.Exists(sMachineDir) Then
|
||||
' zip.AddItem(sMachineDir, sMachineName)
|
||||
' End If
|
||||
' Next
|
||||
' ' aggiungo progetto corrente
|
||||
' If Not String.IsNullOrWhiteSpace(sCurrProject) Then
|
||||
' zip.AddItem(sCurrProject, "")
|
||||
' End If
|
||||
' ' aggiungo file log
|
||||
' zip.AddItem(IniFile.m_sLogFile, "")
|
||||
' ' aggiungo file ausiliari
|
||||
' For Each sOther As String In OtherFiles
|
||||
' zip.AddItem(sOther, "")
|
||||
' Next
|
||||
' ' se door attivo, progetto corrente è una porta e definito direttorio base di Doors
|
||||
' If IniFile.IsActiveDoors And bPrjIsDoor And Directory.Exists(IniFile.m_sDoorsDirPath) Then
|
||||
' ' aggiungo Doors completo
|
||||
' zip.AddItem(IniFile.m_sDoorsDirPath, "Doors")
|
||||
' End If
|
||||
' ' salvo lo zip
|
||||
' zip.Save()
|
||||
' End Using
|
||||
' Catch ex1 As Exception
|
||||
' EgtOutLog("Exception in zip: " & ex1.ToString())
|
||||
' End Try
|
||||
' ' preparo la mail per il supporto
|
||||
' Dim bEx As Boolean = False
|
||||
' Try
|
||||
' Dim SendFeedbackWindow As New EgtWPFLib5.MapiMailMessage("EgtCAM5 Feedback - " & sKey)
|
||||
' SendFeedbackWindow.Recipients.Add(sSupportAddress)
|
||||
' If Not String.IsNullOrWhiteSpace(sZipToCreate) AndAlso File.Exists(sZipToCreate) Then
|
||||
' SendFeedbackWindow.Files.Add(IniFile.m_sTempDir & "\Feedback.zip")
|
||||
' End If
|
||||
' SendFeedbackWindow.ShowDialog()
|
||||
' Catch ex As Exception
|
||||
' EgtOutLog("Feedback exception: " & ex.ToString)
|
||||
' bEx = True
|
||||
' End Try
|
||||
' If bEx OrElse EgtWPFLib5.MapiMailMessage.m_ErrorCode <> 0 Then
|
||||
' MessageBox.Show(String.Format(EgtMsg(MSG_TOPCOMMANDBAR + 12), sSupportAddress, sZipToCreate), EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||
' Else
|
||||
' Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSOUTPUT, EgtMsg(MSG_TOPCOMMANDBAR + 14))
|
||||
' End If
|
||||
' End Sub
|
||||
|
||||
'#End Region ' SendFeedbackCommand
|
||||
|
||||
#End Region ' Commands
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,68 @@
|
||||
|
||||
''' <summary>
|
||||
''' A command whose sole purpose is to
|
||||
''' relay its functionality to other
|
||||
''' objects by invoking delegates. The
|
||||
''' default return value for the CanExecute
|
||||
''' method is 'true'.
|
||||
''' </summary>
|
||||
Public Class Command
|
||||
Implements ICommand
|
||||
|
||||
#Region "Fields"
|
||||
|
||||
Private ReadOnly _execute As Action(Of Object)
|
||||
Private ReadOnly _canExecute As Predicate(Of Object)
|
||||
|
||||
#End Region ' Fields
|
||||
|
||||
#Region "Constructors"
|
||||
|
||||
''' <summary>
|
||||
''' Creates a new command that can always execute.
|
||||
''' </summary>
|
||||
''' <param name="execute">The execution logic.</param>
|
||||
Public Sub New(ByVal execute As Action(Of Object))
|
||||
Me.New(execute, Nothing)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Creates a new command.
|
||||
''' </summary>
|
||||
''' <param name="execute">The execution logic.</param>
|
||||
''' <param name="canExecute">The execution status logic.</param>
|
||||
Public Sub New(ByVal execute As Action(Of Object), ByVal canExecute As Predicate(Of Object))
|
||||
If execute Is Nothing Then
|
||||
Throw New ArgumentNullException("execute")
|
||||
End If
|
||||
|
||||
_execute = execute
|
||||
_canExecute = canExecute
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructors
|
||||
|
||||
#Region "ICommand Members"
|
||||
|
||||
<DebuggerStepThrough> _
|
||||
Public Function CanExecute(ByVal parameter As Object) As Boolean Implements ICommand.CanExecute
|
||||
Return If(_canExecute Is Nothing, True, _canExecute(parameter))
|
||||
End Function
|
||||
|
||||
Public Custom Event CanExecuteChanged As EventHandler Implements ICommand.CanExecuteChanged
|
||||
AddHandler(ByVal value As EventHandler)
|
||||
AddHandler CommandManager.RequerySuggested, value
|
||||
End AddHandler
|
||||
RemoveHandler(ByVal value As EventHandler)
|
||||
RemoveHandler CommandManager.RequerySuggested, value
|
||||
End RemoveHandler
|
||||
RaiseEvent(ByVal sender As System.Object, ByVal e As System.EventArgs)
|
||||
End RaiseEvent
|
||||
End Event
|
||||
|
||||
Public Sub Execute(ByVal parameter As Object) Implements ICommand.Execute
|
||||
_execute(parameter)
|
||||
End Sub
|
||||
|
||||
#End Region ' ICommand Members
|
||||
End Class
|
||||
@@ -0,0 +1,68 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtUILib
|
||||
|
||||
Public Module IniFile
|
||||
|
||||
Friend m_sIniFile As String
|
||||
|
||||
Public Function GetPrivateProfileInt(IpAppName As String, IpKeyName As String, nDefault As Integer) As Integer
|
||||
Return EgtUILib.GetPrivateProfileInt(IpAppName, IpKeyName, nDefault, m_sIniFile)
|
||||
End Function
|
||||
|
||||
Public Function GetPrivateProfileDouble(IpAppName As String, IpKeyName As String, nDefault As Integer) As Double
|
||||
Return EgtUILib.GetPrivateProfileDouble(IpAppName, IpKeyName, nDefault, m_sIniFile)
|
||||
End Function
|
||||
|
||||
Public Function GetPrivateProfileString(IpAppName As String, IpKeyName As String, IpDefault As String, ByRef IpString As String) As Integer
|
||||
Return EgtUILib.GetPrivateProfileString(IpAppName, IpKeyName, IpDefault, IpString, m_sIniFile)
|
||||
End Function
|
||||
|
||||
Public Function GetPrivateProfileColor(IpAppName As String, IpKeyName As String, ByRef Col As EgtUILib.EgtInterface.Color3d) As Boolean
|
||||
Return EgtUILib.GetPrivateProfileColor(IpAppName, IpKeyName, Col, m_sIniFile)
|
||||
End Function
|
||||
|
||||
Public Function GetPrivateProfileWinPos(IpAppName As String, IpKeyName As String, ByRef nFlag As Integer, ByRef nLeft As Integer, ByRef nTop As Integer, ByRef nWidth As Integer, ByRef nHeight As Integer) As Boolean
|
||||
Return EgtUILib.GetPrivateProfileWinPos(IpAppName, IpKeyName, nFlag, nLeft, nTop, nWidth, nHeight, m_sIniFile)
|
||||
End Function
|
||||
|
||||
Public Function GetPrivateProfileZoomWin(IpAppName As String, IpKeyName As String, ByRef bOutline As Boolean, ByRef Col As EgtUILib.EgtInterface.Color3d) As Boolean
|
||||
Return EgtUILib.GetPrivateProfileZoomWin(IpAppName, IpKeyName, bOutline, Col, m_sIniFile)
|
||||
End Function
|
||||
|
||||
Public Function GetPrivateProfileFloatingWinPos(lpAppName As String, lpKeyName As String, ByRef nState As String, ByRef nIndex As Integer, ByRef nLeft As Integer, ByRef nTop As Integer) As Boolean
|
||||
Dim sVal As String = String.Empty
|
||||
GetPrivateProfileString(lpAppName, lpKeyName, "", sVal)
|
||||
Dim sItems() As String = sVal.Split(",".ToCharArray)
|
||||
If sItems.Count() >= 4 Then
|
||||
nState = sItems(0)
|
||||
nIndex = CInt(sItems(1))
|
||||
nLeft = CInt(sItems(2))
|
||||
nTop = CInt(sItems(3))
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
'Public Function GetPrivateProfileLanguage(
|
||||
' ByVal lpAppName As String,
|
||||
' ByVal lpKeyName As String) As Language
|
||||
|
||||
' Dim sVal As String = String.Empty
|
||||
' GetPrivateProfileString(lpAppName, lpKeyName, "", sVal)
|
||||
' Dim sItems() As String = sVal.Split(",".ToCharArray)
|
||||
' If sItems.Count() = 2 Then
|
||||
' Return New Language(sItems(0), sItems(1))
|
||||
' End If
|
||||
' Return Nothing
|
||||
|
||||
'End Function
|
||||
|
||||
Public Function WritePrivateProfileString(IpAppName As String, IpKeyName As String, ByRef IpString As String) As Boolean
|
||||
Return EgtUILib.WritePrivateProfileString(IpAppName, IpKeyName, IpString, m_sIniFile)
|
||||
End Function
|
||||
|
||||
Public Function WritePrivateProfileWinPos(IpAppName As String, IpKeyName As String, ByRef nFlag As Integer, ByRef nLeft As Integer, ByRef nTop As Integer, ByRef nWidth As Integer, ByRef nHeight As Integer) As Boolean
|
||||
Return EgtUILib.WritePrivateProfileWinPos(IpAppName, IpKeyName, nFlag, nLeft, nTop, nWidth, nHeight, m_sIniFile)
|
||||
End Function
|
||||
|
||||
End Module
|
||||
@@ -0,0 +1,212 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:OmagOFFICE="clr-namespace:OmagOFFICE"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
||||
|
||||
<!--
|
||||
Assign a Key to every Panel ViewModel to use
|
||||
it in xaml file(ProjectView.xaml).
|
||||
-->
|
||||
<OmagOFFICE:MainWindowVM x:Key="MainWindowVM"/>
|
||||
<OmagOFFICE:TopCommandBarVM x:Key="TopCommandBarVM"/>
|
||||
<OmagOFFICE:StatusBarVM x:Key="StatusBarVM"/>
|
||||
<OmagOFFICE:ProjectVM x:Key="ProjectVM"/>
|
||||
<OmagOFFICE:SceneHostVM x:Key="SceneHostVM"/>
|
||||
<OmagOFFICE:ShowPanelVM x:Key="ShowPanelVM"/>
|
||||
<OmagOFFICE:ViewPanelVM x:Key="ViewPanelVM"/>
|
||||
<OmagOFFICE:InstrumentPanelVM x:Key="InstrumentPanelVM"/>
|
||||
<OmagOFFICE:DrawPanelVM x:Key="DrawPanelVM"/>
|
||||
<OmagOFFICE:MachinePanelVM x:Key="MachinePanelVM"/>
|
||||
<OmagOFFICE:OptionPanelVM x:Key="OptionPanelVM"/>
|
||||
<OmagOFFICE:RawPartTabVM x:Key="RawPartTabVM"/>
|
||||
<OmagOFFICE:NestingTabVM x:Key="NestingTabVM"/>
|
||||
<OmagOFFICE:MachiningTabVM x:Key="MachiningTabVM"/>
|
||||
<OmagOFFICE:MachGroupPanelVM x:Key="MachGroupPanelVM"/>
|
||||
|
||||
<!--Colori predefiniti-->
|
||||
<SolidColorBrush x:Key="Omag_Blue" Color="#FF095CA8" />
|
||||
<SolidColorBrush x:Key="Omag_Yellow" Color="#FFFFCE5B" />
|
||||
<SolidColorBrush x:Key="Omag_Red" Color="Red" />
|
||||
<SolidColorBrush x:Key="Omag_Green" Color="LawnGreen" />
|
||||
<SolidColorBrush x:Key="Omag_VeryLightGray" Color="#FFF2F2F2" />
|
||||
<SolidColorBrush x:Key="Omag_LightGray" Color="LightGray" />
|
||||
<SolidColorBrush x:Key="Omag_Gray" Color="#FF9E9E9E" />
|
||||
<SolidColorBrush x:Key="Omag_DarkGray" Color="#FF444444" />
|
||||
<SolidColorBrush x:Key="Omag_White" Color="#FFFFFFFF" />
|
||||
|
||||
<!-- FocusVisual standard-->
|
||||
<Style x:Key="FocusVisual">
|
||||
<Setter Property="Control.Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- Button Style -->
|
||||
|
||||
<SolidColorBrush x:Key="Button.Static.Background" Color="#FFDDDDDD"/>
|
||||
<SolidColorBrush x:Key="Button.Static.Border" Color="#FF707070"/>
|
||||
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FFBEE6FD"/>
|
||||
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="#FF3C7FB1"/>
|
||||
<SolidColorBrush x:Key="Button.Pressed.Background" Color="#FFC4E5F6"/>
|
||||
<SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/>
|
||||
<Style TargetType="{x:Type Button}">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
||||
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Padding" Value="1"/>
|
||||
<Setter Property="Margin" Value="1"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="border" CornerRadius="3" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
|
||||
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsDefaulted" Value="true">
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
|
||||
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
|
||||
<Setter Property="OpacityMask" Value="#54707070"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ToolBar_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="30"/>
|
||||
</Style>
|
||||
<Style x:Key="ToolBar_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- ToggleButton Style -->
|
||||
|
||||
<Style TargetType="{x:Type ToggleButton}">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
||||
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Padding" Value="1"/>
|
||||
<Setter Property="Margin" Value="1"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<Border x:Name="border" CornerRadius="3" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
|
||||
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Button.IsDefaulted" Value="true">
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="true">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
|
||||
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
|
||||
<Setter Property="OpacityMask" Value="#54707070"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ToolBar_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="30"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<SolidColorBrush x:Key="ScrollBar.Static.Background" Color="#F0F0F0"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Static.Border" Color="#F0F0F0"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Pressed.Glyph" Color="#FFFFFF"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.MouseOver.Glyph" Color="#000000"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Disabled.Glyph" Color="#BFBFBF"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Static.Glyph" Color="#606060"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.MouseOver.Background" Color="#DADADA"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.MouseOver.Border" Color="#DADADA"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Pressed.Background" Color="#606060"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Pressed.Border" Color="#606060"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Disabled.Background" Color="#F0F0F0"/>
|
||||
<SolidColorBrush x:Key="ScrollBar.Disabled.Border" Color="#F0F0F0"/>
|
||||
<Style x:Key="CustomScrollBarButton" TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Padding" Value="1"/>
|
||||
<Setter Property="Focusable" Value="false"/>
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<Border x:Name="border" CornerRadius="3" BorderBrush="{StaticResource ScrollBar.Static.Border}" BorderThickness="1" Background="{StaticResource ScrollBar.Static.Background}" SnapsToDevicePixels="true">
|
||||
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource ScrollBar.MouseOver.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource ScrollBar.MouseOver.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource ScrollBar.Pressed.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource ScrollBar.Pressed.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Opacity" TargetName="contentPresenter" Value="0.56"/>
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource ScrollBar.Disabled.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource ScrollBar.Disabled.Border}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,151 @@
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Module OmagOFFICEMap
|
||||
|
||||
#Region "Program ViewModel Map"
|
||||
|
||||
Private m_refMainWindowVM As MainWindowVM
|
||||
Private m_refStatusBarVM As StatusBarVM
|
||||
Private m_refTopCommandBarVM As TopCommandBarVM
|
||||
Private m_refProjectVM As ProjectVM
|
||||
Private m_refSceneHostV As SceneHostV
|
||||
Private m_refSceneHostVM As SceneHostVM
|
||||
Private m_refMachinePanelVM As MachinePanelVM
|
||||
Private m_refMachGroupPanelVM As MachGroupPanelVM
|
||||
Private m_refOptionPanelVM As OptionPanelVM
|
||||
Private m_refRawPartTabVM As RawPartTabVM
|
||||
Private m_refNestingTabVM As NestingTabVM
|
||||
Private m_refMachiningTabVM As MachiningTabVM
|
||||
|
||||
#Region "Get"
|
||||
|
||||
Public ReadOnly Property refMainWindowVM As MainWindowVM
|
||||
Get
|
||||
Return m_refMainWindowVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refStatusBarVM As StatusBarVM
|
||||
Get
|
||||
Return m_refStatusBarVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refTopCommandBarVM As TopCommandBarVM
|
||||
Get
|
||||
Return m_refTopCommandBarVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refProjectVM As ProjectVM
|
||||
Get
|
||||
Return m_refProjectVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refSceneHostV As SceneHostV
|
||||
Get
|
||||
Return m_refSceneHostV
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refSceneHostVM As SceneHostVM
|
||||
Get
|
||||
Return m_refSceneHostVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refMachinePanelVM As MachinePanelVM
|
||||
Get
|
||||
Return m_refMachinePanelVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refMachGroupPanelVM As MachGroupPanelVM
|
||||
Get
|
||||
Return m_refMachGroupPanelVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refOptionPanelVM As OptionPanelVM
|
||||
Get
|
||||
Return m_refOptionPanelVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refRawPartTabVM As RawPartTabVM
|
||||
Get
|
||||
Return m_refRawPartTabVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refNestingTabVM As NestingTabVM
|
||||
Get
|
||||
Return m_refNestingTabVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refMachiningTabVM As MachiningTabVM
|
||||
Get
|
||||
Return m_refMachiningTabVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Get
|
||||
|
||||
#Region "Set"
|
||||
|
||||
Friend Function SetRefStatusBarVM(StatusBarVM As StatusBarVM) As Boolean
|
||||
m_refStatusBarVM = StatusBarVM
|
||||
Return Not IsNothing(m_refStatusBarVM)
|
||||
End Function
|
||||
Friend Function SetRefTopCommandBarVM(TopCommandBarVM As TopCommandBarVM) As Boolean
|
||||
m_refTopCommandBarVM = TopCommandBarVM
|
||||
Return Not IsNothing(m_refTopCommandBarVM)
|
||||
End Function
|
||||
Friend Function SetRefProjectVM(ProjectVM As ProjectVM) As Boolean
|
||||
m_refProjectVM = ProjectVM
|
||||
Return Not IsNothing(m_refProjectVM)
|
||||
End Function
|
||||
Friend Function SetRefSceneHostV(SceneHostV As SceneHostV) As Boolean
|
||||
m_refSceneHostV = SceneHostV
|
||||
Return Not IsNothing(m_refSceneHostV)
|
||||
End Function
|
||||
Friend Function SetRefSceneHostVM(SceneHostVM As SceneHostVM) As Boolean
|
||||
m_refSceneHostVM = SceneHostVM
|
||||
Return Not IsNothing(m_refSceneHostVM)
|
||||
End Function
|
||||
Friend Function SetRefMachinePanelVM(MachinePanelVM As MachinePanelVM) As Boolean
|
||||
m_refMachinePanelVM = MachinePanelVM
|
||||
Return Not IsNothing(m_refMachinePanelVM)
|
||||
End Function
|
||||
Friend Function SetRefMachGroupPanelVM(MachGroupPanelVM As MachGroupPanelVM) As Boolean
|
||||
m_refMachGroupPanelVM = MachGroupPanelVM
|
||||
Return Not IsNothing(m_refMachGroupPanelVM)
|
||||
End Function
|
||||
Friend Function SetRefOptionPanelVM(OptionPanelVM As OptionPanelVM) As Boolean
|
||||
m_refOptionPanelVM = OptionPanelVM
|
||||
Return Not IsNothing(m_refOptionPanelVM)
|
||||
End Function
|
||||
Friend Function SetRefRawPartTabVM(RawPartTabVM As RawPartTabVM) As Boolean
|
||||
m_refRawPartTabVM = RawPartTabVM
|
||||
Return Not IsNothing(m_refRawPartTabVM)
|
||||
End Function
|
||||
Friend Function SetRefNestingTabVM(NestingTabVM As NestingTabVM) As Boolean
|
||||
m_refNestingTabVM = NestingTabVM
|
||||
Return Not IsNothing(m_refNestingTabVM)
|
||||
End Function
|
||||
Friend Function SetRefMachiningTabVM(MachiningTabVM As MachiningTabVM) As Boolean
|
||||
m_refMachiningTabVM = MachiningTabVM
|
||||
Return Not IsNothing(m_refMachiningTabVM)
|
||||
End Function
|
||||
|
||||
#End Region ' Set
|
||||
|
||||
#Region "Init"
|
||||
|
||||
Friend Function BeginInit(MainWindowVM As MainWindowVM) As Boolean
|
||||
m_refMainWindowVM = MainWindowVM
|
||||
Return Not IsNothing(m_refMainWindowVM)
|
||||
End Function
|
||||
Friend Function EndInit() As Boolean
|
||||
' Verifico se tutti i pezzi necessari sono stati caricati
|
||||
Return Not IsNothing(m_refMainWindowVM) AndAlso Not IsNothing(m_refProjectVM) AndAlso Not IsNothing(m_refStatusBarVM) AndAlso Not IsNothing(m_refTopCommandBarVM) AndAlso
|
||||
Not IsNothing(m_refSceneHostV) AndAlso Not IsNothing(m_refSceneHostVM) AndAlso Not IsNothing(m_refMachinePanelVM) AndAlso Not IsNothing(m_refMachGroupPanelVM) AndAlso
|
||||
Not IsNothing(m_refOptionPanelVM) AndAlso Not IsNothing(m_refRawPartTabVM) AndAlso Not IsNothing(m_refNestingTabVM) AndAlso Not IsNothing(m_refMachiningTabVM)
|
||||
End Function
|
||||
|
||||
#End Region ' Init
|
||||
|
||||
#End Region ' Program ViewModel Map
|
||||
|
||||
End Module
|
||||
@@ -0,0 +1,12 @@
|
||||
Imports System.ComponentModel
|
||||
|
||||
Public Class VMBase
|
||||
Implements INotifyPropertyChanged
|
||||
|
||||
Public Event PropertyChanged(sender As Object, e As PropertyChangedEventArgs) Implements INotifyPropertyChanged.PropertyChanged
|
||||
|
||||
Public Sub NotifyPropertyChanged(propName As String)
|
||||
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,45 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="ViewPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
IsTopDockable="True" IsBottomDockable="False" IsLeftDockable="False"
|
||||
IsRightDockable="False" IsFloating="False"
|
||||
Background="{StaticResource Omag_Gray}" BorderBrush="{StaticResource Omag_Gray}">
|
||||
|
||||
<Button ToolTip="{Binding ZoomAllToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}"
|
||||
Command="{Binding ZoomAllCommand}">
|
||||
<Image Source="/Resources/ViewPanel/ZoomAll.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding LookFromTopToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}"
|
||||
Command="{Binding TopViewCommand}">
|
||||
<Image Source="/Resources/ViewPanel/LookFromTOP.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding LookFromFrontToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}"
|
||||
Command="{Binding FrontViewCommand}">
|
||||
<Image Source="/Resources/ViewPanel/LookFromFRONT.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding LookFromRightToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}"
|
||||
Command="{Binding RightViewCommand}">
|
||||
<Image Source="/Resources/ViewPanel/LookFromRIGHT.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding LookFromBackToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}"
|
||||
Command="{Binding BackViewCommand}">
|
||||
<Image Source="/Resources/ViewPanel/LookFromBACK.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding LookFromLeftToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}"
|
||||
Command="{Binding LeftViewCommand}">
|
||||
<Image Source="/Resources/ViewPanel/LookFromLEFT.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding LookFromIso_SWToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}"
|
||||
Command="{Binding IsoViewSWCommand}">
|
||||
<Image Source="/Resources/ViewPanel/LookFromISO_SW.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class GridViewPanelV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,231 @@
|
||||
Imports EgtUILib
|
||||
|
||||
|
||||
Public Class ViewPanelVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdZoomAll As ICommand
|
||||
Private m_cmdTopView As ICommand
|
||||
Private m_cmdFrontView As ICommand
|
||||
Private m_cmdLeftView As ICommand
|
||||
Private m_cmdBackView As ICommand
|
||||
Private m_cmdRightView As ICommand
|
||||
Private m_cmdIsoViewSW As ICommand
|
||||
|
||||
#Region "ToolTip"
|
||||
|
||||
Public ReadOnly Property ZoomAllToolTip As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_GRIDVIEWPANEL + 4)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property LookFromTopToolTip As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_GRIDVIEWPANEL + 7)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property LookFromFrontToolTip As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_GRIDVIEWPANEL + 8)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property LookFromLeftToolTip As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_GRIDVIEWPANEL + 9)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property LookFromBackToolTip As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_GRIDVIEWPANEL + 10)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property LookFromRightToolTip As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_GRIDVIEWPANEL + 11)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property LookFromIso_SWToolTip As String
|
||||
Get
|
||||
'Return EgtMsg(MSG_GRIDVIEWPANEL + 12)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' ToolTip
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "ZoomAllCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do ZoomAll.
|
||||
''' </summary>
|
||||
Public ReadOnly Property ZoomAllCommand As ICommand
|
||||
Get
|
||||
If m_cmdZoomAll Is Nothing Then
|
||||
m_cmdZoomAll = New Command(AddressOf ZoomAll)
|
||||
End If
|
||||
Return m_cmdZoomAll
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the ZoomAll. This method is invoked by the ZoomAllCommand.
|
||||
''' </summary>
|
||||
Public Sub ZoomAll(ByVal param As Object)
|
||||
OmagOFFICEMap.refSceneHostV.ZoomMode(ZM.ALL)
|
||||
End Sub
|
||||
|
||||
#End Region ' ZoomAllCommand
|
||||
|
||||
#Region "TopViewCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do TopView.
|
||||
''' </summary>
|
||||
Public ReadOnly Property TopViewCommand As ICommand
|
||||
Get
|
||||
If m_cmdTopView Is Nothing Then
|
||||
m_cmdTopView = New Command(AddressOf TopView)
|
||||
End If
|
||||
Return m_cmdTopView
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the TopView. This method is invoked by the TopViewCommand.
|
||||
''' </summary>
|
||||
Public Sub TopView(ByVal param As Object)
|
||||
OmagOFFICEMap.refSceneHostV.ViewMode(VT.TOP)
|
||||
End Sub
|
||||
|
||||
#End Region ' TopViewCommand
|
||||
|
||||
#Region "FrontViewCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do FrontView.
|
||||
''' </summary>
|
||||
Public ReadOnly Property FrontViewCommand As ICommand
|
||||
Get
|
||||
If m_cmdFrontView Is Nothing Then
|
||||
m_cmdFrontView = New Command(AddressOf FrontView)
|
||||
End If
|
||||
Return m_cmdFrontView
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the FrontView. This method is invoked by the FrontViewCommand.
|
||||
''' </summary>
|
||||
Public Sub FrontView(ByVal param As Object)
|
||||
OmagOFFICEMap.refSceneHostV.ViewMode(VT.FRONT)
|
||||
End Sub
|
||||
|
||||
#End Region ' FrontViewCommand
|
||||
|
||||
#Region "LeftViewCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do LeftView.
|
||||
''' </summary>
|
||||
Public ReadOnly Property LeftViewCommand As ICommand
|
||||
Get
|
||||
If m_cmdLeftView Is Nothing Then
|
||||
m_cmdLeftView = New Command(AddressOf LeftView)
|
||||
End If
|
||||
Return m_cmdLeftView
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the LeftView. This method is invoked by the LeftViewCommand.
|
||||
''' </summary>
|
||||
Public Sub LeftView(ByVal param As Object)
|
||||
OmagOFFICEMap.refSceneHostV.ViewMode(VT.LEFT)
|
||||
End Sub
|
||||
|
||||
#End Region ' LeftViewCommand
|
||||
|
||||
#Region "BackViewCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do BackView.
|
||||
''' </summary>
|
||||
Public ReadOnly Property BackViewCommand As ICommand
|
||||
Get
|
||||
If m_cmdBackView Is Nothing Then
|
||||
m_cmdBackView = New Command(AddressOf BackView)
|
||||
End If
|
||||
Return m_cmdBackView
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the BackView. This method is invoked by the BackViewCommand.
|
||||
''' </summary>
|
||||
Public Sub BackView(ByVal param As Object)
|
||||
OmagOFFICEMap.refSceneHostV.ViewMode(VT.BACK)
|
||||
End Sub
|
||||
|
||||
#End Region ' BackViewCommand
|
||||
|
||||
#Region "RightViewCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do RightView.
|
||||
''' </summary>
|
||||
Public ReadOnly Property RightViewCommand As ICommand
|
||||
Get
|
||||
If m_cmdRightView Is Nothing Then
|
||||
m_cmdRightView = New Command(AddressOf RightView)
|
||||
End If
|
||||
Return m_cmdRightView
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the RightView. This method is invoked by the RightViewCommand.
|
||||
''' </summary>
|
||||
Public Sub RightView(ByVal param As Object)
|
||||
OmagOFFICEMap.refSceneHostV.ViewMode(VT.RIGHT)
|
||||
End Sub
|
||||
|
||||
#End Region ' RightViewCommand
|
||||
|
||||
#Region "IsoViewSWCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do IsoViewSW.
|
||||
''' </summary>
|
||||
Public ReadOnly Property IsoViewSWCommand As ICommand
|
||||
Get
|
||||
If m_cmdIsoViewSW Is Nothing Then
|
||||
m_cmdIsoViewSW = New Command(AddressOf IsoViewSW)
|
||||
End If
|
||||
Return m_cmdIsoViewSW
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the IsoViewSW. This method is invoked by the IsoViewSWCommand.
|
||||
''' </summary>
|
||||
Public Sub IsoViewSW(ByVal param As Object)
|
||||
OmagOFFICEMap.refSceneHostV.ViewMode(VT.ISO_SW)
|
||||
End Sub
|
||||
|
||||
#End Region ' IsoViewSWCommand
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
|
||||