Compare commits

..

15 Commits

Author SHA1 Message Date
Samuele Locatelli 4884bac5df Update DbManager con singleton 2021-04-03 15:33:49 +02:00
Samuele Locatelli 10dc2105f6 Aggiunta migrazione modelli proj/prod aggiornati 2021-04-03 15:33:41 +02:00
Samuele Locatelli 17a7a1a8ae Merge remote-tracking branch 'gitlab.steamware/feature/total_rebuild' into feature/FixCoreModels 2021-04-03 14:51:09 +02:00
Emmanuele Sassi eb8807b981 Corretto costruttore 2021-04-03 13:01:24 +02:00
Samuele Locatelli 5d92c905ac allinemento a CORE library 2021-04-03 12:58:12 +02:00
Samuele Locatelli aa8731779b Merge remote-tracking branch 'gitlab.steamware/feature/total_rebuild' into feature/FixCoreModels 2021-04-03 12:53:25 +02:00
Emmanuele Sassi 7f10469853 Correzione 2021-04-03 12:52:39 +02:00
Samuele Locatelli 8755297287 fix db name 2021-04-03 12:51:20 +02:00
Samuele Locatelli a7c6ec8372 Merge remote-tracking branch 'gitlab.steamware/feature/total_rebuild' into feature/FixCoreModels 2021-04-03 12:49:38 +02:00
Samuele Locatelli 58043a263d update x allineamento a Core 2021-04-03 12:49:27 +02:00
Samuele Locatelli 602ffa6da7 modifica modelli DB x core models 2021-04-03 12:49:19 +02:00
Emmanuele Sassi 5a6acb77f7 Definizione oggetti ProjectM e sistemazioni 2021-04-03 12:48:47 +02:00
Emmanuele Sassi 9e9b17a50e Update ultima release DataLayer 2021-04-03 10:21:30 +02:00
Emmanuele Sassi 14bfdc0b87 Merge remote-tracking branch 'gitlab.seriate/develop' into feature/total_rebuild 2021-04-03 10:04:16 +02:00
Emmanuele Sassi c1f1dd3c09 Aggiornamento Project 2021-04-03 09:22:05 +02:00
38 changed files with 1130 additions and 488 deletions
+3 -1
View File
@@ -99,7 +99,9 @@
</Compile>
<Compile Include="MyMachGroup.vb" />
<Compile Include="Part.vb" />
<Compile Include="ProjectFile.vb" />
<Compile Include="ProdFileM.vb" />
<Compile Include="ProjectFileM.vb" />
<Compile Include="ProjFileM.vb" />
<Compile Include="SectionXMaterial.vb" />
<Compile Include="Utility\BTLIniFile.vb" />
<Compile Include="Utility\Command.vb" />
+42
View File
@@ -0,0 +1,42 @@
Imports System.IO
Imports EgtUILib
Public Class ProdFileM
Inherits ProjectFileM
Protected m_nProjIdList As List(Of Integer)
Public ReadOnly Property nProjIdList As List(Of Integer)
Get
Return m_nProjIdList
End Get
End Property
Protected m_sName As String
Public ReadOnly Property sName As String
Get
Return m_sName
End Get
End Property
#Region "CONSTRUCTORS"
Protected Sub New()
End Sub
Public Shared Function CreateNewProdFileM() As ProdFileM
Return New ProdFileM
End Function
Public Shared Function CreateProdFileM(nProdId As Integer, nProjIdList As List(Of Integer),
dtCreateProjDate As DateTime, sName As String) As ProdFileM
Dim NewProjectFileM As New ProdFileM
NewProjectFileM.m_nProdId = nProdId
NewProjectFileM.m_nProjIdList = nProjIdList
NewProjectFileM.m_dtCreateDate = dtCreateProjDate
NewProjectFileM.m_sName = sName
Return NewProjectFileM
End Function
#End Region ' CONSTRUCTORS
End Class
+51
View File
@@ -0,0 +1,51 @@
Imports System.IO
Imports EgtUILib
Public Class ProjFileM
Inherits ProjectFileM
Protected m_dtExportDate As DateTime
Public ReadOnly Property dtExportDate As DateTime
Get
Return m_dtExportDate
End Get
End Property
Protected m_sListName As String
Public ReadOnly Property sListName As String
Get
Return m_sListName
End Get
End Property
Protected m_sBTLFileName As String = String.Empty
Public ReadOnly Property sBTLFileName As String
Get
Return m_sBTLFileName
End Get
End Property
#Region "CONSTRUCTORS"
Protected Sub New()
End Sub
Public Shared Function CreateNewProjFileM() As ProjFileM
Return New ProjFileM
End Function
Public Shared Function CreateProjFileM(nProjId As Integer, nProdId As Integer, dtCreateProjDate As DateTime,
dtExportDate As DateTime, sListName As String, sBTLFileName As String) As ProjFileM
Dim NewProjectFileM As New ProjFileM
NewProjectFileM.m_nProjId = nProjId
NewProjectFileM.m_nProdId = nProdId
NewProjectFileM.m_dtCreateDate = dtCreateProjDate
NewProjectFileM.m_dtExportDate = dtExportDate
NewProjectFileM.m_sListName = sListName
NewProjectFileM.m_sBTLFileName = sBTLFileName
Return NewProjectFileM
End Function
#End Region ' CONSTRUCTORS
End Class
-74
View File
@@ -1,74 +0,0 @@
Imports System.IO
Imports EgtUILib
Public Class ProjectFile
Protected m_nProjectType As ProjectType
Public ReadOnly Property nProjectType As ProjectType
Get
Return m_nProjectType
End Get
End Property
Public Sub SetProjectType(nProjectType As ProjectType)
m_nProjectType = nProjectType
End Sub
Protected m_nProjId As Integer = 0
Public ReadOnly Property nProjId As Integer
Get
Return m_nProjId
End Get
End Property
Protected m_nProdId As Integer = 0
Public ReadOnly Property nProdId As Integer
Get
Return m_nProdId
End Get
End Property
Protected m_BTLFileName As String = String.Empty
Public ReadOnly Property BTLFileName As String
Get
Return m_BTLFileName
End Get
End Property
Protected m_NewProj As Boolean
Public Property NewProj As Boolean
Get
Return m_NewProj
End Get
Set(value As Boolean)
m_NewProj = value
End Set
End Property
Protected m_NewProd As Boolean
Public Property NewProd As Boolean
Get
Return m_NewProd
End Get
Set(value As Boolean)
m_NewProd = value
End Set
End Property
' temporaneo, per funzionamento vecchio senza db
Sub New()
End Sub
Sub New(nProjectType As ProjectType, nProjId As Integer, nProdId As Integer, sBTLFileName As String)
m_nProjectType = nProjectType
If m_nProjectType = ProjectType.PROJ Then
m_nProjId = nProjId
m_nProdId = nProdId
m_BTLFileName = sBTLFileName
ElseIf m_nProjectType = ProjectType.PROD Then
m_nProdId = nProdId
End If
End Sub
End Class
+62
View File
@@ -0,0 +1,62 @@
Imports System.IO
Imports EgtUILib
Public Class ProjectFileM
'Protected m_nProjectType As ProjectType
'Public ReadOnly Property nProjectType As ProjectType
' Get
' Return m_nProjectType
' End Get
'End Property
'Public Sub SetProjectType(nProjectType As ProjectType)
' m_nProjectType = nProjectType
'End Sub
Protected m_nProjId As Integer = 0
Public ReadOnly Property nProjId As Integer
Get
Return m_nProjId
End Get
End Property
Protected m_nProdId As Integer = 0
Public ReadOnly Property nProdId As Integer
Get
Return m_nProdId
End Get
End Property
Protected m_dtCreateDate As DateTime
Public ReadOnly Property dtCreateDate As DateTime
Get
Return m_dtCreateDate
End Get
End Property
Protected m_bIsNew As Boolean
Public Property bIsNew As Boolean
Get
Return m_bIsNew
End Get
Set(value As Boolean)
m_bIsNew = value
End Set
End Property
#Region "CONSTRUCTORS"
'Sub New(nProjectType As ProjectType, nProjId As Integer, nProdId As Integer, sBTLFileName As String)
' m_nProjectType = nProjectType
' If m_nProjectType = ProjectType.PROJ Then
' m_nProjId = nProjId
' m_nProdId = nProdId
' m_BTLFileName = sBTLFileName
' ElseIf m_nProjectType = ProjectType.PROD Then
' m_nProdId = nProdId
' End If
'End Sub
#End Region ' CONSTRUCTORS
End Class
+14 -9
View File
@@ -1,30 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework"
type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
requirePermission="false"/>
</configSections>
<entityFramework>
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6"/>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.10.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d">
<provider invariantName="MySql.Data.MySqlClient"
type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.10.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d">
</provider></providers>
</entityFramework>
<connectionStrings>
<add name="DefaultConnection" connectionString="server=localhost;port=3306;User Id=EgtUser;password=viacremasca;Persist Security Info=True;database=EgtBwDb;SslMode=none" providerName="MySql.Data.MySqlClient" />
<add name="DefaultConnection"
connectionString="server=localhost;port=3306;User Id=EgtUser;password=viacremasca;Persist Security Info=True;database=EgtBwDb;SslMode=none"
providerName="MySql.Data.MySqlClient"/>
</connectionStrings>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.10.9.0" newVersion="6.10.9.0" />
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.10.9.0" newVersion="6.10.9.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
</startup>
</configuration>
@@ -272,14 +272,14 @@ namespace EgtBEAMWALL.DataLayer.Controllers
/// </summary>
/// <param name="numRecord"></param>
/// <returns></returns>
public List<Core.ProjectFile> GetLastDesc(int numRecord)
public List<Core.ProdFileM> GetLastDesc(int numRecord)
{
List<Core.ProjectFile> result = new List<Core.ProjectFile>();
List<Core.ProdFileM> result = new List<Core.ProdFileM>();
var dbResult = GetLastDbModelDesc(numRecord);
// conversione
result = dbResult.Select(x => new Core.ProjectFile(Core.ConstBeam.ProjectType.PROD, 0, x.ProdId, "")).ToList();
result = dbResult.Select(x => Core.ProdFileM.CreateProdFileM(x.ProdId, DbManager.obj.ProjCtr.GetByProdAsc(x.ProdId).Select(y => y.ProjId).ToList(), x.DtCreated, x.Description)).ToList();
return result;
}
@@ -245,14 +245,14 @@ namespace EgtBEAMWALL.DataLayer.Controllers
/// </summary>
/// <param name="numRecord"></param>
/// <returns></returns>
public List<Core.ProjectFile> GetLastDesc(int numRecord)
public List<Core.ProjFileM> GetLastDesc(int numRecord)
{
List<Core.ProjectFile> result = new List<Core.ProjectFile>();
List<Core.ProjFileM> result = new List<Core.ProjFileM>();
var dbResult = GetLastDbModelDesc(numRecord);
// conversione
result = dbResult.Select(x => new Core.ProjectFile(Core.ConstBeam.ProjectType.PROJ, x.ProjId, ProdIdByProdDbId(x.ProdDbId), x.BTLFileName)).ToList();
result = dbResult.Select(x => Core.ProjFileM.CreateProjFileM(x.ProjId, ProdIdByProdDbId(x.ProdDbId), x.DtCreated, x.DtExported, x.ListName, x.BTLFileName)).ToList();
return result;
}
@@ -18,6 +18,12 @@ namespace EgtBEAMWALL.DataLayer.DatabaseModels
[Column("Description")]
public string Description { get; set; } = "";
/// <summary>
/// Data Creazione
/// </summary>
[Column("DtCreated")]
public DateTime DtCreated { get; set; }
/// <summary>
/// Stato NEW = creato ma NON salvato
/// </summary>
@@ -30,9 +36,15 @@ namespace EgtBEAMWALL.DataLayer.DatabaseModels
[Column("Lock")]
public bool Locked { get; set; } = false;
/// <summary>
/// Chiave univoca DB
/// </summary>
[Key, Column("ProdDbId"), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int ProdDbId { get; set; }
/// <summary>
/// chiave univoca per EgtBM
/// </summary>
[Column("Id")]
public int ProdId { get; set; }
@@ -18,12 +18,30 @@ namespace EgtBEAMWALL.DataLayer.DatabaseModels
[Column("BTLFileName")]
public string BTLFileName { get; set; } = "";
/// <summary>
/// Data Creazione
/// </summary>
[Column("DtCreated")]
public DateTime DtCreated { get; set; }
/// <summary>
/// Data Esportazione
/// </summary>
[Column("DtExported")]
public DateTime DtExported { get; set; }
/// <summary>
/// Stato NEW = creato ma NON salvato
/// </summary>
[Column("IsNew")]
public bool IsNew { get; set; } = true;
/// <summary>
/// ListName del BTL
/// </summary>
[Column("ListName")]
public string ListName { get; set; } = "";
/// <summary>
/// Stato locked (quando aperto da un dispositivo in rete)
/// </summary>
+25 -10
View File
@@ -5,16 +5,31 @@ using System.Text;
namespace EgtBEAMWALL.DataLayer
{
public class DbManager
{
public static bool AdvDataModel { get; set; } = false;
public class DbManager
{
#region Public Fields
public DbManager()
{
}
public static DbManager obj = new DbManager();
public Controllers.BTLPartController BtlPartCtr = new Controllers.BTLPartController();
public Controllers.MachGroupController MachGroupCtr = new Controllers.MachGroupController();
public Controllers.PartController PartCtr = new Controllers.PartController();
public Controllers.ProdController ProdCtr = new Controllers.ProdController();
public Controllers.ProjController ProjCtr = new Controllers.ProjController();
public Controllers.ProjController ProjCtr = new Controllers.ProjController();
public Controllers.BTLPartController BtlPartCtr = new Controllers.BTLPartController();
#endregion Public Fields
}
}
#region Public Constructors
public DbManager()
{
}
#endregion Public Constructors
#region Public Properties
public static bool AdvDataModel { get; set; } = false;
#endregion Public Properties
}
}
@@ -91,6 +91,10 @@
<Compile Include="Migrations\202103061456017_InitDb.Designer.cs">
<DependentUpon>202103061456017_InitDb.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\202104031327316_UpdateProjProd.cs" />
<Compile Include="Migrations\202104031327316_UpdateProjProd.designer.cs">
<DependentUpon>202104031327316_UpdateProjProd.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\Configuration.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
@@ -108,6 +112,9 @@
<EmbeddedResource Include="Migrations\202103061456017_InitDb.resx">
<DependentUpon>202103061456017_InitDb.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Migrations\202104031327316_UpdateProjProd.resx">
<DependentUpon>202104031327316_UpdateProjProd.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
@@ -0,0 +1,29 @@
// <auto-generated />
namespace EgtBEAMWALL.DataLayer.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.4.4")]
public sealed partial class UpdateProjProd : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(UpdateProjProd));
string IMigrationMetadata.Id
{
get { return "202104031327316_UpdateProjProd"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}
@@ -0,0 +1,24 @@
namespace EgtBEAMWALL.DataLayer.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class UpdateProjProd : DbMigration
{
public override void Up()
{
AddColumn("dbo.ProjList", "DtCreated", c => c.DateTime(nullable: false, precision: 0));
AddColumn("dbo.ProjList", "DtExported", c => c.DateTime(nullable: false, precision: 0));
AddColumn("dbo.ProjList", "ListName", c => c.String(unicode: false));
AddColumn("dbo.ProdList", "DtCreated", c => c.DateTime(nullable: false, precision: 0));
}
public override void Down()
{
DropColumn("dbo.ProdList", "DtCreated");
DropColumn("dbo.ProjList", "ListName");
DropColumn("dbo.ProjList", "DtExported");
DropColumn("dbo.ProjList", "DtCreated");
}
}
}
@@ -0,0 +1,126 @@
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
<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" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</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" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Target" xml:space="preserve">
<value>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</value>
</data>
<data name="DefaultSchema" xml:space="preserve">
<value>dbo</value>
</data>
</root>
+2 -2
View File
@@ -25,8 +25,8 @@ namespace EgtBEAMWALL.StressTest
public List<Core.BTLPartM> BtlPartList = new List<Core.BTLPartM>();
public List<Core.MyMachGroup> MachGroupList = new List<Core.MyMachGroup>();
public List<Core.Part> PartList = new List<Core.Part>();
public List<Core.ProjectFile> ProdList = new List<Core.ProjectFile>();
public List<Core.ProjectFile> ProjList = new List<Core.ProjectFile>();
public List<Core.ProjectFileM> ProdList = new List<Core.ProjectFileM>();
public List<Core.ProjectFileM> ProjList = new List<Core.ProjectFileM>();
#endregion Public Fields
@@ -1,4 +1,5 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -8,9 +9,12 @@
<OutputType>WinExe</OutputType>
<RootNamespace>EgtBEAMWALL.Supervisor</RootNamespace>
<AssemblyName>EgtBEAMWALL.Supervisor</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<MyType>Custom</MyType>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -22,6 +26,7 @@
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>EgtBEAMWALL.Supervisor.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -34,6 +39,7 @@
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>EgtBEAMWALL.Supervisor.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
@@ -57,6 +63,7 @@
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<DefineTrace>true</DefineTrace>
@@ -67,6 +74,7 @@
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
@@ -78,6 +86,7 @@
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<DefineTrace>true</DefineTrace>
@@ -88,6 +97,7 @@
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="EgtUILib">
@@ -97,10 +107,10 @@
<HintPath>..\..\..\EgtProg\DllD32\EgtWPFLib5.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.0.0\lib\net40\EntityFramework.dll</HintPath>
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.0.0\lib\net40\EntityFramework.SqlServer.dll</HintPath>
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
@@ -208,4 +218,12 @@
<Resource Include="Resources\TreeView\Folder.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
</Target>
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
</Project>
+48 -47
View File
@@ -1,7 +1,7 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:$clrversion$
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
@@ -11,52 +11,53 @@
Option Strict On
Option Explicit On
Imports System
Namespace My.Resources
'This class was auto-generated by the StronglyTypedResourceBuilder
'class via a tool like ResGen or Visual Studio.
'To add or remove a member, edit your .ResX file then rerun ResGen
'with the /str option, or rebuild your VS project.
'''<summary>
''' A strongly-typed resource class, for looking up localized strings, etc.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
Friend Module Resources
Private resourceMan As Global.System.Resources.ResourceManager
Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary>
''' Returns the cached ResourceManager instance used by this class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("$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
'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", "16.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("EgtBEAMWALL.Supervisor.Resources", GetType(Resources).Assembly)
resourceMan = temp
End If
Return resourceMan
End Get
End Property
'''<summary>
''' Overrides the current thread's CurrentUICulture property for all
''' resource lookups using this strongly typed resource class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set
resourceCulture = value
End Set
End Property
End Module
End Namespace
+44 -46
View File
@@ -12,62 +12,60 @@ 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)
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.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 addedHandler As Boolean
Private Shared addedHandlerLockObject As New Object
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
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, 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
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
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
End Get
End Property
End Class
Namespace My
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global.EgtBEAMWALL.Supervisor.My.MySettings
Get
Return Global.EgtBEAMWALL.Supervisor.My.MySettings.Default
End Get
End Property
End Module
<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.EgtBEAMWALL.Supervisor.MySettings
Get
Return Global.EgtBEAMWALL.Supervisor.MySettings.Default
End Get
End Property
End Module
End Namespace
+17 -11
View File
@@ -1,31 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework"
type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
requirePermission="false"/>
</configSections>
<entityFramework>
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6"/>
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.10.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
<provider invariantName="MySql.Data.MySqlClient"
type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.10.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
</providers>
</entityFramework>
<connectionStrings>
<add name="DefaultConnection" connectionString="server=localhost;port=3306;User Id=root;password=viacremasca;Persist Security Info=True;database=EgtBwDb;SslMode=none" providerName="MySql.Data.MySqlClient" />
<add name="DefaultConnection"
connectionString="server=localhost;port=3306;User Id=root;password=viacremasca;Persist Security Info=True;database=EgtBwDb;SslMode=none"
providerName="MySql.Data.MySqlClient"/>
</connectionStrings>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.10.9.0" newVersion="6.10.9.0" />
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.10.9.0" newVersion="6.10.9.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.10.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
<remove invariant="MySql.Data.MySqlClient"/>
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL"
type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.10.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
</DbProviderFactories>
</system.data>
</configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/></startup></configuration>
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.0.0" targetFramework="net40" />
<package id="EntityFramework" version="6.4.4" targetFramework="net452" />
</packages>
+17 -10
View File
@@ -1,30 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework"
type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
requirePermission="false"/>
</configSections>
<entityFramework>
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6"/>
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.10.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
<provider invariantName="MySql.Data.MySqlClient"
type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.10.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
</providers>
</entityFramework>
<connectionStrings>
<add name="DefaultConnection" connectionString="server=localhost;port=3306;User Id=EgtUser;password=viacremasca;Persist Security Info=True;database=EgtBwDb;SslMode=none" providerName="MySql.Data.MySqlClient" />
<add name="DefaultConnection"
connectionString="server=localhost;port=3306;User Id=EgtUser;password=viacremasca;Persist Security Info=True;database=EgtBwDb;SslMode=none"
providerName="MySql.Data.MySqlClient"/>
</connectionStrings>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.10.9.0" newVersion="6.10.9.0" />
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.10.9.0" newVersion="6.10.9.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.10.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
<remove invariant="MySql.Data.MySqlClient"/>
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL"
type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.10.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
</DbProviderFactories>
</system.data>
</configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/></startup></configuration>
@@ -1563,7 +1563,7 @@ Public Class BTLPartVM
ColorDlg.FullOpen = True
ColorDlg.Color = Col.ToColor()
' Visualizzo dialogo
If ColorDlg.ShowDialog() <> Windows.Forms.DialogResult.OK Then Return False
If ColorDlg.ShowDialog() <> Forms.DialogResult.OK Then Return False
' Recupero colore scelto
NewCol.FromString(ColorDlg.Color.R & "," & ColorDlg.Color.G & "," & ColorDlg.Color.B & "," & ColorDlg.Color.A) 'NewCol.FromColor(ColorDlg.Color)
Return True
@@ -105,12 +105,6 @@
'Public Const S_GENERAL As String = "General"
'Public Const K_DEBUG As String = "Debug"
' Tipo di progetto
Public Enum ProjectType As Integer
PROJ = 1
PROD = 2
End Enum
Friend Const PROJ As String = "PROJ"
Friend Const FILENAMESEPARATOR As Char = "^"c
Friend Const BTLINFO As String = "BtlInfo"
@@ -1,4 +1,5 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -8,11 +9,12 @@
<OutputType>WinExe</OutputType>
<RootNamespace>EgtBEAMWALL.ViewerOptimizer</RootNamespace>
<AssemblyName>EgtBEAMWALL.ViewerOptimizer</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<MyType>Custom</MyType>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -24,6 +26,7 @@
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>EgtBEAMWALL.ViewerOptimizer.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -36,6 +39,7 @@
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>EgtBEAMWALL.ViewerOptimizer.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
@@ -59,6 +63,7 @@
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<DefineTrace>true</DefineTrace>
@@ -69,6 +74,7 @@
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
@@ -80,6 +86,7 @@
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<DefineTrace>true</DefineTrace>
@@ -90,6 +97,7 @@
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Resources\EgtBEAMWALL.ico</ApplicationIcon>
@@ -102,10 +110,10 @@
<HintPath>..\..\..\EgtProg\DllD32\EgtWPFLib5.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.0.0\lib\net40\EntityFramework.dll</HintPath>
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.0.0\lib\net40\EntityFramework.SqlServer.dll</HintPath>
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="MySql.Data, Version=6.10.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>..\packages\MySql.Data.6.10.9\lib\net40\MySql.Data.dll</HintPath>
@@ -144,6 +152,7 @@
<Compile Include="BTLParam\BTLPartVM.vb" />
<Compile Include="BTLParam\BTLRawPartVM.vb" />
<Compile Include="Constants\ConstWarehouseIni.vb" />
<Compile Include="ProjectManager\ProdFileVM.vb" />
<Compile Include="Utility\DbControllers.vb" />
<Compile Include="WarehouseWnd\WarehouseWndV.xaml.vb">
<DependentUpon>WarehouseWndV.xaml</DependentUpon>
@@ -203,7 +212,7 @@
<DependentUpon>ProdManagerV.xaml</DependentUpon>
</Compile>
<Compile Include="ProdManager\ProdManagerVM.vb" />
<Compile Include="ProjectManager\ProjectFile.vb" />
<Compile Include="ProjectManager\ProjFileVM.vb" />
<Compile Include="Project\ProjectV.xaml.vb">
<DependentUpon>ProjectV.xaml</DependentUpon>
</Compile>
@@ -545,4 +554,12 @@ IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Debug" copy $(TargetPa
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\ViewerOptimizer\EgtBEAMWALL.ViewerOptimizerR64.exe
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\ViewerOptimizer\EgtBEAMWALL.ViewerOptimizerD64.exe</PostBuildEvent>
</PropertyGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
</Target>
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
</Project>
@@ -3,6 +3,7 @@ Imports System.Threading
Imports System.Globalization
Imports EgtUILib
Imports EgtWPFLib5
Imports EgtBEAMWALL.Core.ConstBeam
Public Class CalcIntegration
@@ -273,26 +274,26 @@ Public Class CalcIntegration
While nFeatureId <> GDB_ID.NULL
' verifico che sia una feature
Dim nGRP As Integer
If EgtGetInfo( nFeatureId, BTL_FTR_GRP, nGRP) Then
If EgtGetInfo(nFeatureId, BTL_FTR_GRP, nGRP) Then
' assegno TASKID alla feature per calcoli
EgtSetInfo( nFeatureId, "TASKID", nFeatureId, True)
EgtSetInfo(nFeatureId, "TASKID", nFeatureId, True)
End If
nFeatureId = EgtGetNext( nFeatureId)
nFeatureId = EgtGetNext(nFeatureId)
End While
Return True
End Function
Private Shared Sub ProcessResults( Bar As Bar)
Private Shared Sub ProcessResults(Bar As Bar)
Dim BtlPath As String = Bar.sBarPath
Dim ResPath As String = Path.ChangeExtension( BtlPath, ".txt")
Dim ResPath As String = Path.ChangeExtension(BtlPath, ".txt")
Dim bErrors As Boolean = False
Dim nLastErr As Integer = 0
Dim sLastMsg As String = ""
Dim nCurrCutId As Integer = 0
Dim nTotTime As Integer = 0
If File.Exists( ResPath) Then
If File.Exists(ResPath) Then
Dim nErr As Integer = 0
Dim sMsg As String = ""
@@ -306,7 +307,7 @@ Public Class CalcIntegration
Dim currBTLPart As BTLPartVM
Dim currPart As Core.Part
Dim lines As String() = System.IO.File.ReadAllLines( ResPath)
Dim lines As String() = System.IO.File.ReadAllLines(ResPath)
For Each line As String In lines
If line.StartsWith("ERR=") Then
@@ -399,12 +400,12 @@ Public Class CalcIntegration
End If
ElseIf line.StartsWith("TIME=") Then
Dim nVal As Integer? = GetVal(line, "TIME")
nTotTime = ( If( nVal IsNot Nothing, nVal.Value, 0))
If Bar.nBarType = ProjectType.PROJ AndAlso Not IsNothing( currBTLPart) Then
nTotTime = (If(nVal IsNot Nothing, nVal.Value, 0))
If Bar.nBarType = ProjectType.PROJ AndAlso Not IsNothing(currBTLPart) Then
EgtSetInfo(currBTLPart.nPartId, If(Bar.nBarType = ProjectType.PROJ, ITG_PROJ_TIME, ITG_PROD_TIME), nTotTime, True)
End If
ElseIf Not String.IsNullOrWhiteSpace( line) AndAlso line <> "---" Then
ElseIf Not String.IsNullOrWhiteSpace(line) AndAlso line <> "---" Then
sMsg = line
End If
Next
@@ -441,7 +442,7 @@ Public Class CalcIntegration
End Sub
Private Shared Function GetVal( sText As String, sKey As String) As Integer?
Private Shared Function GetVal(sText As String, sKey As String) As Integer?
Dim sParts As String() = sText.Split("="c)
If String.Compare(sParts(0), sKey) <> 0 Then Return Nothing
Dim nVal As Integer = Nothing
@@ -1,5 +1,6 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtBEAMWALL.Core.ConstBeam
Imports EgtUILib
Imports EgtWPFLib5
@@ -140,7 +141,7 @@ Public Class MainMenuVM
Map.refProjectVM.SetProjManager_Visibility(False)
Map.refProjectVM.SetProdManager_Visibility(True)
' verifico se progetto modificato, e chiedo se salvare
If bVerifyModification Then ProjectFile.VerifyProjectModification(Map.refProjManagerVM.CurrProj, ProjectType.PROJ)
If bVerifyModification Then ProjFileVM.VerifyProjectModification(Map.refProjManagerVM.CurrProj, ProjectType.PROJ)
Return True
End Function
@@ -183,7 +184,7 @@ Public Class MainMenuVM
Map.refProjectVM.SetProjManager_Visibility(True)
Map.refProjectVM.SetProdManager_Visibility(False)
' verifico se progetto modificato, e chiedo se salvare
If bVerifyModification Then ProjectFile.VerifyProjectModification(Map.refProdManagerVM.CurrProd, ProjectType.PROD)
If bVerifyModification Then ProjFileVM.VerifyProjectModification(Map.refProdManagerVM.CurrProd, ProjectType.PROD)
EgtResetCurrMachGroup()
Return True
End Function
@@ -59,6 +59,25 @@ Public Class MainWindowVM
m_Title = sTitle
NotifyPropertyChanged("Title")
End Sub
Public Sub UpdateTitle()
Select Case Map.refMainMenuVM.SelPage
Case Pages.VIEW
If Map.refProjManagerVM.CurrProj.bIsNew Then
m_Title = "New"
Else
m_Title = Map.refProjManagerVM.CurrProj.nProjId.ToString("0000") & " - " & Map.refProjManagerVM.CurrProj.BTLFileName
End If
Case Pages.MACHINING
If Map.refProdManagerVM.CurrProd.NewProd Then
m_Title = "New"
Else
m_Title = Map.refProdManagerVM.CurrProd.nProdId.ToString("0000")
End If
Case Pages.CONFIG
m_Title = "Configuration Page"
End Select
m_Title &= " - EgtBEAMWALL"
End Sub
Friend Sub ContentRendered()
' Verifico che l'inizializzazione di tutte le parti del programma sia andata a buon fine
+48 -47
View File
@@ -1,7 +1,7 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:$clrversion$
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
@@ -11,52 +11,53 @@
Option Strict On
Option Explicit On
Imports System
Namespace My.Resources
'This class was auto-generated by the StronglyTypedResourceBuilder
'class via a tool like ResGen or Visual Studio.
'To add or remove a member, edit your .ResX file then rerun ResGen
'with the /str option, or rebuild your VS project.
'''<summary>
''' A strongly-typed resource class, for looking up localized strings, etc.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
Friend Module Resources
Private resourceMan As Global.System.Resources.ResourceManager
Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary>
''' Returns the cached ResourceManager instance used by this class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("$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
'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", "16.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("EgtBEAMWALL.ViewerOptimizer.Resources", GetType(Resources).Assembly)
resourceMan = temp
End If
Return resourceMan
End Get
End Property
'''<summary>
''' Overrides the current thread's CurrentUICulture property for all
''' resource lookups using this strongly typed resource class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set
resourceCulture = value
End Set
End Property
End Module
End Namespace
+44 -46
View File
@@ -12,62 +12,60 @@ 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)
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.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 addedHandler As Boolean
Private Shared addedHandlerLockObject As New Object
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
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, 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
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
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
End Get
End Property
End Class
Namespace My
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global.EgtBEAMWALL.ViewerOptimizer.My.MySettings
Get
Return Global.EgtBEAMWALL.ViewerOptimizer.My.MySettings.Default
End Get
End Property
End Module
<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.EgtBEAMWALL.ViewerOptimizer.MySettings
Get
Return Global.EgtBEAMWALL.ViewerOptimizer.MySettings.Default
End Get
End Property
End Module
End Namespace
@@ -26,7 +26,7 @@ Public Class OpenProjectFileDialogV
' mostro la finestra di dialogo
Return Me.ShowDialog()
End Function
Public Function EgtShowDialog(ProjectType As ProjectType, ProjectList As List(Of ProjectFile)) As Boolean?
Public Function EgtShowDialog(ProjectType As ProjectType, ProjectList As List(Of ProjFileVM)) As Boolean?
m_OpenProjFileDialogVM.Init(ProjectType, ProjectList)
' mostro la finestra di dialogo
Return Me.ShowDialog()
@@ -1,4 +1,5 @@
Imports System.IO
Imports EgtBEAMWALL.Core.ConstBeam
Imports EgtUILib
Public Class OpenProjectFileDialogVM
@@ -47,8 +48,8 @@ Public Class OpenProjectFileDialogVM
End Get
End Property
Private m_ProjectList As New List(Of ProjectFile)
Public ReadOnly Property ProjectList As List(Of ProjectFile)
Private m_ProjectList As New List(Of ProjFileVM)
Public ReadOnly Property ProjectList As List(Of ProjFileVM)
Get
Return m_ProjectList
End Get
@@ -58,12 +59,12 @@ Public Class OpenProjectFileDialogVM
'End Set
End Property
Private m_SelProject As ProjectFile
Public Property SelProject As ProjectFile
Private m_SelProject As ProjFileVM
Public Property SelProject As ProjFileVM
Get
Return m_SelProject
End Get
Set(value As ProjectFile)
Set(value As ProjFileVM)
m_SelProject = value
End Set
End Property
@@ -96,31 +97,19 @@ Public Class OpenProjectFileDialogVM
' Definizione comandi
Private m_cmdProjectDoubleClick As ICommand
Public Function Init(ProjectType As ProjectType, Optional ProjectList As List(Of ProjectFile) = Nothing) As Boolean?
Public Function Init(ProjectType As ProjectType, Optional ProjectList As List(Of ProjFileVM) = Nothing) As Boolean?
m_ProjectType = ProjectType
If IsNothing(ProjectList) OrElse ProjectList.Count = 0 Then
' leggo da db
Dim DbProjectList As New List(Of Core.ProjectFile)
Dim DbProjectList As New List(Of Core.ProjFileM)
If ProjectType = ProjectType.PROJ Then
DbProjectList = DbControllers.m_ProjController.GetLastDesc(50)
ElseIf ProjectType = ProjectType.PROD Then
DbProjectList = DbControllers.m_ProdController.GetLastDesc(50)
End If
For Each Project In DbProjectList
m_ProjectList.Add(New ProjectFile(Project.nProjectType, Project.nProjId, Project.nProdId, Project.BTLFileName))
m_ProjectList.Add(New ProjectFileVM(Project))
Next
'' cartella da cui leggere i programmi
'Dim sFolderPath As String
'If m_ProjectType = ProjectType.PROJ Then
' sFolderPath = Map.refMainWindowVM.MainWindowM.sProjsDir
'Else
' sFolderPath = Map.refMainWindowVM.MainWindowM.sProdsDir
'End If
'' leggo i file che contiene
'Dim AllDirsInDir As IEnumerable(Of String) = IO.Directory.EnumerateDirectories(sFolderPath)
'For Each CurrDirectory In AllDirsInDir
' VerifyFiles(CurrDirectory)
'Next
Else
m_ProjectList = ProjectList
End If
@@ -133,8 +122,8 @@ Public Class OpenProjectFileDialogVM
Dim nProjId As Integer = 0
Dim nProdId As Integer = 0
Dim sBTLFileName As String = ""
If ProjectFile.VerifyProjectFile(m_ProjectType, Path.GetFileNameWithoutExtension(File), nProjId, nProdId, sBTLFileName) Then
m_ProjectList.Add(New ProjectFile(m_ProjectType, nProjId, nProdId, sBTLFileName))
If ProjFileVM.VerifyProjectFile(m_ProjectType, Path.GetFileNameWithoutExtension(File), nProjId, nProdId, sBTLFileName) Then
m_ProjectList.Add(New ProjectFileVM(m_ProjectType, nProjId, nProdId, sBTLFileName))
End If
End If
Next
@@ -1,5 +1,8 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtBEAMWALL.Core
Imports EgtBEAMWALL.Core.ConstBeam
Imports EgtBEAMWALL.DataLayer.DatabaseModels
Imports EgtUILib
Imports EgtWPFLib5
@@ -8,12 +11,12 @@ Public Class ProdManagerVM
#Region "FIELDS & PROPERTIES"
Private m_CurrProd As ProjectFile
Friend Property CurrProd As ProjectFile
Private m_CurrProd As ProdFileVM
Friend Property CurrProd As ProdFileVM
Get
Return m_CurrProd
End Get
Set(value As ProjectFile)
Set(value As ProdFileVM)
m_CurrProd = value
End Set
End Property
@@ -60,6 +63,17 @@ Public Class ProdManagerVM
#End Region ' CONSTRUCTOR
#Region "METHODS"
Public Function SetCurrProd(nProdId As Integer) As Boolean
Dim Currprod As ProdModel = DbControllers.m_ProdController.FindByProdId(nProdId)
If IsNothing(Currprod) Then Return False
Map.refProdManagerVM.CurrProd = New ProdFileVM(ProdFileM.CreateProdFileM(Currprod.ProdId, New List(Of Integer), Date.Now(), ""))
Return True
End Function
#End Region ' METHODS
#Region "COMMANDS"
#Region "OpenCommand"
@@ -85,9 +99,9 @@ Public Class ProdManagerVM
Friend Sub OpenProject(sFilePath As String)
' verifico se progetto modificato, e chiedo se salvare
ProjectFile.VerifyProjectModification(CurrProd, ProjectType.PROD)
ProdFileVM.VerifyProjectModification(CurrProd, ProjectType.PROD)
' se la string è vuota
Dim TempCurrProd As ProjectFile
Dim TempCurrProd As ProjFileVM
Dim OpenProjectFileDialogVM As OpenProjectFileDialogVM = Nothing
If String.IsNullOrEmpty(sFilePath) Then
' apro dialogo di scelta file
@@ -101,8 +115,8 @@ Public Class ProdManagerVM
Dim nProjId As Integer = 0
Dim nProdId As Integer = 0
Dim sBTLFileName As String = ""
If ProjectFile.VerifyProjectFile(ProjectType.PROD, Path.GetFileNameWithoutExtension(sFilePath), nProjId, nProdId, sBTLFileName) Then
TempCurrProd = New ProjectFile(ProjectType.PROD, nProjId, nProdId, sBTLFileName)
If ProjFileVM.VerifyProjectFile(ProjectType.PROD, Path.GetFileNameWithoutExtension(sFilePath), nProjId, nProdId, sBTLFileName) Then
TempCurrProd = New ProjectFileVM(ProjectType.PROD, nProjId, nProdId, sBTLFileName)
Else
MessageBox.Show("Error in file name!!")
Return
@@ -196,7 +210,7 @@ Public Class ProdManagerVM
''' </summary>
Friend Sub GoToProj()
' verifico se salvare progetto corrente
ProjectFile.VerifyProjectModification(Map.refProdManagerVM.CurrProd, ProjectType.PROD)
ProjFileVM.VerifyProjectModification(Map.refProdManagerVM.CurrProd, ProjectType.PROD)
' recupero Proj associato da Db
Dim DbProjList As List(Of DataLayer.DatabaseModels.ProjModel) = DbControllers.m_ProjController.GetByProdAsc(m_CurrProd.nProdId)
Dim nProjId As Integer = 0
@@ -241,7 +255,7 @@ Public Class ProdManagerVM
' Proj = ProjList(0)
'End If
' apro progetto proj
Map.refProjManagerVM.CurrProj = New ProjectFile(ProjectType.PROJ, nProjId, m_CurrProd.nProdId, sBTLFileName)
Map.refProjManagerVM.CurrProj = New ProjectFileVM(ProjectType.PROJ, nProjId, m_CurrProd.nProdId, sBTLFileName)
' vado in pagina proj
Map.refMainMenuVM.SetSelPage(Pages.VIEW, False)
End Sub
@@ -7,11 +7,11 @@
Style="{StaticResource ToolBar_EgtFloatingPanel}">
<!--Barra superiore dei comandi-->
<!--<Button Command="{Binding NewCommand}"
<Button Command="{Binding New_Command}"
ToolTip="{Binding NewToolTip}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/ProjectManager/New.png" Stretch="Uniform"/>
</Button>-->
</Button>
<Button Command="{Binding OpenCommand}"
ToolTip="{Binding OpenToolTip}"
Style="{StaticResource ToolBar_Button}">
@@ -1,5 +1,7 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtBEAMWALL.Core
Imports EgtBEAMWALL.DataLayer.DatabaseModels
Imports EgtUILib
Imports EgtWPFLib5
@@ -8,12 +10,12 @@ Public Class ProjManagerVM
#Region "FIELDS & PROPERTIES"
Private m_CurrProj As ProjectFile
Friend Property CurrProj As ProjectFile
Private m_CurrProj As ProjFileVM
Friend Property CurrProj As ProjFileVM
Get
Return m_CurrProj
End Get
Set(value As ProjectFile)
Set(value As ProjFileVM)
m_CurrProj = value
End Set
End Property
@@ -124,28 +126,15 @@ Public Class ProjManagerVM
Private Sub NewProdFromProj()
' verifico se progetto modificato, e chiedo se salvare
ProjectFile.VerifyProjectModification(CurrProj, ProjectType.PROJ)
' creo nuova ottimizzazione
' leggo indice di ottimizzazione
Dim nProdsIndex As Integer = DbControllers.m_ProdController.GetNextIndex(CurrProj.nProjId)
Dim sProdsDir As String = refMainWindowVM.MainWindowM.sProdsDir & "\" & nProdsIndex.ToString("0000")
' creo cartella nuova ottimizzazione
If Not Directory.Exists(sProdsDir) Then
Directory.CreateDirectory(sProdsDir)
Else
Dim di As System.IO.DirectoryInfo = New DirectoryInfo(sProdsDir)
For Each file As FileInfo In di.EnumerateFiles()
file.Delete()
Next
For Each dir As DirectoryInfo In di.EnumerateDirectories()
dir.Delete(True)
Next
End If
ProjFileVM.VerifyProjectModification(CurrProj, ProjectType.PROJ)
' inizializzo nuovo progetto
Dim nProdId As Integer = 0
Dim sProdDir As String = ""
InitNewProject(nProdId, sProdDir)
' copio file progetto
Dim sProjPath As String = String.Empty
Dim bOk = False
Dim sProdPath As String = sProdsDir & "\" & nProdsIndex.ToString("0000") & ".nge"
Dim sProdPath As String = sProdDir & "\" & nProdId.ToString("0000") & ".nge"
If EgtGetCurrFilePath(sProjPath) AndAlso Not String.IsNullOrEmpty(sProjPath) Then
Try
File.Copy(sProjPath, sProdPath)
@@ -158,21 +147,89 @@ Public Class ProjManagerVM
End If
If bOk Then
' aggiorno path proj
Map.refProjManagerVM.CurrProj.SetProdId(nProdsIndex)
Map.refProjManagerVM.CurrProj.SetProdId(nProdId)
' imposto currprod
Map.refProdManagerVM.CurrProd = New ProjectFile(ProjectType.PROD, Path.GetFileNameWithoutExtension(sProdPath))
Map.refProdManagerVM.SetCurrProd(nProdId)
' setto flag nuovo progetto in prod
Map.refProdManagerVM.CurrProd.NewProd = True
Map.refProdManagerVM.CurrProd.bIsNew = True
Else
' elimino da DB
DbControllers.m_ProdController.DeleteProd(nProdsIndex)
DbControllers.m_ProdController.DeleteProd(nProdId)
End If
End Sub
Private Function InitNewProject(ByRef nProjId As Integer, ByRef sProjectDir As String) As Boolean
' richiedo indice nuovo progetto
nProjId = DbControllers.m_ProjController.GetNextIndex()
If nProjId <= 0 Then Return False
sProjectDir = refMainWindowVM.MainWindowM.sProjsDir & "\" & nProjId.ToString("0000")
' creo cartella nuovo progetto
If Not Directory.Exists(sProjectDir) Then
Directory.CreateDirectory(sProjectDir)
Else
Dim di As System.IO.DirectoryInfo = New DirectoryInfo(sProjectDir)
For Each file As FileInfo In di.EnumerateFiles()
file.Delete()
Next
For Each dir As DirectoryInfo In di.EnumerateDirectories()
dir.Delete(True)
Next
End If
Return True
End Function
Private Function UpdateProjData(nProjId As Integer, nProdId As Integer, dtCreateProjDate As DateTime, dtExportDate As DateTime,
sListName As String, sBTLFileName As String)
DbControllers.m_ProjController.UpdateName(nProjId, sBTLFileName)
' aggiornare tutti gli altri dati!!!
End Function
Public Function SetCurrProj(nProjId As Integer) As Boolean
Dim Currproj As ProjModel = DbControllers.m_ProjController.FindByProjId(nProjId)
If IsNothing(Currproj) Then Return False
m_CurrProj = New ProjFileVM(ProjFileM.CreateProjFileM(ProjectType.PROJ, Currproj.ProjId, 0, Date.Now, Date.Now, "", Currproj.BTLFileName))
Return True
End Function
#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_cmdSave Is Nothing Then
m_cmdSave = New Command(AddressOf NewProject)
End If
Return m_cmdSave
End Get
End Property
''' <summary>
''' Execute the Save. This method is invoked by the SaveCommand.
''' </summary>
Public Sub NewProject()
' verifico se progetto modificato, e chiedo se salvare
ProjFileVM.VerifyProjectModification(CurrProj, ProjectType.PROJ)
If Map.refSceneHostVM.MainController.NewProject() Then
' inizializzo nuovo progetto
Dim nProjId As Integer = 0
Dim sProjDir As String = ""
InitNewProject(nProjId, sProjDir)
SetCurrProj(nProjId)
'DbControllers.m_ProjController.LockByProjId(m_CurrProj.nProjId)
Else
MessageBox.Show("Impossibile creare un nuovo file!!")
End If
Map.refMainWindowVM.UpdateTitle()
End Sub
#End Region ' New
#Region "OpenCommand"
''' <summary>
@@ -192,11 +249,11 @@ Public Class ProjManagerVM
''' </summary>
Friend Sub Open()
' verifico se progetto modificato, e chiedo se salvare
ProjectFile.VerifyProjectModification(CurrProj, ProjectType.PROJ)
ProjFileVM.VerifyProjectModification(CurrProj, ProjectType.PROJ)
OpenProject(Nothing)
End Sub
Friend Sub OpenProject(TempCurrProj As ProjectFile)
Friend Sub OpenProject(TempCurrProj As ProjFileVM)
' se la string è vuota
Dim OpenProjectFileDialogVM As OpenProjectFileDialogVM = Nothing
If IsNothing(TempCurrProj) Then
@@ -217,7 +274,7 @@ Public Class ProjManagerVM
If Map.refSceneHostVM.MainController.OpenProject(sFilePath, False) Then
m_CurrProj = TempCurrProj
'DbControllers.m_ProjController.LockByProjId(m_CurrProj.nProjId)
Map.refMainWindowVM.SetTitle(CurrProj.nProjId.ToString("0000") & " - " & CurrProj.BTLFileName & " - EgtBEAMWALL")
Map.refMainWindowVM.UpdateTitle()
Else
MessageBox.Show("Impossibile aprire il file!!")
Map.refMainWindowVM.SetTitle("New - EgtBEAMWALL")
@@ -311,7 +368,7 @@ Public Class ProjManagerVM
''' Execute the Export. This method is invoked by the ExportCommand.
''' </summary>
Public Sub Import()
ProjectFile.VerifyProjectModification(CurrProj, ProjectType.PROJ)
ProjFileVM.VerifyProjectModification(CurrProj, ProjectType.PROJ)
Dim sDir As String = String.Empty
GetMainPrivateProfileString(S_GENERAL, K_LASTIMPDIR, "", sDir)
' apro finestra scelta file
@@ -322,25 +379,12 @@ Public Class ProjManagerVM
.CheckFileExists = True,
.ValidateNames = True}
If BTLDlg.ShowDialog() <> True Then Return
' leggo indice di progetto
'Dim nProjId As Integer = GetMainPrivateProfileInt(S_GENERAL, K_PROJSINDEX, 1)
Dim nProjId As Integer = DbControllers.m_ProjController.GetNextIndex()
Dim sProjsDir As String = refMainWindowVM.MainWindowM.sProjsDir & "\" & nProjId.ToString("0000")
' creo cartella nuovo progetto
If Not Directory.Exists(sProjsDir) Then
Directory.CreateDirectory(sProjsDir)
Else
Dim di As System.IO.DirectoryInfo = New DirectoryInfo(sProjsDir)
For Each file As FileInfo In di.EnumerateFiles()
file.Delete()
Next
For Each dir As DirectoryInfo In di.EnumerateDirectories()
dir.Delete(True)
Next
End If
' inizializzo nuovo progetto
Dim nProjId As Integer = 0
Dim sProjDir As String = ""
InitNewProject(nProjId, sProjDir)
' copio file BTL
Dim sBtlCopyPath As String = sProjsDir & "\" & Path.GetFileName(BTLDlg.FileName)
Dim sBtlCopyPath As String = sProjDir & "\" & Path.GetFileName(BTLDlg.FileName)
Dim bOk = False
Try
File.Copy(BTLDlg.FileName, sBtlCopyPath)
@@ -353,7 +397,7 @@ Public Class ProjManagerVM
If bOk Then
bOk = Map.refSceneHostVM.MainController.ImportProject(sBtlCopyPath, False)
End If
Dim sProjFileName As String = sProjsDir & "\" & nProjId.ToString("0000") & FILENAMESEPARATOR & FILENAMESEPARATOR & Path.GetFileNameWithoutExtension(sBtlCopyPath) & ".nge"
Dim sProjFileName As String = sProjDir & "\" & nProjId.ToString("0000") & FILENAMESEPARATOR & FILENAMESEPARATOR & Path.GetFileNameWithoutExtension(sBtlCopyPath) & ".nge"
If bOk Then
' scrivo info proj su tutti i pezzi
Dim nPartId = EgtGetFirstPart()
@@ -368,10 +412,11 @@ Public Class ProjManagerVM
End If
If bOk Then
' aggiorno Db
DbControllers.m_ProjController.UpdateName(nProjId, Path.GetFileNameWithoutExtension(BTLDlg.FileName))
m_CurrProj = New ProjectFile(ProjectType.PROJ, Path.GetFileNameWithoutExtension(sProjFileName))
Dim sBTLFileName As String = Path.GetFileNameWithoutExtension(BTLDlg.FileName)
UpdateProjData(nProjId, 0, Date.Now(), Date.Now(), "", sBTLFileName)
SetCurrProj(nProjId)
'm_CurrProj.NewProj = True
Map.refMainWindowVM.SetTitle(CurrProj.nProjId.ToString("0000") & " - " & CurrProj.BTLFileName & " - EgtBEAMWALL")
Map.refMainWindowVM.UpdateTitle()
Else
' elimino da Db
DbControllers.m_ProjController.DeleteProj(nProjId)
@@ -420,7 +465,7 @@ Public Class ProjManagerVM
'If m_CurrProj.nProdId > 0 Then
If nProdId > 0 Then
'Map.refSceneHostVM.MainController.OpenProject(m_CurrProj.sProdPath, False)
Map.refProdManagerVM.CurrProd = New ProjectFile(ProjectType.PROD, Path.GetFileNameWithoutExtension(m_CurrProj.sProdPath))
Map.refProdManagerVM.CurrProd = New ProjectFileVM(ProjectType.PROD, Path.GetFileNameWithoutExtension(m_CurrProj.sProdPath))
Else
'' chiedo se aggiungere ad ottimizzazione già presente o creare nuova
'Select Case MessageBox.Show("Si: crea nuova ottimizzazione; No: aggiungi ad ottimizzazione già presente", "", MessageBoxButton.YesNoCancel, MessageBoxImage.Information)
@@ -0,0 +1,208 @@
Imports System.IO
Imports EgtBEAMWALL.Core
Imports EgtUILib
Public Class ProdFileVM
Inherits VMBase
Private m_ProdFileM As ProdFileM
Public ReadOnly Property nProjIdList As List(Of Integer)
Get
Return m_ProdFileM.nProjIdList
End Get
End Property
Public ReadOnly Property nProdId As Integer
Get
Return m_ProdFileM.nProdId
End Get
End Property
Friend ReadOnly Property sProdDirPath As String
Get
Dim sPath As String = String.Empty
If IsNothing(m_ProdFileM.nProdId) OrElse m_ProdFileM.nProdId = 0 Then Return String.Empty
Return refMainWindowVM.MainWindowM.sProdsDir & "\" & nProdId.ToString("0000")
End Get
End Property
Friend ReadOnly Property sProdPath As String
Get
Dim sPath As String = String.Empty
If IsNothing(m_ProdFileM.nProdId) OrElse m_ProdFileM.nProdId = 0 Then Return String.Empty
Return refMainWindowVM.MainWindowM.sProdsDir & "\" & nProdId.ToString("0000") & "\" & nProdId.ToString("0000") & ".nge"
End Get
End Property
Public Property bIsNew As Boolean
Get
Return m_ProdFileM.bIsNew
End Get
Set(value As Boolean)
m_ProdFileM.bIsNew = value
End Set
End Property
' nome del file mostrato nella finestra OpenProjFileDialog
Public ReadOnly Property OpenFileName As String
Get
Return m_ProdFileM.nProdId.ToString("0000")
End Get
End Property
#Region "CONSTRUCTORS"
Sub New(ProdFileM As ProdFileM)
m_ProdFileM = ProdFileM
End Sub
'Sub New(nProjectType As ProjectType, ProjectFileName As String)
' m_nProjectType = nProjectType
' If m_nProjectType = ProjectType.PROJ Then
' Dim DataFromFileName As String() = ProjectFileName.Split(FILENAMESEPARATOR)
' If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
' Integer.TryParse(DataFromFileName(0), m_nProjId)
' End If
' If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
' Integer.TryParse(DataFromFileName(1), m_nProdId)
' Else
' m_nProdId = 0
' End If
' If Not String.IsNullOrEmpty(DataFromFileName(2)) Then
' m_BTLFileName = DataFromFileName(2)
' End If
' ElseIf m_nProjectType = ProjectType.PROD Then
' Integer.TryParse(ProjectFileName, m_nProdId)
' End If
'End Sub
'Sub New(nProjectType As ProjectType, nProjId As Integer, nProdId As Integer, sBTLFileName As String)
' MyBase.New(nProjectType, nProjId, nProdId, sBTLFileName)
'End Sub
#End Region ' CONSTRUCTORS
' funzione che restituisce le parti di nome file
Friend Shared Function VerifyProjectFile(nProjectType As ProjectType, ProjectFileName As String, ByRef nProjId As Integer, ByRef nProdId As Integer, ByRef sBTLFileName As String) As Boolean
If nProjectType = ProjectType.PROJ Then
Dim DataFromFileName As String() = ProjectFileName.Split(FILENAMESEPARATOR)
If DataFromFileName.Count = 3 Then
If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
Integer.TryParse(DataFromFileName(0), nProjId)
Else Return False
End If
If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
Integer.TryParse(DataFromFileName(1), nProdId)
Else
nProdId = 0
End If
If Not String.IsNullOrEmpty(DataFromFileName(2)) Then
sBTLFileName = DataFromFileName(2)
End If
Return True
Else Return False
End If
ElseIf nProjectType = ProjectType.PROD Then
Return Integer.TryParse(ProjectFileName, nProdId)
Else Return False
End If
End Function
' funzione che dato un nome file e il tipo restituisce il corretto numero di progetto
Friend Shared Function GetProjectNumber(nProjectType As ProjectType, ProjectFileName As String, ByRef nProjId As Integer, ByRef nProdId As Integer, ByRef sBTLFileName As String) As Boolean
If String.IsNullOrWhiteSpace(ProjectFileName) Then
nProjId = 0
nProdId = 0
sBTLFileName = ""
Return False
ElseIf ProjectFileName.Contains(FILENAMESEPARATOR) Then
Dim DataFromFileName As String() = ProjectFileName.Split(FILENAMESEPARATOR)
If DataFromFileName.Count = 3 Then
If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
Integer.TryParse(DataFromFileName(0), nProjId)
Else Return False
End If
If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
Integer.TryParse(DataFromFileName(1), nProdId)
Else
nProdId = 0
End If
If Not String.IsNullOrEmpty(DataFromFileName(2)) Then
sBTLFileName = DataFromFileName(2)
End If
Return True
Else Return False
End If
ElseIf nProjectType = ProjectType.PROJ Then
Dim ProjectFileNameProd As String = Integer.TryParse(ProjectFileName, nProdId)
Dim nTempProjId As Integer = 0
Dim nTempProdId As Integer = 0
Dim sTempBTLFileName As String = ""
' ricavo lista cartelle proj
Dim AllDirsInDir As IEnumerable(Of String) = IO.Directory.EnumerateDirectories(Map.refMainWindowVM.MainWindowM.sProjsDir)
For Each Directory In AllDirsInDir
Dim AllFilesInDir As IEnumerable(Of String) = IO.Directory.EnumerateFiles(Directory)
For Each File In AllFilesInDir
If Path.GetExtension(File).ToLower() = ".nge" Then
If File.Contains(FILENAMESEPARATOR) Then
Dim DataFromFileName As String() = ProjectFileName.Split(FILENAMESEPARATOR)
If DataFromFileName.Count = 3 Then
If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
Integer.TryParse(DataFromFileName(0), nTempProjId)
Else Return False
End If
If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
Integer.TryParse(DataFromFileName(1), nTempProdId)
Else
nProdId = 0
End If
If Not String.IsNullOrEmpty(DataFromFileName(2)) Then
sTempBTLFileName = DataFromFileName(2)
End If
If ProjectFileNameProd = nTempProdId Then
nProjId = nTempProjId
nProdId = nTempProdId
sTempBTLFileName = sBTLFileName
Return True
End If
Else Return False
End If
End If
End If
Next
Next
End If
Return False
End Function
Friend Shared Function VerifyProjectModification(CurrProject As ProdFileVM, Type As ProjectType) As Boolean
If IsNothing(CurrProject) Then Return False
Dim bNewProject As Boolean = False
Dim sProjectDirPath As String = ""
sProjectDirPath = CurrProject.sProdDirPath
' verifico se progetto modificato, e chiedo se salvare
If (EgtGetModified() Or CurrProject.bIsNew) Then
If MessageBox.Show("Salvare le modifiche apportate al progetto?", "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
' salvo proj
Map.refProdManagerVM.Save()
Return True
Else
' se da non salvare e nuovo prod
If CurrProject.bIsNew Then
' lo elimino
Directory.Delete(sProjectDirPath, True)
DbControllers.m_ProjController.DeleteProj(CurrProject.nProdId)
If CurrProject.nProdId = Map.refProjManagerVM.CurrProj.nProdId Then
' reset prod in path proj
Map.refProjManagerVM.CurrProj.ResetProdId()
End If
CurrProject = Nothing
End If
EgtResetModified()
Return False
End If
End If
Return True
End Function
End Class
@@ -1,21 +1,36 @@
Imports System.IO
Imports EgtBEAMWALL.Core
Imports EgtUILib
Public Class ProjectFile
Inherits Core.ProjectFile
Public Class ProjFileVM
Inherits VMBase
Private m_ProjFileM As ProjFileM
Public ReadOnly Property nProjId As Integer
Get
Return m_ProjFileM.nProjId
End Get
End Property
Public ReadOnly Property nProdId As Integer
Get
Return m_ProjFileM.nProdId
End Get
End Property
Friend ReadOnly Property sProjDirPath As String
Get
If IsNothing(m_nProjId) OrElse m_nProjId = 0 Then Return String.Empty
If IsNothing(m_ProjFileM.nProjId) OrElse m_ProjFileM.nProjId = 0 Then Return String.Empty
Return refMainWindowVM.MainWindowM.sProjsDir & "\" & nProjId.ToString("0000")
End Get
End Property
Friend ReadOnly Property sProjPath As String
Get
Dim sPath As String = String.Empty
If IsNothing(m_nProjId) OrElse m_nProjId = 0 Then Return String.Empty
If IsNothing(m_ProjFileM.nProjId) OrElse m_ProjFileM.nProjId = 0 Then Return String.Empty
sPath = refMainWindowVM.MainWindowM.sProjsDir & "\" & nProjId.ToString("0000") & "\" & nProjId.ToString("0000") & FILENAMESEPARATOR
If Not IsNothing(m_nProdId) AndAlso m_nProdId > 0 Then
If Not IsNothing(m_ProjFileM.nProdId) AndAlso m_ProjFileM.nProdId > 0 Then
sPath &= nProdId.ToString("0000")
End If
sPath &= FILENAMESEPARATOR & BTLFileName & ".nge"
@@ -23,62 +38,64 @@ Public Class ProjectFile
End Get
End Property
Friend ReadOnly Property sProdDirPath As String
Public ReadOnly Property BTLFileName As String
Get
Dim sPath As String = String.Empty
If IsNothing(m_nProdId) OrElse m_nProdId = 0 Then Return String.Empty
Return refMainWindowVM.MainWindowM.sProdsDir & "\" & nProdId.ToString("0000")
Return m_ProjFileM.sBTLFileName
End Get
End Property
Friend ReadOnly Property sProdPath As String
Public Property bIsNew As Boolean
Get
Dim sPath As String = String.Empty
If IsNothing(m_nProdId) OrElse m_nProdId = 0 Then Return String.Empty
Return refMainWindowVM.MainWindowM.sProdsDir & "\" & nProdId.ToString("0000") & "\" & nProdId.ToString("0000") & ".nge"
Return m_ProjFileM.bIsNew
End Get
Set(value As Boolean)
m_ProjFileM.bIsNew = value
End Set
End Property
' nome del file mostrato nella finestra OpenProjFileDialog
Public ReadOnly Property OpenFileName As String
Get
If m_nProjectType = ProjectType.PROJ Then
Return m_nProjId.ToString("0000") & " " & BTLFileName
ElseIf m_nProjectType = ProjectType.PROD Then
Return m_nProdId.ToString("0000")
Else
Return ""
End If
Return m_ProjFileM.nProjId.ToString("0000") & " " & BTLFileName
End Get
End Property
Sub New(nProjectType As ProjectType, ProjectFileName As String)
m_nProjectType = nProjectType
If m_nProjectType = ProjectType.PROJ Then
Dim DataFromFileName As String() = ProjectFileName.Split(FILENAMESEPARATOR)
If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
Integer.TryParse(DataFromFileName(0), m_nProjId)
End If
If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
Integer.TryParse(DataFromFileName(1), m_nProdId)
Else
m_nProdId = 0
End If
If Not String.IsNullOrEmpty(DataFromFileName(2)) Then
m_BTLFileName = DataFromFileName(2)
End If
ElseIf m_nProjectType = ProjectType.PROD Then
Integer.TryParse(ProjectFileName, m_nProdId)
End If
#Region "CONSTRUCTORS"
Sub New(ProjectFileM As ProjFileM)
m_ProjFileM = ProjectFileM
End Sub
Sub New(nProjectType As ProjectType, nProjId As Integer, nProdId As Integer, sBTLFileName As String)
MyBase.New(nProjectType, nProjId, nProdId, sBTLFileName)
End Sub
'Sub New(nProjectType As ProjectType, ProjectFileName As String)
' m_nProjectType = nProjectType
' If m_nProjectType = ProjectType.PROJ Then
' Dim DataFromFileName As String() = ProjectFileName.Split(FILENAMESEPARATOR)
' If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
' Integer.TryParse(DataFromFileName(0), m_nProjId)
' End If
' If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
' Integer.TryParse(DataFromFileName(1), m_nProdId)
' Else
' m_nProdId = 0
' End If
' If Not String.IsNullOrEmpty(DataFromFileName(2)) Then
' m_BTLFileName = DataFromFileName(2)
' End If
' ElseIf m_nProjectType = ProjectType.PROD Then
' Integer.TryParse(ProjectFileName, m_nProdId)
' End If
'End Sub
'Sub New(nProjectType As ProjectType, nProjId As Integer, nProdId As Integer, sBTLFileName As String)
' MyBase.New(nProjectType, nProjId, nProdId, sBTLFileName)
'End Sub
#End Region ' CONSTRUCTORS
Friend Sub SetProdId(nProdId As Integer)
' rinomino proj con riferimento a prod
Dim OldPath As String = sProjPath
m_nProdId = nProdId
'''m_ProjFileM.nProdId = nProdId
Dim NewPath As String = sProjPath
File.Move(OldPath, NewPath)
End Sub
@@ -180,36 +197,25 @@ Public Class ProjectFile
Return False
End Function
Friend Shared Function VerifyProjectModification(CurrProject As ProjectFile, Type As ProjectType) As Boolean
Friend Shared Function VerifyProjectModification(CurrProject As ProjFileVM, Type As ProjectType) As Boolean
If IsNothing(CurrProject) Then Return False
Dim bNewProject As Boolean = False
Dim sProjectDirPath As String = ""
If Type = ProjectType.PROJ Then
bNewProject = DbControllers.m_ProjController.FindByProjId(CurrProject.m_nProjId).IsNew
sProjectDirPath = CurrProject.sProjDirPath
Else
bNewProject = CurrProject.NewProd
sProjectDirPath = CurrProject.sProdDirPath
End If
sProjectDirPath = CurrProject.sProjDirPath
' verifico se progetto modificato, e chiedo se salvare
If (EgtGetModified() Or bNewProject) Then
If (EgtGetModified() Or CurrProject.bIsNew) Then
If MessageBox.Show("Salvare le modifiche apportate al progetto?", "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
' salvo proj
If Type = ProjectType.PROJ Then
Map.refProjManagerVM.Save()
Else
Map.refProdManagerVM.Save()
End If
Map.refProjManagerVM.Save()
Return True
Else
' se da non salvare e nuovo proj
If bNewProject Then
If CurrProject.bIsNew Then
' lo elimino
Directory.Delete(sProjectDirPath, True)
DbControllers.m_ProjController.DeleteProj(CurrProject.m_nProjId)
If Type = ProjectType.PROD AndAlso CurrProject.m_nProdId = Map.refProjManagerVM.CurrProj.m_nProdId Then
DbControllers.m_ProjController.DeleteProj(CurrProject.nProjId)
If Type = ProjectType.PROD AndAlso CurrProject.nProdId = Map.refProjManagerVM.CurrProj.nProdId Then
' reset prod in path proj
Map.refProjManagerVM.CurrProj.ResetProdId()
'''Map.refProjManagerVM.CurrProj.ResetProdId()
End If
CurrProject = Nothing
End If
+3 -3
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.4.4" targetFramework="net40" />
<package id="MySql.Data" version="6.10.9" targetFramework="net40" />
<package id="MySql.Data.Entity" version="6.10.9" targetFramework="net40" />
<package id="EntityFramework" version="6.4.4" targetFramework="net452" />
<package id="MySql.Data" version="6.10.9" targetFramework="net40" requireReinstallation="true" />
<package id="MySql.Data.Entity" version="6.10.9" targetFramework="net40" requireReinstallation="true" />
</packages>