Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a2a611ff9e | |||
| 46ee89fbde | |||
| c5e20a4855 | |||
| 9bb0299cfa | |||
| 761490510b | |||
| 9acbbab49e | |||
| d3e9474417 | |||
| ff30e35665 | |||
| c36390f183 |
@@ -0,0 +1,31 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.8.34309.116
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EgtWindowMaker", "EgtWindowMaker\EgtWindowMaker.vbproj", "{DBEEAB57-E513-456C-8D10-56411B6AB67D}"
|
||||||
|
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
|
||||||
|
{DBEEAB57-E513-456C-8D10-56411B6AB67D}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{DBEEAB57-E513-456C-8D10-56411B6AB67D}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{DBEEAB57-E513-456C-8D10-56411B6AB67D}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{DBEEAB57-E513-456C-8D10-56411B6AB67D}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{DBEEAB57-E513-456C-8D10-56411B6AB67D}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{DBEEAB57-E513-456C-8D10-56411B6AB67D}.Release|x64.Build.0 = Release|x64
|
||||||
|
{DBEEAB57-E513-456C-8D10-56411B6AB67D}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{DBEEAB57-E513-456C-8D10-56411B6AB67D}.Release|x86.Build.0 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {15CFDCEA-4D67-44B0-BF5C-AE78E3C4A032}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||||
|
</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/Dictionary.xaml"/>
|
||||||
|
</Application.Resources>
|
||||||
|
|
||||||
|
</Application>
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
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
|
||||||
|
'If e.Args.Count = 0 Then
|
||||||
|
' ' creo finestra SplashScreen
|
||||||
|
' Dim SplashScreen As New SplashScreen
|
||||||
|
' Me.MainWindow = SplashScreen
|
||||||
|
' Me.MainWindow.Show()
|
||||||
|
' Map.SetRefSplashScreen(SplashScreen)
|
||||||
|
'End If
|
||||||
|
|
||||||
|
' Creo la View principale
|
||||||
|
Me.MainWindow = New MainWindowV
|
||||||
|
' Mostro la View principale
|
||||||
|
Me.MainWindow.Show()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
<UserControl x:Class="CRMPageV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="clr-namespace:EgtWindowMaker"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<UserControl.Resources>
|
||||||
|
<sys:Int32 x:Key="NewCustomer">0</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="CustomerList">1</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="NewEstimation">2</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="EstimationList">3</sys:Int32>
|
||||||
|
</UserControl.Resources>
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<Button Content="Nuovo Cliente"
|
||||||
|
Command="{Binding Page_Command}"
|
||||||
|
CommandParameter="{StaticResource NewCustomer}"
|
||||||
|
Style="{StaticResource Button.CRMPage}"/>
|
||||||
|
<Button Content="Lista Clienti"
|
||||||
|
Command="{Binding Page_Command}"
|
||||||
|
CommandParameter="{StaticResource CustomerList}"
|
||||||
|
Style="{StaticResource Button.CRMPage}"/>
|
||||||
|
<Button Content="Nuova offerta"
|
||||||
|
Command="{Binding Page_Command}"
|
||||||
|
CommandParameter="{StaticResource NewEstimation}"
|
||||||
|
Style="{StaticResource Button.CRMPage}"/>
|
||||||
|
<Button Content="Lista offerte"
|
||||||
|
Command="{Binding Page_Command}"
|
||||||
|
CommandParameter="{StaticResource EstimationList}"
|
||||||
|
Style="{StaticResource Button.CRMPage}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<TabControl Grid.Row="1"
|
||||||
|
SelectedIndex="{Binding SelCRMPage}"
|
||||||
|
TabStripPlacement="Right"
|
||||||
|
Style="{StaticResource TabControl.NoHeader}">
|
||||||
|
<TabItem Header="Nuovo cliente">
|
||||||
|
<!--<local:NewEstimationPageV DataContext="{StaticResource NewEstimationPageVM}"/>-->
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Lista Clienti">
|
||||||
|
<!--<local:NewEstimationPageV DataContext="{StaticResource NewEstimationPageVM}"/>-->
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Dettagli offerta">
|
||||||
|
<local:EstimationDetailPageV/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Lista offerte">
|
||||||
|
<local:EstimationListPageV/>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Public Class CRMPageV
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
Imports System.IO
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
Imports Newtonsoft.Json
|
||||||
|
|
||||||
|
Public Class CRMPageVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Private m_SelPage As CRMPages
|
||||||
|
Public Property SelCRMPage As Integer
|
||||||
|
Get
|
||||||
|
Return m_SelPage
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
SetSelPage(value)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Friend Sub SetSelPage(Page As CRMPages)
|
||||||
|
Dim bOk As Boolean = True
|
||||||
|
' Esco dallo stato corrente
|
||||||
|
Select Case m_SelPage
|
||||||
|
Case CRMPages.NEWCUSTOMER
|
||||||
|
'bOk = ExitHOME()
|
||||||
|
Case CRMPages.CUSTOMERLIST
|
||||||
|
'bOk = ExitESTIMATING()
|
||||||
|
Case CRMPages.ESTIMATIONDETAIL
|
||||||
|
' bOk = ExitPRODUCING()
|
||||||
|
Case CRMPages.ESTIMATIONLIST
|
||||||
|
'bOk = ExitDESIGNING()
|
||||||
|
End Select
|
||||||
|
If bOk Then
|
||||||
|
' Entro nel nuovo stato
|
||||||
|
m_SelPage = Page
|
||||||
|
Select Case m_SelPage
|
||||||
|
Case CRMPages.NEWCUSTOMER
|
||||||
|
'bOk = InitHOME()
|
||||||
|
Case CRMPages.CUSTOMERLIST
|
||||||
|
'bOk = InitESTIMATING()
|
||||||
|
Case CRMPages.ESTIMATIONDETAIL
|
||||||
|
'bOk = InitPRODUCING()
|
||||||
|
bOk = Map.refEstimationDetailPageVM.InitEstimationDetailPage()
|
||||||
|
Case CRMPages.ESTIMATIONLIST
|
||||||
|
bOk = Map.refEstimationListPageVM.InitEstimationListPage()
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
NotifyPropertyChanged(NameOf(SelCRMPage))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdPage As ICommand
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
Map.SetRefCRMPageVM(Me)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Function InitCRMPage() As Boolean
|
||||||
|
'leggo lista stime da file
|
||||||
|
Map.refEstimationListPageVM.ReadEstimationList()
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "Page"
|
||||||
|
|
||||||
|
Public ReadOnly Property Page_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdPage Is Nothing Then
|
||||||
|
m_cmdPage = New Command(AddressOf Page)
|
||||||
|
End If
|
||||||
|
Return m_cmdPage
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Page(nPage As Integer)
|
||||||
|
Select Case nPage
|
||||||
|
Case CRMPages.NEWCUSTOMER
|
||||||
|
Case CRMPages.CUSTOMERLIST
|
||||||
|
Case CRMPages.ESTIMATIONDETAIL
|
||||||
|
' se entro direttamente nei dettagli, creo nuovo progetto
|
||||||
|
Map.refEstimationListPageVM.NewEstimation()
|
||||||
|
Case CRMPages.ESTIMATIONLIST
|
||||||
|
End Select
|
||||||
|
SetSelPage(nPage)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Page
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
'----------------------------------------------------------------------------
|
||||||
|
' EgalTech 2015-2017
|
||||||
|
'----------------------------------------------------------------------------
|
||||||
|
' File : ConstGen.vb Data : 10.04.17 Versione : 1.8d1
|
||||||
|
' Contenuto : Modulo costanti generali.
|
||||||
|
'
|
||||||
|
'
|
||||||
|
'
|
||||||
|
' Modifiche : 10.04.17 DS Creazione modulo.
|
||||||
|
'
|
||||||
|
'
|
||||||
|
'----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Public 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 = "EgtWindowMaker.lic"
|
||||||
|
Public Const S_LICENCE As String = "Licence"
|
||||||
|
Public Const K_LOCKID As String = "LockId"
|
||||||
|
Public Const K_KEY As String = "Key"
|
||||||
|
Public Const K_NESTKEY As String = "NestKey"
|
||||||
|
|
||||||
|
' Pagine del programma
|
||||||
|
Public Enum Pages As Integer
|
||||||
|
HOME = 0
|
||||||
|
ESTIMATING = 1
|
||||||
|
PRODUCING = 2
|
||||||
|
DESIGNING = 3
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum CRMPages
|
||||||
|
NEWCUSTOMER = 0
|
||||||
|
CUSTOMERLIST = 1
|
||||||
|
ESTIMATIONDETAIL = 2
|
||||||
|
ESTIMATIONLIST = 3
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
' Abilitazioni licenza
|
||||||
|
Friend Enum KEY_OPT As UInteger
|
||||||
|
BASE = 1 ' Prodotto EgtWindowMaker
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
' File di log generale
|
||||||
|
Public Const GENLOG_FILE_NAME As String = "EgtWindowMaker#.txt"
|
||||||
|
|
||||||
|
' Sottodirettorio di configurazione
|
||||||
|
Public Const CONF_DIR As String = "Config"
|
||||||
|
' Sottodirettorio dei lua
|
||||||
|
Public Const WINDOW_DIR As String = "Window"
|
||||||
|
' Sottodirettorio dei lua
|
||||||
|
Public Const DESIGNING_DIR As String = "Designing"
|
||||||
|
' Sottodirettorio dei lua
|
||||||
|
Public Const CAMAUTO_DIR As String = "CAMAuto"
|
||||||
|
' Sottodirettorio dei profili
|
||||||
|
Public Const PROFILES_DIR As String = "Profiles"
|
||||||
|
' Sottodirettorio dei template
|
||||||
|
Public Const TEMPLATE_DIR As String = "Template"
|
||||||
|
' Sottodirettorio dei offerte
|
||||||
|
Public Const ESTIMATIONS_DIR As String = "Estimations"
|
||||||
|
' Sottodirettorio delle risorse
|
||||||
|
Public Const RES_DIR As String = "Resources"
|
||||||
|
' Sottodirettorio temporaneo
|
||||||
|
Public Const TEMP_DIR As String = "Temp"
|
||||||
|
' Sottodirettorio lavorazioni
|
||||||
|
Public Const MACHININGS_DIR As String = "Machinings"
|
||||||
|
' Sottodirettorio materiali
|
||||||
|
Public Const MATERIALS_DIR As String = "Materials"
|
||||||
|
' Sottodirettorio di default per le macchine
|
||||||
|
Public Const MACHINES_DFL_DIR As String = "Machines"
|
||||||
|
|
||||||
|
End Module
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
'----------------------------------------------------------------------------
|
||||||
|
' 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.
|
||||||
|
'
|
||||||
|
'
|
||||||
|
'----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Public Module ConstIni
|
||||||
|
|
||||||
|
Public Const INI_FILE_NAME As String = "EgtWindowMaker.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_USERLEVEL As String = "UserLevel"
|
||||||
|
'Public Const K_MAXINST As String = "MaxInstances"
|
||||||
|
'Public Const K_INSTANCES As String = "Instances"
|
||||||
|
'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_LASTPROJ As String = "LastProj"
|
||||||
|
Public Const K_NETKEY As String = "NetKey"
|
||||||
|
Public Const K_LASTNGEDIR As String = "LastNgeDir"
|
||||||
|
Public Const K_LASTIMPDIR As String = "LastImpDir"
|
||||||
|
Public Const K_MACHINEEXPORT As String = "MachineExport"
|
||||||
|
'Public Const K_SUPPORT As String = "Support"
|
||||||
|
|
||||||
|
'Public Const S_LANGUAGES As String = "Languages"
|
||||||
|
'Public Const K_LANGUAGE As String = "Language"
|
||||||
|
|
||||||
|
Public Const S_VIEWLAYER As String = "ViewLayer"
|
||||||
|
Public Const K_MOD_PRINTSOLID As String = "ModPrintSolid"
|
||||||
|
Public Const K_MOD_REFERENCE As String = "ModReference"
|
||||||
|
Public Const K_MOD_STARTMACHINING As String = "ModStartMAchining"
|
||||||
|
Public Const K_MOD_RIBS As String = "ModRibs"
|
||||||
|
Public Const K_MOD_SHELLNUMBER As String = "ModShellNumber"
|
||||||
|
Public Const K_MOD_AUXSOLIDS As String = "ModAuxSolids"
|
||||||
|
Public Const K_MOD_SOLIDSLICE As String = "ModSolidSlice"
|
||||||
|
Public Const K_MOD_SLICETOOLPATH As String = "ModSliceToolPath"
|
||||||
|
Public Const K_MOD_OTHERS As String = "ModOthers"
|
||||||
|
Public Const K_SLC_PRINTSOLID As String = "SlcPrintSolid"
|
||||||
|
Public Const K_SLC_REFERENCE As String = "SlcReference"
|
||||||
|
Public Const K_SLC_STARTMACHINING As String = "SlcStartMAchining"
|
||||||
|
Public Const K_SLC_RIBS As String = "SlcRibs"
|
||||||
|
Public Const K_SLC_SHELLNUMBER As String = "SlcShellNumber"
|
||||||
|
Public Const K_SLC_AUXSOLIDS As String = "SlcAuxSolids"
|
||||||
|
Public Const K_SLC_SOLIDSLICE As String = "SlcSolidSlice"
|
||||||
|
Public Const K_SLC_SLICETOOLPATH As String = "SlcSliceToolPath"
|
||||||
|
Public Const K_SLC_OTHERS As String = "SlcOthers"
|
||||||
|
|
||||||
|
'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 K_SURFTMTOLER As String = "SurfTmToler"
|
||||||
|
|
||||||
|
'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_LINEWIDTH As String = "LineWidth"
|
||||||
|
'Public Const K_TEXMAXLINPIX As String = "TextureMaxLinPixels"
|
||||||
|
'Public Const K_ZOOMWIN As String = "ZoomWin"
|
||||||
|
'Public Const K_DISTLINE As String = "DistLine"
|
||||||
|
'Public Const K_MMUNITS As String = "MmUnits"
|
||||||
|
Public Const K_CUSTOMCOLORS As String = "CustomColors"
|
||||||
|
|
||||||
|
'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_IMPORT As String = "Import"
|
||||||
|
Public Const K_DXFSCALE As String = "DxfScale"
|
||||||
|
Public Const K_STLSCALE As String = "StlScale"
|
||||||
|
Public Const K_CNCFLAG As String = "CncFlag"
|
||||||
|
|
||||||
|
'Public Const S_SIMUL As String = "Simul"
|
||||||
|
'Public Const K_SLIDERX As String = "SliderX"
|
||||||
|
'Public Const K_SLIDERVAL As String = "SliderVal"
|
||||||
|
Public Const K_MACHVIEWMODE As String = "MachViewMode"
|
||||||
|
|
||||||
|
Public Const S_PRINTING3D As String = "3dPrinting"
|
||||||
|
Public Const K_3PRNBASEDIR As String = "BaseDir"
|
||||||
|
Public Const K_CURRMATERIAL As String = "CurrMaterial"
|
||||||
|
Public Const K_CURRMACHINING As String = "CurrMachining"
|
||||||
|
Public Const K_VIEWSLIDER As String = "ViewSlider"
|
||||||
|
Public Const K_IMPORTCURREXTENSION As String = "ImportCurrExtension"
|
||||||
|
|
||||||
|
Public Const S_COLORS As String = "Colors"
|
||||||
|
Public Const K_CLR_PRINTPART As String = "PrintPart"
|
||||||
|
Public Const K_CLR_RIBS As String = "Ribs"
|
||||||
|
Public Const K_CLR_SHELLNUMBERS As String = "ShellNumbers"
|
||||||
|
Public Const K_CLR_AUXSOLIDS As String = "AuxSolids"
|
||||||
|
Public Const K_CLR_MACHSTART As String = "MachStart"
|
||||||
|
Public Const K_CLR_OTHERS As String = "Others"
|
||||||
|
|
||||||
|
Public Const S_WINDOW As String = "Window"
|
||||||
|
Public Const K_BASEDIR As String = "BaseDir"
|
||||||
|
Public Const K_PROFILEDIR As String = "ProfileDir"
|
||||||
|
Public Const K_TEMPLATEDIR As String = "TemplateDir"
|
||||||
|
Public Const K_ESTIMATIONDIR As String = "EstimationDir"
|
||||||
|
|
||||||
|
Public Const S_MRUFILES As String = "MruFiles"
|
||||||
|
Public Const S_MRUIMPORTFILES As String = "MruImportFiles"
|
||||||
|
|
||||||
|
End Module
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
'----------------------------------------------------------------------------
|
||||||
|
' 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.
|
||||||
|
'
|
||||||
|
'
|
||||||
|
'----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Public Module ConstMachDataIni
|
||||||
|
|
||||||
|
Public Const MACHDATA_INI_FILE_NAME As String = "Data.ini"
|
||||||
|
|
||||||
|
Public Const S_TABLE As String = "Table"
|
||||||
|
Public Const K_DIMX As String = "DimX"
|
||||||
|
Public Const K_DIMY As String = "DimY"
|
||||||
|
Public Const K_POSX As String = "PosX"
|
||||||
|
Public Const K_POSY As String = "PosY"
|
||||||
|
Public Const K_POSZ As String = "PosZ"
|
||||||
|
|
||||||
|
Public Const S_VERTICAL As String = "Vertical"
|
||||||
|
Public Const S_45DEGX As String = "45DegX"
|
||||||
|
Public Const S_45DEGY As String = "45DegY"
|
||||||
|
Public Const S_HORIZONTAL As String = "Horizontal"
|
||||||
|
Public Const K_MINX As String = "MinX"
|
||||||
|
Public Const K_MAXX As String = "MaxX"
|
||||||
|
Public Const K_MINY As String = "MinY"
|
||||||
|
Public Const K_MAXY As String = "MaxY"
|
||||||
|
|
||||||
|
|
||||||
|
End Module
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
Public Module ConstMachIni
|
||||||
|
|
||||||
|
Public Const MACH_INI_FILE_NAME As String = "MachData.ini"
|
||||||
|
|
||||||
|
Public Const S_MACHINING As String = "Machining"
|
||||||
|
Public Const K_MACH_INITSCRIPT As String = "InitScript"
|
||||||
|
Public Const K_MACH_EXITSCRIPT As String = "ExitScript"
|
||||||
|
|
||||||
|
Public Const S_MACH_PRINTING3D As String = "3dPrinting"
|
||||||
|
Public Const K_SLICINGTYPE As String = "SlicingType"
|
||||||
|
Public Const K_SPEED_MIN As String = "SpeedMin"
|
||||||
|
Public Const K_SPEED_MAX As String = "SpeedMax"
|
||||||
|
Public Const K_MAX_HEIGHT As String = "HMax"
|
||||||
|
|
||||||
|
Public Const S_MINMAX As String = "MinMax"
|
||||||
|
|
||||||
|
End Module
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
Public Module ConstMsg
|
||||||
|
|
||||||
|
Public Const MSG_SETUPERRORS As Integer = 5000 + 1470
|
||||||
|
|
||||||
|
Public Const MSG_MISSINGKEYWD As Integer = 10100
|
||||||
|
Public Const MSG_NUMERICKEYBOARDWD As Integer = 10200
|
||||||
|
Public Const MSG_MESSAGEBOX As Integer = 15000
|
||||||
|
Public Const MSG_EGTSAVEFILEDIALOG As Integer = 30000
|
||||||
|
|
||||||
|
Public Const MSG_OMAGCUT As Integer = 90000
|
||||||
|
Public Const MSG_GENERAL As Integer = MSG_OMAGCUT
|
||||||
|
Public Const MSG_WORKINPROGRESSPAGEUC As Integer = MSG_OMAGCUT + 100
|
||||||
|
Public Const MSG_DIRECTCUTPAGEUC As Integer = MSG_OMAGCUT + 200
|
||||||
|
Public Const MSG_MANUALAXESMOVEPAGEUC As Integer = MSG_OMAGCUT + 220
|
||||||
|
Public Const MSG_CADCUTPAGEUC As Integer = MSG_OMAGCUT + 300
|
||||||
|
Public Const MSG_NESTPAGEUC As Integer = MSG_OMAGCUT + 330
|
||||||
|
Public Const MSG_SPLITPAGEUC As Integer = MSG_OMAGCUT + 340
|
||||||
|
Public Const MSG_MOVERAWPAGEUC As Integer = MSG_OMAGCUT + 360
|
||||||
|
Public Const MSG_DRAWPAGEUC As Integer = MSG_OMAGCUT + 380
|
||||||
|
Public Const MSG_COMPONENTPAGEUC As Integer = MSG_OMAGCUT + 400
|
||||||
|
Public Const MSG_IMPORTPAGEUC As Integer = MSG_OMAGCUT + 450
|
||||||
|
Public Const MSG_OPENPAGEUC As Integer = MSG_OMAGCUT + 490
|
||||||
|
Public Const MSG_RAWPARTPAGEUC As Integer = MSG_OMAGCUT + 500
|
||||||
|
Public Const MSG_CHOOSEMACHININGPAGEUC As Integer = MSG_OMAGCUT + 535
|
||||||
|
Public Const MSG_SIMULATIONPAGEUC As Integer = MSG_OMAGCUT + 550
|
||||||
|
Public Const MSG_FRAMECUTPAGEUC As Integer = MSG_OMAGCUT + 600
|
||||||
|
Public Const MSG_MACHINEPAGEUC As Integer = MSG_OMAGCUT + 700
|
||||||
|
Public Const MSG_TOOLSDBPAGEUC As Integer = MSG_OMAGCUT + 720
|
||||||
|
Public Const MSG_MACHININGSDBPAGEUC As Integer = MSG_OMAGCUT + 760
|
||||||
|
Public Const MSG_COMBOBOXPARAM As Integer = MSG_OMAGCUT + 800
|
||||||
|
Public Const MSG_ALARMSPAGEUC As Integer = MSG_OMAGCUT + 900
|
||||||
|
Public Const MSG_MACHINECNPAGEUC As Integer = MSG_OMAGCUT + 950
|
||||||
|
Public Const MSG_OPTIONSPAGEUC As Integer = MSG_OMAGCUT + 980
|
||||||
|
Public Const MSG_EGTMSGBOX As Integer = MSG_OMAGCUT + 1100
|
||||||
|
Public Const MSG_CSVPAGEUC As Integer = MSG_OMAGCUT + 1200
|
||||||
|
|
||||||
|
Public Const MSG_OMAGOFFICE As Integer = 91400
|
||||||
|
Public Const MSG_OPTIONPANEL As Integer = MSG_OMAGOFFICE
|
||||||
|
Public Const MSG_MYMACHININGDBWINDOW As Integer = MSG_OMAGOFFICE + 50
|
||||||
|
Public Const MSG_TOPCMDBAR As Integer = MSG_OMAGOFFICE + 100
|
||||||
|
Public Const MSG_RAWPARTTAB As Integer = MSG_OMAGOFFICE + 150
|
||||||
|
Public Const MSG_VEINMATCHING As Integer = MSG_OMAGOFFICE + 200
|
||||||
|
Public Const MSG_GENERIC As Integer = MSG_OMAGOFFICE + 250
|
||||||
|
|
||||||
|
Public Const MSG_EGTWPFLIB5 As Integer = 30000
|
||||||
|
Public Const MSG_TOPCOMMANDBAR As Integer = MSG_EGTWPFLIB5 + 500
|
||||||
|
Public Const MSG_GRIDVIEWPANEL As Integer = MSG_EGTWPFLIB5 + 800
|
||||||
|
Public Const MSG_TOOLDB As Integer = MSG_EGTWPFLIB5 + 1000
|
||||||
|
Public Const MSG_TOOLDBERRORS As Integer = MSG_EGTWPFLIB5 + 1100
|
||||||
|
Public Const MSG_MACHININGDB As Integer = MSG_EGTWPFLIB5 + 1200
|
||||||
|
Public Const MSG_MACHININGDBERRORS As Integer = MSG_EGTWPFLIB5 + 1400
|
||||||
|
Public Const MSG_SIMULATION As Integer = MSG_EGTWPFLIB5 + 1600
|
||||||
|
|
||||||
|
End Module
|
||||||
@@ -0,0 +1,142 @@
|
|||||||
|
'----------------------------------------------------------------------------
|
||||||
|
' EgalTech 2015-2017
|
||||||
|
'----------------------------------------------------------------------------
|
||||||
|
' File : ConstGen.vb Data : 10.04.17 Versione : 1.8d1
|
||||||
|
' Contenuto : Modulo costanti generali.
|
||||||
|
'
|
||||||
|
'
|
||||||
|
'
|
||||||
|
' Modifiche : 10.04.17 DS Creazione modulo.
|
||||||
|
'
|
||||||
|
'
|
||||||
|
'----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Public Module ConstWindow
|
||||||
|
|
||||||
|
Public Enum AreaTypes
|
||||||
|
NULL = 0
|
||||||
|
FRAME = 1
|
||||||
|
SASH = 2
|
||||||
|
FILL = 3
|
||||||
|
SPLIT = 4
|
||||||
|
SPLITTED = 5
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum FillTypes
|
||||||
|
NULL = 0
|
||||||
|
GLASS = 1
|
||||||
|
WOOD = 2
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum Shapes As Integer
|
||||||
|
RECTANGLE = 1
|
||||||
|
RIGHTCHAMFER = 2
|
||||||
|
LEFTCHAMFER = 3
|
||||||
|
DOUBLECHAMFER = 4
|
||||||
|
ARC = 11
|
||||||
|
ARC_FULL = 12
|
||||||
|
FILLET = 13
|
||||||
|
DOUBLEARC = 14
|
||||||
|
TRIANGLE = 21
|
||||||
|
CUSTOM = 100
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum SplitShapes As Integer
|
||||||
|
NULL = 0
|
||||||
|
VERTICAL = 1
|
||||||
|
HORIZONTAL = 2
|
||||||
|
GRID = 3
|
||||||
|
CUSTOM = 100
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum Joints As Integer
|
||||||
|
ANGLED = 1
|
||||||
|
FULL_H = 2
|
||||||
|
FULL_V = 3
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum SashTypes As Integer
|
||||||
|
NULL = 0
|
||||||
|
ACTIVE = 1
|
||||||
|
INACTIVE = 2
|
||||||
|
ACTIVE_IN = 3
|
||||||
|
ACTIVE_OUT = 4
|
||||||
|
INACTIVE_IN = 5
|
||||||
|
INACTIVE_OUT = 6
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum Openings As Integer
|
||||||
|
NULL = 0
|
||||||
|
TURNONLY_LEFT = 1
|
||||||
|
TURNONLY_RIGHT = 2
|
||||||
|
TILTTURN_LEFT = 3
|
||||||
|
TILTTURN_RIGHT = 4
|
||||||
|
TILTONLY_TOP = 5
|
||||||
|
TILTONLY_BOTTOM = 6
|
||||||
|
PIVOT = 7
|
||||||
|
FIXED = 8
|
||||||
|
COMPLANARSLIDE_LEFT = 9
|
||||||
|
COMPLANARSLIDE_RIGHT = 10
|
||||||
|
LIFTSLIDE_LEFT = 11
|
||||||
|
LIFTSLIDE_RIGHT = 12
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum OpeningTypes As Integer
|
||||||
|
NULL = 0
|
||||||
|
TURNONLY = 1
|
||||||
|
TILTTURN = 2
|
||||||
|
TILTONLY = 3
|
||||||
|
PIVOT = 4
|
||||||
|
FIXED = 5
|
||||||
|
COMPLANARSLIDE = 6
|
||||||
|
LIFTSLIDE = 7
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum OpeningSides As Integer
|
||||||
|
NULL = 0
|
||||||
|
LEFT = 1
|
||||||
|
RIGHT = 2
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
'------------ LUA ------------------
|
||||||
|
|
||||||
|
Public Enum LuaAreaTypes
|
||||||
|
NULL = 0
|
||||||
|
FRAME = 1
|
||||||
|
SASH = 2
|
||||||
|
FILL = 3
|
||||||
|
SPLIT = 4
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum LuaSplitTypes
|
||||||
|
NULL = 0
|
||||||
|
MULLION = 1
|
||||||
|
FRENCH = 2
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum LuaShapes
|
||||||
|
RECT = 1
|
||||||
|
CHAMFER_SIDE = 2
|
||||||
|
CHAMFER = 3
|
||||||
|
ROUND_ARC = 4
|
||||||
|
SEGMENTAL_ARC = 5
|
||||||
|
POINTED_ARC = 6
|
||||||
|
TRIANGLE = 7
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Const WIN_OUTLINE As String = "Outline"
|
||||||
|
Public Const WIN_AREA As String = "Area"
|
||||||
|
Public Const WIN_AREATYPE As String = "AreaType"
|
||||||
|
Public Const WIN_SELECTION As String = "Selection"
|
||||||
|
|
||||||
|
'------------ LUA ------------------
|
||||||
|
|
||||||
|
Public Const LUA_WIN_SPLITSELECTION As String = "SplitSelection"
|
||||||
|
Public Const LUA_WIN_SPLIT As String = "Split"
|
||||||
|
Public Const LUA_WIN_SPLITTYPE As String = "SplitType"
|
||||||
|
Public Const LUA_WIN_ORIGSPLIT As String = "OrigSplit"
|
||||||
|
Public Const LUA_WIN_HDW_FAVOURITE As String = "HdwFavourite"
|
||||||
|
Public Const LUA_WIN_HDW_HANDLE As String = "HdwHandle"
|
||||||
|
Public Const LUA_WIN_HDW_OPTIONS As String = "HdwOptions"
|
||||||
|
|
||||||
|
End Module
|
||||||
|
After Width: | Height: | Size: 34 KiB |
@@ -0,0 +1,339 @@
|
|||||||
|
<Project ToolsVersion="15.0" 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>{DBEEAB57-E513-456C-8D10-56411B6AB67D}</ProjectGuid>
|
||||||
|
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<RootNamespace>EgtWindowMaker</RootNamespace>
|
||||||
|
<AssemblyName>EgtWindowMaker</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||||
|
<MyType>Custom</MyType>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
</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|x64'">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DefineDebug>true</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||||
|
<DocumentationFile>EgtWindowMaker.xml</DocumentationFile>
|
||||||
|
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
|
<Prefer32Bit>true</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\x64\Release\</OutputPath>
|
||||||
|
<DocumentationFile>EgtWindowMaker.xml</DocumentationFile>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
|
<Prefer32Bit>true</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DefineDebug>true</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||||
|
<DocumentationFile>EgtWindowMaker.xml</DocumentationFile>
|
||||||
|
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<Prefer32Bit>true</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\x86\Release\</OutputPath>
|
||||||
|
<DocumentationFile>EgtWindowMaker.xml</DocumentationFile>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<Prefer32Bit>true</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ApplicationIcon>EgtWindowMaker.ico</ApplicationIcon>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="EgtUILib">
|
||||||
|
<HintPath>..\..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="EgtWPFLib5">
|
||||||
|
<HintPath>..\..\..\EgtProg\DllD32\EgtWPFLib5.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<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="System.Net.Http" />
|
||||||
|
<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\ConstMachDataIni.vb" />
|
||||||
|
<Compile Include="Constants\ConstMachIni.vb" />
|
||||||
|
<Compile Include="Constants\ConstMsg.vb" />
|
||||||
|
<Compile Include="Constants\ConstWindow.vb" />
|
||||||
|
<Compile Include="CRMPage\CRMPageV.xaml.vb">
|
||||||
|
<DependentUpon>CRMPageV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="CRMPage\CRMPageVM.vb" />
|
||||||
|
<Compile Include="EstimatingPage\EstimatingPageV.xaml.vb">
|
||||||
|
<DependentUpon>EstimatingPageV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="EstimatingPage\EstimatingPageVM.vb" />
|
||||||
|
<Compile Include="EstimationDetailPage\Estimation.vb" />
|
||||||
|
<Compile Include="EstimationListPage\EstimationListPageV.xaml.vb">
|
||||||
|
<DependentUpon>EstimationListPageV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="EstimationListPage\EstimationListPageVM.vb" />
|
||||||
|
<Compile Include="HomePage\HomePageV.xaml.vb">
|
||||||
|
<DependentUpon>HomePageV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="HomePage\HomePageVM.vb" />
|
||||||
|
<Compile Include="Json\JsonEstimationDetail.vb" />
|
||||||
|
<Compile Include="Json\JsonGenWinParam.vb" />
|
||||||
|
<Compile Include="Json\JsonWindowRow.vb" />
|
||||||
|
<Compile Include="MainWindow\MainWindowM.vb" />
|
||||||
|
<Compile Include="MainWindow\MainWindowV.xaml.vb">
|
||||||
|
<DependentUpon>MainWindowV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MainWindow\MainWindowVM.vb" />
|
||||||
|
<Compile Include="EstimationDetailPage\EstimationDetailPageV.xaml.vb">
|
||||||
|
<DependentUpon>EstimationDetailPageV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="EstimationDetailPage\EstimationDetailPageVM.vb" />
|
||||||
|
<Compile Include="NewWindowWnd\NewWindowWndV.xaml.vb">
|
||||||
|
<DependentUpon>NewWindowWndV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="NewWindowWnd\NewWindowWndVM.vb" />
|
||||||
|
<Compile Include="ProducingPage\ProducingPageV.xaml.vb">
|
||||||
|
<DependentUpon>ProducingPageV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ProducingPage\ProducingPageVM.vb" />
|
||||||
|
<Compile Include="ProjManager\ProjManagerV.xaml.vb">
|
||||||
|
<DependentUpon>ProjManagerV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ProjManager\ProjManagerVM.vb" />
|
||||||
|
<Compile Include="SceneHost\MySceneHostVM.vb" />
|
||||||
|
<Compile Include="SceneHost\SceneHostV.xaml.vb">
|
||||||
|
<DependentUpon>SceneHostV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ShowPanel\ShowPanelV.xaml.vb">
|
||||||
|
<DependentUpon>ShowPanelV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Utility\AGBOption.vb" />
|
||||||
|
<Compile Include="Utility\Dictionary.xaml.vb">
|
||||||
|
<DependentUpon>Dictionary.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Utility\JsonUtility.vb" />
|
||||||
|
<Compile Include="Utility\LuaExec.vb" />
|
||||||
|
<Compile Include="Utility\Map.vb" />
|
||||||
|
<Compile Include="Application.xaml.vb">
|
||||||
|
<DependentUpon>Application.xaml</DependentUpon>
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ViewPanel\ViewPanelV.xaml.vb">
|
||||||
|
<DependentUpon>ViewPanelV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Page Include="CRMPage\CRMPageV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="EstimatingPage\EstimatingPageV.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Include="EstimationListPage\EstimationListPageV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="HomePage\HomePageV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="MainWindow\MainWindowV.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Include="ManageWindow\ManageWindowV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="EstimationDetailPage\EstimationDetailPageV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="NewWindowWnd\NewWindowWndV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="ProducingPage\ProducingPageV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="ProjManager\ProjManagerV.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Include="SceneHost\SceneHostV.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Include="ShowPanel\ShowPanelV.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Include="Utility\Dictionary.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</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="ManageWindow\ManageWindowV.xaml.vb">
|
||||||
|
<DependentUpon>ManageWindowV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ManageWindow\ManageWindowVM.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>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
<Resource Include="Resources\Fonts\Roboto-Light.ttf" />
|
||||||
|
<Resource Include="Resources\Fonts\Roboto-Regular.ttf" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\AboutBox\EgalwareLogo.png" />
|
||||||
|
<Resource Include="Resources\AboutBox\IcarusLogo.png" />
|
||||||
|
<Resource Include="Resources\Common\Cancel.png" />
|
||||||
|
<Resource Include="Resources\Common\Close.png" />
|
||||||
|
<Resource Include="Resources\Common\Maximize.png" />
|
||||||
|
<Resource Include="Resources\Common\Minimize.png" />
|
||||||
|
<Resource Include="Resources\Common\Ok.png" />
|
||||||
|
<Resource Include="Resources\Common\Restore.png" />
|
||||||
|
<Resource Include="Resources\ProjectManager\Export.png" />
|
||||||
|
<Resource Include="Resources\ProjectManager\ExportProject.png" />
|
||||||
|
<Resource Include="Resources\ProjectManager\Help.png" />
|
||||||
|
<Resource Include="Resources\ProjectManager\Import.png" />
|
||||||
|
<Resource Include="Resources\ProjectManager\ImportProject.png" />
|
||||||
|
<Resource Include="Resources\ProjectManager\New.png" />
|
||||||
|
<Resource Include="Resources\ProjectManager\Open.png" />
|
||||||
|
<Resource Include="Resources\ProjectManager\Options.png" />
|
||||||
|
<Resource Include="Resources\ProjectManager\Save.png" />
|
||||||
|
<Resource Include="Resources\ProjectManager\SaveAs.png" />
|
||||||
|
<Resource Include="Resources\ProjectManager\Send.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="EgtWindowMaker.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 />
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtWindowMaker\EgtWindowMakerR32.exe
|
||||||
|
IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\EgtWindowMaker\EgtWindowMakerD32.exe
|
||||||
|
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtWindowMaker\EgtWindowMakerR64.exe
|
||||||
|
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\EgtWindowMaker\EgtWindowMakerD64.exe</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<UserControl x:Class="EstimatingPageV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="clr-namespace:EgtWindowMaker"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Public Class EstimatingPageV
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
Public Class EstimatingPageVM
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,122 @@
|
|||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports System.IO
|
||||||
|
Imports Newtonsoft.Json
|
||||||
|
|
||||||
|
Public Class Estimation
|
||||||
|
|
||||||
|
Private m_nId As Integer
|
||||||
|
Public Property nId As Integer
|
||||||
|
Get
|
||||||
|
Return m_nId
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_nId = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Profile As String
|
||||||
|
Public Property Profile As String
|
||||||
|
Get
|
||||||
|
Return m_Profile
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_Profile = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_WoodType As String
|
||||||
|
Public Property WoodType As String
|
||||||
|
Get
|
||||||
|
Return m_WoodType
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_WoodType = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Color As String
|
||||||
|
Public Property Color As String
|
||||||
|
Get
|
||||||
|
Return m_Color
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_Color = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Glass As String
|
||||||
|
Public Property Glass As String
|
||||||
|
Get
|
||||||
|
Return m_Glass
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_Glass = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_FrameConfiguration As String
|
||||||
|
Public Property FrameConfiguration As String
|
||||||
|
Get
|
||||||
|
Return m_FrameConfiguration
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_FrameConfiguration = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SashConfiguration As String
|
||||||
|
Public Property SashConfiguration As String
|
||||||
|
Get
|
||||||
|
Return m_SashConfiguration
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_SashConfiguration = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_WindowList As New ObservableCollection(Of WindowRow)
|
||||||
|
Public ReadOnly Property WindowList As ObservableCollection(Of WindowRow)
|
||||||
|
Get
|
||||||
|
Return m_WindowList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(nId As Integer)
|
||||||
|
m_nId = nId
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
<JsonConstructor>
|
||||||
|
Sub New(nId As Integer, Profile As String, WoodType As String, Color As String, Glass As String, FrameConfiguration As String, SashConfiguration As String, WindowList As ObservableCollection(Of WindowRow))
|
||||||
|
m_nId = nId
|
||||||
|
m_Profile = Profile
|
||||||
|
m_WoodType = WoodType
|
||||||
|
m_Color = Color
|
||||||
|
m_Glass = Glass
|
||||||
|
m_FrameConfiguration = FrameConfiguration
|
||||||
|
m_SashConfiguration = SashConfiguration
|
||||||
|
m_WindowList = WindowList
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Shared Function WriteEstimation(Estimation As Estimation) As Boolean
|
||||||
|
Dim FilePath As String = Map.refMainWindowVM.MainWindowM.sEstimationDir & "\" & Estimation.nId & "\Estimation.json"
|
||||||
|
Dim JsonFromWindow As String = JsonConvert.SerializeObject(Estimation, Formatting.Indented)
|
||||||
|
If File.Exists(FilePath) Then
|
||||||
|
Try
|
||||||
|
File.Delete(FilePath)
|
||||||
|
Catch ex As Exception
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
File.WriteAllText(FilePath, JsonFromWindow)
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Shared Function ReadEstimation(nId As Integer, ByRef Estimation As Estimation) As Boolean
|
||||||
|
Dim FilePath As String = Map.refMainWindowVM.MainWindowM.sEstimationDir & "\" & nId & "\Estimation.json"
|
||||||
|
If Not File.Exists(FilePath) Then Return False
|
||||||
|
Dim sReadedFile As String = File.ReadAllText(FilePath)
|
||||||
|
Estimation = JsonConvert.DeserializeObject(Of Estimation)(sReadedFile)
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,188 @@
|
|||||||
|
<Grid x:Class="EstimationDetailPageV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="clr-namespace:EgtWindowMaker"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TabControl SelectedIndex="{Binding SelPage}">
|
||||||
|
<TabItem Header="Intestazione offerta"
|
||||||
|
Style="{StaticResource TabItem.EstimationDetail}">
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Dati fatturazione"
|
||||||
|
Style="{StaticResource TabItem.EstimationDetail}">
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Parametri default finestra"
|
||||||
|
Style="{StaticResource TabItem.EstimationDetail}">
|
||||||
|
<Border BorderBrush="{StaticResource EgtWindow.DarkBlue}"
|
||||||
|
BorderThickness="10"
|
||||||
|
Margin="200,100">
|
||||||
|
<UniformGrid Columns="2"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Height="400"
|
||||||
|
Width="600">
|
||||||
|
<TextBlock Text="Modello"
|
||||||
|
Style="{StaticResource TextBlock.EstimationDetail}"/>
|
||||||
|
<ComboBox ItemsSource="{Binding ProfileList}"
|
||||||
|
SelectedItem="{Binding SelProfile}"
|
||||||
|
Style="{StaticResource ComboBox.EstimationDetail}"/>
|
||||||
|
<TextBlock Text="Legno"
|
||||||
|
Style="{StaticResource TextBlock.EstimationDetail}"/>
|
||||||
|
<ComboBox ItemsSource="{Binding WoodTypeList}"
|
||||||
|
SelectedItem="{Binding SelWoodType}"
|
||||||
|
Style="{StaticResource ComboBox.EstimationDetail}"/>
|
||||||
|
<TextBlock Text="Colore"
|
||||||
|
Style="{StaticResource TextBlock.EstimationDetail}"/>
|
||||||
|
<ComboBox ItemsSource="{Binding ColorList}"
|
||||||
|
SelectedItem="{Binding SelColor}"
|
||||||
|
Style="{StaticResource ComboBox.EstimationDetail}"/>
|
||||||
|
<TextBlock Text="Vetro"
|
||||||
|
Style="{StaticResource TextBlock.EstimationDetail}"/>
|
||||||
|
<ComboBox ItemsSource="{Binding GlassList}"
|
||||||
|
SelectedItem="{Binding SelGlass}"
|
||||||
|
Style="{StaticResource ComboBox.EstimationDetail}"/>
|
||||||
|
<TextBlock Text="Configurazione telaio"
|
||||||
|
Style="{StaticResource TextBlock.EstimationDetail}"/>
|
||||||
|
<ComboBox ItemsSource="{Binding FrameConfigurationList}"
|
||||||
|
SelectedItem="{Binding SelFrameConfiguration}"
|
||||||
|
Style="{StaticResource ComboBox.EstimationDetail}"/>
|
||||||
|
<TextBlock Text="Configurazione anta"
|
||||||
|
Style="{StaticResource TextBlock.EstimationDetail}"/>
|
||||||
|
<ComboBox ItemsSource="{Binding SashConfigurationList}"
|
||||||
|
SelectedItem="{Binding SelSashConfiguration}"
|
||||||
|
Style="{StaticResource ComboBox.EstimationDetail}"/>
|
||||||
|
<TextBlock Text="Modello ferramenta"
|
||||||
|
Style="{StaticResource TextBlock.EstimationDetail}"/>
|
||||||
|
<TextBox Text="{Binding HardwareModel}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</Border>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Lista finestre"
|
||||||
|
Style="{StaticResource TabItem.EstimationDetail}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<Button Content="Nuova finestra"
|
||||||
|
Command="{Binding NewWindow_Command}"
|
||||||
|
Style="{StaticResource Button.EstimationDetail.WindowList}"/>
|
||||||
|
<Button Content="Nuova portafinestra"
|
||||||
|
Command="{Binding NewWindow_Command}"
|
||||||
|
Style="{StaticResource Button.EstimationDetail.WindowList}"/>
|
||||||
|
<Button Content="Nuova persiana"
|
||||||
|
Command="{Binding NewWindow_Command}"
|
||||||
|
Style="{StaticResource Button.EstimationDetail.WindowList}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<DataGrid Grid.Row="1"
|
||||||
|
ItemsSource="{Binding WindowList}"
|
||||||
|
SelectedItem="{Binding SelWindow}"
|
||||||
|
AutoGenerateColumns="False"
|
||||||
|
CanUserDeleteRows="False"
|
||||||
|
CanUserResizeRows="False"
|
||||||
|
SelectionMode="Single"
|
||||||
|
SelectionUnit="FullRow"
|
||||||
|
CanUserSortColumns="False"
|
||||||
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||||
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||||
|
HorizontalGridLinesBrush="Transparent"
|
||||||
|
VerticalGridLinesBrush="Transparent"
|
||||||
|
ColumnHeaderHeight="32"
|
||||||
|
HeadersVisibility="Column"
|
||||||
|
FontSize="12"
|
||||||
|
FontFamily="/Resources/Fonts/#Roboto"
|
||||||
|
FontWeight="Regular"
|
||||||
|
RowHeight="32"
|
||||||
|
BorderThickness="0">
|
||||||
|
<DataGrid.ColumnHeaderStyle>
|
||||||
|
<Style TargetType="{x:Type DataGridColumnHeader}">
|
||||||
|
<Setter Property="Background" Value="{StaticResource EgtWindow.DarkBlue}"/>
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="FontSize" Value="15"/>
|
||||||
|
<Setter Property="Padding" Value="10,0,10,0"/>
|
||||||
|
</Style>
|
||||||
|
</DataGrid.ColumnHeaderStyle>
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn Header="Id"
|
||||||
|
Binding="{Binding nId}"
|
||||||
|
Width="Auto"
|
||||||
|
IsReadOnly="True"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn}"/>
|
||||||
|
<DataGridTextColumn Header="Nome"
|
||||||
|
Binding="{Binding sName}"
|
||||||
|
Width="1*"
|
||||||
|
IsReadOnly="True"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn}"/>
|
||||||
|
<DataGridTextColumn Header="Larghezza"
|
||||||
|
Binding="{Binding dWidth}"
|
||||||
|
Width="1*"
|
||||||
|
IsReadOnly="True"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn}"/>
|
||||||
|
<DataGridTextColumn Header="Altezza"
|
||||||
|
Binding="{Binding dHeight}"
|
||||||
|
Width="1*"
|
||||||
|
IsReadOnly="True"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn}"/>
|
||||||
|
<DataGridTextColumn Header="Immagine"
|
||||||
|
Binding="{Binding sImage}"
|
||||||
|
Width="1*"
|
||||||
|
IsReadOnly="True"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn}"/>
|
||||||
|
<DataGridTextColumn Header="Legno"
|
||||||
|
Binding="{Binding sWoodType}"
|
||||||
|
Width="1*"
|
||||||
|
IsReadOnly="True"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn}"/>
|
||||||
|
<DataGridTextColumn Header="Colore"
|
||||||
|
Binding="{Binding sColor}"
|
||||||
|
Width="1*"
|
||||||
|
IsReadOnly="True"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn}"/>
|
||||||
|
<DataGridTextColumn Header="Vetro"
|
||||||
|
Binding="{Binding sGlass}"
|
||||||
|
Width="1*"
|
||||||
|
IsReadOnly="True"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn}"/>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
<DataGrid.RowStyle>
|
||||||
|
<Style TargetType="{x:Type DataGridRow}">
|
||||||
|
<EventSetter Event="MouseDoubleClick" Handler="Row_MouseDoubleClick"/>
|
||||||
|
</Style>
|
||||||
|
</DataGrid.RowStyle>
|
||||||
|
</DataGrid>
|
||||||
|
</Grid>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Costo"
|
||||||
|
Style="{StaticResource TabItem.EstimationDetail}">
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Stampa preventivo"
|
||||||
|
Style="{StaticResource TabItem.EstimationDetail}">
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
<StackPanel Grid.Row="1"
|
||||||
|
Orientation="Horizontal"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Margin="10">
|
||||||
|
<!--<Button Content="<"
|
||||||
|
Command="{Binding Ok_Command}"/>
|
||||||
|
<Button Content=">"
|
||||||
|
Command="{Binding Ok_Command}"/>-->
|
||||||
|
<Button Content="Ok"
|
||||||
|
Command="{Binding Ok_Command}"
|
||||||
|
Margin="0,0,10,0"
|
||||||
|
Style="{StaticResource Button.Confirm}"/>
|
||||||
|
<Button Content="Annulla"
|
||||||
|
Command="{Binding Cancel_Command}"
|
||||||
|
Style="{StaticResource Button.Confirm}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
Public Class EstimationDetailPageV
|
||||||
|
|
||||||
|
Private WithEvents m_EstimationDetailPageVM As EstimationDetailPageVM
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
|
||||||
|
' This call is required by the designer.
|
||||||
|
InitializeComponent()
|
||||||
|
|
||||||
|
' Add any initialization after the InitializeComponent() call.
|
||||||
|
m_EstimationDetailPageVM = New EstimationDetailPageVM
|
||||||
|
|
||||||
|
Me.DataContext = m_EstimationDetailPageVM
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Row_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs)
|
||||||
|
If IsNothing(sender) OrElse TypeOf sender IsNot DataGridRow Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
Dim SelDataGridRow As DataGridRow = DirectCast(sender, DataGridRow)
|
||||||
|
If IsNothing(SelDataGridRow.DataContext) Then Return
|
||||||
|
m_EstimationDetailPageVM.OpenWindow()
|
||||||
|
e.Handled = True
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,540 @@
|
|||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports System.IO
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
Imports Newtonsoft.Json
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports System.Windows.Forms
|
||||||
|
|
||||||
|
Public Class EstimationDetailPageVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Public Enum EstimationDetailPages
|
||||||
|
GENERAL = 0
|
||||||
|
BILLING = 1
|
||||||
|
WINDOWDEFAULT = 2
|
||||||
|
WINDOWLIST = 3
|
||||||
|
PRICING = 4
|
||||||
|
PRINT = 5
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Private m_CurrEstimation As Estimation
|
||||||
|
Public ReadOnly Property CurrEstimation As Estimation
|
||||||
|
Get
|
||||||
|
Return m_CurrEstimation
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetCurrEstimation(value As Estimation)
|
||||||
|
m_CurrEstimation = value
|
||||||
|
NotifyPropertyChanged(NameOf(SelProfile))
|
||||||
|
NotifyPropertyChanged(NameOf(SelWoodType))
|
||||||
|
NotifyPropertyChanged(NameOf(SelColor))
|
||||||
|
NotifyPropertyChanged(NameOf(SelGlass))
|
||||||
|
NotifyPropertyChanged(NameOf(SelFrameConfiguration))
|
||||||
|
NotifyPropertyChanged(NameOf(SelSashConfiguration))
|
||||||
|
NotifyPropertyChanged(NameOf(WindowList))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_SelPage As EstimationDetailPages
|
||||||
|
Public Property SelPage As Integer
|
||||||
|
Get
|
||||||
|
Return m_SelPage
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
SetSelPage(value)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Friend Sub SetSelPage(Page As EstimationDetailPages)
|
||||||
|
Dim bOk As Boolean = True
|
||||||
|
' Esco dallo stato corrente
|
||||||
|
Select Case m_SelPage
|
||||||
|
Case EstimationDetailPages.GENERAL
|
||||||
|
'bOk = ExitHOME()
|
||||||
|
Case EstimationDetailPages.BILLING
|
||||||
|
'bOk = ExitESTIMATING()
|
||||||
|
Case EstimationDetailPages.WINDOWDEFAULT
|
||||||
|
' bOk = ExitPRODUCING()
|
||||||
|
Case EstimationDetailPages.WINDOWLIST
|
||||||
|
'bOk = ExitDESIGNING()
|
||||||
|
End Select
|
||||||
|
If bOk Then
|
||||||
|
' Entro nel nuovo stato
|
||||||
|
m_SelPage = Page
|
||||||
|
Select Case m_SelPage
|
||||||
|
Case EstimationDetailPages.GENERAL
|
||||||
|
'bOk = InitHOME()
|
||||||
|
Case EstimationDetailPages.BILLING
|
||||||
|
'bOk = InitESTIMATING()
|
||||||
|
Case EstimationDetailPages.WINDOWDEFAULT
|
||||||
|
'bOk = InitPRODUCING()
|
||||||
|
Case EstimationDetailPages.WINDOWLIST
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
NotifyPropertyChanged(NameOf(SelPage))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "Window Parameters"
|
||||||
|
|
||||||
|
Private m_ProfileList As New List(Of String)
|
||||||
|
Public ReadOnly Property ProfileList As List(Of String)
|
||||||
|
Get
|
||||||
|
Return m_ProfileList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property SelProfile As String
|
||||||
|
Get
|
||||||
|
If IsNothing(m_CurrEstimation) Then Return ""
|
||||||
|
Return m_CurrEstimation.Profile
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_CurrEstimation.Profile = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_WoodTypeList As New List(Of String)
|
||||||
|
Public ReadOnly Property WoodTypeList As List(Of String)
|
||||||
|
Get
|
||||||
|
Return m_WoodTypeList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelWoodType As String
|
||||||
|
Public Property SelWoodType As String
|
||||||
|
Get
|
||||||
|
If IsNothing(m_CurrEstimation) Then Return ""
|
||||||
|
Return m_CurrEstimation.WoodType
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_CurrEstimation.WoodType = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_ColorList As New List(Of String)
|
||||||
|
Public ReadOnly Property ColorList As List(Of String)
|
||||||
|
Get
|
||||||
|
Return m_ColorList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelColor As String
|
||||||
|
Public Property SelColor As String
|
||||||
|
Get
|
||||||
|
If IsNothing(m_CurrEstimation) Then Return ""
|
||||||
|
Return m_CurrEstimation.Color
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_CurrEstimation.Color = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_GlassList As New List(Of String)
|
||||||
|
Public ReadOnly Property GlassList As List(Of String)
|
||||||
|
Get
|
||||||
|
Return m_GlassList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelGlass As String
|
||||||
|
Public Property SelGlass As String
|
||||||
|
Get
|
||||||
|
If IsNothing(m_CurrEstimation) Then Return ""
|
||||||
|
Return m_CurrEstimation.Glass
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_CurrEstimation.Glass = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_FrameConfigurationList As New List(Of String)
|
||||||
|
Public ReadOnly Property FrameConfigurationList As List(Of String)
|
||||||
|
Get
|
||||||
|
Return m_FrameConfigurationList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelFrameConfiguration As String
|
||||||
|
Public Property SelFrameConfiguration As String
|
||||||
|
Get
|
||||||
|
If IsNothing(m_CurrEstimation) Then Return ""
|
||||||
|
Return m_CurrEstimation.FrameConfiguration
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_CurrEstimation.FrameConfiguration = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SashConfigurationList As New List(Of String)
|
||||||
|
Public ReadOnly Property SashConfigurationList As List(Of String)
|
||||||
|
Get
|
||||||
|
Return m_SashConfigurationList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelSashConfiguration As String
|
||||||
|
Public Property SelSashConfiguration As String
|
||||||
|
Get
|
||||||
|
If IsNothing(m_CurrEstimation) Then Return ""
|
||||||
|
Return m_CurrEstimation.SashConfiguration
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_CurrEstimation.SashConfiguration = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property WindowList As ObservableCollection(Of WindowRow)
|
||||||
|
Get
|
||||||
|
If IsNothing(m_CurrEstimation) Then Return New ObservableCollection(Of WindowRow)
|
||||||
|
Return m_CurrEstimation.WindowList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelWindow As WindowRow
|
||||||
|
Public Property SelWindow As WindowRow
|
||||||
|
Get
|
||||||
|
Return m_SelWindow
|
||||||
|
End Get
|
||||||
|
Set(value As WindowRow)
|
||||||
|
m_SelWindow = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdNewWindow As ICommand
|
||||||
|
Private m_cmdOk As ICommand
|
||||||
|
Private m_cmdCancel As ICommand
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
Map.SetRefEstimationDetailPageVM(Me)
|
||||||
|
' carico lista profili
|
||||||
|
Dim ProfileFileList() As String = Directory.GetFiles(Map.refMainWindowVM.MainWindowM.sProfileDir)
|
||||||
|
For Each ProfileFile In ProfileFileList
|
||||||
|
m_ProfileList.Add(Path.GetFileNameWithoutExtension(ProfileFile))
|
||||||
|
Next
|
||||||
|
' carico lista tipi di legno
|
||||||
|
m_WoodTypeList.Add("Pino")
|
||||||
|
m_WoodTypeList.Add("Abete")
|
||||||
|
m_WoodTypeList.Add("Faggio")
|
||||||
|
m_WoodTypeList.Add("Castagno")
|
||||||
|
m_WoodTypeList.Add("Quercia")
|
||||||
|
' carico lista colori
|
||||||
|
m_ColorList.Add("Trasparente")
|
||||||
|
m_ColorList.Add("Bianco")
|
||||||
|
m_ColorList.Add("Marrone")
|
||||||
|
' carico lista vetri
|
||||||
|
m_GlassList.Add("Trasparente")
|
||||||
|
m_GlassList.Add("Bianco")
|
||||||
|
m_GlassList.Add("Marrone")
|
||||||
|
' carico lista configurazioni frame
|
||||||
|
m_FrameConfigurationList.Add("Orizzontale")
|
||||||
|
m_FrameConfigurationList.Add("Verticale")
|
||||||
|
m_FrameConfigurationList.Add("45Deg")
|
||||||
|
' carico lista configurazioni sash
|
||||||
|
m_SashConfigurationList.Add("Orizzontale")
|
||||||
|
m_SashConfigurationList.Add("Verticale")
|
||||||
|
m_SashConfigurationList.Add("45Deg")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Function InitEstimationDetailPage() As Boolean
|
||||||
|
'If IsNothing(m_CurrEstimation) Then
|
||||||
|
' ' devo creare nuovo preventivo
|
||||||
|
' Dim FolderList() As String = Directory.GetDirectories(Map.refMainWindowVM.MainWindowM.sEstimationDir)
|
||||||
|
' Dim EstimationIndex As Integer = 0
|
||||||
|
' If FolderList.Count > 0 Then
|
||||||
|
' EstimationIndex = FolderList.Max(Of Integer)(Function(x) Integer.Parse(Path.GetFileNameWithoutExtension(x)))
|
||||||
|
' End If
|
||||||
|
' Directory.CreateDirectory(Map.refMainWindowVM.MainWindowM.sEstimationDir & "\" & (EstimationIndex + 1).ToString())
|
||||||
|
'Else
|
||||||
|
'End If
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'Private Function WriteJsonGenWinParam(FilePath As String) As Boolean
|
||||||
|
' Dim GenWinParam As New JsonGenWinParam(m_SelProfile, m_SelWoodType, m_SelColor, m_SelGlass, m_SelFrameConfiguration, m_SelSashConfiguration)
|
||||||
|
' Dim WinList As New List(Of JsonWindowRow)
|
||||||
|
' For Each Window In m_WindowList
|
||||||
|
' WinList.Add(New JsonWindowRow(Window.nId, Window.sName, Window.dWidth, Window.dHeight, Window.sImage, Window.sWoodType, Window.sColor, Window.sGlass))
|
||||||
|
' Next
|
||||||
|
' Dim JsonFromWindow As String = JsonConvert.SerializeObject(GenWinParam, Formatting.Indented)
|
||||||
|
' If File.Exists(FilePath) Then
|
||||||
|
' Try
|
||||||
|
' File.Delete(FilePath)
|
||||||
|
' Catch ex As Exception
|
||||||
|
' EgtOutLog("Error! Impossible deleting file!")
|
||||||
|
' Return False
|
||||||
|
' End Try
|
||||||
|
' End If
|
||||||
|
' File.WriteAllText(FilePath, JsonFromWindow)
|
||||||
|
' Return True
|
||||||
|
'End Function
|
||||||
|
|
||||||
|
'Private Function ReadJsonGenWinParam(FilePath As String) As Boolean
|
||||||
|
' If Not File.Exists(FilePath) Then Return False
|
||||||
|
' Dim sReadedFile As String = File.ReadAllText(FilePath)
|
||||||
|
' Dim WindowFromJson As JsonGenWinParam = JsonConvert.DeserializeObject(Of JsonGenWinParam)(sReadedFile)
|
||||||
|
' m_SelProfile = WindowFromJson.SelProfile
|
||||||
|
' m_SelWoodType = WindowFromJson.SelWoodType
|
||||||
|
' m_SelColor = WindowFromJson.SelColor
|
||||||
|
' m_SelGlass = WindowFromJson.SelGlass
|
||||||
|
' m_SelFrameConfiguration = WindowFromJson.SelFrameConfiguration
|
||||||
|
' m_SelSashConfiguration = WindowFromJson.SelSashConfiguration
|
||||||
|
' NotifyPropertyChanged(NameOf(SelProfile))
|
||||||
|
' NotifyPropertyChanged(NameOf(SelWoodType))
|
||||||
|
' NotifyPropertyChanged(NameOf(SelColor))
|
||||||
|
' NotifyPropertyChanged(NameOf(SelGlass))
|
||||||
|
' NotifyPropertyChanged(NameOf(SelFrameConfiguration))
|
||||||
|
' NotifyPropertyChanged(NameOf(SelSashConfiguration))
|
||||||
|
' Return True
|
||||||
|
'End Function
|
||||||
|
|
||||||
|
Friend Function NewWindowId() As Integer
|
||||||
|
Dim nId As Integer = 0
|
||||||
|
If m_CurrEstimation.WindowList.Count > 0 Then
|
||||||
|
nId = m_CurrEstimation.WindowList.Max(Function(x) x.nId)
|
||||||
|
End If
|
||||||
|
Return nId + 10
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function AddWindow(nId As Integer) As Boolean
|
||||||
|
m_CurrEstimation.WindowList.Add(New WindowRow(nId, "", 0, 0, "", "", "", ""))
|
||||||
|
NotifyPropertyChanged(NameOf(WindowList))
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Sub OpenWindow()
|
||||||
|
Dim NewWindowWndVM As New NewWindowWndVM
|
||||||
|
Dim NewWindowWnd As New NewWindowWndV(Application.Current.MainWindow, NewWindowWndVM)
|
||||||
|
NewWindowWndVM.Init(SelWindow.nId)
|
||||||
|
NewWindowWnd.ShowDialog()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "NewWindow"
|
||||||
|
|
||||||
|
Public ReadOnly Property NewWindow_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdNewWindow Is Nothing Then
|
||||||
|
m_cmdNewWindow = New Command(AddressOf NewWindow)
|
||||||
|
End If
|
||||||
|
Return m_cmdNewWindow
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub NewWindow(nPage As Integer)
|
||||||
|
' apro finestra con lista dei template
|
||||||
|
Dim NewWindowWndVM As New NewWindowWndVM
|
||||||
|
Dim NewWindowWnd As New NewWindowWndV(Application.Current.MainWindow, NewWindowWndVM)
|
||||||
|
NewWindowWndVM.Init(0)
|
||||||
|
|
||||||
|
NewWindowWnd.ShowDialog()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' NewWindow
|
||||||
|
|
||||||
|
#Region "Ok"
|
||||||
|
|
||||||
|
Public ReadOnly Property Ok_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdOk Is Nothing Then
|
||||||
|
m_cmdOk = New Command(AddressOf Ok)
|
||||||
|
End If
|
||||||
|
Return m_cmdOk
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Ok(nPage As Integer)
|
||||||
|
' salvo preventivo
|
||||||
|
Estimation.WriteEstimation(m_CurrEstimation)
|
||||||
|
' torno in lista preventivi
|
||||||
|
Map.refCRMPageVM.SetSelPage(CRMPages.ESTIMATIONLIST)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Ok
|
||||||
|
|
||||||
|
#Region "Cancel"
|
||||||
|
|
||||||
|
Public ReadOnly Property Cancel_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdCancel Is Nothing Then
|
||||||
|
m_cmdCancel = New Command(AddressOf Cancel)
|
||||||
|
End If
|
||||||
|
Return m_cmdCancel
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Cancel(nPage As Integer)
|
||||||
|
' elimino preventivo
|
||||||
|
|
||||||
|
' torno in lista preventivi
|
||||||
|
Map.refCRMPageVM.SetSelPage(CRMPages.ESTIMATIONLIST)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Cancel
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class TemplateRow
|
||||||
|
|
||||||
|
Private m_nId As Integer
|
||||||
|
Public ReadOnly Property nId As Integer
|
||||||
|
Get
|
||||||
|
Return m_nId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sName As String
|
||||||
|
Public ReadOnly Property sName As String
|
||||||
|
Get
|
||||||
|
Return m_sName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dWidth As Double
|
||||||
|
Public ReadOnly Property dWidth As Double
|
||||||
|
Get
|
||||||
|
Return m_dWidth
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dHeight As Double
|
||||||
|
Public ReadOnly Property dHeight As Double
|
||||||
|
Get
|
||||||
|
Return m_dHeight
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sImagePath As String
|
||||||
|
Public ReadOnly Property sImagePath As String
|
||||||
|
Get
|
||||||
|
Return m_sImagePath
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(nId As Integer, sName As String, dWidth As Double, dHeight As Double)
|
||||||
|
m_nId = nId
|
||||||
|
m_sName = sName
|
||||||
|
m_dWidth = dWidth
|
||||||
|
m_dHeight = dHeight
|
||||||
|
m_sImagePath = Map.refMainWindowVM.MainWindowM.sTemplateDir & "\" & nId & ".png"
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class EstimationRow
|
||||||
|
|
||||||
|
Private m_nId As Integer
|
||||||
|
Public ReadOnly Property nId As Integer
|
||||||
|
Get
|
||||||
|
Return m_nId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sName As String
|
||||||
|
Public ReadOnly Property sName As String
|
||||||
|
Get
|
||||||
|
Return m_sName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sWoodType As String
|
||||||
|
Public ReadOnly Property sWoodType As String
|
||||||
|
Get
|
||||||
|
Return m_sWoodType
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sColor As String
|
||||||
|
Public ReadOnly Property sColor As String
|
||||||
|
Get
|
||||||
|
Return m_sColor
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sGlass As String
|
||||||
|
Public ReadOnly Property sGlass As String
|
||||||
|
Get
|
||||||
|
Return m_sGlass
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(nId As Integer)
|
||||||
|
m_nId = nId
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class WindowRow
|
||||||
|
|
||||||
|
Private m_nId As Integer
|
||||||
|
Public ReadOnly Property nId As Integer
|
||||||
|
Get
|
||||||
|
Return m_nId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sName As String
|
||||||
|
Public ReadOnly Property sName As String
|
||||||
|
Get
|
||||||
|
Return m_sName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dWidth As Double
|
||||||
|
Public ReadOnly Property dWidth As Double
|
||||||
|
Get
|
||||||
|
Return m_dWidth
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dHeight As Double
|
||||||
|
Public ReadOnly Property dHeight As Double
|
||||||
|
Get
|
||||||
|
Return m_dHeight
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sImage As String
|
||||||
|
Public ReadOnly Property sImage As String
|
||||||
|
Get
|
||||||
|
Return m_sImage
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sWoodType As String
|
||||||
|
Public ReadOnly Property sWoodType As String
|
||||||
|
Get
|
||||||
|
Return m_sWoodType
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sColor As String
|
||||||
|
Public ReadOnly Property sColor As String
|
||||||
|
Get
|
||||||
|
Return m_sColor
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sGlass As String
|
||||||
|
Public ReadOnly Property sGlass As String
|
||||||
|
Get
|
||||||
|
Return m_sGlass
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(nId As Integer, sName As String, dWidth As Double, dHeight As Double, sImage As String, sWoodType As String, sColor As String, sGlass As String)
|
||||||
|
m_nId = nId
|
||||||
|
m_sName = sName
|
||||||
|
m_dWidth = dWidth
|
||||||
|
m_dHeight = dHeight
|
||||||
|
m_sImage = sImage
|
||||||
|
m_sWoodType = sWoodType
|
||||||
|
m_sColor = sColor
|
||||||
|
m_sGlass = sGlass
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
<Grid x:Class="EstimationListPageV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="clr-namespace:EgtWindowMaker"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<!--<RowDefinition Height="Auto"/>-->
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<!--<StackPanel Orientation="Horizontal">
|
||||||
|
<Button Content="Apri"
|
||||||
|
Command="{Binding OpenEstimation_Command}"/>
|
||||||
|
</StackPanel>-->
|
||||||
|
<DataGrid Grid.Row="1"
|
||||||
|
ItemsSource="{Binding EstimationList}"
|
||||||
|
SelectedItem="{Binding SelEstimation}"
|
||||||
|
AutoGenerateColumns="False"
|
||||||
|
CanUserDeleteRows="False"
|
||||||
|
CanUserResizeRows="False"
|
||||||
|
SelectionMode="Single"
|
||||||
|
SelectionUnit="FullRow"
|
||||||
|
CanUserSortColumns="False"
|
||||||
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||||
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||||
|
HorizontalGridLinesBrush="Transparent"
|
||||||
|
VerticalGridLinesBrush="Transparent"
|
||||||
|
ColumnHeaderHeight="32"
|
||||||
|
HeadersVisibility="Column"
|
||||||
|
FontSize="12"
|
||||||
|
FontFamily="/Resources/Fonts/#Roboto"
|
||||||
|
FontWeight="Regular"
|
||||||
|
RowHeight="32"
|
||||||
|
BorderThickness="0">
|
||||||
|
<DataGrid.ColumnHeaderStyle>
|
||||||
|
<Style TargetType="{x:Type DataGridColumnHeader}">
|
||||||
|
<Setter Property="Background" Value="{StaticResource EgtWindow.DarkBlue}"/>
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="FontSize" Value="15"/>
|
||||||
|
<Setter Property="Padding" Value="10,0,10,0"/>
|
||||||
|
</Style>
|
||||||
|
</DataGrid.ColumnHeaderStyle>
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn Header="Id"
|
||||||
|
Binding="{Binding nId, Mode=OneWay}"
|
||||||
|
Width="Auto"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn}"/>
|
||||||
|
<DataGridTextColumn Header="Nome"
|
||||||
|
Binding="{Binding sName, Mode=OneWay}"
|
||||||
|
Width="200"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn}"/>
|
||||||
|
<DataGridTextColumn Header="Legno"
|
||||||
|
Binding="{Binding sWoodType, Mode=OneWay}"
|
||||||
|
Width="200"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn}"/>
|
||||||
|
<DataGridTextColumn Header="Colore"
|
||||||
|
Binding="{Binding sColor, Mode=OneWay}"
|
||||||
|
Width="200"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn}"/>
|
||||||
|
<DataGridTextColumn Header="Vetro"
|
||||||
|
Binding="{Binding sGlass, Mode=OneWay}"
|
||||||
|
Width="200"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn}"/>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
<DataGrid.RowStyle>
|
||||||
|
<Style TargetType="{x:Type DataGridRow}">
|
||||||
|
<EventSetter Event="MouseDoubleClick" Handler="Row_MouseDoubleClick"/>
|
||||||
|
</Style>
|
||||||
|
</DataGrid.RowStyle>
|
||||||
|
</DataGrid>
|
||||||
|
</Grid>
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
Public Class EstimationListPageV
|
||||||
|
|
||||||
|
Private WithEvents m_EstimationListPageVM As EstimationListPageVM
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
|
||||||
|
' This call is required by the designer.
|
||||||
|
InitializeComponent()
|
||||||
|
|
||||||
|
' Add any initialization after the InitializeComponent() call.
|
||||||
|
m_EstimationListPageVM = New EstimationListPageVM
|
||||||
|
Me.DataContext = m_EstimationListPageVM
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Row_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs)
|
||||||
|
If IsNothing(sender) OrElse TypeOf sender IsNot DataGridRow Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
Dim SelDataGridRow As DataGridRow = DirectCast(sender, DataGridRow)
|
||||||
|
If IsNothing(SelDataGridRow.DataContext) Then Return
|
||||||
|
m_EstimationListPageVM.OpenEstimation()
|
||||||
|
e.Handled = True
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports System.IO
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
|
Public Class EstimationListPageVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Private m_EstimationList As New ObservableCollection(Of EstimationRow)
|
||||||
|
Public ReadOnly Property EstimationList As ObservableCollection(Of EstimationRow)
|
||||||
|
Get
|
||||||
|
Return m_EstimationList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelEstimation As EstimationRow
|
||||||
|
Public Property SelEstimation As EstimationRow
|
||||||
|
Get
|
||||||
|
Return m_SelEstimation
|
||||||
|
End Get
|
||||||
|
Set(value As EstimationRow)
|
||||||
|
m_SelEstimation = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdOpenEstimation As ICommand
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
Map.SetRefEstimationListPageVM(Me)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Function InitEstimationListPage() As Boolean
|
||||||
|
'm_EstimationList.Clear()
|
||||||
|
'Dim FolderList() As String = Directory.GetDirectories(Map.refMainWindowVM.MainWindowM.sEstimationDir)
|
||||||
|
'For Each EstimationFolder In FolderList
|
||||||
|
' Dim nId As Integer = 0
|
||||||
|
' Integer.TryParse(Path.GetFileNameWithoutExtension(EstimationFolder), nId)
|
||||||
|
' m_EstimationList.Add(New EstimationRow(nId))
|
||||||
|
'Next
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Sub NewEstimation()
|
||||||
|
Dim nId As Integer = 0
|
||||||
|
If m_EstimationList.Count > 0 Then
|
||||||
|
nId = m_EstimationList.Max(Of Integer)(Function(x) x.nId)
|
||||||
|
End If
|
||||||
|
nId += 1
|
||||||
|
Dim NewEstimation As New EstimationRow(nId)
|
||||||
|
m_EstimationList.Add(NewEstimation)
|
||||||
|
Directory.CreateDirectory(Map.refMainWindowVM.MainWindowM.sEstimationDir & "\" & (nId).ToString())
|
||||||
|
m_SelEstimation = NewEstimation
|
||||||
|
Map.refEstimationDetailPageVM.SetCurrEstimation(New Estimation(nId))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub OpenEstimation()
|
||||||
|
Dim CurrEstimation As Estimation = Nothing
|
||||||
|
Estimation.ReadEstimation(m_SelEstimation.nId, CurrEstimation)
|
||||||
|
Map.refEstimationDetailPageVM.SetCurrEstimation(CurrEstimation)
|
||||||
|
Map.refCRMPageVM.SetSelPage(CRMPages.ESTIMATIONDETAIL)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Function ReadEstimationList() As Boolean
|
||||||
|
m_EstimationList.Clear()
|
||||||
|
Dim FolderList() As String = Directory.GetDirectories(Map.refMainWindowVM.MainWindowM.sEstimationDir)
|
||||||
|
For Each EstimationFolder In FolderList
|
||||||
|
Dim nId As Integer = 0
|
||||||
|
Integer.TryParse(Path.GetFileNameWithoutExtension(EstimationFolder), nId)
|
||||||
|
m_EstimationList.Add(New EstimationRow(nId))
|
||||||
|
Next
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
'#Region "OpenEstimation"
|
||||||
|
|
||||||
|
' Public ReadOnly Property OpenEstimation_Command As ICommand
|
||||||
|
' Get
|
||||||
|
' If m_cmdOpenEstimation Is Nothing Then
|
||||||
|
' m_cmdOpenEstimation = New Command(AddressOf OpenEstimation)
|
||||||
|
' End If
|
||||||
|
' Return m_cmdOpenEstimation
|
||||||
|
' End Get
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
|
||||||
|
'#End Region ' OpenEstimation
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<UniformGrid x:Class="HomePageV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||||
|
Columns="3"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center">
|
||||||
|
<UniformGrid.Resources>
|
||||||
|
<sys:Int32 x:Key="Estimating">1</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="Producing">2</sys:Int32>
|
||||||
|
<sys:Int32 x:Key="Designing">3</sys:Int32>
|
||||||
|
</UniformGrid.Resources>
|
||||||
|
<Button Content="CRM"
|
||||||
|
Command="{Binding Page_Command}"
|
||||||
|
CommandParameter="{StaticResource Estimating}"
|
||||||
|
Style="{StaticResource Button.HomePage}"/>
|
||||||
|
<Button Content="CAD"
|
||||||
|
Command="{Binding Page_Command}"
|
||||||
|
CommandParameter="{StaticResource Designing}"
|
||||||
|
Style="{StaticResource Button.HomePage}"/>
|
||||||
|
<Button Content="CAM"
|
||||||
|
Command="{Binding Page_Command}"
|
||||||
|
CommandParameter="{StaticResource Producing}"
|
||||||
|
Style="{StaticResource Button.HomePage}"/>
|
||||||
|
</UniformGrid>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Public Class HomePageV
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
|
Public Class HomePageVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdPage As ICommand
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "Page"
|
||||||
|
|
||||||
|
Public ReadOnly Property Page_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdPage Is Nothing Then
|
||||||
|
m_cmdPage = New Command(AddressOf Page)
|
||||||
|
End If
|
||||||
|
Return m_cmdPage
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Page(nPage As Integer)
|
||||||
|
Map.refMainWindowVM.SetSelPage(nPage)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Page
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
Public Class JsonEstimationDetail
|
||||||
|
|
||||||
|
Private m_JsonGenWinParam As JsonGenWinParam
|
||||||
|
Public ReadOnly Property JsonGenWinParam As JsonGenWinParam
|
||||||
|
Get
|
||||||
|
Return m_JsonGenWinParam
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_JsonWindowList As List(Of JsonWindowRow)
|
||||||
|
Public ReadOnly Property JsonWindowList As List(Of JsonWindowRow)
|
||||||
|
Get
|
||||||
|
Return m_JsonWindowList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(JsonGenWinParam As JsonGenWinParam, JsonWindowList As List(Of JsonWindowRow))
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
Public Class JsonGenWinParam
|
||||||
|
|
||||||
|
Private m_SelProfile As String
|
||||||
|
Public ReadOnly Property SelProfile As String
|
||||||
|
Get
|
||||||
|
Return m_SelProfile
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelWoodType As String
|
||||||
|
Public ReadOnly Property SelWoodType As String
|
||||||
|
Get
|
||||||
|
Return m_SelWoodType
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelColor As String
|
||||||
|
Public ReadOnly Property SelColor As String
|
||||||
|
Get
|
||||||
|
Return m_SelColor
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelGlass As String
|
||||||
|
Public ReadOnly Property SelGlass As String
|
||||||
|
Get
|
||||||
|
Return m_SelGlass
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelFrameConfiguration As String
|
||||||
|
Public ReadOnly Property SelFrameConfiguration As String
|
||||||
|
Get
|
||||||
|
Return m_SelFrameConfiguration
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelSashConfiguration As String
|
||||||
|
Public ReadOnly Property SelSashConfiguration As String
|
||||||
|
Get
|
||||||
|
Return m_SelSashConfiguration
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(SelProfile As String, SelWoodType As String, SelColor As String, SelGlass As String, SelFrameConfiguration As String, SelSashConfiguration As String)
|
||||||
|
m_SelProfile = SelProfile
|
||||||
|
m_SelWoodType = SelWoodType
|
||||||
|
m_SelColor = SelColor
|
||||||
|
m_SelGlass = SelGlass
|
||||||
|
m_SelFrameConfiguration = SelFrameConfiguration
|
||||||
|
m_SelSashConfiguration = SelSashConfiguration
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
Public Class JsonWindowRow
|
||||||
|
|
||||||
|
Private m_nId As Integer
|
||||||
|
Public ReadOnly Property nId As Integer
|
||||||
|
Get
|
||||||
|
Return m_nId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sName As String
|
||||||
|
Public ReadOnly Property sName As String
|
||||||
|
Get
|
||||||
|
Return m_sName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dWidth As Double
|
||||||
|
Public ReadOnly Property dWidth As Double
|
||||||
|
Get
|
||||||
|
Return m_dWidth
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_dHeight As Double
|
||||||
|
Public ReadOnly Property dHeight As Double
|
||||||
|
Get
|
||||||
|
Return m_dHeight
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sImage As String
|
||||||
|
Public ReadOnly Property sImage As String
|
||||||
|
Get
|
||||||
|
Return m_sImage
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sWoodType As String
|
||||||
|
Public ReadOnly Property sWoodType As String
|
||||||
|
Get
|
||||||
|
Return m_sWoodType
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sColor As String
|
||||||
|
Public ReadOnly Property sColor As String
|
||||||
|
Get
|
||||||
|
Return m_sColor
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sGlass As String
|
||||||
|
Public ReadOnly Property sGlass As String
|
||||||
|
Get
|
||||||
|
Return m_sGlass
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(nId As Integer, sName As String, dWidth As Double, dHeight As Double, sImage As String, sWoodType As String, sColor As String, sGlass As String)
|
||||||
|
m_nId = nId
|
||||||
|
m_sName = sName
|
||||||
|
m_dWidth = dWidth
|
||||||
|
m_dHeight = dHeight
|
||||||
|
m_sImage = sImage
|
||||||
|
m_sWoodType = sWoodType
|
||||||
|
m_sColor = sColor
|
||||||
|
m_sGlass = sGlass
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,374 @@
|
|||||||
|
Imports System.Threading
|
||||||
|
Imports System.Math
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
|
Public Class MainWindowM
|
||||||
|
|
||||||
|
#Region "FIELDS"
|
||||||
|
|
||||||
|
' massimo numero di istanze del programma ammesse
|
||||||
|
Const MAX_INST As Integer = 32
|
||||||
|
|
||||||
|
Private m_objMutex As Mutex
|
||||||
|
|
||||||
|
Private m_sDataRoot As String = String.Empty
|
||||||
|
Friend ReadOnly Property sDataRoot As String
|
||||||
|
Get
|
||||||
|
Return m_sDataRoot
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sDataDir As String = String.Empty
|
||||||
|
Friend ReadOnly Property sDataDir As String
|
||||||
|
Get
|
||||||
|
Return m_sDataDir
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sConfigDir As String = String.Empty
|
||||||
|
Public ReadOnly Property sConfigDir As String
|
||||||
|
Get
|
||||||
|
Return m_sConfigDir
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sBaseDir As String
|
||||||
|
Public ReadOnly Property sBaseDir As String
|
||||||
|
Get
|
||||||
|
Return m_sBaseDir
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sProfileDir As String
|
||||||
|
Public ReadOnly Property sProfileDir As String
|
||||||
|
Get
|
||||||
|
Return m_sProfileDir
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sTemplateDir As String
|
||||||
|
Public ReadOnly Property sTemplateDir As String
|
||||||
|
Get
|
||||||
|
Return m_sTemplateDir
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sEstimationDir As String
|
||||||
|
Public ReadOnly Property sEstimationDir As String
|
||||||
|
Get
|
||||||
|
Return m_sEstimationDir
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nDebug As Integer = 0
|
||||||
|
Public ReadOnly Property DebugLevel As Integer
|
||||||
|
Get
|
||||||
|
Return m_nDebug
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_bFirstInstance As Boolean = False
|
||||||
|
Friend ReadOnly Property bFirstInstance As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bFirstInstance
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nInstance As Integer = 0
|
||||||
|
Friend ReadOnly Property nInstance As Integer
|
||||||
|
Get
|
||||||
|
Return m_nInstance
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nUserLevel As Integer = 1
|
||||||
|
Friend ReadOnly Property nUserLevel As Integer
|
||||||
|
Get
|
||||||
|
Return m_nUserLevel
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nKeyLevel As Integer = 0
|
||||||
|
Friend ReadOnly Property nKeyLevel As Integer
|
||||||
|
Get
|
||||||
|
Return m_nKeyLevel
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nKeyOptions As UInteger = 0
|
||||||
|
Friend ReadOnly Property nKeyOptions As Integer
|
||||||
|
Get
|
||||||
|
Return m_nKeyOptions
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Friend ReadOnly Property sVersion As String
|
||||||
|
Get
|
||||||
|
Return 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()
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_s3dPrintingDir As String
|
||||||
|
Friend ReadOnly Property s3dPrintingDir As String
|
||||||
|
Get
|
||||||
|
Return m_s3dPrintingDir
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sMaterialsDir As String
|
||||||
|
Friend ReadOnly Property sMaterialsDir As String
|
||||||
|
Get
|
||||||
|
Return m_sMaterialsDir
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sTempDir As String
|
||||||
|
Friend ReadOnly Property sTempDir As String
|
||||||
|
Get
|
||||||
|
Return m_sTempDir
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Private m_sMachinesRoot As String
|
||||||
|
Friend ReadOnly Property sMachinesRoot As String
|
||||||
|
Get
|
||||||
|
Return m_sMachinesRoot
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Private m_sToolMakersDir As String
|
||||||
|
Friend ReadOnly Property sToolMakersDir As String
|
||||||
|
Get
|
||||||
|
Return m_sToolMakersDir
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Private m_sResourcesRoot As String
|
||||||
|
Friend ReadOnly Property sResourcesRoot As String
|
||||||
|
Get
|
||||||
|
Return m_sResourcesRoot
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Private m_sLogFile As String
|
||||||
|
Friend ReadOnly Property sLogFile As String
|
||||||
|
Get
|
||||||
|
Return m_sLogFile
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#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
|
||||||
|
' 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 path machinings e materials dir
|
||||||
|
m_sMaterialsDir = m_sDataRoot & "\" & MATERIALS_DIR
|
||||||
|
' Impostazione direttorio per le macchine
|
||||||
|
If GetMainPrivateProfileString(S_MACH, K_MACHINESDIR, "", m_sMachinesRoot) = 0 Then
|
||||||
|
m_sMachinesRoot = m_sDataRoot & "\" & MACHINES_DFL_DIR
|
||||||
|
End If
|
||||||
|
' Impostazione direttorio base dei lua
|
||||||
|
If GetMainPrivateProfileString(S_WINDOW, K_BASEDIR, "", m_sBaseDir) = 0 Then
|
||||||
|
m_sBaseDir = m_sDataRoot & "\" & WINDOW_DIR
|
||||||
|
End If
|
||||||
|
' Impostazione direttorio profili
|
||||||
|
If GetMainPrivateProfileString(S_WINDOW, K_PROFILEDIR, "", m_sProfileDir) = 0 Then
|
||||||
|
m_sProfileDir = m_sDataRoot & "\" & PROFILES_DIR
|
||||||
|
End If
|
||||||
|
' impostazione direttorio template
|
||||||
|
If GetMainPrivateProfileString(S_WINDOW, K_TEMPLATEDIR, "", m_sTemplateDir) = 0 Then
|
||||||
|
m_sTemplateDir = m_sDataRoot & "\" & TEMPLATE_DIR
|
||||||
|
End If
|
||||||
|
' impostazione direttorio offerte
|
||||||
|
If GetMainPrivateProfileString(S_WINDOW, K_ESTIMATIONDIR, "", m_sEstimationDir) = 0 Then
|
||||||
|
m_sEstimationDir = m_sDataRoot & "\" & ESTIMATIONS_DIR
|
||||||
|
End If
|
||||||
|
' Verifico indice di istanza
|
||||||
|
ManageInstance()
|
||||||
|
' Imposto tipo di chiave
|
||||||
|
EgtSetLockType(KEY_TYPE.HW)
|
||||||
|
' Leggo e imposto chiave di protezione
|
||||||
|
Dim sLicFileName As String = String.Empty
|
||||||
|
GetMainPrivateProfileString(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)
|
||||||
|
' Impostazioni per chiave di rete
|
||||||
|
Dim bNetKey As Boolean = ( GetMainPrivateProfileInt( S_GENERAL, K_NETKEY, 0) = 1)
|
||||||
|
EgtSetNetHwKey( bNetKey)
|
||||||
|
Dim sLockId As String = ""
|
||||||
|
EgtUILib.GetPrivateProfileString( S_LICENCE, K_LOCKID, "", sLockId, sLicFile)
|
||||||
|
If Not String.IsNullOrEmpty( sLockId) Then
|
||||||
|
EgtSetLockId( sLockId)
|
||||||
|
End If
|
||||||
|
' Recupero livello e opzioni della chiave
|
||||||
|
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2512, 1, m_nKeyLevel) And
|
||||||
|
EgtGetKeyOptions(3279, 2512, 1, m_nKeyOptions)
|
||||||
|
' Inizializzazione generale di EgtInterface
|
||||||
|
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||||
|
m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||||
|
Dim sLogMsg As String = "User " & Environment.MachineName & "\" & Environment.UserName & " (" & m_nInstance.ToString() & ")" & vbLf &
|
||||||
|
My.Application.Info.Title.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)
|
||||||
|
EgtSetTempDir(m_sTempDir)
|
||||||
|
EgtSetIniFile(IniFile.m_sIniFile)
|
||||||
|
' Leggo direttorio dei messaggi (se manca uso direttorio di configurazione)
|
||||||
|
Dim sMsgDir As String = String.Empty
|
||||||
|
If GetMainPrivateProfileString(S_GENERAL, K_MESSAGESDIR, "", sMsgDir) = 0 Then
|
||||||
|
sMsgDir = m_sConfigDir
|
||||||
|
End If
|
||||||
|
'' Inizializzo OptionModule
|
||||||
|
'OptionModule.InitOptionModule()
|
||||||
|
' Leggo lingua corrente
|
||||||
|
Dim sLanguage As String = String.Empty
|
||||||
|
GetMainPrivateProfileString(S_GENERAL, K_MESSAGES, "", sLanguage)
|
||||||
|
' Recupero nome file dei messaggi della lingua corrente
|
||||||
|
Dim sMsgName As String = "EgalTechIta.txt"
|
||||||
|
Dim nIndex As Integer = 1
|
||||||
|
While True
|
||||||
|
Dim ReadLanguage As Language = GetMainPrivateProfileLanguage(S_LANGUAGES, K_LANGUAGE & nIndex)
|
||||||
|
If IsNothing(ReadLanguage) Then Exit While
|
||||||
|
If String.Compare(ReadLanguage.Name, sLanguage, True) = 0 Then
|
||||||
|
sMsgName = ReadLanguage.FilePath
|
||||||
|
Exit While
|
||||||
|
End If
|
||||||
|
nIndex += 1
|
||||||
|
End While
|
||||||
|
' Leggo file messaggi
|
||||||
|
Dim sMsgFilePath As String = sMsgDir & "\" & sMsgName
|
||||||
|
If Not EgtLoadMessages(sMsgFilePath) Then
|
||||||
|
EgtOutLog("Error in EgtLoadMessages")
|
||||||
|
End If
|
||||||
|
' Leggo e imposto unità di misura per interfaccia utente
|
||||||
|
EgtSetUiUnits(GetMainPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0)
|
||||||
|
' Leggo e imposto livello utilizzatore
|
||||||
|
m_nUserLevel = Math.Min(m_nKeyLevel, GetMainPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
|
||||||
|
' Imposto dir font Nfe e font default
|
||||||
|
Dim sNfeDir As String = String.Empty
|
||||||
|
GetMainPrivateProfileString(S_GEOMDB, K_NFEFONTDIR, "", sNfeDir)
|
||||||
|
Dim sDefFont As String = String.Empty
|
||||||
|
GetMainPrivateProfileString(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
|
||||||
|
GetMainPrivateProfileString(S_LUA, K_LIBSDIR, "", sLuaLibsDir)
|
||||||
|
EgtSetLuaLibs(sLuaLibsDir)
|
||||||
|
Dim sLuaBaseLib As String = String.Empty
|
||||||
|
GetMainPrivateProfileString(S_LUA, K_BASELIB, "EgtBase", sLuaBaseLib)
|
||||||
|
EgtLuaRequire(sLuaBaseLib)
|
||||||
|
' Info su opzioni chiave
|
||||||
|
EgtOutLog("KeyOptions : " & bKey.ToString() & " " & m_nKeyOptions.ToString())
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ManageInstance()
|
||||||
|
Dim bCreated As Boolean
|
||||||
|
Try
|
||||||
|
m_objMutex = New Mutex(False, "Global\EgtWindowMaker", bCreated)
|
||||||
|
Catch
|
||||||
|
bCreated = False
|
||||||
|
End Try
|
||||||
|
m_bFirstInstance = bCreated
|
||||||
|
If bCreated Then
|
||||||
|
' Prima istanza
|
||||||
|
m_nInstance = 1
|
||||||
|
' Aggiorno stato istanze attive
|
||||||
|
WriteMainPrivateProfileString(S_GENERAL, K_INSTANCES, m_nInstance.ToString())
|
||||||
|
Else
|
||||||
|
' Leggo il massimo numero di istanze ammesse
|
||||||
|
Dim nMaxInst As Integer = GetMaxInstances()
|
||||||
|
' Cerco il primo indice di istanza libero
|
||||||
|
Dim nTmp As Integer = GetMainPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
|
||||||
|
m_nInstance = 1
|
||||||
|
Dim nMask As Integer = 1
|
||||||
|
While (nTmp And nMask) <> 0 And m_nInstance <= MAX_INST
|
||||||
|
m_nInstance += 1
|
||||||
|
nMask *= 2
|
||||||
|
End While
|
||||||
|
' Se l'indice supera il massimo
|
||||||
|
If m_nInstance > nMaxInst 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("EgtWindowMakerR32")
|
||||||
|
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("EgtWindowMakerR64")
|
||||||
|
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
|
||||||
|
' Aggiorno stato istanze attive
|
||||||
|
nTmp += (1 << (m_nInstance - 1))
|
||||||
|
WriteMainPrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Function GetKeyOption(nKeyOpt As KEY_OPT) As Boolean
|
||||||
|
Return ((m_nKeyOptions And nKeyOpt) <> 0)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function GetMaxInstances() As Integer
|
||||||
|
' Leggo il massimo numero di istanze ammesse
|
||||||
|
Dim nMaxInst As Integer = GetMainPrivateProfileInt(S_GENERAL, K_MAXINST, 1)
|
||||||
|
Return 1 ' Max(1, Min(nMaxInst, MAX_INST))
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Sub Close()
|
||||||
|
' Terminazione generale di EgtInterface
|
||||||
|
EgtExit()
|
||||||
|
' Aggiorno istanze usate
|
||||||
|
m_objMutex.WaitOne(1000)
|
||||||
|
Dim nTmp As Integer = GetMainPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
|
||||||
|
nTmp -= (1 << (m_nInstance - 1))
|
||||||
|
WriteMainPrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
|
||||||
|
m_objMutex.ReleaseMutex()
|
||||||
|
' Rilascio mutex
|
||||||
|
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' METHODS
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<Window x:Class="MainWindowV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
|
xmlns:local="clr-namespace:EgtWindowMaker">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TabControl Grid.Row="1"
|
||||||
|
SelectedIndex="{Binding SelPage}"
|
||||||
|
Style="{StaticResource TabControl.NoHeader}">
|
||||||
|
<TabItem Header="Home">
|
||||||
|
<local:HomePageV DataContext="{StaticResource HomePageVM}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="CRM">
|
||||||
|
<local:CRMPageV DataContext="{StaticResource CRMPageVM}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Producing">
|
||||||
|
<local:ProducingPageV DataContext="{StaticResource ProducingPageVM}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="WindowManager">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<local:ProjManagerV DataContext="{StaticResource ProjManagerVM}"/>
|
||||||
|
<local:ManageWindowV Grid.Row="1"
|
||||||
|
DataContext="{StaticResource ManageWindowVM}"/>
|
||||||
|
</Grid>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
</Window>
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
Imports EgtWPFLib5
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports System.Windows.Interop
|
||||||
|
|
||||||
|
Class MainWindowV
|
||||||
|
|
||||||
|
Private m_MainWindowVM As MainWindowVM
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
m_MainWindowVM = New MainWindowVM
|
||||||
|
' Funzione che interpreta l'xaml
|
||||||
|
InitializeComponent()
|
||||||
|
Me.DataContext = m_MainWindowVM
|
||||||
|
' creo finestra della scena
|
||||||
|
AddHandler Me.Loaded, AddressOf MainWindowV_Loaded
|
||||||
|
AddHandler Me.ContentRendered, AddressOf MainWindowV_ContentRendered
|
||||||
|
AddHandler Me.Closing, AddressOf MainWindowV_Closing
|
||||||
|
AddHandler Me.KeyDown, AddressOf MainWindowV_KeyDown
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' CONSTRUCTOR
|
||||||
|
|
||||||
|
#Region "EVENTS"
|
||||||
|
|
||||||
|
Private Sub MainWindowV_Loaded(sender As Object, e As RoutedEventArgs)
|
||||||
|
' Carico e imposto posizione finestra
|
||||||
|
WinPosFromIniToWindow(S_GENERAL, K_WINPLACE, Me)
|
||||||
|
' Recupero e imposto handle finestra principale
|
||||||
|
Dim hMainWnd As IntPtr = New WindowInteropHelper(Application.Current.MainWindow).Handle
|
||||||
|
EgtSetMainWindowHandle(hMainWnd)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub MainWindowV_ContentRendered(sender As Object, e As EventArgs)
|
||||||
|
m_MainWindowVM.ContentRendered()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub MainWindowV_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs)
|
||||||
|
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
|
||||||
|
e.Cancel = True
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' Salvo posizione finestra (se non minimizzata)
|
||||||
|
If WindowState <> WindowState.Minimized Then
|
||||||
|
WinPosFromWindowToIni(Me, S_GENERAL, K_WINPLACE)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub MainWindowV_KeyDown(sender As Object, e As KeyEventArgs)
|
||||||
|
m_MainWindowVM.KeyDown(e.Key)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub MainWindowV_Drop(sender As Object, e As DragEventArgs)
|
||||||
|
' Se drag di file
|
||||||
|
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
|
||||||
|
' Attivo il programma
|
||||||
|
Me.Activate()
|
||||||
|
' Recupero l'array di stringhe con i nomi del file
|
||||||
|
Dim sFiles() As String = DirectCast(e.Data.GetData(DataFormats.FileDrop), String())
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' EVENTS
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,280 @@
|
|||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
Imports System.IO
|
||||||
|
Imports System.Threading
|
||||||
|
Imports System.Windows.Threading
|
||||||
|
|
||||||
|
Public Class MainWindowVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
|
||||||
|
' Riferimento al Model della MainWindow
|
||||||
|
Private m_MainWindowM As MainWindowM
|
||||||
|
Friend ReadOnly Property MainWindowM As MainWindowM
|
||||||
|
Get
|
||||||
|
Return m_MainWindowM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Funzioni di callback per output in interfaccia da LUA
|
||||||
|
Private m_ProcEventsCallback As New ProcessEventsCallback(AddressOf ProcessEvents)
|
||||||
|
|
||||||
|
' 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
|
||||||
|
|
||||||
|
' Titolo
|
||||||
|
Public ReadOnly Property sTitle As String
|
||||||
|
Get
|
||||||
|
Return "EgtWindowMaker"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sProjectName As String
|
||||||
|
Get
|
||||||
|
Dim sFilePath As String = ""
|
||||||
|
EgtGetCurrFilePath(sFilePath)
|
||||||
|
If String.IsNullOrEmpty(sFilePath) Then
|
||||||
|
sFilePath = EgtMsg(MSG_TOPCOMMANDBAR + 1) & Map.refMainWindowVM.MainWindowM.nInstance.ToString()
|
||||||
|
Return sFilePath
|
||||||
|
Else
|
||||||
|
Return Path.GetFileNameWithoutExtension(sFilePath) & If(EgtGetModified(), "*", "")
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sProjectPath As String
|
||||||
|
Get
|
||||||
|
Dim sFilePath As String = ""
|
||||||
|
EgtGetCurrFilePath(sFilePath)
|
||||||
|
If String.IsNullOrEmpty(sFilePath) Then
|
||||||
|
sFilePath = EgtMsg(MSG_TOPCOMMANDBAR + 1) & Map.refMainWindowVM.MainWindowM.nInstance.ToString()
|
||||||
|
End If
|
||||||
|
Return sFilePath
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_MachinePanelVM As MachinePanelVM
|
||||||
|
Public ReadOnly Property MachinePanelVM As MachinePanelVM
|
||||||
|
Get
|
||||||
|
Return m_MachinePanelVM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelPage As Pages
|
||||||
|
Public Property SelPage As Integer
|
||||||
|
Get
|
||||||
|
Return m_SelPage
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
SetSelPage(value)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Friend Sub SetSelPage(Page As Pages)
|
||||||
|
Dim bOk As Boolean = True
|
||||||
|
' Esco dallo stato corrente
|
||||||
|
Select Case m_SelPage
|
||||||
|
Case Pages.HOME
|
||||||
|
'bOk = ExitHOME()
|
||||||
|
Case Pages.ESTIMATING
|
||||||
|
'bOk = ExitESTIMATING()
|
||||||
|
Case Pages.PRODUCING
|
||||||
|
' bOk = ExitPRODUCING()
|
||||||
|
Case Pages.DESIGNING
|
||||||
|
'bOk = ExitDESIGNING()
|
||||||
|
End Select
|
||||||
|
If bOk Then
|
||||||
|
' Entro nel nuovo stato
|
||||||
|
m_SelPage = Page
|
||||||
|
Select Case m_SelPage
|
||||||
|
Case Pages.HOME
|
||||||
|
'bOk = InitHOME()
|
||||||
|
Case Pages.ESTIMATING
|
||||||
|
'bOk = InitESTIMATING()
|
||||||
|
bOk = Map.refCRMPageVM.InitCRMPage()
|
||||||
|
Case Pages.PRODUCING
|
||||||
|
'bOk = InitPRODUCING()
|
||||||
|
Case Pages.DESIGNING
|
||||||
|
'bOk = InitDESIGNING()
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
NotifyPropertyChanged(NameOf(SelPage))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' definizione comandi
|
||||||
|
Private m_cmdAboutBox As ICommand
|
||||||
|
Private m_cmdCloseApplication As ICommand
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
' Avvio l'inizializzazione della mappa passandogli il riferimento al MainWindowVM
|
||||||
|
Map.BeginInit(Me)
|
||||||
|
' Creo Model della MainWindow
|
||||||
|
m_MainWindowM = New MainWindowM
|
||||||
|
' inizializzo machine panel
|
||||||
|
m_MachinePanelVM = New MachinePanelVM
|
||||||
|
' Installo funzione gestione eventi per lua
|
||||||
|
EgtSetProcessEvents(m_ProcEventsCallback)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' CONSTRUCTOR
|
||||||
|
|
||||||
|
'#Region "METHODS"
|
||||||
|
|
||||||
|
Friend Sub ContentRendered()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub KeyDown(PressedKey As Key)
|
||||||
|
' ' Con ESC esco dall'azione corrente
|
||||||
|
' If PressedKey = Key.Escape Then
|
||||||
|
' ' resetto sempre input box a meno che non sia nelle ribs e stia creando il percorso
|
||||||
|
' If Not (Not IsNothing(Map.refTopPanelVM.SelPage) AndAlso Map.refTopPanelVM.SelPage = Pages.MODIFY AndAlso
|
||||||
|
' Not IsNothing(Map.refTopPanelVM.SelModifyMode) AndAlso
|
||||||
|
' ((Map.refTopPanelVM.SelModifyMode.ModifyMode = ModifyModes.RIBS AndAlso Map.refRibPanelVM.bIsCreatingPath) OrElse
|
||||||
|
' (Map.refTopPanelVM.SelModifyMode.ModifyMode = ModifyModes.SHELLNUMBER AndAlso Map.refShellNumberPanelVM.bIsCreatingPath))) Then
|
||||||
|
' Map.refControllerInputPanelVM.ResetInputBox()
|
||||||
|
' End If
|
||||||
|
' If Not IsNothing(Map.refTopPanelVM.SelPage) AndAlso Map.refTopPanelVM.SelPage = Pages.MODIFY AndAlso
|
||||||
|
' Not IsNothing(Map.refTopPanelVM.SelModifyMode) Then
|
||||||
|
' Dim nNewExtrusionLayerId As Integer = GDB_ID.NULL
|
||||||
|
' If Map.refTopPanelVM.SelModifyMode.ModifyMode = ModifyModes.RIBS Then
|
||||||
|
' ' cancello eventuali layer di modifica
|
||||||
|
' If Not IsNothing(Map.refTopPanelVM.SelPart) AndAlso Not Map.refRibPanelVM.bIsCreatingPath Then
|
||||||
|
' nNewExtrusionLayerId = EgtGetFirstNameInGroup(Map.refTopPanelVM.SelPart.nPartId, LAY_NEWEXTRUSION)
|
||||||
|
' If nNewExtrusionLayerId <> GDB_ID.NULL Then
|
||||||
|
' EgtErase(nNewExtrusionLayerId)
|
||||||
|
' End If
|
||||||
|
' Dim nNewRibLayerId As Integer = EgtGetFirstNameInGroup(Map.refTopPanelVM.SelPart.nPartId, LAY_NEWRIB)
|
||||||
|
' If nNewRibLayerId <> GDB_ID.NULL Then
|
||||||
|
' EgtErase(nNewRibLayerId)
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' ' annullo trasparenza attivata durante edit rib
|
||||||
|
' If Not IsNothing(Map.refRibPanelVM.SelRib) Then
|
||||||
|
' 'EgtSetAlpha(Map.refRibPanelVM.SelRib.nExtrusionId, 100)
|
||||||
|
' End If
|
||||||
|
' ElseIf Map.refTopPanelVM.SelModifyMode.ModifyMode = ModifyModes.SHELLNUMBER Then
|
||||||
|
' ' cancello eventuali layer di modifica
|
||||||
|
' If Not IsNothing(Map.refTopPanelVM.SelPart) AndAlso Not Map.refShellNumberPanelVM.bIsCreatingPath Then
|
||||||
|
' nNewExtrusionLayerId = EgtGetFirstNameInGroup(Map.refTopPanelVM.SelPart.nPartId, LAY_NEWEXTRUSION)
|
||||||
|
' If nNewExtrusionLayerId <> GDB_ID.NULL Then
|
||||||
|
' EgtErase(nNewExtrusionLayerId)
|
||||||
|
' End If
|
||||||
|
' Dim nNewRibLayerId As Integer = EgtGetFirstNameInGroup(Map.refTopPanelVM.SelPart.nPartId, LAY_NEWRIB)
|
||||||
|
' If nNewRibLayerId <> GDB_ID.NULL Then
|
||||||
|
' EgtErase(nNewRibLayerId)
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' ' annullo trasparenza attivata durante edit rib
|
||||||
|
' If Not IsNothing(Map.refShellNumberPanelVM.SelShellNumber) Then
|
||||||
|
' 'EgtSetAlpha(Map.refShellNumberPanelVM.SelShellNumber.nExtrusionId, 100)
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' ' reset Azione corrente
|
||||||
|
' Map.refSceneHostVM.MainController.ResetStatus()
|
||||||
|
' ' se misura attiva, la disattivo
|
||||||
|
' If Map.refInstrumentPanelVM.GetDistIsChecked Then
|
||||||
|
' Map.refInstrumentPanelVM.SetGetDistance_IsChecked(False)
|
||||||
|
' End If
|
||||||
|
' ' pulisco output
|
||||||
|
' Map.refMyStatusBarVM.ClearOutputMessage()
|
||||||
|
' End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer
|
||||||
|
' If Map.refSliceManagerVM.bCalculating OrElse Map.refSliceManagerVM.bCalcSolid Then
|
||||||
|
' Map.refSliceManagerVM.ProcessEvents(nProg, nPause)
|
||||||
|
' End If
|
||||||
|
' If Not IsNothing(Map.refImportLoadingWndVM) Then
|
||||||
|
' Map.refImportLoadingWndVM.ProcessEvents(nProg, nPause)
|
||||||
|
' End If
|
||||||
|
' Map.refMyStatusBarVM.ProcessEvents(nProg, nPause)
|
||||||
|
' Return 0
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Sub CloseApplication()
|
||||||
|
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
'' gestisco la chiusura della simulazione
|
||||||
|
'If Map.refRightPanelVM.SelPanel = RightPanelVM.Panels.SIMULATION AndAlso Not IsNothing(Map.refSimulationPanelVM) Then
|
||||||
|
' Map.refSimulationPanelVM.MySimul.ResetSimulation()
|
||||||
|
'End If
|
||||||
|
' Gestisco eventuale file corrente modificato
|
||||||
|
Dim bOk As Boolean = True
|
||||||
|
'bOk = ProjFileVM.VerifyProjectModification(Map.refProjManagerVM.CurrProj, ProjectType.PROJ)
|
||||||
|
' se salvataggio annullato, rimango
|
||||||
|
If Not bOk Then Return
|
||||||
|
Dim bAllowClose As Boolean = Map.refSceneHostVM.MainController.ManageModified()
|
||||||
|
' Salvo impostazione macchina corrente
|
||||||
|
'Map.refMachinePanelVM.SaveCurrentMachine()
|
||||||
|
' Se non confermata chiusura, esco
|
||||||
|
If Not bAllowClose Then Return
|
||||||
|
' salvo modo di visualizzazione
|
||||||
|
WriteMainPrivateProfileString(S_SCENE, K_SHOWMODE, EgtGetShowMode().ToString())
|
||||||
|
' Salvo stato visualizzazione direzione curve
|
||||||
|
WriteMainPrivateProfileString(S_SCENE, K_CURVEDIR, If(EgtGetShowCurveDirection(), "1", "0"))
|
||||||
|
'' Salvo stato visualizzazione griglia
|
||||||
|
'WriteMainPrivateProfileString(S_GRID, K_SHOWGRID, If(Map.refMyStatusBarVM.bGridVisibility, "1", "0"))
|
||||||
|
' Termino il Model
|
||||||
|
m_MainWindowM.Close()
|
||||||
|
' Termino il programma
|
||||||
|
Application.Current.Shutdown()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "AboutBoxCommand"
|
||||||
|
|
||||||
|
' Returns a command that manage the MainWindow_Unloaded command
|
||||||
|
Public ReadOnly Property AboutBoxCommand() As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdAboutBox Is Nothing Then
|
||||||
|
m_cmdAboutBox = New Command(AddressOf AboutBox)
|
||||||
|
End If
|
||||||
|
Return m_cmdAboutBox
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||||
|
Public Sub AboutBox(ByVal param As Object)
|
||||||
|
'Dim AboutBoxWindow As New AboutBoxV
|
||||||
|
'AboutBoxWindow.Owner = Application.Current.MainWindow
|
||||||
|
'AboutBoxWindow.ShowDialog()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' AboutBoxCommand
|
||||||
|
|
||||||
|
#Region "CloseApplicationCommand"
|
||||||
|
|
||||||
|
' Returns a command that manage the MainWindow_Unloaded command
|
||||||
|
Public ReadOnly Property CloseApplicationCommand() As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdCloseApplication Is Nothing Then
|
||||||
|
m_cmdCloseApplication = New Command(AddressOf CloseApplication)
|
||||||
|
End If
|
||||||
|
Return m_cmdCloseApplication
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||||
|
Public Sub CloseApplication(ByVal param As Object)
|
||||||
|
'If Map.refSliceManagerVM.bCalculating Then
|
||||||
|
' MessageBox.Show("Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
|
' Return
|
||||||
|
'End If
|
||||||
|
CloseApplication()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' CloseApplicationCommand
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,420 @@
|
|||||||
|
<Grid x:Class="ManageWindowV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||||
|
xmlns:local="clr-namespace:EgtWindowMaker">
|
||||||
|
<Grid.Resources>
|
||||||
|
<local:AreaToSplitPageConverter x:Key="AreaToSplitPageConverter"/>
|
||||||
|
<local:OptionTypeToVisibilityConverter x:Key="OptionTypeToVisibilityConverter"/>
|
||||||
|
<sys:Double x:Key="Text">1</sys:Double>
|
||||||
|
<sys:Double x:Key="Lenght">2</sys:Double>
|
||||||
|
<sys:Double x:Key="Combo">3</sys:Double>
|
||||||
|
</Grid.Resources>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="400"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TabControl Grid.Row="1"
|
||||||
|
TabStripPlacement="Left"
|
||||||
|
SelectedIndex="{Binding SelParamCathegoryIndex}">
|
||||||
|
<TabItem Header="General"
|
||||||
|
Style="{StaticResource TabItem.ManageWindow}">
|
||||||
|
<StackPanel Margin="10">
|
||||||
|
<UniformGrid Columns="2">
|
||||||
|
<TextBlock Text="Material"
|
||||||
|
Style="{StaticResource TextBlock.ManageWindow}"/>
|
||||||
|
<ComboBox ItemsSource="{Binding MaterialList}"
|
||||||
|
SelectedItem="{Binding SelMaterial}"
|
||||||
|
Margin="0,0,0,10"
|
||||||
|
Style="{StaticResource ComboBox.ManageWindow}"/>
|
||||||
|
<TextBlock Text="Profile"
|
||||||
|
Style="{StaticResource TextBlock.ManageWindow}"/>
|
||||||
|
<TextBox Text="{Binding CurrWindow.sProfilePath}"
|
||||||
|
Style="{StaticResource TextBox.ManageWindow}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</StackPanel>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Frame"
|
||||||
|
Style="{StaticResource TabItem.ManageWindow}">
|
||||||
|
<StackPanel Margin="10">
|
||||||
|
<GroupBox Header="Shape & Dimensions"
|
||||||
|
Margin="0,0,0,10">
|
||||||
|
<StackPanel Margin="10">
|
||||||
|
<ComboBox ItemsSource="{Binding SelArea.ShapeList}"
|
||||||
|
SelectedIndex="{Binding SelArea.SelShapeIndex}"
|
||||||
|
Margin="0,0,0,5"/>
|
||||||
|
<ItemsControl ItemsSource="{Binding SelArea.DimensionList}"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<UniformGrid Columns="2"
|
||||||
|
Margin="0,5">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="{Binding nIndex}"/>
|
||||||
|
<TextBlock Text="{Binding sName}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<TextBox Text="{Binding dValue}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
</StackPanel>
|
||||||
|
</GroupBox>
|
||||||
|
<GroupBox Header="Joints"
|
||||||
|
Margin="0,0,0,10">
|
||||||
|
<ItemsControl ItemsSource="{Binding SelArea.JointList}"
|
||||||
|
Padding="10,5">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<UniformGrid Columns="2"
|
||||||
|
Margin="0,5">
|
||||||
|
<TextBlock Text="{Binding nIndex}"/>
|
||||||
|
<ComboBox ItemsSource="{Binding JointTypeList}"
|
||||||
|
SelectedIndex="{Binding SelJointTypeIndex}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
</GroupBox>
|
||||||
|
<Expander IsExpanded="{Binding SelArea.BottomRail}"
|
||||||
|
Header="Bottom Rail"
|
||||||
|
Margin="0,0,0,10"
|
||||||
|
Style="{StaticResource Expander.CheckBoxHeader}">
|
||||||
|
<UniformGrid Columns="2"
|
||||||
|
Margin="0,5">
|
||||||
|
<TextBlock Text="Quantità"/>
|
||||||
|
<TextBox Text="{Binding SelArea.BottomRailQty}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</Expander>
|
||||||
|
<GroupBox Header="Threshold"
|
||||||
|
Padding="10,5"
|
||||||
|
Margin="0,0,0,10">
|
||||||
|
<StackPanel>
|
||||||
|
<ComboBox ItemsSource="{Binding DataContext.CurrWindow.ThresholdTypeList, RelativeSource={RelativeSource AncestorType={x:Type local:ManageWindowV}}}"
|
||||||
|
SelectedItem="{Binding SelThresholdType}"
|
||||||
|
Margin="0,5"/>
|
||||||
|
<ComboBox ItemsSource="{Binding DataContext.CurrWindow.ThresholdList, RelativeSource={RelativeSource AncestorType={x:Type local:ManageWindowV}}}"
|
||||||
|
SelectedItem="{Binding SelThreshold}"
|
||||||
|
Margin="0,5"/>
|
||||||
|
</StackPanel>
|
||||||
|
</GroupBox>
|
||||||
|
<Button Content="Calcola"
|
||||||
|
Command="{Binding ApplyFrame_Command}"
|
||||||
|
Style="{StaticResource Button.ManageWindow.LeftBar}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</TabItem>
|
||||||
|
<!--<TabItem Header="Joint">
|
||||||
|
<StackPanel>
|
||||||
|
<ItemsControl ItemsSource="{Binding SelArea.JointList}">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<UniformGrid Columns="2">
|
||||||
|
<TextBlock Text="{Binding nIndex}"/>
|
||||||
|
<ComboBox ItemsSource="{Binding JointTypeList}"
|
||||||
|
SelectedIndex="{Binding SelJointTypeIndex}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
</StackPanel>
|
||||||
|
</TabItem>-->
|
||||||
|
<TabItem Header="Split & Rail"
|
||||||
|
Style="{StaticResource TabItem.ManageWindow}">
|
||||||
|
<!--Oriz/Vert, Quota, ecc-->
|
||||||
|
<TabControl SelectedIndex="{Binding SelArea, Converter={StaticResource AreaToSplitPageConverter}}"
|
||||||
|
Margin="0"
|
||||||
|
Padding="0"
|
||||||
|
BorderThickness="0">
|
||||||
|
<TabControl.ItemContainerStyle>
|
||||||
|
<Style TargetType="{x:Type TabItem}">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed"/>
|
||||||
|
</Style>
|
||||||
|
</TabControl.ItemContainerStyle>
|
||||||
|
<TabItem>
|
||||||
|
<TextBlock Text="Select Area"
|
||||||
|
Style="{StaticResource TextBlock.ManageWindow.SelArea}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem>
|
||||||
|
<StackPanel Margin="10">
|
||||||
|
<TextBlock Text="Numero"
|
||||||
|
Margin="0,0,0,5"/>
|
||||||
|
<TextBox Text="{Binding SelArea.nSplitQty}"
|
||||||
|
Margin="0,0,0,10"/>
|
||||||
|
<UniformGrid Rows="1" Margin="0,0,0,5">
|
||||||
|
<TextBlock Text="Shape"
|
||||||
|
Style="{StaticResource TextBlock.ManageWindow}"/>
|
||||||
|
<ComboBox ItemsSource="{Binding SelArea.SplitShapeList}"
|
||||||
|
SelectedIndex="{Binding SelArea.SelSplitShapeIndex}"
|
||||||
|
Style="{StaticResource ComboBox.ManageWindow}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
<ItemsControl ItemsSource="{Binding SelArea.SplitPositionList}"
|
||||||
|
Margin="0,0,0,10">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<StackPanel Margin="0,5">
|
||||||
|
<TextBlock Text="Dimensione"
|
||||||
|
Margin="0,0,0,5"/>
|
||||||
|
<TextBox Text="{Binding dDimension}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
<Button Content="Calcola"
|
||||||
|
Command="{Binding ApplySplit_Command}"
|
||||||
|
Margin="0,0,0,10"
|
||||||
|
Style="{StaticResource Button.ManageWindow.LeftBar}"/>
|
||||||
|
<Button Content="Elimina"
|
||||||
|
Command="{Binding DeleteArea_Command}"
|
||||||
|
Margin="0,0,0,10"
|
||||||
|
Style="{StaticResource Button.ManageWindow.LeftBar}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
<!--<StackPanel>
|
||||||
|
<UniformGrid Columns="2">
|
||||||
|
<TextBlock Text="Cerniere"/>
|
||||||
|
<TextBox Grid.Column="1" Text="{Binding dHeight}"/>
|
||||||
|
<TextBlock Text="Maniglia"/>
|
||||||
|
<TextBox Grid.Column="1" Text="{Binding dWidth}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</StackPanel>-->
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Sash"
|
||||||
|
Style="{StaticResource TabItem.ManageWindow}">
|
||||||
|
<TabControl SelectedIndex="{Binding SelArea, Converter={StaticResource AreaToSplitPageConverter}}"
|
||||||
|
Margin="0"
|
||||||
|
Padding="0"
|
||||||
|
BorderThickness="0">
|
||||||
|
<TabControl.ItemContainerStyle>
|
||||||
|
<Style TargetType="{x:Type TabItem}">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed"/>
|
||||||
|
</Style>
|
||||||
|
</TabControl.ItemContainerStyle>
|
||||||
|
<TabItem>
|
||||||
|
<TextBlock Text="Select Area"
|
||||||
|
Style="{StaticResource TextBlock.ManageWindow.SelArea}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem>
|
||||||
|
<StackPanel Margin="10">
|
||||||
|
<!--Quantita', ecc-->
|
||||||
|
<TextBlock Text="Numero"
|
||||||
|
Margin="0,0,0,5"/>
|
||||||
|
<TextBox Text="{Binding SelArea.nSashQty}"
|
||||||
|
Margin="0,0,0,10"/>
|
||||||
|
<TextBlock Text="Orientamento"
|
||||||
|
Margin="0,0,0,5"/>
|
||||||
|
<RadioButton Content="Verticale"
|
||||||
|
IsChecked="{Binding SelArea.bIsSashVertical}"
|
||||||
|
GroupName="Orientation"
|
||||||
|
Margin="0,0,0,5"/>
|
||||||
|
<RadioButton Content="Orizzontale"
|
||||||
|
GroupName="Orientation"
|
||||||
|
Margin="0,0,0,10"/>
|
||||||
|
<CheckBox Content="Measure Glass"
|
||||||
|
IsChecked="{Binding SelArea.bIsMeasureGlass}"
|
||||||
|
Margin="0,0,0,5"/>
|
||||||
|
<ItemsControl ItemsSource="{Binding SelArea.SashList}"
|
||||||
|
Margin="0,0,0,5">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<GroupBox Margin="0,5"
|
||||||
|
Padding="10">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Text="Tipo di apertura"
|
||||||
|
Margin="0,0,0,5"/>
|
||||||
|
<ComboBox ItemsSource="{Binding OpeningTypeList}"
|
||||||
|
SelectedItem="{Binding SelOpeningType}"
|
||||||
|
DisplayMemberPath="Name"
|
||||||
|
Margin="0,0,0,10"/>
|
||||||
|
<TextBlock Text="Dimensione"
|
||||||
|
Margin="0,0,0,5"/>
|
||||||
|
<TextBox Text="{Binding dDimension}"
|
||||||
|
Margin="0,0,0,5"/>
|
||||||
|
<RadioButton Content="Handle"
|
||||||
|
IsChecked="{Binding bHasHandle}"
|
||||||
|
GroupName="HandleGroup"/>
|
||||||
|
</StackPanel>
|
||||||
|
</GroupBox>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
<GroupBox Header="Joints"
|
||||||
|
Margin="0,0,0,10">
|
||||||
|
<ItemsControl ItemsSource="{Binding SelArea.JointList}"
|
||||||
|
Padding="10,5">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<UniformGrid Columns="2"
|
||||||
|
Margin="0,5">
|
||||||
|
<TextBlock Text="{Binding nIndex}"/>
|
||||||
|
<ComboBox ItemsSource="{Binding JointTypeList}"
|
||||||
|
SelectedIndex="{Binding SelJointTypeIndex}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
</GroupBox>
|
||||||
|
<Expander IsExpanded="{Binding SelArea.BottomRail}"
|
||||||
|
Header="Bottom Rail"
|
||||||
|
Margin="0,0,0,10"
|
||||||
|
Style="{StaticResource Expander.CheckBoxHeader}">
|
||||||
|
<UniformGrid Columns="2"
|
||||||
|
Margin="0,5">
|
||||||
|
<TextBlock Text="Quantità"/>
|
||||||
|
<TextBox Text="{Binding SelArea.BottomRailQty}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</Expander>
|
||||||
|
<TextBlock Text="Modello ferramenta"
|
||||||
|
Margin="0,0,0,5"/>
|
||||||
|
<ComboBox ItemsSource="{Binding SelArea.HardwareList}"
|
||||||
|
SelectedItem="{Binding SelArea.SelHardware}"
|
||||||
|
DisplayMemberPath="sName"
|
||||||
|
Margin="0,0,0,10"/>
|
||||||
|
<Expander Header="Hardware Options"
|
||||||
|
Margin="0,0,0,10">
|
||||||
|
<ItemsControl ItemsSource="{Binding SelArea.HwdOptionList}"
|
||||||
|
Grid.IsSharedSizeScope="True"
|
||||||
|
Margin="0,5"
|
||||||
|
Padding="10">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid Visibility="{Binding OptVisibility}"
|
||||||
|
Margin="0,5">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto" SharedSizeGroup="HdwOptCol"/>
|
||||||
|
<ColumnDefinition Width="1*" MinWidth="30"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Text="{Binding sDescription}"/>
|
||||||
|
<ComboBox Grid.Column="1"
|
||||||
|
ItemsSource="{Binding ValueList}"
|
||||||
|
SelectedValue="{Binding sValue}"
|
||||||
|
DisplayMemberPath="sDescription"
|
||||||
|
Visibility="{Binding Type, Converter={StaticResource OptionTypeToVisibilityConverter},
|
||||||
|
ConverterParameter={StaticResource Combo}}"/>
|
||||||
|
<TextBox Grid.Column="1"
|
||||||
|
Text="{Binding sValue}"
|
||||||
|
Visibility="{Binding Type, Converter={StaticResource OptionTypeToVisibilityConverter},
|
||||||
|
ConverterParameter={StaticResource Text}}"/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
</Expander>
|
||||||
|
<!--<TextBlock Text="Altezza maniglia"/>
|
||||||
|
<TextBox Text="{Binding SelArea.dHandleHeight}"/>-->
|
||||||
|
<Button Content="Calcola"
|
||||||
|
Command="{Binding ApplySash_Command}"
|
||||||
|
Margin="0,0,0,10"
|
||||||
|
Style="{StaticResource Button.ManageWindow.LeftBar}"/>
|
||||||
|
<Button Content="Elimina"
|
||||||
|
Command="{Binding DeleteArea_Command}"
|
||||||
|
Margin="0,0,0,10"
|
||||||
|
Style="{StaticResource Button.ManageWindow.LeftBar}"/>
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
<!--<StackPanel>
|
||||||
|
<UniformGrid Columns="2">
|
||||||
|
<TextBlock Text="Cerniere"/>
|
||||||
|
<TextBox Grid.Column="1" Text="{Binding dHeight}"/>
|
||||||
|
<TextBlock Text="Maniglia"/>
|
||||||
|
<TextBox Grid.Column="1" Text="{Binding dWidth}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</StackPanel>-->
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="Fill"
|
||||||
|
Style="{StaticResource TabItem.ManageWindow}">
|
||||||
|
<TabControl SelectedIndex="{Binding SelArea, Converter={StaticResource AreaToSplitPageConverter}}"
|
||||||
|
Margin="0"
|
||||||
|
Padding="0"
|
||||||
|
BorderThickness="0">
|
||||||
|
<TabControl.ItemContainerStyle>
|
||||||
|
<Style TargetType="{x:Type TabItem}">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed"/>
|
||||||
|
</Style>
|
||||||
|
</TabControl.ItemContainerStyle>
|
||||||
|
<TabItem>
|
||||||
|
<TextBlock Text="Select Area"
|
||||||
|
Style="{StaticResource TextBlock.ManageWindow.SelArea}"/>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem>
|
||||||
|
<StackPanel Margin="10">
|
||||||
|
<UniformGrid Columns="1"
|
||||||
|
HorizontalAlignment="Center">
|
||||||
|
<RadioButton Content="Glass"
|
||||||
|
GroupName="FillType"
|
||||||
|
IsChecked="{Binding SelArea.bGlass_IsChecked}"
|
||||||
|
Margin="0,0,0,10"/>
|
||||||
|
<RadioButton Content="Wood"
|
||||||
|
GroupName="FillType"
|
||||||
|
IsChecked="{Binding SelArea.bWood_IsChecked}"
|
||||||
|
Margin="0,0,0,10"/>
|
||||||
|
</UniformGrid>
|
||||||
|
<Button Content="Calcola"
|
||||||
|
Command="{Binding ApplyFill_Command}"
|
||||||
|
Margin="0,0,0,10"
|
||||||
|
Style="{StaticResource Button.ManageWindow.LeftBar}"/>
|
||||||
|
<Button Content="Elimina"
|
||||||
|
Command="{Binding DeleteArea_Command}"
|
||||||
|
Margin="0,0,0,10"
|
||||||
|
Style="{StaticResource Button.ManageWindow.LeftBar}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
<!--<StackPanel>
|
||||||
|
<UniformGrid Columns="2">
|
||||||
|
<TextBlock Text="Cerniere"/>
|
||||||
|
<TextBox Grid.Column="1" Text="{Binding dHeight}"/>
|
||||||
|
<TextBlock Text="Maniglia"/>
|
||||||
|
<TextBox Grid.Column="1" Text="{Binding dWidth}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</StackPanel>-->
|
||||||
|
</TabItem>
|
||||||
|
<!--<TabItem Header="Hardware">
|
||||||
|
<StackPanel>
|
||||||
|
-->
|
||||||
|
<!--Quantita', ecc-->
|
||||||
|
<!--
|
||||||
|
<Button Content="Test"
|
||||||
|
Command="{Binding Read_Command}"/>
|
||||||
|
<Button Content="Test"
|
||||||
|
Command="{Binding Write_Command}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</TabItem>-->
|
||||||
|
</TabControl>
|
||||||
|
</Grid>
|
||||||
|
<Grid Grid.Column="1">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<local:ShowPanelV DataContext="{StaticResource ShowPanelVM}"/>
|
||||||
|
<local:ViewPanelV DataContext="{StaticResource ViewPanelVM}"/>
|
||||||
|
<RadioButton Content="2D"
|
||||||
|
IsChecked="{Binding bIsShow2DOn}"
|
||||||
|
Margin="0,0,5,0"
|
||||||
|
Style="{StaticResource ToggleButton.ToolBar.DShowMode}"/>
|
||||||
|
<RadioButton Content="S3D"
|
||||||
|
IsChecked="{Binding bIsShowSimple3DOn}"
|
||||||
|
Margin="0,0,5,0"
|
||||||
|
Style="{StaticResource ToggleButton.ToolBar.DShowMode}"/>
|
||||||
|
<RadioButton Content="3D"
|
||||||
|
IsChecked="{Binding bIsShow3DOn}"
|
||||||
|
Margin="0,0,5,0"
|
||||||
|
Style="{StaticResource ToggleButton.ToolBar.DShowMode}"/>
|
||||||
|
<ToggleButton Content="Ferramenta"
|
||||||
|
IsChecked="{Binding HardwareShowMode}"
|
||||||
|
Style="{StaticResource ToggleButton.ToolBar.DShowMode}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<local:SceneHostV Grid.Row="1"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Public Class ManageWindowV
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
Imports System
|
||||||
|
Imports System.Globalization
|
||||||
|
Imports System.Reflection
|
||||||
|
Imports System.Resources
|
||||||
|
Imports System.Runtime.InteropServices
|
||||||
|
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
|
||||||
|
|
||||||
|
<Assembly: AssemblyTitle("EgtWindowMaker")>
|
||||||
|
<Assembly: AssemblyDescription("")>
|
||||||
|
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||||
|
<Assembly: AssemblyProduct("EgtWindowMaker")>
|
||||||
|
<Assembly: AssemblyCopyright("Copyright © 2022-2023 by Egalware 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("7177afe1-3bd7-4f56-b4b0-be5f0ac7c7e2")>
|
||||||
|
|
||||||
|
' 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("2.6.1.1")>
|
||||||
|
<Assembly: AssemblyFileVersion("2.6.1.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,62 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' This code was generated by a tool.
|
||||||
|
' Runtime Version:$clrversion$
|
||||||
|
'
|
||||||
|
' 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
|
||||||
|
|
||||||
|
|
||||||
|
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("$safeprojectname$.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(ByVal value As Global.System.Globalization.CultureInfo)
|
||||||
|
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,73 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <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
|
||||||
|
|
||||||
|
|
||||||
|
Namespace My
|
||||||
|
|
||||||
|
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||||
|
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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
|
||||||
|
End Namespace
|
||||||
|
|
||||||
|
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.EgtWindowMaker.My.MySettings
|
||||||
|
Get
|
||||||
|
Return Global.EgtWindowMaker.My.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,100 @@
|
|||||||
|
<Window x:Class="NewWindowWndV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:local="clr-namespace:EgtWindowMaker"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="Editor Finestra"
|
||||||
|
Height="900" Width="1200"
|
||||||
|
WindowStartupLocation="CenterOwner">
|
||||||
|
<TabControl SelectedIndex="{Binding SelPage}"
|
||||||
|
Style="{StaticResource TabControl.NoHeader}">
|
||||||
|
<TabItem Header="TemplateList">
|
||||||
|
<DataGrid ItemsSource="{Binding TemplateList}"
|
||||||
|
SelectedItem="{Binding SelTemplate}"
|
||||||
|
AutoGenerateColumns="False"
|
||||||
|
CanUserDeleteRows="False"
|
||||||
|
CanUserResizeRows="False"
|
||||||
|
SelectionMode="Single"
|
||||||
|
SelectionUnit="FullRow"
|
||||||
|
CanUserSortColumns="False"
|
||||||
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||||
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||||
|
HorizontalGridLinesBrush="Transparent"
|
||||||
|
VerticalGridLinesBrush="Transparent"
|
||||||
|
ColumnHeaderHeight="32"
|
||||||
|
HeadersVisibility="Column"
|
||||||
|
FontSize="12"
|
||||||
|
FontFamily="/Resources/Fonts/#Roboto"
|
||||||
|
FontWeight="Regular"
|
||||||
|
RowHeight="150"
|
||||||
|
BorderThickness="0">
|
||||||
|
<DataGrid.ColumnHeaderStyle>
|
||||||
|
<Style TargetType="{x:Type DataGridColumnHeader}">
|
||||||
|
<Setter Property="Background" Value="{StaticResource EgtWindow.DarkBlue}"/>
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="FontSize" Value="15"/>
|
||||||
|
<Setter Property="Padding" Value="10,0,10,0"/>
|
||||||
|
</Style>
|
||||||
|
</DataGrid.ColumnHeaderStyle>
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn Header="Id"
|
||||||
|
Binding="{Binding nId}"
|
||||||
|
Width="Auto"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn}"/>
|
||||||
|
<DataGridTemplateColumn Header="Immagine"
|
||||||
|
Width="1*">
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Image Source="{Binding sImagePath}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
<DataGridTextColumn Header="Name"
|
||||||
|
Binding="{Binding sName}"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Width="1*"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn}"/>
|
||||||
|
<DataGridTextColumn Header="Larghezza"
|
||||||
|
Binding="{Binding dWidth}"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Width="1*"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn}"/>
|
||||||
|
<DataGridTextColumn Header="Altezza"
|
||||||
|
Binding="{Binding dHeight}"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Width="1*"
|
||||||
|
ElementStyle="{StaticResource TextBlock.DataGridTextColumn}"/>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
<DataGrid.RowStyle>
|
||||||
|
<Style TargetType="{x:Type DataGridRow}">
|
||||||
|
<EventSetter Event="MouseDoubleClick" Handler="Row_MouseDoubleClick"/>
|
||||||
|
</Style>
|
||||||
|
</DataGrid.RowStyle>
|
||||||
|
</DataGrid>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem Header="ManageWindow">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<local:ManageWindowV DataContext="{Binding ManageWindowVM}"/>
|
||||||
|
<StackPanel Grid.Row="1"
|
||||||
|
Orientation="Horizontal"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Margin="10">
|
||||||
|
<Button Content="Ok"
|
||||||
|
Command="{Binding Ok_Command}"
|
||||||
|
Margin="0,0,10,0"
|
||||||
|
Style="{StaticResource Button.Confirm}"/>
|
||||||
|
<Button Content="Annulla"
|
||||||
|
IsCancel="True"
|
||||||
|
Style="{StaticResource Button.Confirm}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
</Window>
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
Public Class NewWindowWndV
|
||||||
|
|
||||||
|
Private WithEvents m_NewWindowWndVM As NewWindowWndVM
|
||||||
|
|
||||||
|
Sub New(Owner As Windows.Window, NewWindowWndVM As NewWindowWndVM)
|
||||||
|
|
||||||
|
' This call is required by the designer.
|
||||||
|
InitializeComponent()
|
||||||
|
|
||||||
|
Me.Owner = Owner
|
||||||
|
' Add any initialization after the InitializeComponent() call.
|
||||||
|
m_NewWindowWndVM = NewWindowWndVM
|
||||||
|
Me.DataContext = m_NewWindowWndVM
|
||||||
|
'AddHandler Me.ContentRendered, AddressOf ContentRendered2
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Row_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs)
|
||||||
|
If IsNothing(sender) OrElse TypeOf sender IsNot DataGridRow Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
Dim SelDataGridRow As DataGridRow = DirectCast(sender, DataGridRow)
|
||||||
|
If IsNothing(SelDataGridRow.DataContext) Then Return
|
||||||
|
m_NewWindowWndVM.TemplateConfirmed()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_NewWindowWndVM.m_CloseWindow
|
||||||
|
Me.DialogResult = bDialogResult
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,194 @@
|
|||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports System.IO
|
||||||
|
Imports EgtUILib.EgtInterface
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
|
Public Class NewWindowWndVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Public Enum NewWindowPages
|
||||||
|
TEMPATELIST = 0
|
||||||
|
EDIT = 1
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
||||||
|
|
||||||
|
Private m_ManageWindowVM As ManageWindowVM
|
||||||
|
Public ReadOnly Property ManageWindowVM As ManageWindowVM
|
||||||
|
Get
|
||||||
|
Return m_ManageWindowVM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nId As Integer
|
||||||
|
Public ReadOnly Property nId As Integer
|
||||||
|
Get
|
||||||
|
Return m_nId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_bNewWindow As Boolean = False
|
||||||
|
|
||||||
|
Private m_SelPage As NewWindowPages
|
||||||
|
Public Property SelPage As Integer
|
||||||
|
Get
|
||||||
|
Return m_SelPage
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
SetSelPage(value)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Friend Sub SetSelPage(Page As NewWindowPages)
|
||||||
|
Dim bOk As Boolean = True
|
||||||
|
' Esco dallo stato corrente
|
||||||
|
Select Case m_SelPage
|
||||||
|
Case NewWindowPages.TEMPATELIST
|
||||||
|
'bOk = ExitHOME()
|
||||||
|
Case NewWindowPages.EDIT
|
||||||
|
'bOk = ExitESTIMATING()
|
||||||
|
End Select
|
||||||
|
If bOk Then
|
||||||
|
' Entro nel nuovo stato
|
||||||
|
m_SelPage = Page
|
||||||
|
Select Case m_SelPage
|
||||||
|
Case NewWindowPages.TEMPATELIST
|
||||||
|
'bOk = InitHOME()
|
||||||
|
Case NewWindowPages.EDIT
|
||||||
|
'bOk = InitESTIMATING()
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
NotifyPropertyChanged(NameOf(SelPage))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_TemplateList As New ObservableCollection(Of TemplateRow)
|
||||||
|
Public ReadOnly Property TemplateList As ObservableCollection(Of TemplateRow)
|
||||||
|
Get
|
||||||
|
Return m_TemplateList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelTemplate As TemplateRow
|
||||||
|
Public Property SelTemplate As TemplateRow
|
||||||
|
Get
|
||||||
|
Return m_SelTemplate
|
||||||
|
End Get
|
||||||
|
Set(value As TemplateRow)
|
||||||
|
m_SelTemplate = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdOk As ICommand
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
m_ManageWindowVM = New ManageWindowVM
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub Init(nId As Integer)
|
||||||
|
If nId > 0 Then
|
||||||
|
m_nId = nId
|
||||||
|
m_ManageWindowVM.Read(Map.refMainWindowVM.MainWindowM.sEstimationDir & "\" & Map.refEstimationDetailPageVM.CurrEstimation.nId & "\" & m_nId & ".jwd")
|
||||||
|
m_SelPage = NewWindowPages.EDIT
|
||||||
|
Else
|
||||||
|
m_bNewWindow = True
|
||||||
|
m_nId = Map.refEstimationDetailPageVM.NewWindowId()
|
||||||
|
' carico template
|
||||||
|
Dim TemplateFiles() As String = Directory.GetFiles(Map.refMainWindowVM.MainWindowM.sTemplateDir)
|
||||||
|
For Each Template In TemplateFiles
|
||||||
|
If Path.GetExtension(Template).ToLower <> ".jwd" Then Continue For
|
||||||
|
Dim TemplateData() As String = Path.GetFileNameWithoutExtension(Template).Split("_"c)
|
||||||
|
Dim nTemplateId As Integer = 0
|
||||||
|
Integer.TryParse(TemplateData(0), nTemplateId)
|
||||||
|
Dim sName As String = ""
|
||||||
|
If TemplateData.Count > 1 Then
|
||||||
|
sName = TemplateData(1)
|
||||||
|
End If
|
||||||
|
Dim dWidth As Double = 0
|
||||||
|
If TemplateData.Count > 2 Then
|
||||||
|
StringToDouble(TemplateData(2), dWidth)
|
||||||
|
End If
|
||||||
|
Dim dHeight As Double = 0
|
||||||
|
If TemplateData.Count > 3 Then
|
||||||
|
StringToDouble(TemplateData(3), dHeight)
|
||||||
|
End If
|
||||||
|
m_TemplateList.Add(New TemplateRow(nTemplateId, sName, dWidth, dHeight))
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub TemplateConfirmed()
|
||||||
|
m_ManageWindowVM.Read(Map.refMainWindowVM.MainWindowM.sTemplateDir & "\" & SelTemplate.nId & "_" & SelTemplate.sName & "_" & SelTemplate.dWidth & "_" & SelTemplate.dHeight & ".jwd")
|
||||||
|
SetSelPage(NewWindowPages.EDIT)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Function OpenWindow(sFilePath As String) As Boolean
|
||||||
|
Dim bOk As Boolean = False
|
||||||
|
If String.IsNullOrEmpty(sFilePath) Then
|
||||||
|
' Recupero cartella dell'ultimo progetto aperto
|
||||||
|
Dim sDir As String = ""
|
||||||
|
GetMainPrivateProfileString(S_MRUFILES, K_FILE & 1, "", sDir)
|
||||||
|
If Not String.IsNullOrWhiteSpace(sDir) Then
|
||||||
|
sDir = Path.GetDirectoryName(sDir)
|
||||||
|
End If
|
||||||
|
Dim OpenFileDialog As New Windows.Forms.OpenFileDialog With {
|
||||||
|
.Title = "Open",
|
||||||
|
.Filter = "Window project|*.jwd",
|
||||||
|
.FilterIndex = 1,
|
||||||
|
.InitialDirectory = sDir
|
||||||
|
}
|
||||||
|
If Not OpenFileDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then Return False
|
||||||
|
sFilePath = OpenFileDialog.FileName
|
||||||
|
End If
|
||||||
|
Map.refManageWindowVM.Read(sFilePath)
|
||||||
|
Return bOk
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Sub SaveWindow()
|
||||||
|
' Recupero cartella dell'ultimo progetto aperto
|
||||||
|
Dim sDir As String = ""
|
||||||
|
GetMainPrivateProfileString(S_MRUFILES, K_FILE & 1, "", sDir)
|
||||||
|
If Not String.IsNullOrWhiteSpace(sDir) Then
|
||||||
|
sDir = Path.GetDirectoryName(sDir)
|
||||||
|
End If
|
||||||
|
Dim SaveFileDialog As New Windows.Forms.SaveFileDialog With {
|
||||||
|
.Title = "Open",
|
||||||
|
.Filter = "Window project|*.jwd",
|
||||||
|
.FilterIndex = 1,
|
||||||
|
.InitialDirectory = sDir
|
||||||
|
}
|
||||||
|
If Not SaveFileDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then Return
|
||||||
|
Map.refManageWindowVM.Write(SaveFileDialog.FileName)
|
||||||
|
EgtSaveFile(Path.ChangeExtension(SaveFileDialog.FileName, ".nge"), NGE.BIN)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "Ok"
|
||||||
|
|
||||||
|
Public ReadOnly Property Ok_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdOk Is Nothing Then
|
||||||
|
m_cmdOk = New Command(AddressOf Ok)
|
||||||
|
End If
|
||||||
|
Return m_cmdOk
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Ok()
|
||||||
|
If m_bNewWindow Then
|
||||||
|
' aggiungo riga della finestra all'ordine
|
||||||
|
Map.refEstimationDetailPageVM.AddWindow(m_nId)
|
||||||
|
End If
|
||||||
|
' salvo finestra
|
||||||
|
Dim sWindowPath As String = Map.refMainWindowVM.MainWindowM.sEstimationDir & "\" & Map.refEstimationDetailPageVM.CurrEstimation.nId & "\" & m_nId & ".jwd"
|
||||||
|
m_ManageWindowVM.Write(sWindowPath)
|
||||||
|
m_ManageWindowVM.SetDShowMode(ManageWindowVM.DShowModes.MODESIMPLE3D)
|
||||||
|
m_ManageWindowVM.GetImage(Path.ChangeExtension(sWindowPath, ".png"))
|
||||||
|
RaiseEvent m_CloseWindow(True)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Ok
|
||||||
|
|
||||||
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<UserControl x:Class="ProducingPageV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="clr-namespace:EgtWindowMaker"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Public Class ProducingPageV
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Public Class ProducingPageVM
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
<StackPanel x:Class="ProjManagerV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
Orientation="Horizontal"
|
||||||
|
IsEnabled="{Binding ProjManager_IsEnabled}">
|
||||||
|
|
||||||
|
<!--Barra superiore dei comandi-->
|
||||||
|
<Button Command="{Binding New_Command}"
|
||||||
|
ToolTip="{Binding NewToolTip}"
|
||||||
|
IsEnabled="{Binding ProjCmd_IsEnabled}"
|
||||||
|
Margin="0,0,2.5,0"
|
||||||
|
Style="{StaticResource ProjManager_Button}">
|
||||||
|
<Image Source="/Resources/ProjectManager/New.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Command="{Binding OpenCommand}"
|
||||||
|
ToolTip="{Binding OpenToolTip}"
|
||||||
|
ContextMenuService.Placement="Bottom"
|
||||||
|
Tag="{Binding}"
|
||||||
|
IsEnabled="{Binding ProjCmd_IsEnabled}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ProjManager_Button}">
|
||||||
|
<Button.ContextMenu>
|
||||||
|
<ContextMenu ItemsSource="{Binding MruFileNames}"
|
||||||
|
Style="{StaticResource Icarus_ContextMenu}">
|
||||||
|
<ContextMenu.Resources>
|
||||||
|
<Style TargetType="{x:Type MenuItem}" BasedOn="{StaticResource Icarus_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/ProjectManager/Open.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Command="{Binding SaveCommand}"
|
||||||
|
ToolTip="{Binding SaveToolTip}"
|
||||||
|
IsEnabled="{Binding ProjCmd_IsEnabled}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ProjManager_Button}">
|
||||||
|
<Image Source="/Resources/ProjectManager/Save.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<!--<Button Command="{Binding SaveAsCommand}"
|
||||||
|
ToolTip="{Binding SaveAsToolTip}"
|
||||||
|
IsEnabled="{Binding ProjCmd_IsEnabled}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ProjManager_Button}">
|
||||||
|
<Image Source="/Resources/ProjectManager/SaveAs.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Command="{Binding ImportCommand}"
|
||||||
|
ToolTip="{Binding ImportToolTip}"
|
||||||
|
IsEnabled="{Binding ProjCmd_IsEnabled}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ProjManager_Button}">
|
||||||
|
<Image Source="/Resources/ProjectManager/Import.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Command="{Binding ExportCommand}"
|
||||||
|
ToolTip="{Binding ExportToolTip}"
|
||||||
|
IsEnabled="{Binding ProjCmd_IsEnabled}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ProjManager_Button}">
|
||||||
|
<Image Source="/Resources/ProjectManager/Export.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>-->
|
||||||
|
<!--<Button Command="{Binding ExportCommand}" ToolTip="{Binding ExportToolTip}"
|
||||||
|
IsEnabled="{Binding DrawIsChecked}">
|
||||||
|
<Image Source="/Resources/ProjectManager/Export.png" Stretch="Uniform"/>
|
||||||
|
</Button>-->
|
||||||
|
<Button Command="{Binding OptionsCommand}"
|
||||||
|
ToolTip="{Binding OptionsToolTip}"
|
||||||
|
Margin="2.5,0,2.5,0"
|
||||||
|
Style="{StaticResource ProjManager_Button}">
|
||||||
|
<Image Source="/Resources/ProjectManager/Options.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Command="{Binding SendFeedbackCommand}"
|
||||||
|
ToolTip="{Binding SendFeedbackToolTip}"
|
||||||
|
Margin="2.5,0,0,0"
|
||||||
|
Style="{StaticResource ProjManager_Button}">
|
||||||
|
<Image Source="/Resources/ProjectManager/Send.png"
|
||||||
|
Style="{StaticResource Button_Image}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Public Class ProjManagerV
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,521 @@
|
|||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports System.IO
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports Newtonsoft.Json
|
||||||
|
|
||||||
|
Public Class ProjManagerVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Private m_ProjCmd_IsEnabled As Boolean = True
|
||||||
|
Public ReadOnly Property ProjCmd_IsEnabled As Boolean
|
||||||
|
Get
|
||||||
|
Return m_ProjCmd_IsEnabled
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetProjCmdIsEnabled(value As Boolean)
|
||||||
|
m_ProjCmd_IsEnabled = value
|
||||||
|
NotifyPropertyChanged(NameOf(ProjCmd_IsEnabled))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_CurrProject As String = ""
|
||||||
|
|
||||||
|
Private m_MruFiles As New MruList
|
||||||
|
Public ReadOnly Property MruFiles As MruList
|
||||||
|
Get
|
||||||
|
Return m_MruFiles
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property MruFileNames As ObservableCollection(Of String)
|
||||||
|
Get
|
||||||
|
For Each FileName In m_MruFiles.FileNames.ToList()
|
||||||
|
If Not File.Exists(FileName) Then
|
||||||
|
m_MruFiles.Remove(FileName)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return m_MruFiles.FileNames
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_MruImportFiles As New MruList
|
||||||
|
Public ReadOnly Property MruImportFiles As MruList
|
||||||
|
Get
|
||||||
|
Return m_MruImportFiles
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property MruImportFileNames As ObservableCollection(Of String)
|
||||||
|
Get
|
||||||
|
For Each FileName In m_MruImportFiles.FileNames.ToList()
|
||||||
|
If Not File.Exists(FileName) Then
|
||||||
|
m_MruImportFiles.Remove(FileName)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return m_MruImportFiles.FileNames
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdNew As ICommand
|
||||||
|
Private m_cmdOpen As ICommand
|
||||||
|
Private m_cmdOpenMruFile As ICommand
|
||||||
|
Private m_cmdSave As ICommand
|
||||||
|
Private m_cmdSaveAs As ICommand
|
||||||
|
Private m_cmdImport As ICommand
|
||||||
|
Private m_cmdExport 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 ImportToolTip As String
|
||||||
|
Get
|
||||||
|
Return "Import"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property ExportToolTip As String
|
||||||
|
Get
|
||||||
|
Return "Export"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property OptionsToolTip As String
|
||||||
|
Get
|
||||||
|
Return "Options"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property SendFeedbackToolTip As String
|
||||||
|
Get
|
||||||
|
Return "Send Feedback"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region ' ToolTip
|
||||||
|
|
||||||
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
' Creo riferimento a questa classe in Map
|
||||||
|
Map.SetRefProjManagerVM(Me)
|
||||||
|
' Impostazioni MruLists
|
||||||
|
m_MruFiles.Init(S_MRUFILES, 8)
|
||||||
|
m_MruImportFiles.Init(S_MRUIMPORTFILES, 8)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' CONSTRUCTOR
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
#End Region ' METHODS
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "New"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns a command that do Save.
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property New_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdNew Is Nothing Then
|
||||||
|
m_cmdNew = New Command(AddressOf NewProjectCmd)
|
||||||
|
End If
|
||||||
|
Return m_cmdNew
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Execute the Save. This method is invoked by the SaveCommand.
|
||||||
|
''' </summary>
|
||||||
|
Public Sub NewProjectCmd()
|
||||||
|
NewProject(True)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub NewProject(bDialog As Boolean)
|
||||||
|
'' Gestisco eventuale file corrente modificato
|
||||||
|
'If Not Map.refSceneHostVM.MainController.ManageModified() Then Return
|
||||||
|
'EgtResetModified()
|
||||||
|
'Dim NewProjMachine As Machine
|
||||||
|
'If bDialog AndAlso Map.refMachinePanelVM.MachineList.Count > 0 Then
|
||||||
|
' Dim ChooseMachineWndVM As New ChooseMachineWndVM
|
||||||
|
' Dim ChooseMachineWnd As New ChooseMachineWndV(Application.Current.MainWindow, ChooseMachineWndVM)
|
||||||
|
' Dim bResult As Boolean = ChooseMachineWnd.ShowDialog()
|
||||||
|
' If IsNothing(bResult) OrElse Not bResult Then Return
|
||||||
|
' NewProjMachine = ChooseMachineWndVM.SelMachine
|
||||||
|
'Else
|
||||||
|
' NewProjMachine = Map.refMachinePanelVM.SelectedMachine
|
||||||
|
'End If
|
||||||
|
'' imposto la macchina
|
||||||
|
'Map.refMachinePanelVM.SelectedMachine = NewProjMachine
|
||||||
|
' creo nuovo progetto
|
||||||
|
Map.refManageWindowVM.ResetParamCathegory()
|
||||||
|
Map.refManageWindowVM.NewWindow()
|
||||||
|
'NotifyPropertyChanged(NameOf(MruFileNames))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' New
|
||||||
|
|
||||||
|
#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("")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Function OpenProject(sFilePath As String) As Boolean
|
||||||
|
Dim bOk As Boolean = False
|
||||||
|
If String.IsNullOrEmpty(sFilePath) Then
|
||||||
|
' Recupero cartella dell'ultimo progetto aperto
|
||||||
|
Dim sDir As String = ""
|
||||||
|
GetMainPrivateProfileString(S_MRUFILES, K_FILE & 1, "", sDir)
|
||||||
|
If Not String.IsNullOrWhiteSpace(sDir) Then
|
||||||
|
sDir = Path.GetDirectoryName(sDir)
|
||||||
|
End If
|
||||||
|
Dim OpenFileDialog As New Windows.Forms.OpenFileDialog With {
|
||||||
|
.Title = "Open",
|
||||||
|
.Filter = "Window project|*.jwd",
|
||||||
|
.FilterIndex = 1,
|
||||||
|
.InitialDirectory = sDir
|
||||||
|
}
|
||||||
|
If Not OpenFileDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then Return False
|
||||||
|
sFilePath = OpenFileDialog.FileName
|
||||||
|
End If
|
||||||
|
Map.refManageWindowVM.Read(sFilePath)
|
||||||
|
Return bOk
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#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 Command(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 SaveCmd)
|
||||||
|
End If
|
||||||
|
Return m_cmdSave
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub SaveCmd()
|
||||||
|
Save()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Execute the Save. This method is invoked by the SaveCommand.
|
||||||
|
''' </summary>
|
||||||
|
Public Sub Save()
|
||||||
|
' Recupero cartella dell'ultimo progetto aperto
|
||||||
|
Dim sDir As String = ""
|
||||||
|
GetMainPrivateProfileString(S_MRUFILES, K_FILE & 1, "", sDir)
|
||||||
|
If Not String.IsNullOrWhiteSpace(sDir) Then
|
||||||
|
sDir = Path.GetDirectoryName(sDir)
|
||||||
|
End If
|
||||||
|
Dim SaveFileDialog As New Windows.Forms.SaveFileDialog With {
|
||||||
|
.Title = "Open",
|
||||||
|
.Filter = "Window project|*.jwd",
|
||||||
|
.FilterIndex = 1,
|
||||||
|
.InitialDirectory = sDir
|
||||||
|
}
|
||||||
|
If Not SaveFileDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then Return
|
||||||
|
Map.refManageWindowVM.Write(SaveFileDialog.FileName)
|
||||||
|
EgtSaveFile(Path.ChangeExtension(SaveFileDialog.FileName, ".nge"), NGE.BIN)
|
||||||
|
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 Command(AddressOf SaveAs)
|
||||||
|
End If
|
||||||
|
Return m_cmdSaveAs
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Execute the SaveAs. This method is invoked by the SaveAsCommand.
|
||||||
|
''' </summary>
|
||||||
|
Public Sub SaveAs(ByVal param As Object)
|
||||||
|
Map.refSceneHostVM.SaveAsProject()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' SaveAsCommand
|
||||||
|
|
||||||
|
#Region "Import"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns a command that do Import.
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property ImportCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdImport Is Nothing Then
|
||||||
|
m_cmdImport = New Command(AddressOf Import)
|
||||||
|
End If
|
||||||
|
Return m_cmdImport
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Execute the Import. This method is invoked by the ImportCommand.
|
||||||
|
''' </summary>
|
||||||
|
Public Sub Import(ByVal param As Object)
|
||||||
|
'Map.refSceneHostVM.InsertProject()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Import
|
||||||
|
|
||||||
|
#Region "ExportCommand"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns a command that do Export.
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property ExportCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdExport Is Nothing Then
|
||||||
|
m_cmdExport = New Command(AddressOf Export)
|
||||||
|
End If
|
||||||
|
Return m_cmdExport
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Execute the Export. This method is invoked by the ExportCommand.
|
||||||
|
''' </summary>
|
||||||
|
Public Sub Export(ByVal param As Object)
|
||||||
|
'Map.refSceneHostVM.ExportProject()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' ExportCommand
|
||||||
|
|
||||||
|
#Region "Options"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns a command that do Export.
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property OptionsCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdOptions Is Nothing Then
|
||||||
|
m_cmdOptions = New Command(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 OptionWindowV
|
||||||
|
'OptionsWindow.DataContext = New OptionWindowVM
|
||||||
|
'OptionsWindow.Owner = Application.Current.MainWindow
|
||||||
|
'OptionsWindow.ShowDialog()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Options
|
||||||
|
|
||||||
|
#Region "SendFeedback"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns a command that do SendFeedback.
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property SendFeedbackCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdSendFeedback Is Nothing Then
|
||||||
|
m_cmdSendFeedback = New Command(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
|
||||||
|
'GetMainPrivateProfileString(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 o con estensione non valida, chiedo se si vuole salvare
|
||||||
|
'If String.IsNullOrWhiteSpace(sCurrProject) Or EgtGetFileType(sCurrProject) <> FT.NGE Then
|
||||||
|
' If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||||
|
' Map.refSceneHostVM.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
|
||||||
|
' Map.refSceneHostVM.SaveProject()
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
'' 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 sCurrProjName As String = Path.GetFileNameWithoutExtension(sCurrProject).ToUpper()
|
||||||
|
' Dim TempFiles() As String = Directory.GetFiles(sCurrProjectDir)
|
||||||
|
' For FileIndex = 0 To TempFiles.Count - 1
|
||||||
|
' If TempFiles(FileIndex) = sCurrProject Then Continue For
|
||||||
|
' Dim sCurrFileName As String = Path.GetFileNameWithoutExtension( TempFiles(FileIndex)).ToUpper()
|
||||||
|
' If String.Compare(sCurrFileName, sCurrProjName) = 0 Then
|
||||||
|
' OtherFiles.Add(TempFiles(FileIndex))
|
||||||
|
' End If
|
||||||
|
' Next
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
'' Creo zip file da allegare
|
||||||
|
'Dim sZipToCreate As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\Feedback.zip"
|
||||||
|
'If File.Exists(sZipToCreate) Then
|
||||||
|
' File.Delete(sZipToCreate)
|
||||||
|
'End If
|
||||||
|
'Try
|
||||||
|
' Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out)
|
||||||
|
' zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always
|
||||||
|
' zip.AlternateEncoding = Text.Encoding.UTF8
|
||||||
|
' ' aggiungo file macchine
|
||||||
|
' For Each sMachineName As String In Machines
|
||||||
|
' Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sMachineName
|
||||||
|
' If Directory.Exists(sMachineDir) Then
|
||||||
|
' zip.AddSelectedFiles( "name != *\.git\*.* and name != *.git*", sMachineDir, sMachineName, True)
|
||||||
|
' End If
|
||||||
|
' Next
|
||||||
|
' ' aggiungo progetto corrente
|
||||||
|
' If File.Exists(sCurrProject) Then
|
||||||
|
' zip.AddItem(sCurrProject, "")
|
||||||
|
' End If
|
||||||
|
' ' aggiungo file log
|
||||||
|
' If File.Exists(Map.refMainWindowVM.MainWindowM.sLogFile) Then
|
||||||
|
' zip.AddItem(Map.refMainWindowVM.MainWindowM.sLogFile, "")
|
||||||
|
' End If
|
||||||
|
' ' aggiungo file ausiliari
|
||||||
|
' For Each sOther As String In OtherFiles
|
||||||
|
' zip.AddItem(sOther, "")
|
||||||
|
' Next
|
||||||
|
' ' 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 sAddressArray As String() = sSupportAddress.Split(CType(",", Char()))
|
||||||
|
' Dim SendFeedbackWindow As New EgtWPFLib5.MapiMailMessage("Icarus Feedback - " & sKey)
|
||||||
|
' SendFeedbackWindow.Recipients.Add(sAddressArray(0))
|
||||||
|
' For index As Integer = 1 To sAddressArray.Length() - 1
|
||||||
|
' SendFeedbackWindow.Recipients.Add(sAddressArray(index), EgtWPFLib5.MapiMailMessage.RecipientType.CC)
|
||||||
|
' Next
|
||||||
|
' If Not String.IsNullOrWhiteSpace(sZipToCreate) AndAlso File.Exists(sZipToCreate) Then
|
||||||
|
' SendFeedbackWindow.Files.Add(Map.refMainWindowVM.MainWindowM.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
|
||||||
|
' Map.refMyStatusBarVM.SetOutputMessage(EgtMsg(MSG_TOPCOMMANDBAR + 14), 5)
|
||||||
|
'End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' SendFeedback
|
||||||
|
|
||||||
|
#End Region ' Commands
|
||||||
|
|
||||||
|
End Class
|
||||||
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 266 B |
|
After Width: | Height: | Size: 301 B |
|
After Width: | Height: | Size: 159 B |
|
After Width: | Height: | Size: 136 B |
|
After Width: | Height: | Size: 311 B |
|
After Width: | Height: | Size: 254 B |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 283 B |
|
After Width: | Height: | Size: 535 B |
|
After Width: | Height: | Size: 321 B |
|
After Width: | Height: | Size: 285 B |
|
After Width: | Height: | Size: 534 B |
|
After Width: | Height: | Size: 374 B |
|
After Width: | Height: | Size: 463 B |
|
After Width: | Height: | Size: 558 B |
|
After Width: | Height: | Size: 311 B |
|
After Width: | Height: | Size: 397 B |
|
After Width: | Height: | Size: 650 B |
|
After Width: | Height: | Size: 413 B |
|
After Width: | Height: | Size: 418 B |
|
After Width: | Height: | Size: 510 B |
|
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,10 @@
|
|||||||
|
<UserControl 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">
|
||||||
|
|
||||||
|
<WindowsFormsHost>
|
||||||
|
<EgtUILib:Scene x:Name="MainScene"/>
|
||||||
|
</WindowsFormsHost>
|
||||||
|
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
Imports System.Windows.Interop
|
||||||
|
Imports System.IO
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
|
Public Class SceneHostV
|
||||||
|
|
||||||
|
Private m_MySceneHostVM As MySceneHostVM
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
' This call is required by the designer.
|
||||||
|
InitializeComponent()
|
||||||
|
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||||
|
Me.DataContext = New MySceneHostVM
|
||||||
|
m_MySceneHostVM = DirectCast(Me.DataContext, MySceneHostVM)
|
||||||
|
m_MySceneHostVM.SetMainScene(MainScene)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'Private Sub MainScene_GotFocus() Handles MainScene.GotFocus
|
||||||
|
' m_MySceneHostVM.SetIsFocused(True)
|
||||||
|
' ' Map.refSecondaryWindowV.Topmost = True
|
||||||
|
' 'Map.refSecondaryWindowVM.SetVisibility(True)
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
'Private Sub MainScene_LostFocus() Handles MainScene.LostFocus
|
||||||
|
' m_MySceneHostVM.SetIsFocused(False)
|
||||||
|
' ' Map.refSecondaryWindowV.Topmost = False
|
||||||
|
' 'Map.refSecondaryWindowVM.SetVisibility(False)
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<StackPanel x:Class="ShowPanelV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
Orientation="Horizontal">
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Public Class ShowPanelV
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,189 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <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 Off
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
|
Imports System.Xml.Serialization
|
||||||
|
|
||||||
|
'
|
||||||
|
'This source code was auto-generated by xsd, Version=4.8.3928.0.
|
||||||
|
'
|
||||||
|
|
||||||
|
'''<remarks/>
|
||||||
|
<System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0"), _
|
||||||
|
System.SerializableAttribute(), _
|
||||||
|
System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||||
|
System.ComponentModel.DesignerCategoryAttribute("code"), _
|
||||||
|
System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true), _
|
||||||
|
System.Xml.Serialization.XmlRootAttribute([Namespace]:="", IsNullable:=false)> _
|
||||||
|
Partial Public Class ParametriOpzioni
|
||||||
|
|
||||||
|
Private itemsField() As ParametriOpzioniParametri
|
||||||
|
|
||||||
|
'''<remarks/>
|
||||||
|
<System.Xml.Serialization.XmlElementAttribute("Parametri", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||||
|
Public Property Items() As ParametriOpzioniParametri()
|
||||||
|
Get
|
||||||
|
Return Me.itemsField
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
Me.itemsField = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
End Class
|
||||||
|
|
||||||
|
'''<remarks/>
|
||||||
|
<System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0"), _
|
||||||
|
System.SerializableAttribute(), _
|
||||||
|
System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||||
|
System.ComponentModel.DesignerCategoryAttribute("code"), _
|
||||||
|
System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)> _
|
||||||
|
Partial Public Class ParametriOpzioniParametri
|
||||||
|
|
||||||
|
Private nomeParametroField As String
|
||||||
|
|
||||||
|
Private descrizioneParametroField As String
|
||||||
|
|
||||||
|
Private valoreCorrenteField As String
|
||||||
|
|
||||||
|
Private tipoField As String
|
||||||
|
|
||||||
|
Private visibleField As String
|
||||||
|
|
||||||
|
Private ricalcolaSeModificatoField As String
|
||||||
|
|
||||||
|
Private opzioniField() As ParametriOpzioniParametriOpzioni
|
||||||
|
|
||||||
|
'''<remarks/>
|
||||||
|
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||||
|
Public Property NomeParametro() As String
|
||||||
|
Get
|
||||||
|
Return Me.nomeParametroField
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
Me.nomeParametroField = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<remarks/>
|
||||||
|
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||||
|
Public Property DescrizioneParametro() As String
|
||||||
|
Get
|
||||||
|
Return Me.descrizioneParametroField
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
Me.descrizioneParametroField = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<remarks/>
|
||||||
|
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||||
|
Public Property ValoreCorrente() As String
|
||||||
|
Get
|
||||||
|
Return Me.valoreCorrenteField
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
Me.valoreCorrenteField = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<remarks/>
|
||||||
|
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||||
|
Public Property Tipo() As String
|
||||||
|
Get
|
||||||
|
Return Me.tipoField
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
Me.tipoField = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<remarks/>
|
||||||
|
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||||
|
Public Property Visible() As String
|
||||||
|
Get
|
||||||
|
Return Me.visibleField
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
Me.visibleField = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<remarks/>
|
||||||
|
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||||
|
Public Property RicalcolaSeModificato() As String
|
||||||
|
Get
|
||||||
|
Return Me.ricalcolaSeModificatoField
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
Me.ricalcolaSeModificatoField = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<remarks/>
|
||||||
|
<System.Xml.Serialization.XmlElementAttribute("Opzioni", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||||
|
Public Property Opzioni() As ParametriOpzioniParametriOpzioni()
|
||||||
|
Get
|
||||||
|
Return Me.opzioniField
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
Me.opzioniField = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
End Class
|
||||||
|
|
||||||
|
'''<remarks/>
|
||||||
|
<System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0"), _
|
||||||
|
System.SerializableAttribute(), _
|
||||||
|
System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||||
|
System.ComponentModel.DesignerCategoryAttribute("code"), _
|
||||||
|
System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)> _
|
||||||
|
Partial Public Class ParametriOpzioniParametriOpzioni
|
||||||
|
|
||||||
|
Private nomeParametroField As String
|
||||||
|
|
||||||
|
Private descrizioneOpzioneField As String
|
||||||
|
|
||||||
|
Private valoreField As String
|
||||||
|
|
||||||
|
'''<remarks/>
|
||||||
|
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||||
|
Public Property NomeParametro() As String
|
||||||
|
Get
|
||||||
|
Return Me.nomeParametroField
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
Me.nomeParametroField = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<remarks/>
|
||||||
|
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||||
|
Public Property DescrizioneOpzione() As String
|
||||||
|
Get
|
||||||
|
Return Me.descrizioneOpzioneField
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
Me.descrizioneOpzioneField = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<remarks/>
|
||||||
|
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||||
|
Public Property Valore() As String
|
||||||
|
Get
|
||||||
|
Return Me.valoreField
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
Me.valoreField = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,287 @@
|
|||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports System.IO
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
|
Public Module CurrentMachine
|
||||||
|
|
||||||
|
Private m_Salt As String = "3,1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679"
|
||||||
|
|
||||||
|
' Nome macchina corrente
|
||||||
|
Private m_sMachineName As String = String.Empty
|
||||||
|
Friend ReadOnly Property sMachineName As String
|
||||||
|
Get
|
||||||
|
Return m_sMachineName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
' Direttorio macchina corrente
|
||||||
|
Private m_sMachDir As String = String.Empty
|
||||||
|
Friend ReadOnly Property sMachDir As String
|
||||||
|
Get
|
||||||
|
Return m_sMachDir
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
' File ini della macchina
|
||||||
|
Private m_sMachIniFile As String = String.Empty
|
||||||
|
Friend ReadOnly Property sMachIniFile As String
|
||||||
|
Get
|
||||||
|
Return m_sMachIniFile
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
' File ini dei dati della macchina
|
||||||
|
Private m_sMachDataIniFile As String = String.Empty
|
||||||
|
Friend ReadOnly Property sMachDataIniFile As String
|
||||||
|
Get
|
||||||
|
Return m_sMachDataIniFile
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
' File script della macchina
|
||||||
|
Private m_sMachScriptDir As String = String.Empty
|
||||||
|
Friend ReadOnly Property sMachScriptDir As String
|
||||||
|
Get
|
||||||
|
Return m_sMachScriptDir
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
' Cartella delle lavorazioni
|
||||||
|
Private m_sMachiningFilePath As String = String.Empty
|
||||||
|
Friend ReadOnly Property sMachiningFilePath As String
|
||||||
|
Get
|
||||||
|
Return m_sMachiningFilePath
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetMachiningFilePath(sValue As String)
|
||||||
|
m_sMachiningFilePath = sValue
|
||||||
|
End Sub
|
||||||
|
' Cartella dei materiali
|
||||||
|
Private m_sMaterialFilePath As String = String.Empty
|
||||||
|
Friend ReadOnly Property sMaterialFilePath As String
|
||||||
|
Get
|
||||||
|
Return m_sMaterialFilePath
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetMaterialFilePath(sValue As String)
|
||||||
|
m_sMaterialFilePath = sValue
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' box della tavola macchina
|
||||||
|
Private m_b3Tab As New BBox3d
|
||||||
|
Friend ReadOnly Property b3Tab As BBox3d
|
||||||
|
Get
|
||||||
|
Return m_b3Tab
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' box dell'area di estrusione
|
||||||
|
Private m_b3ExtrusionArea As New BBox3d
|
||||||
|
Friend ReadOnly Property b3ExtrusionArea As BBox3d
|
||||||
|
Get
|
||||||
|
Return m_b3ExtrusionArea
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' altezza massima di estrusione impostata in file ini macchina
|
||||||
|
Private m_dSlicingMaxHeight As Double
|
||||||
|
Public ReadOnly Property dSlicingMaxHeight As Double
|
||||||
|
Get
|
||||||
|
Return m_dSlicingMaxHeight
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#Region "Init"
|
||||||
|
|
||||||
|
Sub InitCurrentMachine(sMachinesRootDir As String, sMachineName As String)
|
||||||
|
' Nome macchina corrente
|
||||||
|
m_sMachineName = sMachineName
|
||||||
|
' Impostazione direttorio macchina
|
||||||
|
m_sMachDir = sMachinesRootDir & "\" & sMachineName
|
||||||
|
' Impostazione path MachIni file
|
||||||
|
m_sMachIniFile = sMachinesRootDir & "\" & sMachineName & "\" & sMachineName & ".ini"
|
||||||
|
' Impostazione path MachData Ini file
|
||||||
|
m_sMachDataIniFile = sMachinesRootDir & "\" & sMachineName & "\" & "CustomData" & "\" & MACHDATA_INI_FILE_NAME
|
||||||
|
If Not File.Exists(m_sMachDataIniFile) Then m_sMachDataIniFile = ""
|
||||||
|
' impostazione cartella script
|
||||||
|
m_sMachScriptDir = sMachinesRootDir & "\" & sMachineName & "\Scripts"
|
||||||
|
' impostazione cartella lavorazioni
|
||||||
|
m_sMachiningFilePath = sMachinesRootDir & "\" & sMachineName & "\Machinings\Machinings.ini"
|
||||||
|
' impostazione cartella materiali
|
||||||
|
m_sMaterialFilePath = sMachinesRootDir & "\" & sMachineName & "\Materials\Materials.ini"
|
||||||
|
' leggo altezza massima estrusione impostata su macchina
|
||||||
|
m_dSlicingMaxHeight = GetPrivateProfileDouble(S_MACH_PRINTING3D, K_MAX_HEIGHT, 900, m_sMachIniFile)
|
||||||
|
' Disabilito segnalazione modificato
|
||||||
|
Dim DisableMgr As New DisableModifiedMgr
|
||||||
|
' recupero box macchina
|
||||||
|
Dim nQqqId = EgtAddMachGroup("qqq")
|
||||||
|
EgtSetTable("Tab")
|
||||||
|
EgtGetTableArea(1, m_b3Tab)
|
||||||
|
EgtResetCurrMachGroup()
|
||||||
|
EgtRemoveMachGroup(nQqqId)
|
||||||
|
' carico materiali e lavorazioni
|
||||||
|
Map.refTopPanelVM.InitMaterialList()
|
||||||
|
Map.refMaterialDbVM.Init()
|
||||||
|
Map.refTopPanelVM.InitMachiningsList()
|
||||||
|
Map.refMachiningDbVM.Init()
|
||||||
|
' Ripristino stato segnalazione modifica
|
||||||
|
DisableMgr.ReEnable()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region 'Init
|
||||||
|
|
||||||
|
#Region "Methods"
|
||||||
|
|
||||||
|
Public Sub CreateMachineTable()
|
||||||
|
' Disabilito segnalazione modificato
|
||||||
|
Dim DisableMgr As New DisableModifiedMgr
|
||||||
|
Dim dTabX = b3Tab.DimX
|
||||||
|
Dim dTabY = b3Tab.DimY()
|
||||||
|
' Disegno tavola
|
||||||
|
Dim nTabPartId As Integer = EgtCreateGroup(GDB_ID.ROOT)
|
||||||
|
EgtSetLevel(nTabPartId, GDB_LV.SYSTEM)
|
||||||
|
EgtSetMode(nTabPartId, GDB_MD.LOCKED)
|
||||||
|
EgtSetStatus(nTabPartId, GDB_ST.ON_)
|
||||||
|
EgtSetName(nTabPartId, TABLE)
|
||||||
|
Dim nTabLayerId As Integer = EgtCreateGroup(nTabPartId)
|
||||||
|
EgtSetName(nTabLayerId, TABLE)
|
||||||
|
Dim nTabOutlineId As Integer = EgtCreateRectangle2P(nTabLayerId, New Point3d(0, 0, 0), New Point3d(dTabX, dTabY, 0))
|
||||||
|
EgtSetName(nTabOutlineId, TABLE_OUTLINE)
|
||||||
|
' scrivo il nome macchina sulla tavola
|
||||||
|
EgtSetInfo(nTabPartId, KEY_MACHINE_NAME, CurrentMachine.sMachineName)
|
||||||
|
' scrivo materiale sulla tavola
|
||||||
|
If Not IsNothing(Map.refTopPanelVM.SelMaterial) Then
|
||||||
|
EgtSetInfo(nTabPartId, KEY_MATERIAL_GUID, Map.refTopPanelVM.SelMaterial.sGUID)
|
||||||
|
EgtSetInfo(nTabPartId, KEY_MATERIAL_NAME, Map.refTopPanelVM.SelMaterial.sName)
|
||||||
|
End If
|
||||||
|
'' creo area di estrusione
|
||||||
|
UpdateExtrusionArea()
|
||||||
|
' Ripristino stato segnalazione modifica
|
||||||
|
DisableMgr.ReEnable()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub UpdateExtrusionArea()
|
||||||
|
Dim DisableMgr As New DisableModifiedMgr
|
||||||
|
' recupero eventuale vecchia area di estrusione
|
||||||
|
Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE)
|
||||||
|
Dim nTabLayerId As Integer = EgtGetFirstNameInGroup(nTabPartId, TABLE)
|
||||||
|
Dim nExtrusionAreaId As Integer = EgtGetFirstNameInGroup(nTabLayerId, EXTRUSION_AREA)
|
||||||
|
If nExtrusionAreaId <> GDB_ID.NULL Then EgtErase(nExtrusionAreaId)
|
||||||
|
Dim nExtrusionRectId As Integer = EgtGetFirstNameInGroup(nTabLayerId, EXTRUSION_RECT)
|
||||||
|
If nExtrusionRectId <> GDB_ID.NULL Then EgtErase(nExtrusionRectId)
|
||||||
|
' se lavorazione corrente nulla, esco
|
||||||
|
If IsNothing(Map.refTopPanelVM.CurrMachining) Then
|
||||||
|
DisableMgr.ReEnable()
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' se non esiste file dati macchina, esco
|
||||||
|
If String.IsNullOrWhiteSpace(m_sMachDataIniFile) Then
|
||||||
|
DisableMgr.ReEnable()
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' recupero tipo di slice
|
||||||
|
Dim sExtrusionType As String = S_VERTICAL
|
||||||
|
Dim GeneralCathegory As MachiningCathegory = Map.refTopPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL)
|
||||||
|
Dim SlicingTypeParam As ComboMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.SLICINGTYPE)
|
||||||
|
Dim SlicingTypeValue As Machining.MPAR_SLICINGTYPE = SlicingTypeParam.SelValue.Id
|
||||||
|
Select Case SlicingTypeValue
|
||||||
|
Case Machining.MPAR_SLICINGTYPE.VERTICAL
|
||||||
|
sExtrusionType = S_VERTICAL
|
||||||
|
Case Machining.MPAR_SLICINGTYPE.DEG45
|
||||||
|
sExtrusionType = S_45DEGX
|
||||||
|
Case Machining.MPAR_SLICINGTYPE.DEG45_Y
|
||||||
|
sExtrusionType = S_45DEGY
|
||||||
|
Case Machining.MPAR_SLICINGTYPE.HORIZONTAL
|
||||||
|
sExtrusionType = S_HORIZONTAL
|
||||||
|
End Select
|
||||||
|
Dim dExtrXMax = GetPrivateProfileDouble(sExtrusionType, K_MAXX, 0, m_sMachDataIniFile)
|
||||||
|
Dim dExtrXMin = GetPrivateProfileDouble(sExtrusionType, K_MINX, 0, m_sMachDataIniFile)
|
||||||
|
Dim dExtrYMax = GetPrivateProfileDouble(sExtrusionType, K_MAXY, 0, m_sMachDataIniFile)
|
||||||
|
Dim dExtrYMin = GetPrivateProfileDouble(sExtrusionType, K_MINY, 0, m_sMachDataIniFile)
|
||||||
|
Const AREA_WIDTH As Double = 10
|
||||||
|
Dim nAuxRectId As Integer = EgtCreateRectangle2P(nTabLayerId, New Point3d(dExtrXMin - AREA_WIDTH, dExtrYMin - AREA_WIDTH, 0), New Point3d(dExtrXMax + AREA_WIDTH, dExtrYMax + AREA_WIDTH, 0))
|
||||||
|
nExtrusionRectId = EgtCreateRectangle2P(nTabLayerId, New Point3d(dExtrXMin, dExtrYMin, 0), New Point3d(dExtrXMax, dExtrYMax, 0))
|
||||||
|
nExtrusionAreaId = EgtCreateSurfTmByRegion( nTabLayerId, { nAuxRectId, nExtrusionRectId}, EPS_STM)
|
||||||
|
EgtErase( nAuxRectId)
|
||||||
|
Dim c3Temp As New Color3d
|
||||||
|
c3Temp.FromColor(System.Drawing.Color.Lime)
|
||||||
|
EgtSetColor(nExtrusionAreaId, c3Temp)
|
||||||
|
EgtSetName(nExtrusionAreaId, EXTRUSION_AREA)
|
||||||
|
EgtSetColor(nExtrusionRectId, c3Temp)
|
||||||
|
EgtSetName(nExtrusionRectId, EXTRUSION_RECT)
|
||||||
|
m_b3ExtrusionArea = New BBox3d(New Point3d(dExtrXMin, dExtrYMin, 0), New Point3d(dExtrXMax, dExtrYMax, 0))
|
||||||
|
DisableMgr.ReEnable()
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Function ReadMachiningParamString(lpAppName As String, lpKeyName As String, lpDefault As String, ByRef lpString As String, Optional sFilePath As String = "") As Integer
|
||||||
|
Dim nResult As Integer = GetPrivateProfileString(lpAppName, lpKeyName, "", lpString, If(Not String.IsNullOrWhiteSpace(sFilePath), sFilePath, m_sMachiningFilePath))
|
||||||
|
If Not String.IsNullOrWhiteSpace(lpString) Then
|
||||||
|
lpString = EgwCrypto.PowerDecryptString(lpString, m_Salt)
|
||||||
|
Else
|
||||||
|
lpString = lpDefault
|
||||||
|
End If
|
||||||
|
Return nResult
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function ReadMachiningParamSplit(lpAppName As String, lpKeyName As String, lpDefault As String, ByRef lpString As String, Optional sFilePath As String = "") As Integer
|
||||||
|
Dim nResult As Integer = GetPrivateProfileString(lpAppName, lpKeyName, "", lpString, If(Not String.IsNullOrWhiteSpace(sFilePath), sFilePath, m_sMachiningFilePath))
|
||||||
|
If Not String.IsNullOrWhiteSpace(lpString) Then
|
||||||
|
Dim Values() As String = lpString.Split(";"c)
|
||||||
|
Dim sCryptoValues As String = ""
|
||||||
|
For ValueIndex = 0 To Values.Count - 1
|
||||||
|
sCryptoValues += EgwCrypto.PowerDecryptString(Values(ValueIndex), m_Salt) & If(ValueIndex < Values.Count - 1, ";", "")
|
||||||
|
Next
|
||||||
|
lpString = sCryptoValues
|
||||||
|
Else
|
||||||
|
lpString = lpDefault
|
||||||
|
End If
|
||||||
|
Return nResult
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function ReadMachiningParamDouble(lpAppName As String, lpKeyName As String, dDefault As Double, Optional sFilePath As String = "") As Double
|
||||||
|
Dim sParam As String = ""
|
||||||
|
Dim dParam As Double = dDefault
|
||||||
|
ReadMachiningParamString(lpAppName, lpKeyName, dDefault, sParam, sFilePath)
|
||||||
|
StringToDouble(sParam, dParam)
|
||||||
|
Return dParam
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function WriteMachiningParam(lpAppName As String, lpKeyName As String, lpString As String, Optional sFilePath As String = "") As Boolean
|
||||||
|
Return WritePrivateProfileString(lpAppName, lpKeyName, EgwCrypto.PowerEncryptString(lpString, m_Salt), If(Not String.IsNullOrWhiteSpace(sFilePath), sFilePath, m_sMachiningFilePath))
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function WriteMachiningParamSplit(lpAppName As String, lpKeyName As String, lpString As String, Optional sFilePath As String = "") As Boolean
|
||||||
|
If Not String.IsNullOrWhiteSpace(lpString) Then
|
||||||
|
Dim Values() As String = lpString.Split(";"c)
|
||||||
|
Dim sCryptoValues As String = ""
|
||||||
|
For ValueIndex = 0 To Values.Count - 1
|
||||||
|
sCryptoValues += EgwCrypto.PowerEncryptString(Values(ValueIndex), m_Salt) & If(ValueIndex < Values.Count - 1, ";", "")
|
||||||
|
Next
|
||||||
|
Return WritePrivateProfileString(lpAppName, lpKeyName, sCryptoValues, If(Not String.IsNullOrWhiteSpace(sFilePath), sFilePath, m_sMachiningFilePath))
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function ReadMaterialParamString(lpAppName As String, lpKeyName As String, lpDefault As String, ByRef lpString As String, Optional sFilePath As String = "") As Integer
|
||||||
|
Dim nResult As Integer = GetPrivateProfileString(lpAppName, lpKeyName, lpDefault, lpString, If(Not String.IsNullOrWhiteSpace(sFilePath), sFilePath, m_sMaterialFilePath))
|
||||||
|
If Not String.IsNullOrWhiteSpace(lpString) Then
|
||||||
|
lpString = EgwCrypto.PowerDecryptString(lpString, m_Salt)
|
||||||
|
Else
|
||||||
|
lpString = ""
|
||||||
|
End If
|
||||||
|
Return nResult
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function ReadMaterialParamDouble(lpAppName As String, lpKeyName As String, dDefault As Double, Optional sFilePath As String = "") As Double
|
||||||
|
Dim sParam As String = ""
|
||||||
|
Dim dParam As Double = dDefault
|
||||||
|
ReadMaterialParamString(lpAppName, lpKeyName, dDefault, sParam, sFilePath)
|
||||||
|
StringToDouble(sParam, dParam)
|
||||||
|
Return dParam
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function WriteMaterialParam(lpAppName As String, lpKeyName As String, lpString As String, Optional sFilePath As String = "") As Boolean
|
||||||
|
Return WritePrivateProfileString(lpAppName, lpKeyName, EgwCrypto.PowerEncryptString(lpString, m_Salt), If(Not String.IsNullOrWhiteSpace(sFilePath), sFilePath, m_sMaterialFilePath))
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#End Region 'Methods
|
||||||
|
|
||||||
|
End Module
|
||||||
@@ -0,0 +1,482 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:local="clr-namespace:EgtWindowMaker"
|
||||||
|
xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2"
|
||||||
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
|
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||||
|
xmlns:sys="clr-namespace:System;assembly=mscorlib">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Assign a Key to every Panel ViewModel to use
|
||||||
|
it in xaml file(ProjectView.xaml).
|
||||||
|
-->
|
||||||
|
<local:MainWindowVM x:Key="MainWindowVM"/>
|
||||||
|
<local:HomePageVM x:Key="HomePageVM"/>
|
||||||
|
<local:CRMPageVM x:Key="CRMPageVM"/>
|
||||||
|
<local:EstimatingPageVM x:Key="EstimatingPageVM"/>
|
||||||
|
<local:EstimationDetailPageVM x:Key="EstimationDetailPageVM"/>
|
||||||
|
<local:EstimationListPageVM x:Key="EstimationListPageVM"/>
|
||||||
|
<local:ProducingPageVM x:Key="ProducingPageVM"/>
|
||||||
|
<local:ProjManagerVM x:Key="ProjManagerVM"/>
|
||||||
|
<local:ManageWindowVM x:Key="ManageWindowVM"/>
|
||||||
|
<EgtWPFLib5:ShowPanelVM x:Key="ShowPanelVM"/>
|
||||||
|
<EgtWPFLib5:ViewPanelVM x:Key="ViewPanelVM"/>
|
||||||
|
|
||||||
|
<!--Colori predefiniti-->
|
||||||
|
<SolidColorBrush x:Key="EgaltechBlue1" Color="#FF4D84C4" />
|
||||||
|
<SolidColorBrush x:Key="EgaltechBlue2" Color="#FF7096CE" />
|
||||||
|
<SolidColorBrush x:Key="EgaltechBlue3" Color="#FF90ABD9" />
|
||||||
|
<SolidColorBrush x:Key="EgaltechBlue4" Color="#FFB2C3E4" />
|
||||||
|
<SolidColorBrush x:Key="EgaltechWhite" Color="#FFFFFFFF" />
|
||||||
|
<SolidColorBrush x:Key="EgaltechGray" Color="#FF585858" />
|
||||||
|
<SolidColorBrush x:Key="EgaltechLightGray" Color="LightGray" />
|
||||||
|
<SolidColorBrush x:Key="EgaltechUltralightGray" Color="#FFF2F2F2" />
|
||||||
|
<SolidColorBrush x:Key="EgaltechGreen" Color="#FF00FF00" />
|
||||||
|
|
||||||
|
<!--#838383-->
|
||||||
|
<Color x:Key="EgtWindow.Color.Gray" R="131" G="131" B="131" A="255"/>
|
||||||
|
<SolidColorBrush x:Key="EgtWindow.Gray" Color="{StaticResource EgtWindow.Color.Gray}" />
|
||||||
|
<!--#5480a5-->
|
||||||
|
<Color x:Key="EgtWindow.Color.DarkBlue" R="83" G="128" B="165" A="255"/>
|
||||||
|
<SolidColorBrush x:Key="EgtWindow.DarkBlue" Color="{StaticResource EgtWindow.Color.DarkBlue}" />
|
||||||
|
<!--#e2eaf6-->
|
||||||
|
<Color x:Key="EgtWindow.Color.LightBlue" R="226" G="234" B="246" A="255"/>
|
||||||
|
<SolidColorBrush x:Key="EgtWindow.LightBlue" Color="{StaticResource EgtWindow.Color.LightBlue}" />
|
||||||
|
<!--#eeeeee-->
|
||||||
|
<Color x:Key="EgtWindow.Color.LightGray" R="238" G="238" B="238" A="255"/>
|
||||||
|
<SolidColorBrush x:Key="EgtWindow.LightGray" Color="{StaticResource EgtWindow.Color.LightGray}" />
|
||||||
|
<!--#afc5d6-->
|
||||||
|
<Color x:Key="EgtWindow.Color.VeryLightGray" R="175" G="197" B="214" A="255"/>
|
||||||
|
<SolidColorBrush x:Key="EgtWindow.VeryLightGray" Color="{StaticResource EgtWindow.Color.VeryLightGray}" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--#92908d-->
|
||||||
|
<Color x:Key="Icarus_Gray_Color" R="146" G="144" B="141" A="255"/>
|
||||||
|
<SolidColorBrush x:Key="Icarus_Gray" Color="{StaticResource Icarus_Gray_Color}" />
|
||||||
|
<!--#3c89c9-->
|
||||||
|
<Color x:Key="Icarus_LightBlue_Color" R="60" G="137" B="201" A="255"/>
|
||||||
|
<SolidColorBrush x:Key="Icarus_LightBlue" Color="{StaticResource Icarus_LightBlue_Color}" />
|
||||||
|
<!--#2e5a81-->
|
||||||
|
<Color x:Key="Icarus_Blue_Color" R="46" G="90" B="129" A="255"/>
|
||||||
|
<SolidColorBrush x:Key="Icarus_Blue" Color="{StaticResource Icarus_Blue_Color}" />
|
||||||
|
<!--#50A388-->
|
||||||
|
<Color x:Key="Icarus_Green_Color" R="80" G="163" B="136" A="255"/>
|
||||||
|
<SolidColorBrush x:Key="Icarus_Green" Color="{StaticResource Icarus_Green_Color}" />
|
||||||
|
<!--#BC373E-->
|
||||||
|
<Color x:Key="Icarus_Orange_Color" R="188" G="55" B="62" A="255"/>
|
||||||
|
<SolidColorBrush x:Key="Icarus_Orange" Color="{StaticResource Icarus_Orange_Color}" />
|
||||||
|
<!--#A74C77-->
|
||||||
|
<Color x:Key="Icarus_Purple_Color" R="167" G="76" B="119" A="255"/>
|
||||||
|
<SolidColorBrush x:Key="Icarus_Purple" Color="{StaticResource Icarus_Purple_Color}" />
|
||||||
|
|
||||||
|
|
||||||
|
<!--Risorsa che toglie le animazioni dai menù popup per evitare che i menù mru di scelta dei file rimangano aperti se il file è grosso -->
|
||||||
|
<!--o viene eseguito un lua che non aggiorna l'interfaccia-->
|
||||||
|
<PopupAnimation x:Key="{x:Static SystemParameters.MenuPopupAnimationKey}">None</PopupAnimation>
|
||||||
|
|
||||||
|
<GridLength x:Key="TitleBarHeight">30</GridLength>
|
||||||
|
<Thickness x:Key="WindowBorder_Thickness">2</Thickness>
|
||||||
|
<sys:Double x:Key="WindowBorder_Height">2</sys:Double>
|
||||||
|
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
<!--#region USERCONTROL -->
|
||||||
|
|
||||||
|
<!--#region Button-->
|
||||||
|
|
||||||
|
<!--Colori default dei controlli-->
|
||||||
|
<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="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type Button}">
|
||||||
|
<Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" 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}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="Button.EffectorWindow.TitleBar" TargetType="{x:Type Button}">
|
||||||
|
<Setter Property="Foreground" Value="White" />
|
||||||
|
<Setter Property="Padding" Value="0" />
|
||||||
|
<Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />
|
||||||
|
<Setter Property="IsTabStop" Value="False" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type Button}">
|
||||||
|
<Border x:Name="border"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
SnapsToDevicePixels="true">
|
||||||
|
<ContentPresenter x:Name="contentPresenter"
|
||||||
|
Margin="0"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Focusable="False"
|
||||||
|
RecognizesAccessKey="True" />
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter TargetName="border" Property="Background" Value="{DynamicResource MouseOverOverlayBackgroundBrush}" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="true">
|
||||||
|
<Setter TargetName="border" Property="Background" Value="{DynamicResource PressedOverlayBackgroundBrush}" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="Button.HomePage" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
|
<Setter Property="Height" Value="350"/>
|
||||||
|
<Setter Property="Width" Value="350"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="BorderThickness" Value="15"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{StaticResource EgtWindow.Gray}"/>
|
||||||
|
<Setter Property="FontSize" Value="60"/>
|
||||||
|
<Setter Property="FontWeight" Value="Medium"/>
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource EgtWindow.Gray}"/>
|
||||||
|
<Setter Property="Margin" Value="20"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type Button}">
|
||||||
|
<Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border x:Name="internal"
|
||||||
|
Background="{StaticResource EgtWindow.Gray}"
|
||||||
|
BorderThickness="0"
|
||||||
|
Margin="5"
|
||||||
|
Height="50"
|
||||||
|
VerticalAlignment="Top"/>
|
||||||
|
<ContentPresenter x:Name="contentPresenter" Grid.Row="1" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
</Grid>
|
||||||
|
</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="internal" Value="{StaticResource EgtWindow.DarkBlue}"/>
|
||||||
|
<Setter Property="Background" TargetName="border" Value="{StaticResource EgtWindow.LightBlue}"/>
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource EgtWindow.DarkBlue}"/>
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource EgtWindow.DarkBlue}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="true">
|
||||||
|
<Setter Property="Background" TargetName="internal" Value="{StaticResource EgtWindow.DarkBlue}"/>
|
||||||
|
<Setter Property="Background" TargetName="border" Value="{StaticResource EgtWindow.LightBlue}"/>
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource EgtWindow.DarkBlue}"/>
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource EgtWindow.DarkBlue}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Background" TargetName="internal" Value="{StaticResource Button.Disabled.Border}"/>
|
||||||
|
<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}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!--#endregion Button-->
|
||||||
|
|
||||||
|
<Style x:Key="Button.CRMPage" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
|
<Setter Property="Height" Value="40"/>
|
||||||
|
<Setter Property="Width" Value="120"/>
|
||||||
|
<Setter Property="Background" Value="{StaticResource EgtWindow.LightGray}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type Button}">
|
||||||
|
<Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" 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 EgtWindow.DarkBlue}"/>
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="true">
|
||||||
|
<Setter Property="Background" TargetName="border" Value="{StaticResource EgtWindow.DarkBlue}"/>
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
|
</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}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="Button.EstimationDetail.WindowList" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
|
<Setter Property="Height" Value="40"/>
|
||||||
|
<Setter Property="Width" Value="160"/>
|
||||||
|
<Setter Property="Background" Value="{StaticResource EgtWindow.LightBlue}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type Button}">
|
||||||
|
<Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" 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 EgtWindow.DarkBlue}"/>
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="true">
|
||||||
|
<Setter Property="Background" TargetName="border" Value="{StaticResource EgtWindow.DarkBlue}"/>
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
|
</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}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="Button.ManageWindow.LeftBar" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
|
<Setter Property="Height" Value="30"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="Button.Confirm" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
|
<Setter Property="Height" Value="30"/>
|
||||||
|
<Setter Property="Width" Value="70"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
|
||||||
|
<Style x:Key="ProjManager_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
|
<Setter Property="Height" Value="25"/>
|
||||||
|
<Setter Property="Width" Value="25"/>
|
||||||
|
<Setter Property="Background" Value="White"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
</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"/>
|
||||||
|
<Setter Property="Background" Value="White"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButton.ToolBar.DShowMode" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||||
|
<Setter Property="Height" Value="30"/>
|
||||||
|
<Setter Property="Width" Value="50"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
</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"/>
|
||||||
|
<Setter Property="Background" Value="White"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Image -->
|
||||||
|
|
||||||
|
<!--#region Image-->
|
||||||
|
|
||||||
|
<Style x:Key="Button.Image.DoorList" TargetType="{x:Type Image}">
|
||||||
|
<Setter Property="Stretch" Value="Uniform" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!--#endregion Image-->
|
||||||
|
|
||||||
|
<Style x:Key="Button_Image" TargetType="{x:Type Image}">
|
||||||
|
<Setter Property="Stretch" Value="Uniform" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ContextMenu -->
|
||||||
|
|
||||||
|
<Style x:Key="Icarus_ContextMenu" TargetType="{x:Type ContextMenu}">
|
||||||
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||||
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||||
|
<Setter Property="Grid.IsSharedSizeScope" Value="true" />
|
||||||
|
<Setter Property="HasDropShadow" Value="True" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type ContextMenu}">
|
||||||
|
<Border x:Name="Border"
|
||||||
|
CornerRadius="4"
|
||||||
|
Background="White"
|
||||||
|
BorderBrush="{StaticResource Icarus_Gray}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Padding="4">
|
||||||
|
<StackPanel IsItemsHost="True"
|
||||||
|
KeyboardNavigation.DirectionalNavigation="Cycle" />
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="HasDropShadow" Value="true">
|
||||||
|
<Setter TargetName="Border" Property="Padding" Value="4" />
|
||||||
|
<Setter TargetName="Border" Property="CornerRadius" Value="4" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TextBlock.DataGridTextColumn" TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="TextAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TextBlock.EstimationDetail" TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TextBlock.ManageWindow" TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TextBlock.ManageWindow.SelArea" TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Margin" Value="10"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ComboBox.EstimationDetail" TargetType="{x:Type ComboBox}">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ComboBox.ManageWindow" TargetType="{x:Type ComboBox}">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TextBox.ManageWindow" TargetType="{x:Type TextBox}">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TabItem.EstimationDetail" TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
|
||||||
|
<Setter Property="Height" Value="40"/>
|
||||||
|
<Setter Property="Width" Value="150"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TabItem.ManageWindow" TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
|
||||||
|
<Setter Property="Height" Value="40"/>
|
||||||
|
<Setter Property="Width" Value="100"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="ControlTemplate.TabControl.NoHeader" TargetType="{x:Type TabControl}">
|
||||||
|
<Grid x:Name="templateRoot" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
|
||||||
|
<Border x:Name="contentPanel" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabIndex="1" KeyboardNavigation.TabNavigation="Local">
|
||||||
|
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="TextElement.Foreground" TargetName="templateRoot" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
<Style x:Key="TabControl.NoHeader" TargetType="{x:Type TabControl}">
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="Padding" Value="0"/>
|
||||||
|
<Setter Property="Template" Value="{StaticResource ControlTemplate.TabControl.NoHeader}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="Expander.CheckBoxHeader" TargetType="{x:Type Expander}">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
|
||||||
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type Expander}">
|
||||||
|
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" SnapsToDevicePixels="true">
|
||||||
|
<DockPanel>
|
||||||
|
<CheckBox x:Name="HeaderSite" ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" DockPanel.Dock="Top" FontStretch="{TemplateBinding FontStretch}" Foreground="{TemplateBinding Foreground}" FocusVisualStyle="{StaticResource FocusVisual}" FontStyle="{TemplateBinding FontStyle}" FontFamily="{TemplateBinding FontFamily}" FontWeight="{TemplateBinding FontWeight}" FontSize="{TemplateBinding FontSize}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource Mode=TemplatedParent}}" Margin="1,1,5,1" MinWidth="0" MinHeight="0" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
<ContentPresenter x:Name="ExpandSite" DockPanel.Dock="Bottom" Focusable="false" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Visibility="Collapsed"/>
|
||||||
|
</DockPanel>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsExpanded" Value="true">
|
||||||
|
<Setter Property="Visibility" TargetName="ExpandSite" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!--#endregion USERCONTROL-->
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
Imports System.Globalization
|
||||||
|
|
||||||
|
Public Class Dictionary
|
||||||
|
|
||||||
|
Public Shared ReadOnly MySceneHostVM As String = "MySceneHostVM"
|
||||||
|
|
||||||
|
#Region "Colors"
|
||||||
|
|
||||||
|
Private m_Omag_Red As SolidColorBrush = Brushes.Red
|
||||||
|
Public ReadOnly Property Omag_Red As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Return m_Omag_Red
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Shared m_Button_Static_Background As SolidColorBrush = New BrushConverter().ConvertFrom("#FFDDDDDD")
|
||||||
|
Public Shared ReadOnly Property Button_Static_Background As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Return m_Button_Static_Background
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Shared m_TabControl_Header_Background As LinearGradientBrush = Application.Current.FindResource("TabItem.Static.Background")
|
||||||
|
Public Shared ReadOnly Property TabControl_Header_Background As LinearGradientBrush
|
||||||
|
Get
|
||||||
|
Return m_TabControl_Header_Background
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Private Shared m_Icarus_Gray As SolidColorBrush = Application.Current.FindResource("Icarus_Gray")
|
||||||
|
Public Shared ReadOnly Property Icarus_Gray As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Return m_Icarus_Gray
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Shared m_Icarus_LightBlue As SolidColorBrush = Application.Current.FindResource("Icarus_LightBlue")
|
||||||
|
Public Shared ReadOnly Property Icarus_LightBlue As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Return m_Icarus_LightBlue
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Shared m_Icarus_Blue As SolidColorBrush = Application.Current.FindResource("Icarus_Blue")
|
||||||
|
Public Shared ReadOnly Property Icarus_Blue As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Return m_Icarus_Blue
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Shared m_Icarus_Green As SolidColorBrush = Application.Current.FindResource("Icarus_Green")
|
||||||
|
Public Shared ReadOnly Property Icarus_Green As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Return m_Icarus_Green
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Shared m_Icarus_Orange As SolidColorBrush = Application.Current.FindResource("Icarus_Orange")
|
||||||
|
Public Shared ReadOnly Property Icarus_Orange As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Return m_Icarus_Orange
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Shared m_Icarus_Purple As SolidColorBrush = Application.Current.FindResource("Icarus_Purple")
|
||||||
|
Public Shared ReadOnly Property Icarus_Purple As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Return m_Icarus_Purple
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'<SolidColorBrush x : Key="Icarus_Gray" Color="#92908d" />
|
||||||
|
'<SolidColorBrush x : Key="Icarus_LightBlue" Color="#3c89c9" />
|
||||||
|
'<SolidColorBrush x : Key="Icarus_Blue" Color="#2e5a81" />
|
||||||
|
'<SolidColorBrush x : Key="Icarus_Green" Color="#40826d" />
|
||||||
|
'<SolidColorBrush x : Key="Icarus_Orange" Color="#C37636" />
|
||||||
|
'<SolidColorBrush x : Key="Icarus_Purple" Color="#990066" />
|
||||||
|
|
||||||
|
#End Region ' Colors
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class CenterToolTipConverter
|
||||||
|
Implements IMultiValueConverter
|
||||||
|
|
||||||
|
Public Function Convert(ByVal values As Object(), ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IMultiValueConverter.Convert
|
||||||
|
For Each value In values
|
||||||
|
If TypeOf (value) IsNot Double Then
|
||||||
|
Return Double.NaN
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Dim dPlacementTarget As Double = CDbl(values(0))
|
||||||
|
Dim dToolTip As Double = CDbl(values(1))
|
||||||
|
Return (dPlacementTarget / 2.0) - (dToolTip / 2.0)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function ConvertBack(ByVal value As Object, ByVal targetTypes As Type(), ByVal parameter As Object, ByVal culture As CultureInfo) As Object() Implements IMultiValueConverter.ConvertBack
|
||||||
|
Throw New NotSupportedException()
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||