Merge branch 'feature/NewGraphicsProgram' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/NewGraphicsProgram

This commit is contained in:
Emmanuele Sassi
2026-02-24 18:51:17 +01:00
174 changed files with 1725 additions and 2475 deletions
+1 -1
View File
@@ -544,7 +544,7 @@ Public Class BTLFeatureM
bOk = True
Else
' Impossibile creare una feature con questi valori - ERRORE
MessageBox.Show(EgtMsg(61852), EgtMsg(30007))
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61852), EgtMsg(30007))
nFeatureId = EgtBeamModifyProcess(Me.nFeatureId, Me.nSelGRP, Me.nPRC, Me.nSelSIDE, "", Me.nPRID,
Me.frFRAME, vPar, sPar, vParQ, nCrvId, nCrv2Id)
SetFeatureId(nFeatureId)
@@ -74,7 +74,7 @@
ToolTip="{Binding SaveToolTip}"
Visibility="{Binding Machine_Visibility}"
Style="{StaticResource SaveMachinePanel_Button}">
<Image Source="/Resources/ProjectManager/Save.png"
<Image Source="{StaticResource Save_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
@@ -1,10 +1,7 @@
Public Module ConstDataGridColumnsIni
Public Const DATAGRIDCOLUMNS_FILE_NAME As String = "DataGridColumns.ini"
Public Const OPTIMIZERDATAGRIDCOLUMNS_FILE_NAME As String = "OPTIMIZERDataGridColumns.ini"
Public Const DATAGRIDCOLUMNS_FILE_NAME As String = "DataGridColumns.json"
Public Const S_FEATURELIST As String = "DG_FeatureList"
Public Const S_OPENPROJFILEDLG_PROJ As String = "DG_OpenProjectFileDialog_PROJ"
Public Const S_OPENPROJFILEDLG_PROD As String = "DG_OpenProjectFileDialog_PROD"
Public Const S_NEWOPENPROJFILEDLG_PROD As String = "DG_NewOpenProjectFileDialog_PROD"
Public Const S_RAWPARTLIST_BEAM As String = "DG_RawPartList_BEAM"
@@ -12,8 +9,6 @@
Public Const S_PARTINRAWPARTLIST_BEAM As String = "DG_PartInRawPartList_BEAM"
Public Const S_PARTINRAWPARTLIST_WALL As String = "DG_PartInRawPartList_WALL"
Public Const S_PARAMETERLIST_P As String = "DG_ParameterList_P"
Public Const S_PARAMETERLIST_Q As String = "DG_ParameterList_Q"
Public Const S_DUPLOPARAMETERLIST_Q As String = "DG_DuploParameterList_Q"
Public Const S_RAWPARTLIST_SUPERVISOR As String = "DG_RawPartList_SUPERVISOR"
Public Const S_PARTINRAWPARTLIST_SUPERVISOR As String = "DG_PartInRawPartList_SUPERVISOR"
Public Const S_FEATUREINPARTINRAWPARTLIST_SUPERVISOR As String = "DG_FeatureInPartInRawPartList_SUPERVISOR"
@@ -23,11 +18,8 @@
Public Const S_STATISTICS_PART As String = "DG_Statistics_PART"
Public Const S_OPTIMIZERSTATISTICS As String = "DG_OptimizerStatistics"
Public Const S_RAWPARTSTATISTICS As String = "DG_RawPartStatistics"
Public Const S_BEAMMACHININGS As String = "DG_BeamMachinings"
Public Const S_SPARAMLIST_BEAM As String = "DG_SParamList_BEAM"
Public Const S_SPARAMLIST_WALL As String = "DG_SParamList_WALL"
Public Const S_SECTXMATLIST_BEAM As String = "DG_SectXMatList_BEAM"
Public Const S_SECTXMATLIST_WALL As String = "DG_SectXMatList_WALL"
Public Const S_VARIABLESLIST As String = "DG_VariablesList"
Public Const S_MDICOMMANDS As String = "DG_MDICommands"
Public Const S_MACHINELOG As String = "DG_MachineLog"
-1
View File
@@ -2,7 +2,6 @@
Public Const DIMENSIONS_FILE_NAME As String = "Dimensions.ini"
Public Const PROJECT_OPTIMIZER As String = "Project_Optimizer"
Public Const LEFTPANEL_VIEW As String = "LeftPanel_View"
Public Const LEFTPANEL_SUPERVISOR As String = "LeftPanel_Supervisor"
Public Const PROJECT_SUPERVISOR As String = "Project_Supervisor"
+1
View File
@@ -14,6 +14,7 @@
Public Module ConstIni
Public Const INI_FILE_NAME As String = "Aedifica.ini"
Public Const CONFIG_FILE_NAME As String = "Config.ini"
Public Const K_NETKEY As String = "NetKey"
Public Const K_MAXCAMINST As String = "MaxCamInstances"
+2 -2
View File
@@ -56,8 +56,8 @@
<Reference Include="EgwProxy.LiMan, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EgwProxy.LiMan.1.0.2408.718\lib\EgwProxy.LiMan.dll</HintPath>
</Reference>
<Reference Include="EgwWPFBaseLib, Version=3.1.1.1, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EgwWPFBaseLib.3.1.1.1\lib\EgwWPFBaseLib.dll</HintPath>
<Reference Include="EgwWPFBaseLib, Version=3.1.1.2, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EgwWPFBaseLib.3.1.1.2\lib\EgwWPFBaseLib.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
@@ -44,7 +44,7 @@ Public Class EgtColorPickerV
#Region "EVENTS"
Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtColorPickerVM.OnCloseWindow
Private Sub CloseWindow(DialogResult As Boolean) Handles m_EgtColorPickerVM.OnCloseWindow
Me.DialogResult = DialogResult
Me.Close()
End Sub
@@ -64,7 +64,7 @@ Public Class EgtDataGrid
newItems(index).InitColumn(col)
context.Columns.Add(col)
Catch ex As Exception
MessageBox.Show(String.Format(EgtMsg(61883), newItems(index).Name, newItems(index).ParentDataGridName), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(61883), newItems(index).Name, newItems(index).ParentDataGridName), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
End Try
Next
@@ -159,7 +159,7 @@ Public Class EgtDataGrid
Me.Columns(e.NewStartingIndex).DisplayIndex = e.NewStartingIndex
End If
Catch ex As Exception
MessageBox.Show(String.Format(EgtMsg(61883), one.Name, one.ParentDataGridName), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(61883), one.Name, one.ParentDataGridName), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
End Try
Next
End If
@@ -6,7 +6,7 @@
Title="{Binding sTitle}"
WindowStartupLocation="CenterOwner"
ShowInTaskbar="False"
Height="500" Width="800"
Height="650" Width="1000"
Style="{StaticResource OptimizerWindow.Dialog}">
<Grid Style="{StaticResource AddRawPartWnd_Grid}">
@@ -24,7 +24,7 @@
</Grid.ColumnDefinitions>
<Button Command="{Binding GoBack_Command}"
Style="{StaticResource RightPanel_Button}">
<Image Source="\Resources\EgtDialog\Restore.png"
<Image Source="{StaticResource Restore_Image}"
Style="{StaticResource Button_Image}"/>
</Button>
<TextBlock Grid.Column="1"
@@ -241,25 +241,13 @@
SelectedItem="{Binding ItemSelected}"
RowStyle="{StaticResource RowDataGrid_CustomHighLight}"
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
Style="{StaticResource Optimizer_DataGrid}">
<DataGrid.ColumnHeaderStyle>
<Style TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="Background" Value="{StaticResource BeamWall_Teal}"/>
<Setter Property="Foreground" Value="{StaticResource BeamWall_White}"/>
<Setter Property="BorderBrush" Value="{StaticResource BeamWall_Gray}"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="Padding" Value="1"/>
<Setter Property="BorderThickness" Value="0,0,1,1"/>
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.Columns>
<DataGridTemplateColumn Width="5*">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.Name_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
Style="{StaticResource Name_TextBlock}"/>
<TextBlock Text="{Binding DataContext.Name_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
@@ -283,8 +271,7 @@
ElementStyle="{StaticResource DataGrid_TextBlock}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.LastModify_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
Style="{StaticResource Name_TextBlock}"/>
<TextBlock Text="{Binding DataContext.LastModify_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
@@ -293,8 +280,7 @@
ElementStyle="{StaticResource DataGrid_TextBlock}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.Type_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
Style="{StaticResource Name_TextBlock}"/>
<TextBlock Text="{Binding DataContext.Type_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
@@ -303,8 +289,7 @@
ElementStyle="{StaticResource DataGridR_TextBlock}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.Dimension_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
Style="{StaticResource Name_TextBlock}"/>
<TextBlock Text="{Binding DataContext.Dimension_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
@@ -1,6 +1,6 @@
Imports EgtWPFLib5
Imports System.Windows.Forms
Imports System.Windows.Input
Imports System.Windows.Input
Imports EgtWPFLib5
Imports System.Windows
Public Class EgtManageFileDialogV
@@ -8,7 +8,7 @@ Public Class EgtManageFileDialogV
Private WithEvents m_EgtManageFileDialogVM As EgtManageFileDialogVM
Private Shadows DialogResult As DialogResult
Private Shadows DialogResult As Boolean
''' <summary>
''' Stringa che specifica il titolo da mostrare
@@ -31,6 +31,15 @@ Public Class EgtManageFileDialogV
End Set
End Property
Public Property SelFilter As EgtExstension
Get
Return m_EgtManageFileDialogVM.SelFilter
End Get
Set(value As EgtExstension)
m_EgtManageFileDialogVM.SelFilter = value
End Set
End Property
Public Property InitialDirectory As String
Get
Return m_EgtManageFileDialogVM.sInitialDirectory
@@ -103,31 +112,31 @@ Public Class EgtManageFileDialogV
End Set
End Property
#End Region ' FIELDS & PROPERTIES
#End Region ' Fields & Properties
#Region "CONTRUCTORS"
Sub New(Owner As System.Windows.Window, EgtManageFileDialogVM As EgtManageFileDialogVM)
Sub New(Owner As Window, EgtManageFileDialogVM As EgtManageFileDialogVM)
InitializeComponent()
Me.DataContext = EgtManageFileDialogVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_EgtManageFileDialogVM = EgtManageFileDialogVM
End Sub
#End Region
#End Region ' Constructor
#Region "EVENTS"
Private Sub CloseWindow(DialogResult As DialogResult) Handles m_EgtManageFileDialogVM.OnCloseWindow
Private Sub CloseWindow(DialogResult As Boolean) Handles m_EgtManageFileDialogVM.OnCloseWindow
Me.DialogResult = DialogResult
Me.Close()
End Sub
#End Region
#End Region ' Events
#Region "METHODS"
Public Overloads Function ShowDialog() As DialogResult
Public Overloads Function ShowDialog() As Boolean
MyBase.ShowDialog()
Return Me.DialogResult
End Function
@@ -136,6 +145,6 @@ Public Class EgtManageFileDialogV
m_EgtManageFileDialogVM.MouseDoubleClick()
End Sub
#End Region ' METHODS
#End Region ' Methods
End Class
+2 -2
View File
@@ -214,7 +214,7 @@ Public Class NewMachGroupPanelVM
Dim m_MessageBoxResult As MessageBoxResult
If MachGroupVMList.Count = 1 Then
'chiedo conferma prima di resettare il gruppo di lavorazione
MessageBox.Show(Application.Current.MainWindow, EgtMsg(62539), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62539), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
Select Case m_MessageBoxResult
Case MessageBoxResult.Yes
' cancello il gruppo corrente e ne creo uno nuovo con lo stesso nome
@@ -228,7 +228,7 @@ Public Class NewMachGroupPanelVM
End Select
Else
'chiedo conferma prima di cancellare il gruppo di lavorazione
MessageBox.Show(Application.Current.MainWindow, EgtMsg(62539), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62539), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
Select Case m_MessageBoxResult
Case MessageBoxResult.Yes
' cancello quello selezionato (ovvero il corrente)
+2 -2
View File
@@ -38,5 +38,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("3.1.1.1")>
<Assembly: AssemblyFileVersion("3.1.1.1")>
<Assembly: AssemblyVersion("3.1.2.6")>
<Assembly: AssemblyFileVersion("3.1.2.6")>
@@ -3,9 +3,10 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
Title="{Binding Title}"
ResizeMode="NoResize" TitleBarHeight="30" IsResizable="True"
WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
MinHeight="500" MinWidth="500"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
@@ -90,20 +91,20 @@
<Border Grid.Row="1"
Style="{StaticResource NewOpenProjectFileDialog_Border}"/>
<EgtBEAMWALLCORE:EgtDataGrid Grid.Row="1"
x:Name="MainDataGrid"
ItemsSource="{Binding ProjectList}"
SelectedItem="{Binding SelProject}"
SelectionMode="Single"
Margin="5"
BindingColumns="{Binding ProdColumns}"
RowDetailsVisibilityMode="Visible"
CellEditEnding="MainDataGrid_CellEditEnding"
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
AlternationCount="2"
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
Style="{StaticResource Optimizer_DataGrid}"
CellStyle="{StaticResource CellDataGrid_CustomHighLight}">
<EgwWPFBaseLib:EgwDataGrid Grid.Row="1"
x:Name="MainDataGrid"
ItemsSource="{Binding ProjectList}"
SelectedItem="{Binding SelProject}"
SelectionMode="Single"
Margin="5"
ColumnLayouts="{Binding ProdColumns}"
RowDetailsVisibilityMode="Visible"
CellEditEnding="MainDataGrid_CellEditEnding"
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
AlternationCount="2"
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
Style="{StaticResource Optimizer_DataGrid}"
CellStyle="{StaticResource CellDataGrid_NewOpenProject}">
<DataGrid.Resources>
<!-- ProdId -->
<DataGridTextColumn x:Key="colPRODID" Binding="{Binding sProdId}">
@@ -125,7 +126,7 @@
<ToggleButton Grid.Column="1"
IsChecked="{Binding Path=DataContext.bIsEditNameActive,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:NewOpenProjectFileDialogV}}}"
Style="{StaticResource Small_ToggleButton}">
<Image Source="\Resources\CalcPanel\Edit.png"
<Image Source="{StaticResource Edit_Image}"
Style="{StaticResource Lock_Image}"/>
</ToggleButton>
</Grid>
@@ -147,7 +148,7 @@
<DataGridTemplateColumn x:Key="colARCHIVED">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Image Source="\Resources\OpenProjectFileDialog\Archived.png"
<Image Source="{StaticResource Archived_Image}"
Visibility="{Binding Archived_Visibility}"
Style="{StaticResource Archived_Image}"/>
</DataTemplate>
@@ -166,7 +167,7 @@
</DataGrid.RowStyle>
<DataGrid.RowDetailsTemplate>
<DataTemplate>
<ItemsControl ItemsSource="{Binding ProjFileList}"
<ItemsControl ItemsSource="{Binding ProjFileList}" HorizontalAlignment="Left" Margin="50,-1,0,0"
Style="{StaticResource ProjFileList_ItemsControl}">
<ItemsControl.ItemTemplate>
<DataTemplate>
@@ -216,7 +217,7 @@
</ItemsControl>
</DataTemplate>
</DataGrid.RowDetailsTemplate>
</EgtBEAMWALLCORE:EgtDataGrid>
</EgwWPFBaseLib:EgwDataGrid>
<UniformGrid Grid.Row="2"
Columns="4"
@@ -41,40 +41,30 @@ Public MustInherit Class NewOpenProjectFileDialogVM
Friend Event m_CloseWindow(bDialogResult As Boolean)
Protected m_ProdColumns As New ObservableCollection(Of EgtDataGridColumn)
Public Property ProdColumns As ObservableCollection(Of EgtDataGridColumn)
Protected m_ProdColumns As New ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)
Public Property ProdColumns As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)
Get
Return m_ProdColumns
End Get
Set(value As ObservableCollection(Of EgtDataGridColumn))
Set(value As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout))
m_ProdColumns = value
End Set
End Property
Private m_colProdFile_Name As EgtDataGridColumn
Public ReadOnly Property colProdFile_Name As EgtDataGridColumn
Private m_colProdFile_Name As EgwWPFBaseLib.ColumnLayout
Public ReadOnly Property colProdFile_Name As EgwWPFBaseLib.ColumnLayout
Get
Return m_colProdFile_Name
End Get
End Property
Private m_colArchived_Name As EgtDataGridColumn
Public ReadOnly Property colArchived_Name As EgtDataGridColumn
Private m_colArchived_Name As EgwWPFBaseLib.ColumnLayout
Public ReadOnly Property colArchived_Name As EgwWPFBaseLib.ColumnLayout
Get
Return m_colArchived_Name
End Get
End Property
Protected m_ProjColumns As New ObservableCollection(Of EgtDataGridColumn)
Public Property ProjColumns As ObservableCollection(Of EgtDataGridColumn)
Get
Return m_ProjColumns
End Get
Set(value As ObservableCollection(Of EgtDataGridColumn))
m_ProjColumns = value
End Set
End Property
Protected m_ProjectType As ProjectType
Protected m_sFilter As String
@@ -388,9 +378,9 @@ Public MustInherit Class NewOpenProjectFileDialogVM
Set(value As Boolean)
m_bViewArchived = value
WriteMainPrivateProfileString(S_OPENFILEDIALOG, K_VIEWARCHIVED, If(bViewArchived, 1, 0))
If Not IsNothing( m_colArchived_Name) Then
m_colArchived_Name.Visible = value
RefreshProjectList()
If Not IsNothing(m_colArchived_Name) Then
m_colArchived_Name.IsVisible = value
RefreshProjectList()
End If
End Set
End Property
@@ -551,8 +541,8 @@ Public MustInherit Class NewOpenProjectFileDialogVM
ProdItem.m_delIsModifiedSetUp = AddressOf SetIsEditNameActive
' carico colonne
LoadColumns()
m_colProdFile_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Name = COL_NAME)
m_colArchived_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Name = COL_ARCHIVED)
m_colProdFile_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Key = COL_NAME)
m_colArchived_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Key = COL_ARCHIVED)
' leggo valori per filtri
m_SelDayType = GetMainPrivateProfileInt(S_OPENFILEDIALOG, K_DAYTYPE, 0)
Select Case m_SelDayType
@@ -589,7 +579,7 @@ Public MustInherit Class NewOpenProjectFileDialogVM
Protected Sub LoadColumns()
' carico le colonne della datagrid
GetPrivateProfileColumns(S_NEWOPENPROJFILEDLG_PROD, ProdColumns)
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_NEWOPENPROJFILEDLG_PROD, ProdColumns)
' carico campi su cui eseguire il filtro di ricerca
m_BTLDateTypeList = New List(Of String)({CreateDate_Msg})
m_SelBTLDateType = BTLDateTypes.CREATEDATE
@@ -601,29 +591,14 @@ Public MustInherit Class NewOpenProjectFileDialogVM
New IdNameStruct(FilterTypes.MACHINE, Machine_Msg)})
m_SelFilterType = m_FilterTypeList.FirstOrDefault(Function(x) x.Id = FilterTypes.NULL)
NotifyPropertyChanged(NameOf(SelFilterType))
'End If
' setto la visibilità delle colonne delle EgtDataGrid
For Each col In ProjColumns
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
Next
For Each col In ProdColumns
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
Next
End Sub
Friend Function VerifySelected() As Boolean
' Salvo modifiche a colonne
EgwWPFBaseLib.EgwDataGrid.WriteColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_NEWOPENPROJFILEDLG_PROD, ProdColumns)
If IsNothing(SelProject) Then Return False
Dim AllFilesInDir As IEnumerable(Of String) = Nothing
If m_ProjectType = Core.ConstBeam.ProjectType.PROJ Then
If Not IsNothing(SelProject.ProdFileVM) Then
If String.IsNullOrWhiteSpace(SelProject.ProdFileVM.sProdDirPath) OrElse Not Directory.Exists(SelProject.ProdFileVM.sProdDirPath) Then Return False
AllFilesInDir = Directory.EnumerateFiles(SelProject.ProdFileVM.sProdDirPath)
ElseIf SelProject.ProjFileList.Count > 0 Then
If String.IsNullOrWhiteSpace(SelProject.ProjFileList(0).sProjDirPath) OrElse Not Directory.Exists(SelProject.ProjFileList(0).sProjDirPath) Then Return False
AllFilesInDir = Directory.EnumerateFiles(SelProject.ProjFileList(0).sProjDirPath)
Else Return False
End If
ElseIf m_ProjectType = Core.ConstBeam.ProjectType.PROD Then
If m_ProjectType = Core.ConstBeam.ProjectType.PROD Then
If String.IsNullOrWhiteSpace(SelProject.ProdFileVM.sProdDirPath) OrElse Not Directory.Exists(SelProject.ProdFileVM.sProdDirPath) Then Return False
AllFilesInDir = Directory.EnumerateFiles(SelProject.ProdFileVM.sProdDirPath)
Else
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core"
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
Title="{Binding Title}"
ResizeMode="NoResize" TitleBarHeight="30"
WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
@@ -85,17 +86,17 @@
<Border Grid.Row="1"
Style="{StaticResource NewOpenProjectFileDialog_Border}"/>
<EgtBEAMWALLCORE:EgtDataGrid Grid.Row="1"
ItemsSource="{Binding ProjectList}"
SelectedItem="{Binding SelProject}"
SelectionMode="Single"
Margin="5"
BindingColumns="{Binding ProjectColumns}"
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
AlternationCount="2"
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
Style="{StaticResource Optimizer_DataGrid}"
CellStyle="{StaticResource CellDataGrid_CustomHighLight}">
<EgwWPFBaseLib:EgwDataGrid Grid.Row="1"
ItemsSource="{Binding ProjectList}"
SelectedItem="{Binding SelProject}"
SelectionMode="Single"
Margin="5"
ColumnLayouts="{Binding ProjectColumns}"
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
AlternationCount="2"
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
Style="{StaticResource Optimizer_DataGrid}"
CellStyle="{StaticResource CellDataGrid_CustomHighLight}">
<DataGrid.RowStyle>
<Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
<Setter Property="IsEnabled" Value="{Binding bIsEnabled}"/>
@@ -103,14 +104,14 @@
</Style>
</DataGrid.RowStyle>
<DataGrid.Resources>
<!-- ProjId -->
<!-- ProjId --><!--
<DataGridTextColumn x:Key="colPROJID" Binding="{Binding sProjId}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.Id_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
</DataGridTextColumn>-->
<!-- ProdId -->
<DataGridTextColumn x:Key="colPRODID" Binding="{Binding sProdId}">
<DataGridTextColumn.HeaderTemplate>
@@ -119,14 +120,14 @@
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!-- Project Name -->
<!-- Project Name --><!--
<DataGridTextColumn x:Key="colPROJNAME" Binding="{Binding sDescription}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.BTLFileName_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
</DataGridTextColumn>-->
<!-- BTL FileName -->
<DataGridTextColumn x:Key="colBTLNAME" Binding="{Binding sBTLFileName}">
<DataGridTextColumn.HeaderTemplate>
@@ -135,22 +136,22 @@
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!-- ListName -->
<!-- ListName --><!--
<DataGridTextColumn x:Key="colLISTNAME" Binding="{Binding sListName}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.ListName_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!-- Exported date -->
</DataGridTextColumn>-->
<!-- Exported date --><!--
<DataGridTextColumn x:Key="colEXPDATE" Binding="{Binding dtExportDate}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.ExportDate_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
</DataGridTextColumn>-->
<!-- Creation date -->
<DataGridTextColumn x:Key="colCRTDATE" Binding="{Binding dtCreateDate}">
<DataGridTextColumn.Header>
@@ -163,14 +164,14 @@
<TextBlock Text="{Binding Path=DataContext.Machine_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
</DataGridTextColumn.Header>
</DataGridTextColumn>
<!-- Name (per Prod) -->
<!-- Name (per Prod) --><!--
<DataGridTextColumn x:Key="colNAME" Binding="{Binding sName}">
<DataGridTextColumn.Header>
<TextBlock Text="{Binding Path=DataContext.Name_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:OpenProjectFileDialogV}}}"/>
</DataGridTextColumn.Header>
</DataGridTextColumn>
</DataGridTextColumn>-->
</DataGrid.Resources>
</EgtBEAMWALLCORE:EgtDataGrid>
</EgwWPFBaseLib:EgwDataGrid>
<UniformGrid Grid.Row="2"
Columns="3"
@@ -69,6 +69,8 @@ Public Class OpenProjectFileDialogV
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_OpenProjFileDialogVM.m_CloseWindow
' Salvo modifiche a colonne
EgwWPFBaseLib.EgwDataGrid.WriteColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_OPENPROJFILEDLG_PROD, m_OpenProjFileDialogVM.ProjectColumns)
Me.DialogResult = bDialogResult
End Sub
@@ -42,12 +42,12 @@ Public MustInherit Class OpenProjectFileDialogVM
Protected m_GoToProd As Boolean = False
Protected m_ProjectColumns As New ObservableCollection(Of EgtDataGridColumn)
Public Property ProjectColumns As ObservableCollection(Of EgtDataGridColumn)
Protected m_ProjectColumns As New ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)
Public Property ProjectColumns As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)
Get
Return m_ProjectColumns
End Get
Set(value As ObservableCollection(Of EgtDataGridColumn))
Set(value As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout))
m_ProjectColumns = value
End Set
End Property
@@ -408,6 +408,8 @@ Public MustInherit Class OpenProjectFileDialogVM
#End Region ' FIELDS & PROPERTIES
Sub New()
' carico colonne
LoadColumns()
' leggo valori per filtri
m_SelDayType = GetMainPrivateProfileInt(S_OPENFILEDIALOG, K_DAYTYPE, 0)
Select Case m_SelDayType
@@ -441,51 +443,28 @@ Public MustInherit Class OpenProjectFileDialogVM
Public Overridable Sub RefreshProjectList()
End Sub
Protected Sub LoadColumns(ProjectType As ProjectType)
If ProjectType = ProjectType.PROJ Then
' carico le colonne della datagrid
GetPrivateProfileColumns(S_OPENPROJFILEDLG_PROJ, ProjectColumns)
' carico campi su cui eseguire il filtro di ricerca
m_BTLDateTypeList = New List(Of String)({CreateDate_Msg, ExportDate_Msg})
m_SelBTLDateType = BTLDateTypes.CREATEDATE
NotifyPropertyChanged(NameOf(BTLDateTypeList))
NotifyPropertyChanged(NameOf(SelBTLDateType))
m_FilterTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(FilterTypes.NULL, ""),
New IdNameStruct(FilterTypes.ID, Id_Msg),
New IdNameStruct(FilterTypes.BTLFILENAME, BTLFileName_Msg),
New IdNameStruct(FilterTypes.LISTNAME, ListName_Msg),
New IdNameStruct(FilterTypes.MACHINE, Machine_Msg)})
m_SelFilterType = m_FilterTypeList.FirstOrDefault(Function(x) x.Id = FilterTypes.NULL)
NotifyPropertyChanged(NameOf(SelFilterType))
ElseIf ProjectType = ProjectType.PROD Then
' carico le colonne della datagrid
GetPrivateProfileColumns(S_OPENPROJFILEDLG_PROD, ProjectColumns)
' carico campi su cui eseguire il filtro di ricerca
m_BTLDateTypeList = New List(Of String)({CreateDate_Msg})
m_SelBTLDateType = BTLDateTypes.CREATEDATE
NotifyPropertyChanged(NameOf(BTLDateTypeList))
NotifyPropertyChanged(NameOf(SelBTLDateType))
m_FilterTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(FilterTypes.NULL, ""),
New IdNameStruct(FilterTypes.ID, Id_Msg),
New IdNameStruct(FilterTypes.BTLFILENAME, BTLFileName_Msg),
New IdNameStruct(FilterTypes.MACHINE, Machine_Msg)})
m_SelFilterType = m_FilterTypeList.FirstOrDefault(Function(x) x.Id = FilterTypes.NULL)
NotifyPropertyChanged(NameOf(SelFilterType))
End If
' setto la visibilità delle colonne delle EgtDataGrid
For Each col In ProjectColumns
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
Next
Protected Sub LoadColumns()
' carico le colonne della datagrid
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_OPENPROJFILEDLG_PROD, ProjectColumns)
' carico campi su cui eseguire il filtro di ricerca
m_BTLDateTypeList = New List(Of String)({CreateDate_Msg})
m_SelBTLDateType = BTLDateTypes.CREATEDATE
NotifyPropertyChanged(NameOf(BTLDateTypeList))
NotifyPropertyChanged(NameOf(SelBTLDateType))
m_FilterTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(FilterTypes.NULL, ""),
New IdNameStruct(FilterTypes.ID, Id_Msg),
New IdNameStruct(FilterTypes.BTLFILENAME, BTLFileName_Msg),
New IdNameStruct(FilterTypes.MACHINE, Machine_Msg)})
m_SelFilterType = m_FilterTypeList.FirstOrDefault(Function(x) x.Id = FilterTypes.NULL)
NotifyPropertyChanged(NameOf(SelFilterType))
End Sub
Friend Function VerifySelected() As Boolean
' Salvo modifiche a colonne
EgwWPFBaseLib.EgwDataGrid.WriteColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_OPENPROJFILEDLG_PROD, ProjectColumns)
If IsNothing(SelProject) Then Return False
Dim AllFilesInDir As IEnumerable(Of String) = Nothing
If m_ProjectType = Core.ConstBeam.ProjectType.PROJ Then
If String.IsNullOrWhiteSpace(SelProject.sProjDirPath) OrElse Not Directory.Exists(SelProject.sProjDirPath) Then Return False
' verifico se esiste ProdId
AllFilesInDir = Directory.EnumerateFiles(SelProject.sProjDirPath)
ElseIf m_ProjectType = Core.ConstBeam.ProjectType.PROD Then
If m_ProjectType = Core.ConstBeam.ProjectType.PROD Then
If String.IsNullOrWhiteSpace(SelProject.sProdDirPath) OrElse Not Directory.Exists(SelProject.sProdDirPath) Then Return False
AllFilesInDir = Directory.EnumerateFiles(SelProject.sProdDirPath)
Else
@@ -501,25 +480,13 @@ Public MustInherit Class OpenProjectFileDialogVM
Protected Function ProjectFilter(Proj As Object) As Boolean
Dim bProjectOk As Boolean = True
If m_ProjectType = ProjectType.PROJ Then
Dim CurrProj As ProjFileVM = DirectCast(Proj, ProjFileVM)
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso (
(m_SelFilterType.Id = BTLDateTypes.EXPORTDATE AndAlso Not SearchDate.Contains(CurrProj.dtExportDate.Date)) OrElse
(m_SelFilterType.Id = BTLDateTypes.CREATEDATE AndAlso Not SearchDate.Contains(CurrProj.dtCreateDate.Date))) Then bProjectOk = False
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso m_SearchText <> String.Empty AndAlso (
(m_SelFilterType.Id = FilterTypes.ID AndAlso CurrProj.sProjId.ToString.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
(m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso CurrProj.sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
(m_SelFilterType.Id = FilterTypes.LISTNAME AndAlso CurrProj.sListName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
(m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
ElseIf m_ProjectType = ProjectType.PROD Then
Dim CurrProj As ProdFileVM = DirectCast(Proj, ProdFileVM)
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso (
(m_SelFilterType.Id = BTLDateTypes.CREATEDATE AndAlso Not SearchDate.Contains(CurrProj.dtCreateDate.Date))) Then bProjectOk = False
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso m_SearchText <> String.Empty AndAlso (
(m_SelFilterType.Id = FilterTypes.ID AndAlso CurrProj.sProdId.ToString.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
(m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso CurrProj.sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
(m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
End If
Dim CurrProj As ProdFileVM = DirectCast(Proj, ProdFileVM)
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso (
(m_SelFilterType.Id = BTLDateTypes.CREATEDATE AndAlso Not SearchDate.Contains(CurrProj.dtCreateDate.Date))) Then bProjectOk = False
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso m_SearchText <> String.Empty AndAlso (
(m_SelFilterType.Id = FilterTypes.ID AndAlso CurrProj.sProdId.ToString.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
(m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso CurrProj.sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
(m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
Return bProjectOk
End Function
+76 -6
View File
@@ -410,6 +410,14 @@
<!-- ______________________________________________________________________________________________________________________________________________ -->
<!--#region Image-->
<BitmapImage x:Key="Save_Image" UriSource="/Resources/ProjectManager/Save.png"/>
<!--#endregion Image-->
<!-- ______________________________________________________________________________________________________________________________________________ -->
<!--#region FocusVisual standard-->
<Style x:Key="FocusVisual">
@@ -452,6 +460,7 @@
<!--#region DialogWindow-->
<Style x:Key="DialogWindow_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
<Setter Property="Foreground" Value="{StaticResource BeamWall_Corduroy}"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="FontSize" Value="13"/>
@@ -472,6 +481,7 @@
</Style>
<Style x:Key="EgtColorPicker_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource DialogWindow_TextBlock}">
<Setter Property="Foreground" Value="{StaticResource BeamWall_Corduroy}"/>
<Setter Property="Margin" Value="5,18,5,10"/>
</Style>
@@ -612,6 +622,21 @@
</Style.Triggers>
</Style>
<!--#region AboutBox_TextBlock-->
<Style x:Key="AboutBox_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
<Setter Property="Foreground" Value="{StaticResource BeamWall_Corduroy}"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="FontSize" Value="18"/>
</Style>
<Style x:Key="Copyright_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource AboutBox_TextBlock}">
<Setter Property="FontSize" Value="12"/>
</Style>
<!--#endregion AboutBox_TextBlock-->
<!--#endregion TextBlock-->
<!-- ______________________________________________________________________________________________________________________________________________ -->
@@ -690,6 +715,15 @@
<Setter Property="Margin" Value="0,0,2.5,0"/>
</Style>
<Style x:Key="AboutBox_TextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
<Setter Property="Foreground" Value="{StaticResource BeamWall_Corduroy}"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="TextWrapping" Value="Wrap"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="IsReadOnly" Value="True"/>
</Style>
<!--#endregion TextBox-->
<!-- ______________________________________________________________________________________________________________________________________________ -->
@@ -927,16 +961,15 @@
<Style x:Key="RightPanel_HalfRound_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource Optimizer_Button}">
<Setter Property="Height" Value="24"/>
<Setter Property="Width" Value="64"/>
<Setter Property="BorderThickness" Value="1,1,1,0"/>
</Style>
<Style x:Key="EgtColorPicker_HalfRound_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource RightPanel_HalfRound_Button}">
<Setter Property="Margin" Value="2.5,0,2.5,0"/>
<Setter Property="Margin" Value="2.5,0,2.5,2"/>
</Style>
<Style x:Key="EgtManageDialogOK_HalfRound_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource RightPanel_HalfRound_Button}">
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="Margin" Value="15,0,2.5,0"/>
<Setter Property="Margin" Value="15,0,2.5,2"/>
</Style>
<Style x:Key="MachiningDB_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource RightPanel_HalfRound_Button}">
@@ -945,13 +978,18 @@
<Style x:Key="EgtManageDialogCancel_HalfRound_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource RightPanel_HalfRound_Button}">
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Margin" Value="2.5,0,0,0"/>
<Setter Property="Margin" Value="2.5,0,0,2"/>
</Style>
<!--#endregion RightPanel_HalfRound-->
<!--#endregion Optimizer-->
<Style x:Key="AboutBox_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Margin" Value="100,0"/>
<Setter Property="IsCancel" Value="True"/>
</Style>
<!--#endregion Button-->
<!-- ______________________________________________________________________________________________________________________________________________ -->
@@ -1922,7 +1960,7 @@
</Style>
<Style x:Key="EgtColorPicker_UniformGrid" TargetType="{x:Type UniformGrid}">
<Setter Property="Margin" Value="10,10,10,0"/>
<Setter Property="Margin" Value="10,10,10,5"/>
</Style>
<Style x:Key="EgtManageDialog_UniformGrid" TargetType="{x:Type UniformGrid}">
@@ -1930,7 +1968,7 @@
</Style>
<Style x:Key="Command_UniformGrid" TargetType="{x:Type UniformGrid}">
<Setter Property="Margin" Value="2.5,0,2.5,0"/>
<Setter Property="Margin" Value="2.5,0,2.5,2.5"/>
</Style>
<!--#endregion UniformGrid-->
@@ -2314,6 +2352,15 @@
<Setter Property="BorderThickness" Value="0"/>
</Style>
<Style x:Key="AboutBoxV_Border" TargetType="{x:Type Border}">
<Setter Property="BorderBrush" Value="{StaticResource BeamWall_RegentStBlue}"/>
<Setter Property="BorderThickness" Value="2"/>
</Style>
<Style x:Key="AboutBox_Border" TargetType="{x:Type Border}">
<Setter Property="BorderBrush" Value="{StaticResource BeamWall_White}"/>
</Style>
<!--#endregion Border-->
<!-- ______________________________________________________________________________________________________________________________________________ -->
@@ -2542,6 +2589,29 @@
<Style x:Key="CellDataGrid_CustomHighLight" TargetType="{x:Type DataGridCell}">
<Setter Property="Height" Value="24"/>
<Setter Property="Foreground" Value="{StaticResource BeamWall_Corduroy}" />
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Style.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black" />
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="Transparent" />
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="Black" />
</Style.Resources>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="BorderBrush" Value="{StaticResource BeamWall_FountainBlue}" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Foreground" Value="{StaticResource BeamWall_White}" />
<Setter Property="Background" Value="{StaticResource BeamWall_FountainBlue}" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="CellDataGrid_NewOpenProject" TargetType="{x:Type DataGridCell}">
<Setter Property="Height" Value="24"/>
<Setter Property="Foreground" Value="{StaticResource BeamWall_Corduroy}" />
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="TextBlock.TextAlignment" Value="Left"/>
<Setter Property="Margin" Value="10,0,0,0"/>
<Style.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black" />
@@ -1,7 +1,7 @@
Imports System.Windows
Imports EgtWPFLib5
Imports System.Collections.ObjectModel
Imports System.Windows
Imports EgtUILib
Imports System.Collections.ObjectModel
Imports EgtWPFLib5
Public Module DimensionsIniFile
@@ -32,6 +32,11 @@ Public Module DimensionsIniFile
End If
Index += 1
End While
If GridDimsList.Count = 0 Then
For Ind As Integer = 0 To 4
GridDimsList.Add(New GridDimension(GridName, Ind, 0, New GridLength(1, GridUnitType.Star)))
Next
End If
For Each GridDimsItem In GridDimsList
GridDimsItem.GridDimensions = GridDimsList
Next
@@ -54,8 +59,4 @@ Public Module DimensionsIniFile
Return WritePrivateProfileString(GridName, Index, sValue, m_sDimensionsIniFile)
End Function
Private Function GetGridLengthFromIndexAndType(GridDimsList As List(Of GridDimension), Index As Integer, DimType As DimensionType) As GridDimension
Return GridDimsList.FirstOrDefault(Function(x) x.Index = Index And x.DimType = DimType)
End Function
End Module
+7 -7
View File
@@ -6,43 +6,43 @@
<Button ToolTip="{Binding ZoomAllToolTip}"
Style="{StaticResource Mach_Button}"
Command="{Binding ZoomAllCommand}">
<Image Source="/Resources/ViewPanel/ZoomAll.png"
<Image Source="{StaticResource ZoomAll_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button ToolTip="{Binding LookFromTopToolTip}"
Style="{StaticResource Mach_Button}"
Command="{Binding TopViewCommand}">
<Image Source="/Resources/ViewPanel/LookFromTOP.png"
<Image Source="{StaticResource LookFromTOP_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button ToolTip="{Binding LookFromFrontToolTip}"
Style="{StaticResource Mach_Button}"
Command="{Binding FrontViewCommand}">
<Image Source="/Resources/ViewPanel/LookFromFRONT.png"
<Image Source="{StaticResource LookFromFRONT_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button ToolTip="{Binding LookFromRightToolTip}"
Style="{StaticResource Mach_Button}"
Command="{Binding RightViewCommand}">
<Image Source="/Resources/ViewPanel/LookFromRIGHT.png"
<Image Source="{StaticResource LookFromRIGHT_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button ToolTip="{Binding LookFromBackToolTip}"
Style="{StaticResource Mach_Button}"
Command="{Binding BackViewCommand}">
<Image Source="/Resources/ViewPanel/LookFromBACK.png"
<Image Source="{StaticResource LookFromBACK_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button ToolTip="{Binding LookFromLeftToolTip}"
Style="{StaticResource Mach_Button}"
Command="{Binding LeftViewCommand}">
<Image Source="/Resources/ViewPanel/LookFromLEFT.png"
<Image Source="{StaticResource LookFromLEFT_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button ToolTip="{Binding LookFromIso_SWToolTip}"
Style="{StaticResource Mach_Button}"
Command="{Binding IsoViewSWCommand}">
<Image Source="/Resources/ViewPanel/LookFromISO_SW.png"
<Image Source="{StaticResource LookFromISO_SW_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
+1 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EgwProxy.LiMan" version="1.0.2408.718" targetFramework="net472" />
<package id="EgwWPFBaseLib" version="3.1.1.1" targetFramework="net472" />
<package id="EgwWPFBaseLib" version="3.1.1.2" targetFramework="net472" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net472" />
<package id="Newtonsoft.Json" version="13.0.4" targetFramework="net472" />
<package id="RestSharp" version="111.2.0" targetFramework="net472" />
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 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("3.1.1.1")]
[assembly: AssemblyFileVersion("3.1.1.1")]
[assembly: AssemblyVersion("3.1.2.6")]
[assembly: AssemblyFileVersion("3.1.2.6")]
@@ -1,11 +1,16 @@
<Window x:Class="AboutBoxV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="AboutBox" Height="400" Width="360" WindowStyle="None" ResizeMode="NoResize"
ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
Title="AboutBox"
Height="400"
Width="360"
WindowStyle="None"
ResizeMode="NoResize"
ShowInTaskbar="False"
WindowStartupLocation="CenterOwner">
<Border BorderThickness="2" BorderBrush="LightBlue">
<Grid >
<Border Style="{StaticResource AboutBoxV_Border}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="5*"/>
@@ -24,29 +29,39 @@
<RowDefinition Height="0.35*"/>
</Grid.RowDefinitions>
<Grid Grid.Column="1" Grid.Row="1">
<Grid Grid.Row="1"
Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Border Name="LogoBrd" Grid.Column="1" Background="White">
<Image Source="/Resources/AboutBox/EgalwareLogo.png" Stretch="Uniform"/>
<Border Grid.Column="1"
Style="{StaticResource AboutBox_Border}">
<Image Source="{StaticResource AboutBox_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Border>
</Grid>
<TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18" />
<TextBlock Name="VersionLbl" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="12" />
<TextBox Name="InfoLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" FontSize="12" IsReadOnly="True" TextWrapping="Wrap"/>
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="8" IsCancel="True"
Margin="100,0"/>
<TextBlock Grid.Row="3"
Grid.Column="1"
Name="DescriptionLbl"
Style="{StaticResource AboutBox_TextBlock}"/>
<TextBlock Grid.Row="4"
Grid.Column="1"
Name="VersionLbl"
Style="{StaticResource AboutBox_TextBlock}"/>
<TextBlock Grid.Row="5"
Grid.Column="1"
Name="CopyrightLbl"
Style="{StaticResource Copyright_TextBlock}"/>
<TextBox Grid.Row="6"
Grid.Column="1"
Name="InfoLbl"
Style="{StaticResource AboutBox_TextBox}"/>
<Button Grid.Row="8"
Grid.Column="1"
Name="ExitBtn"
Style="{StaticResource AboutBox_Button}"/>
</Grid>
</Border>
</Window>
@@ -314,7 +314,7 @@ Public Class AddFeatureWndVM
If Not IsNothing(m_nSelPRC) AndAlso m_nSelPRC.nPRC > 0 Then
RaiseEvent m_CloseWindow(True)
Else
MessageBox.Show(EgtMsg(61852), EgtMsg(30007))
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61852), EgtMsg(30007))
End If
End Sub
@@ -165,7 +165,7 @@ Public Class AddPartWndVM
Not IsNothing(m_dH) AndAlso m_dH >= 0 Then
RaiseEvent m_CloseWindow(True)
Else
MessageBox.Show(EgtMsg(61853), EgtMsg(30007))
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61853), EgtMsg(30007))
End If
End Sub
@@ -159,7 +159,7 @@ Public Class AddRawPartWndVM
For Each Variable In m_VariableList
If (Variable.nType = Variable.VariableType.STRING_ AndAlso IsNothing(Variable.sValue)) OrElse
((Variable.nType = Variable.VariableType.DOUBLE_ OrElse Variable.nType = Variable.VariableType.LENGTH) AndAlso IsNothing(Variable.dValue)) Then
MessageBox.Show(If(m_nProjectType = MachineType.BEAM, EgtMsg(61854), EgtMsg(61855)), EgtMsg(30007))
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, If(m_nProjectType = MachineType.BEAM, EgtMsg(61854), EgtMsg(61855)), EgtMsg(30007))
Return
End If
Next
@@ -39,13 +39,13 @@
<Button Command="{Binding Ok_Command}"
ToolTip="{Binding SaveAsToolTip}"
Style="{StaticResource OKBTLDataWnd_Button}">
<Image Source="/Resources/NewPage/Ok.png"
<Image Source="{StaticResource Ok_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding Cancel_Command}"
ToolTip="{Binding SaveAsToolTip}"
Style="{StaticResource BTLDataWnd_Button}">
<Image Source="/Resources/PDFEditor/Delete.png"
<Image Source="{StaticResource Delete_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</UniformGrid>
@@ -11,6 +11,8 @@ Public Class BTLDataWndVM
#Region "FIELDS & PROPERTIES"
Private PADLOCK_IMAGE As String = "pack://application:,,,/Resources/NewPage/padlock.png"
Friend Event m_CloseWindow(bDialogResult As Boolean)
Private m_StrategySetupList As New ObservableCollection(Of String)
@@ -547,8 +549,9 @@ Public Class BTLDataWndVM
#Region "CONSTRUCTOR"
Sub New()
Sub New(nType As BWType)
' leggo file default config
Map.refMainWindowVM.MainWindowM.GetDefaultConfigDirPath(nType, True)
End Sub
Sub New(nProjId As Integer)
@@ -598,7 +601,7 @@ Public Class BTLDataWndVM
m_StrategySetupList.Clear()
' leggo cartella dei setup delle strategie
Dim AISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(nType, True)
Dim AISetupPaths As String() = Directory.GetFiles(AISetupDirPath)
Dim AISetupPaths As String() = Directory.GetFiles(AISetupDirPath).Where(Function(f) Path.GetExtension(f).ToLower() <> ".ini").ToArray()
For Each AiSetup In AISetupPaths
m_StrategySetupList.Add(Path.GetFileNameWithoutExtension(AiSetup))
Next
@@ -616,7 +619,7 @@ Public Class BTLDataWndVM
nCurrBTLInfoLayerId = EgtGetNextName(nCurrBTLInfoLayerId, BTLINFO)
End While
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(Map.refStrategyManagerVM.SelStrategyType.Id)
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(nType)
Dim sGeneralParametersFilePath As String = sStrategiesDirPath & "\" & GENERALPARAMETERS_FILE & ".json"
If File.Exists(sGeneralParametersFilePath) Then
Dim sReadedFiles As String = File.ReadAllText(sGeneralParametersFilePath)
@@ -630,7 +633,7 @@ Public Class BTLDataWndVM
Case Else
If Not Map.refMainMenuVM.UserAdmin_IsChecked Then
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, Visibility.Visible, Visibility.Collapsed))
Map.refMainMenuVM.SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock.png")
Map.refMainMenuVM.SetUnloackImage(PADLOCK_IMAGE)
End If
End Select
Next
@@ -710,7 +713,7 @@ Public Class BTLDataWndVM
Case Else
If Not Map.refMainMenuVM.UserAdmin_IsChecked Then
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, Visibility.Visible, Visibility.Collapsed))
Map.refMainMenuVM.SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock.png")
Map.refMainMenuVM.SetUnloackImage(PADLOCK_IMAGE)
End If
End Select
Next
@@ -738,19 +741,29 @@ Public Class BTLDataWndVM
End If
End Sub
Friend Sub SaveInfoBTL()
Friend Sub SaveInfoBTL(nType As BWType)
Dim AISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(nType, True)
Dim sDefaultConfigFile As String = String.Empty
Dim sTmpStrategySetup As String = String.Empty
Dim sInfo As String = String.Empty
' Controllo se presente file default config
If IsNothing(m_SelStrategySetup) Then
Dim sDefaultConfigFile As String = String.Empty
Dim sTrimDefaultConfig As String = String.Empty
If GetMainPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sDefaultConfigFile) <> 0 Then
sTrimDefaultConfig = System.IO.Path.GetFileNameWithoutExtension(sDefaultConfigFile)
m_SelStrategySetup = sTrimDefaultConfig
If EgtUILib.GetPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sDefaultConfigFile, Map.refMainWindowVM.MainWindowM.sDefaultConfig) <> 0 Then
m_SelStrategySetup = sDefaultConfigFile
EgtSetInfo(m_nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup)
Else
' restituisce la lista dei file presenti nella cartella con le relative informazioni
Dim StrategySetupListFile As List(Of FileInfo) = m_StrategySetupList.Where(Function(f) File.Exists(AISetupDirPath & "\" & f & ".json")).
Select(Function(f) New FileInfo(AISetupDirPath & "\" & f & ".json")).
OrderByDescending(Function(fi) fi.LastWriteTime).ToList()
' restituisce l'ultimo file modificato
If StrategySetupListFile.Any() Then
sDefaultConfigFile = Path.GetFileNameWithoutExtension(StrategySetupListFile.First().Name)
End If
sTmpStrategySetup = m_StrategySetupList.FirstOrDefault(Function(x) x = sDefaultConfigFile)
m_SelStrategySetup = sTmpStrategySetup
EgtSetInfo(m_nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup)
End If
Else
EgtSetInfo(m_nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup)
End If
For Each GeneralParameter In GeneralParametersList
Select Case GeneralParameter.GetType()
@@ -796,14 +809,16 @@ Public Class BTLDataWndVM
Public Sub Ok()
' Messaggio ripristino verifica se presente
If Not IsNothing(m_OldSelStrategySetup) AndAlso m_SelStrategySetup <> m_OldSelStrategySetup Then
If MessageBox.Show("Please note: the part in this BTL will be reset.", "Attention", MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
SaveInfoBTL()
Map.refStrategyManagerVM.Save(m_GeneralParametersList)
Map.refLeftPanelVM.ResetCalc()
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62579), EgtMsg(15002), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
Map.refProjectVM.ResetGeneralParameters()
Map.refSceneHostVM.SaveProject()
Else
Return
End If
Else
SaveInfoBTL(ProjectManagerVM.CurrProd.nType)
End If
Map.refLeftPanelVM.ResetCalc()
Map.refSceneHostVM.SaveProject()
RaiseEvent m_CloseWindow(True)
End Sub
@@ -10,7 +10,7 @@
ToolTip="{Binding CopyPart_ToolTip}"
IsEnabled="{Binding CopyPart_IsEnabled}"
Style="{StaticResource LP_Button}">
<Image Source="/Resources/LeftPanel/CopyPart.png"
<Image Source="{StaticResource CopyPart_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding RemovePart_Command}"
@@ -18,7 +18,7 @@
ToolTip="{Binding RemovePart_ToolTip}"
IsEnabled="{Binding RemovePart_IsEnabled}"
Style="{StaticResource LP_Button}">
<Image Source="/Resources/NewPage/Remove.png"
<Image Source="{StaticResource Remove_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button ToolTip="{Binding Simulate_ToolTip}"
@@ -26,7 +26,7 @@
Command="{Binding Simulate_Command}"
IsEnabled="{Binding Simulate_IsEnabled}"
Style="{StaticResource LP_Button}">
<Image Source="/Resources/CALCPanel/Simulate.png"
<Image Source="{StaticResource Simulate_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button ToolTip="{Binding Edit_ToolTip}"
@@ -34,7 +34,7 @@
Command="{Binding Edit_Command}"
IsEnabled="{Binding Edit_IsEnabled}"
Style="{StaticResource LP_Button}">
<Image Source="/Resources/CALCPanel/Edit.png"
<Image Source="{StaticResource Edit_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding ResetCalc_Command}"
@@ -42,7 +42,7 @@
ToolTip="{Binding ResetCalc_ToolTip}"
IsEnabled="{Binding CALCPanel_IsEnabled}"
Style="{StaticResource LP_Button}">
<Image Source="/Resources/CALCPanel/ResetCalc.png"
<Image Source="{StaticResource ResetCalc_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</StackPanel>
@@ -11,6 +11,8 @@ Public Class BTLPartManagerVM
#Region "FIELDS & PROPERTIES"
Private PADLOCK_IMAGE As String = "pack://application:,,,/Resources/NewPage/padlock.png"
Private m_BTLPartManager_IsEnabled As Boolean = True
Public ReadOnly Property BTLPartManager_IsEnabled As Boolean
Get
@@ -198,7 +200,7 @@ Public Class BTLPartManagerVM
Case Else
If Not Map.refMainMenuVM.UserAdmin_IsChecked Then
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, Visibility.Visible, Visibility.Collapsed))
Map.refMainMenuVM.SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock.png")
Map.refMainMenuVM.SetUnloackImage(PADLOCK_IMAGE)
End If
End Select
Next
@@ -324,7 +326,7 @@ Public Class BTLPartManagerVM
Public Sub RemovePartCmd()
If IsNothing(ProjectManagerVM.CurrProd) Then Return
If MessageBox.Show(EgtMsg(62573), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62573), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Count > 0 Then
Dim CurrSelBTLParts As List(Of BTLPartVM) = Map.refProjectVM.BTLStructureVM.SelBTLParts.ToList()
For RemoveIndex = CurrSelBTLParts.Count - 1 To 0 Step -1
@@ -341,7 +343,7 @@ Public Class BTLPartManagerVM
Dim nDuploCount As Integer = 0
If EgtDuploCount(BTLPartToDelete.nPartId, nDuploCount) AndAlso nDuploCount > 0 Then
' avviso che il pezzo non è cancellabile perchè in produzione
MessageBox.Show(String.Format(EgtMsg(61929), nDuploCount), EgtMsg(15003), MessageBoxButton.OK, MessageBoxImage.Warning)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(61929), nDuploCount), EgtMsg(15003), MessageBoxButton.OK, MessageBoxImage.Warning)
Return
End If
' verifico se rimuovere sezione dalla lista
@@ -351,6 +353,7 @@ Public Class BTLPartManagerVM
End If
' Eseguo cancellazione
EgtBeamSetPart(BTLPartToDelete.nPartId)
RemoveScenePart(BTLPartToDelete)
' seleziono elemento precedente
Dim Index As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList.IndexOf(BTLPartToDelete)
Dim FilteredIndex As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.IndexOf(BTLPartToDelete)
@@ -378,6 +381,21 @@ Public Class BTLPartManagerVM
End If
End Sub
Private Sub RemoveScenePart(BTLPartToDelete As BTLPartVM)
' Rimuovo pezzo dalla scena
Dim IdAsseBase As Integer = Map.refProdManagerVM.ListProjAsseBase(BTLPartToDelete.nPROJ)
' Setto il nuovo contesto
EgtSetCurrentContext(Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx())
If EgtBeamGetBuildingIsOn(IdAsseBase) Then EgtBeamShowBuilding(IdAsseBase, False)
Dim DeletePartId As Integer = Map.refSceneShowBuldingVM.MapInfo(BTLPartToDelete.nPartId)
EgtErase(DeletePartId)
Map.refSceneShowBuldingVM.MapInfo.Remove(BTLPartToDelete.nPartId)
EgtBeamShowBuilding(IdAsseBase, True)
EgtZoom(ZM.ALL)
' Ritorno al contesto corrente
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
End Sub
#End Region ' RemovePart
#Region "SimulateCommand"
@@ -463,10 +481,8 @@ Public Class BTLPartManagerVM
Public Sub ResetCalc()
If IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Return
Map.refMyStatusBarVM.SetLoadingProgress(0)
Map.refMyStatusBarVM.SetOutputMessage("")
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = True
MyExecProcessManager.nProjIndex = 0
Map.refCALCPanelVM.SetCalculating(False)
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.SelBTLPart
If IsNothing(SelPart) Then Return
If SelPart.nGlobalState <> CalcStates.NOTCALCULATED Then
@@ -593,8 +593,7 @@ Public Class BTLFeatureVM
End If
' se modalità building, la tolgo
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
Map.refShowBeamPanelVM.SetShowBuilding(False)
Map.refShowBeamPanelVM.ShowBuilding_IsChecked = False
End If
Map.refProjectVM.SetRawPartManagerVisibility(Visibility.Collapsed)
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.FEATUREMANAGERBTL)
@@ -132,7 +132,7 @@ Public Class BTLParamVM
Case BTLParamType.DOUBLE_, BTLParamType.LENGTH
' verifico che sia compreso tra minimo e massimo
If dNewValue < m_BTLParamM.dMin OrElse dNewValue > m_BTLParamM.dMax Then
MessageBox.Show(EgtMsg(61856), EgtMsg(30007))
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61856), EgtMsg(30007))
NotifyPropertyChanged(NameOf(sValue))
Return
End If
@@ -147,9 +147,9 @@ Public Class BTLParamVM
Dim nDoneCnt As Integer = DbControllers.m_ProjController.getCountItemState(ProjectManagerVM.CurrProd.nProdId, nPartId, ItemState.Assigned)
' controllo se i pezzi sono lavorati se si messaggio di warning altrimenti messaggio informativo
If nDoneCnt > 0 Then
MessageBox.Show("Pezzo " & nPartId & " non modificato in " & INPROD & " barra/e perche' settata/e come da produrre", EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Warning)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62555) & nPartId & EgtMsg(62556) & INPROD & EgtMsg(62557), EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Warning)
ElseIf INPROD > 0 Then
MessageBox.Show("Pezzo " & nPartId & " modificato in " & INPROD & " barra/e grezza/e", EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Information)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62555) & nPartId & EgtMsg(62558) & INPROD & EgtMsg(62559), EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Information)
End If
UpdateParamValue(dNewValue, "")
Case Else
@@ -194,7 +194,7 @@ Public Class BTLParamVM
Case BTLParamType.DOUBLE_, BTLParamType.LENGTH
' verifico che sia compreso tra minimo e massimo
If dNewValue < m_BTLParamM.dMin OrElse dNewValue > m_BTLParamM.dMax Then
MessageBox.Show(EgtMsg(61856), EgtMsg(30007))
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61856), EgtMsg(30007))
NotifyPropertyChanged(NameOf(sDefault))
Return
End If
+17 -56
View File
@@ -10,6 +10,8 @@ Public Class BTLPartVM
#Region "FIELDS & PROPERTIES"
Private DOWN_IMAGE As String = "pack://application:,,,/Resources/NewPage/down.png"
Private WithEvents m_BTLPartM As BTLPartM
Public ReadOnly Property BTLPartM As BTLPartM
Get
@@ -100,12 +102,12 @@ Public Class BTLPartVM
End If
Next
If bDuploInProduction Then
MessageBox.Show("Impossible change dimension because already in production!", "", MessageBoxButton.OK, MessageBoxImage.Exclamation)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62586), "", MessageBoxButton.OK, MessageBoxImage.Exclamation)
Return False
End If
' lo impedisco
' avviso che tutti i pezzi verranno tolti dai grezzi e chiedo di confermare
If MessageBox.Show(String.Format(EgtMsg(61851), nDuploCount), EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Information) = MessageBoxResult.Yes Then
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(61851), nDuploCount), EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Information) = MessageBoxResult.Yes Then
MyMachGroupPanelM.DuploSetToDelete(m_BTLPartM.nPartId)
DeleteDuplo_Otmizer(DuploList)
Else
@@ -1174,7 +1176,7 @@ Public Class BTLPartVM
If nTempADDED >= nINPROD Then
m_BTLPartM.nADDED = nTempADDED
Else
MessageBox.Show(EgtMsg(61857), "", MessageBoxButton.OK, MessageBoxImage.Warning)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61857), "", MessageBoxButton.OK, MessageBoxImage.Warning)
End If
End If
NotifyPropertyChanged(NameOf(sADDED))
@@ -1571,9 +1573,9 @@ Public Class BTLPartVM
End If
End If
If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.FeatureSelectionChanged()
Map.refProdManagerVM.SetBtlImage("pack://application:,,,/Resources/NewPage/down.png")
Map.refProdManagerVM.SetOpenImage("pack://application:,,,/Resources/NewPage/down.png")
Map.refProdManagerVM.SetSaveImage("pack://application:,,,/Resources/NewPage/down.png")
Map.refProdManagerVM.SetBtlImage(DOWN_IMAGE)
Map.refProdManagerVM.SetOpenImage(DOWN_IMAGE)
Map.refProdManagerVM.SetSaveImage(DOWN_IMAGE)
If Not IsNothing(m_SelBTLFeatureVM) Then
SetSelFeatureMsg(EgtMsg(5356) & " [" & m_SelBTLFeatureVM.nSelGRP & "-" & m_SelBTLFeatureVM.nPRC.ToString("000") & "] " & m_SelBTLFeatureVM.sName)
SetDeselFeatureMsg(EgtMsg(5357) & " [" & m_SelBTLFeatureVM.nSelGRP & "-" & m_SelBTLFeatureVM.nPRC.ToString("000") & "] " & m_SelBTLFeatureVM.sName)
@@ -1633,20 +1635,6 @@ Public Class BTLPartVM
NotifyPropertyChanged(NameOf(bOpenFeatureList))
End Sub
Private m_IsSettingBtnOpen As Boolean = False
Public Property IsSettingBtnOpen As Boolean
Get
Return m_IsSettingBtnOpen
End Get
Set(value As Boolean)
m_IsSettingBtnOpen = value
End Set
End Property
Friend Sub SetIsSettingBtnOpen(bIsSettingBtnOpen As Boolean)
m_IsSettingBtnOpen = bIsSettingBtnOpen
NotifyPropertyChanged(NameOf(IsSettingBtnOpen))
End Sub
Public Property IsInverted As Boolean
Get
Return BTLPartM.nINVERTED = 180
@@ -1719,7 +1707,6 @@ Public Class BTLPartVM
Private m_cmdForwardRotation As ICommand
Private m_cmdXRotation As ICommand
Private m_cmdPartColour As ICommand
Private m_cmdShowPopUpSettingBtnCmd As ICommand
Private m_cmdVerify As ICommand
Private m_cmdAddToRawPart As ICommand
Private m_cmdSelectAllFeature As ICommand
@@ -2164,7 +2151,7 @@ Public Class BTLPartVM
For Each sPart In ToAddList
sMessage &= " - " & sPart & Environment.NewLine
Next
If MessageBox.Show(sMessage & EgtMsg(61893), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, sMessage & EgtMsg(61893), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
For Each PartVM In ToAddVM
PartVM.AddNewPartToAdded()
Next
@@ -2329,43 +2316,18 @@ Public Class BTLPartVM
Private Function SelectColor(Col As Color3d, ByRef NewCol As Color3d) As Boolean
' Creo dialogo colori
'Dim ColorDlg As New System.Windows.Forms.ColorDialog With {
' .FullOpen = True,
' .Color = Col.ToColor()
'}
Dim ColorDlg As New EgtColorPickerV(Application.Current.MainWindow, New EgtColorPickerVM()) With {
.Color = Col.ToColor()
}
' Visualizzo dialogo
If ColorDlg.ShowDialog() <> Forms.DialogResult.OK Then Return False
If ColorDlg.ShowDialog() = False Then Return False
' Recupero colore scelto
NewCol.FromString(ColorDlg.Color.R & "," & ColorDlg.Color.G & "," & ColorDlg.Color.B & "," & ColorDlg.Color.A) 'NewCol.FromColor(ColorDlg.Color)
NewCol.FromColor(ColorDlg.Color)
Return True
End Function
#End Region ' PartColour
#Region "ShowPopUpSettingBtnCommand"
Public ReadOnly Property ShowPopUpSettingBtnCommand As ICommand
Get
If m_cmdShowPopUpSettingBtnCmd Is Nothing Then
m_cmdShowPopUpSettingBtnCmd = New Command(AddressOf ShowPopUpSettingBtn)
End If
Return m_cmdShowPopUpSettingBtnCmd
End Get
End Property
Public Sub ShowPopUpSettingBtn(ByVal param As Object)
If m_IsSettingBtnOpen Then
SetIsSettingBtnOpen(False)
Else
SetIsSettingBtnOpen(True)
End If
End Sub
#End Region ' ShowPopUpSettingBtnCommand
#Region "Verify"
Public ReadOnly Property Verify_Command As ICommand
@@ -2379,9 +2341,6 @@ Public Class BTLPartVM
Friend Sub Verify()
If IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Return
Map.refMyStatusBarVM.SetLoadingProgress(0)
Map.refMyStatusBarVM.SetOutputMessage("")
MyExecProcessManager.nProjIndex = -1
Map.refCALCPanelVM.Verify(ProjectType.PROJ)
Return
End Sub
@@ -2419,7 +2378,7 @@ Public Class BTLPartVM
If IsNothing(SelMachGroup) Then Return
' se pareti e piu' di uno selezionato, esco
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL And SelParts.Count > 1 Then
MessageBox.Show(EgtMsg(61971), EgtMsg(30007))
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61971), EgtMsg(30007))
Return
End If
' se MachGroup gia' mandato in produzione, esco
@@ -2438,13 +2397,13 @@ Public Class BTLPartVM
' verifico sezione e materiale
For Each Part In SelParts
If Part.Section <> BeamMachGroup.Section Then
MessageBox.Show(EgtMsg(61866), EgtMsg(30007))
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61866), EgtMsg(30007))
Return
End If
Next
' verifico lunghezza totale
If Not VerifyTotLength(BeamMachGroup, SelParts) Then
MessageBox.Show(EgtMsg(61867), EgtMsg(30007))
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61867), EgtMsg(30007))
Return
End If
If AddPartToBeam(BeamMachGroup, SelParts) Then
@@ -2462,7 +2421,7 @@ Public Class BTLPartVM
Dim WallMachGroup As MyMachGroupVM = SelMachGroup
' verifico spessore
If SelPart.Section <> WallMachGroup.Section Then
MessageBox.Show(EgtMsg(61868), EgtMsg(30007))
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61868), EgtMsg(30007))
Return
End If
If AddPartToWall(WallMachGroup, SelPart) Then
@@ -2491,6 +2450,8 @@ Public Class BTLPartVM
End Function
Friend Function AddPartToBeam(BeamMachGroup As MyMachGroupVM, PartsToAdd As List(Of BTLPartVM)) As Boolean
EgtBeamShowFacesName(False)
EgtBeamShowLoadingSide(False, False)
' ordino i pezzi da aggiungere
PartsToAdd = PartsToAdd.OrderBy(Function(x) x.dL).ToList()
' creo copie dei pezzi
@@ -1,5 +1,4 @@

Imports System.Collections.ObjectModel
Imports System.Collections.ObjectModel
Imports System.Collections.Specialized
Imports System.ComponentModel
Imports System.IO
@@ -14,6 +13,8 @@ Public Class BTLStructureVM
#Region "FIELDS & PROPERTIES"
Private DOWN_IMAGE As String = "pack://application:,,,/Resources/NewPage/down.png"
' Nome file NGE con i pezzi selezionati per effettuare UpdateBTL
Friend Const UPDATEBTL_NGE As String = "UpdateBTL.nge"
@@ -122,8 +123,6 @@ Public Class BTLStructureVM
Dim bLoadingSideShow As Boolean = (nPROJTYPE = BWType.BEAM)
Dim bLeftToRight As Boolean = Not (CurrentMachine.ViewDir = VT.ISO_NW OrElse CurrentMachine.ViewDir = VT.ISO_NE)
EgtBeamShowLoadingSide(bLoadingSideShow, bLeftToRight)
' imposto tipo di grid selezionata
Map.refProjectVM.SetLastSelGridType(ProjectVM.GridSelTypes.PART)
' trovo ed evidenzio MachGroup e Duplo di questo pezzo
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
Dim MachGroupList As New List(Of MyMachGroupVM)
@@ -150,18 +149,18 @@ Public Class BTLStructureVM
' Mostro le strategie forzate
Dim bValue As Boolean = False
Dim bValueForced As Boolean = False
For Each FeatureParam In SelBTLPart.BTLFeatureVMList
For Each FeatureParam As BTLFeatureVM In SelBTLPart.BTLFeatureVMList
bValue = False
EgtGetInfo(FeatureParam.nFeatureId, ConstBeam.STRATEGY & FeatureParam.nFeatureId & "_FORCED", bValue)
If bValue Then
SelBTLPart.SetStrategyModify_Visibility(Visibility.Visible)
FeatureParam.SetbStrategy_Visibility(Visibility.Visible)
End If
For Each StrategySetupParam In Map.refStrategyManagerVM.StrategySetupList
For Each StrategyFeatureParam In StrategySetupParam.StrategyFeatureList
For Each TopologyParam In StrategyFeatureParam.TopologyList
For Each StrategyParam In TopologyParam.StrategyList
For Each Param In StrategyParam.ParameterList
For Each StrategySetupParam As StrategySetup In Map.refStrategyManagerVM.StrategySetupList
For Each StrategyFeatureParam As StrategyFeature In StrategySetupParam.StrategyFeatureList
For Each TopologyParam As Topology In StrategyFeatureParam.TopologyList
For Each StrategyParam As Strategy In TopologyParam.StrategyList
For Each Param As StrategyParameter In StrategyParam.ParameterList
bValueForced = False
EgtGetInfo(FeatureParam.nFeatureId, StrategyParam.sStrategyId & "_" & Param.sNameNge & "_FORCED", bValueForced)
If bValueForced Then FeatureParam.SetbStrategy_Visibility(Visibility.Visible)
@@ -175,11 +174,9 @@ Public Class BTLStructureVM
Map.refShowBeamPanelVM.bShowAll = False
Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False)
EgtZoom(ZM.ALL)
Map.refProdManagerVM.SetBtlImage("pack://application:,,,/Resources/NewPage/down.png")
Map.refProdManagerVM.SetOpenImage("pack://application:,,,/Resources/NewPage/down.png")
Map.refProdManagerVM.SetSaveImage("pack://application:,,,/Resources/NewPage/down.png")
Map.refMyStatusBarVM.SetLoadingProgress(0)
Map.refMyStatusBarVM.SetOutputMessage("")
Map.refProdManagerVM.SetBtlImage(DOWN_IMAGE)
Map.refProdManagerVM.SetOpenImage(DOWN_IMAGE)
Map.refProdManagerVM.SetSaveImage(DOWN_IMAGE)
NotifyPropertyChanged(NameOf(SelBTLPart))
If Not bIsReselect AndAlso m_SelBTLParts.Count = 1 Then BtlPart.SetOpenFeatureList(True)
End Sub
@@ -792,7 +789,7 @@ Public Class BTLStructureVM
Public ReadOnly Property Data_ToolTip As String
Get
Return EgtMsg(61897)
Return EgtMsg(61898)
End Get
End Property
@@ -1277,6 +1274,7 @@ Public Class BTLStructureVM
Map.refProjectVM.BTLStructureVM.SectionList.Add(NewPartVM.Section)
End If
End If
If Map.refProdManagerVM.ListProjAsseBase.Count > 0 Then Map.refProjectVM.UpdatePart()
End If
End Sub
@@ -1297,13 +1295,13 @@ Public Class BTLStructureVM
If IsNothing(CurrProd) Then Return
' verifico se progetto modificato, e chiedo se salvare
If CurrProd.bIsNew Or EgtGetModified() OrElse Map.refCALCPanelVM.IsMachineModified() Then
Select Case MessageBox.Show(EgtMsg(61877), "", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
Select Case EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61877), "", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
Case MessageBoxResult.Yes
Map.refProdManagerVM.Save()
Case MessageBoxResult.Cancel
Return
Case Else ' No
MessageBox.Show(EgtMsg(61892), "", MessageBoxButton.OK, MessageBoxImage.Exclamation)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61892), "", MessageBoxButton.OK, MessageBoxImage.Exclamation)
Return
End Select
End If
@@ -1331,13 +1329,23 @@ Public Class BTLStructureVM
GetMainPrivateProfileString(S_GENERAL, K_LASTUPDATEDIR, "", sDir)
If bWithDlg Then
' apro finestra scelta file
Dim BTLDlg As New Microsoft.Win32.OpenFileDialog() With {
.DefaultExt = ".btl",
.Filter = "BTL (*.btl)|*.btl" &
"|BTLX (*.btlx)|*.btlx",
.InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
.CheckFileExists = True,
.ValidateNames = True}
'Dim BTLDlg As New Microsoft.Win32.OpenFileDialog() With {
' .DefaultExt = ".btl",
' .Filter = "BTL (*.btl)|*.btl" &
' "|BTLX (*.btlx)|*.btlx",
' .InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
' .CheckFileExists = True,
' .ValidateNames = True}
Dim BTLDlg As New EgtBEAMWALL.Core.EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
.Title = EgtMsg(61834),
.Filter = "BTL (*.btl)|*.btl" &
"|BTLX (*.btlx)|*.btlx",
.FilterIndex = 1,
.InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
.CheckFileExists = True,
.ValidateNames = True,
.Mode = 1}
If BTLDlg.ShowDialog() Then
sFile = BTLDlg.FileName
Else
+15 -4
View File
@@ -151,7 +151,7 @@ Public Class CALCPanelVM
Private Sub Calc_Ended(sender As Object, e As CalcEndEventArgs)
If e.End_ = CalcEndEventArgs.Results.ERROR_ OrElse e.End_ = CalcEndEventArgs.Results.NULL Then
MessageBox.Show("Execution error (all processes are disabled)")
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62540))
End If
If e.End_ = CalcEndEventArgs.Results.EDIT Then
Map.refMyStatusBarVM.SetOutputMessage("Editor closed")
@@ -499,7 +499,7 @@ Public Class CALCPanelVM
(nMachType = 3 And Not IsNothing(Map.refProdManagerVM) AndAlso Not IsNothing(ProjectManagerVM.CurrProd)) Then
MachineList.Add(Machine)
' Se il nome Macchina coincide setto la macchina selezionata con la macchina associata al progetto
If Machine.Name = sMachineName Then
If String.Equals(Machine.Name, sMachineName, StringComparison.OrdinalIgnoreCase) Then
SelectedMachine = MachineList(MachineList.IndexOf(Machine))
m_OrigSelectedMachine = SelectedMachine
End If
@@ -890,7 +890,7 @@ Public Class CALCPanelVM
Friend Sub ChooseMachine()
' rendo visibile la CmBx per la scelta e il pulsante di conferma solo se il Proj corrente non ha associato alcun Prod
If ProjectManagerVM.CurrProd.nProjId > 0 Then
MessageBox.Show(EgtMsg(61929), EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Exclamation)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61929), EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Else
SetChooseMachine_Visibility(True)
End If
@@ -962,7 +962,7 @@ Public Class CALCPanelVM
nPartId = EgtGetNextPart(nPartId)
End While
If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count > 0 Then
If MessageBox.Show(EgtMsg(61779), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61779), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
For Index As Integer = Map.refMachGroupPanelVM.MachGroupVMList.Count - 1 To 0 Step -1
Dim CurrMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.MachGroupVMList(Index)
CurrMachGroup.DeleteMachGroup()
@@ -971,6 +971,17 @@ Public Class CALCPanelVM
End If
' rigenero struttura BTL
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(ProjId))
For Each Part In Map.refProjectVM.BTLStructureVM.BTLPartVMList
Part.ResetCalcTotalPart()
Part.SetStrategyModify_Visibility(Visibility.Collapsed)
For Each Feature As BTLFeatureVM In Part.BTLFeatureVMList
Map.refForcedStrategyPanelVM.ResetForcedStrategy(Feature.nFeatureId)
Next
Next
If Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count > 0 Then
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(0))
End If
Map.refMyStatusBarVM.RefreshMachName()
End Sub
#End Region ' Ok
@@ -8,7 +8,7 @@
IsEnabled="{Binding CALCPanel_IsEnabled}"
Visibility="{Binding ChooseMachineBtn_Visibility}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/CALCPanel/ChooseMachine.png"
<Image Source="{StaticResource ChooseMachine_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
@@ -129,7 +129,7 @@ Public Class ChangeMaterialWndVM
Not IsNothing(m_SelWhMaterial) AndAlso m_SelWhMaterial <> "" Then
RaiseEvent m_CloseWindow(True)
Else
MessageBox.Show(EgtMsg(61858), EgtMsg(30007))
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61858), EgtMsg(30007))
End If
End Sub
@@ -108,7 +108,7 @@ Public Class ChangeParameterWndVM
Not IsNothing(m_SelParam) AndAlso m_SelParam.sName <> "" Then
RaiseEvent m_CloseWindow(True)
Else
MessageBox.Show(EgtMsg(61858), EgtMsg(30007))
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61858), EgtMsg(30007))
End If
End Sub
@@ -551,6 +551,7 @@ Public Class ConfigurationPageVM
WriteMainPrivateProfileString(S_NEST, K_SECTIONTIME, DoubleToString(m_SectionTime, 5))
WriteMainPrivateProfileString(S_NEST, K_PARTTIME, DoubleToString(m_PartTime, 5))
WriteMainPrivateProfileString(S_PRINTER, K_ENABLE, If(m_bPrintLabel_IsChecked, 1, 0))
Map.refMyMachine.VerifyConfigPageModification()
End Sub
' funzione che verifica l'inserimento della password quando si edita un parametro Macchina
@@ -601,13 +602,17 @@ Public Class ConfigurationPageVM
End Property
Public Sub ChooseExternalBackupFolderPath()
Dim FileDialog As New Microsoft.Win32.SaveFileDialog() With {.InitialDirectory = m_ExternalBackupFolderPath,
.CheckFileExists = False,
.CheckPathExists = False,
.DefaultExt = ".folder",
.OverwritePrompt = False,
.FileName = "Select this ",
.Title = "Backup & Restore File Path"}
Dim FileDialog As New EgtBEAMWALL.Core.EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
.Title = EgtMsg(63039),
.Filter = "BTL (*.btl)|*.btl" &
"|BTLX (*.btlx)|*.btlx",
.InitialDirectory = m_ExternalBackupFolderPath,
.FileName = "Select this ",
.FilterIndex = 1,
.CheckFileExists = False,
.OverwritePrompt = False,
.Mode = 1}
If FileDialog.ShowDialog() Then
m_ExternalBackupFolderPath = Path.GetDirectoryName(FileDialog.FileName)
WriteMainPrivateProfileString(S_BACKUPANDRESTORE, K_EXTERNALFILEPATH, m_ExternalBackupFolderPath)
@@ -691,7 +696,7 @@ Public Class ConfigurationPageVM
Try
DataLayer.DbConfig.DataBaseDumpToFile(sBackupZipPath)
Catch ex As Exception
MessageBox.Show(EgtMsg(62103), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62103), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
bOk = False
End Try
If bOk AndAlso File.Exists(sBackupZipPath) Then
@@ -724,7 +729,7 @@ Public Class ConfigurationPageVM
End Using
End Using
Catch ex As Exception
MessageBox.Show(EgtMsg(62103), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62103), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
bOk = False
End Try
End If
@@ -737,7 +742,7 @@ Public Class ConfigurationPageVM
If Directory.Exists(m_ExternalBackupFolderPath) Then
CopyForExternalBackup(sBackupFolder, m_ExternalBackupFolderPath)
Else
MessageBox.Show(EgtMsg(62104), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' External folder does not exist or is not reachable! Copy to external folder impossible!
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62104), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' External folder does not exist or is not reachable! Copy to external folder impossible!
End If
End If
'chiudo finestra di caricamento
@@ -788,7 +793,7 @@ Public Class ConfigurationPageVM
Dim localProc As Process() = Process.GetProcessesByName(sSupervisorName)
' verifico che sia chiuso
If localProc.Length > 0 Then
MessageBox.Show(EgtMsg(62105), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning) ' Please verify the machine is stoped and close the supervisor before proceding with the restore operation!
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62105), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning) ' Please verify the machine is stoped and close the supervisor before proceding with the restore operation!
Return
End If
m_bRestoreRunning = True
@@ -834,22 +839,22 @@ Public Class ConfigurationPageVM
Next
End If
If String.IsNullOrEmpty(sRestorePath) Then
MessageBox.Show(EgtMsg(62106), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' Restore impossible! Last backup not found!
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62106), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' Restore impossible! Last backup not found!
m_bRestoreRunning = False
Return
End If
If MessageBox.Show(String.Format(EgtMsg(62107), nYear, nMonth, nDay), EgtMsg(15002), MessageBoxButton.OKCancel, MessageBoxImage.Warning) <> MessageBoxResult.OK Then 'Are you sure you want to restore the last backup from {0}\{1}\{2}? If you proceed you will lose actual data!
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(62107), nYear, nMonth, nDay), EgtMsg(15002), MessageBoxButton.OKCancel, MessageBoxImage.Warning) <> MessageBoxResult.OK Then 'Are you sure you want to restore the last backup from {0}\{1}\{2}? If you proceed you will lose actual data!
m_bRestoreRunning = False
Return
End If
Dim bDoBackup = False
Select Case MessageBox.Show(EgtMsg(62108), EgtMsg(15003), MessageBoxButton.YesNoCancel, MessageBoxImage.Information) ' Do you want to do a backup of the current project before proceding with the restore?
Select Case EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62108), EgtMsg(15003), MessageBoxButton.YesNoCancel, MessageBoxImage.Information) ' Do you want to do a backup of the current project before proceding with the restore?
Case MessageBoxResult.Yes
bDoBackup = True
Case MessageBoxResult.No
bDoBackup = False
Case MessageBoxResult.Cancel
MessageBox.Show(EgtMsg(62109), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62109), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
m_bRestoreRunning = False
Return
End Select
@@ -886,7 +891,7 @@ Public Class ConfigurationPageVM
Catch ex1 As Exception
EgtOutLog("Error! Impossible importing Recovery file " & sRestorePath & "!")
EgtOutLog("Exception in zip: " & ex1.ToString())
MessageBox.Show(EgtMsg(62110), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' Impossible importing Recovery file!
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62110), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' Impossible importing Recovery file!
bOk = False
End Try
Dim sBackupTempPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\DbRestore"
@@ -896,7 +901,7 @@ Public Class ConfigurationPageVM
Try
DataLayer.DbConfig.DataBaseRestoreFromFile(sRestoreDir & "\DbBackup.zip", "", sBackupTempPath)
Catch ex As Exception
MessageBox.Show(EgtMsg(62111), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' Restore failed! Impossible to restore the backup Database
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62111), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) ' Restore failed! Impossible to restore the backup Database
bOk = False
End Try
End If
@@ -26,7 +26,7 @@
ToolTip="{Binding SaveToolTip}"
Visibility="{Binding General_Visibility}"
Style="{StaticResource SaveOptionPanel_Button}">
<Image Source="/Resources/ProjectManager/Save.png"
<Image Source="{StaticResource Save_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</StackPanel>
@@ -44,7 +44,7 @@
ToolTip="{Binding SaveToolTip}"
Visibility="{Binding PDFEditor_Visibility}"
Style="{StaticResource SaveOptionPanel_Button}">
<Image Source="/Resources/ProjectManager/Save.png"
<Image Source="{StaticResource Save_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</StackPanel>
@@ -185,6 +185,12 @@
<Compile Include="Panel\TopPanelV.xaml.vb">
<DependentUpon>TopPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="PopUp\BTLPartListPopUpV.xaml.vb">
<DependentUpon>BTLPartListPopUpV.xaml</DependentUpon>
</Compile>
<Compile Include="PopUp\RawPartListPopUpV.xaml.vb">
<DependentUpon>RawPartListPopUpV.xaml</DependentUpon>
</Compile>
<Compile Include="ProdManager\ProdManagerV.xaml.vb">
<DependentUpon>ProdManagerV.xaml</DependentUpon>
</Compile>
@@ -273,7 +279,6 @@
<Compile Include="Statistics\PDFEditorV.xaml.vb">
<DependentUpon>PDFEditorV.xaml</DependentUpon>
</Compile>
<Compile Include="Statistics\PDFFlowHelper.vb" />
<Compile Include="Statistics\StatisticsV.xaml.vb">
<DependentUpon>StatisticsV.xaml</DependentUpon>
</Compile>
@@ -673,6 +678,14 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="PopUp\BTLPartListPopUpV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="PopUp\RawPartListPopUpV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ProdManager\ProdManagerV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -990,7 +1003,7 @@
<Version>3.1.1.2</Version>
</PackageReference>
<PackageReference Include="EgwWPFBaseLib">
<Version>3.1.1.1</Version>
<Version>3.1.1.2</Version>
</PackageReference>
<PackageReference Include="EntityFramework">
<Version>6.4.4</Version>
@@ -1176,6 +1189,9 @@
<ItemGroup>
<Resource Include="Resources\SplashScreen\SplashScreen.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewPage\clock.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Aedifica\Aedifica.OptimizerR32.exe
@@ -9,9 +9,6 @@ Imports EgwMultiEngineManager.Data.Constants
Module MyExecProcessManager
Friend nProjIndex As Integer = 0
Friend nProdIndex As Integer = 0
Private m_ExecProcessManagerList As New Dictionary(Of EXECENVIRONMENTS, ExecProcessManager)
Public ReadOnly Property ExecProcessManagerList As Dictionary(Of EXECENVIRONMENTS, ExecProcessManager)
Get
@@ -8,21 +8,21 @@
ToolTip="{Binding CopyFeature_ToolTip}"
IsEnabled="{Binding CopyFeature_IsEnabled}"
Style="{StaticResource LP_Button}">
<Image Source="/Resources/LeftPanel/CopyFeature.png"
<Image Source="{StaticResource CopyFeature_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding AddFeature_Command}"
ToolTip="{Binding AddFeature_ToolTip}"
IsEnabled="{Binding AddFeature_IsEnabled}"
Style="{StaticResource LP_Button}">
<Image Source="/Resources/LeftPanel/AddFeature.png"
<Image Source="{StaticResource AddFeature_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding RemoveFeature_Command}"
ToolTip="{Binding RemoveFeature_ToolTip}"
IsEnabled="{Binding RemoveFeature_IsEnabled}"
Style="{StaticResource LP_Button}">
<Image Source="/Resources/NewPage/Remove.png"
<Image Source="{StaticResource Remove_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
@@ -117,7 +117,7 @@ Public Class FeatureListManagerVM
' Reset lua
EgtLuaResetGlobVar("MACRO")
If Not bOk Then
MessageBox.Show(EgtMsg(61869), EgtMsg(30007))
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61869), EgtMsg(30007))
Return
End If
bMacroFlag = True
@@ -79,7 +79,7 @@
ToolTip="{Binding MacroFeature_ToolTip}"
IsEnabled="{Binding MacroFeature_IsEnabled}"
Style="{StaticResource MacroFeaturen_Button}">
<Image Source="/Resources/LeftPanel/MacroFeature.png"
<Image Source="{StaticResource MacroFeature_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
@@ -46,13 +46,13 @@
<Button Command="{Binding Ok_Command}"
ToolTip="{Binding Ok_Msg}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/NewPage/Ok.png"
<Image Source="{StaticResource Ok_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding Cancel_Command}"
ToolTip="{Binding Cancel_Msg}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/PDFEditor/Delete.png"
<Image Source="{StaticResource Delete_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</StackPanel>
@@ -208,7 +208,6 @@ Public Class ForcedStrategyPanelVM
End If
End If
'Dim JsonStrategyFeatureList As List(Of JsonStrategyFeature) = JsonConvert.DeserializeObject(Of List(Of JsonStrategyFeature))(sReadedFile)
Dim JsonStrategyFeature As JsonStrategyFeature = JsonFeatureList.FirstOrDefault(Function(x) x.nGrp = nGRP AndAlso x.nPrc = nPRC)
If IsNothing(JsonStrategyFeature) Then Return False
Dim JsonTopology As JsonTopology = JsonStrategyFeature.TopologyList.FirstOrDefault(Function(x) x.sName = sTopologyName)
@@ -327,6 +326,22 @@ Public Class ForcedStrategyPanelVM
End If
End Sub
Friend Sub ResetForcedStrategy(nFeatureId As Integer)
' cancello precedenti valori
Dim sPrecStrategyID As String = ""
EgtGetInfo(nFeatureId, ConstBeam.STRATEGY, sPrecStrategyID)
If Not String.IsNullOrWhiteSpace(sPrecStrategyID) Then
Dim PrecInfo As String() = {}
EgtGetAllInfo(nFeatureId, PrecInfo)
Dim PrecStrategyInfo As String() = PrecInfo.Where(Function(x) x.StartsWith(sPrecStrategyID)).ToArray()
For Each Info In PrecStrategyInfo
EgtRemoveInfo(nFeatureId, Info.Split("="c)(0))
Next
EgtRemoveInfo(nFeatureId, ConstBeam.STRATEGY)
EgtRemoveInfo(nFeatureId, ConstBeam.STRATEGY & nFeatureId & "_FORCED")
End If
End Sub
#End Region ' Methods
#Region "COMMANDS"
@@ -14,62 +14,62 @@
ToolTip="{Binding Line2P_ToolTip}"
IsEnabled="{Binding Line2P_IsEnabled}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/Line2P.png"
<Image Source="{StaticResource Line2P_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding Delete_Command}"
ToolTip="{Binding Delete_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/Delete.png"
<Image Source="{StaticResource DeleteD_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding ModifyCurve_Command}"
ToolTip="{Binding ModifyCurve_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/ModifyCurve.png"
<Image Source="{StaticResource ModifyCurve_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding AddPointCurve_Command}"
ToolTip="{Binding AddPointCurve_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/AddPointCurve.png"
<Image Source="{StaticResource AddPointCurve_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding RemovePointCurve_Command}"
ToolTip="{Binding RemovePointCurve_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/RemovePointCurve.png"
<Image Source="{StaticResource RemovePointCurve_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding ChangeStart_Command}"
ToolTip="{Binding ChangeStart_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/ChangeStart.png"
<Image Source="{StaticResource ChangeStart_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding InvertCurve_Command}"
ToolTip="{Binding InvertCurve_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/InvertCurve.png"
<Image Source="{StaticResource InvertCurve_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding Move_Command}"
ToolTip="{Binding Move_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/Move.png"
<Image Source="{StaticResource Move_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding Rotate_Command}"
ToolTip="{Binding Rotate_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/Rotate.png"
<Image Source="{StaticResource RotateD_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding TextAngle_Command}"
ToolTip="{Binding TextAngle_ToolTip}"
Visibility="{Binding TextAngle_Visibility}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/Text.png"
<Image Source="{StaticResource Text_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
@@ -83,7 +83,7 @@ Public Class FreeContourManagerVM
NotifyPropertyChanged(NameOf(TextAngle_Visibility))
Case FreeContourTypes.TWO
' chiedo conferma
If MessageBox.Show(EgtMsg(61862), "", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61862), "", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then
m_SelType = FreeContourTypes.TWO
NotifyPropertyChanged(NameOf(SelType))
Return
@@ -423,7 +423,7 @@ Public Class FreeContourManagerVM
Dim frFace As New Frame3d
EgtBeamGetSideData(SelFeature.nSelSIDE, frFace)
Dim frFrame As New Frame3d(SelFeature.BTLFeatureM.frFRAME)
frFrame.ToGlob( frFace)
frFrame.ToGlob(frFace)
EgtSetGridFrame(frFrame)
EgtSetGridShow(True, True)
Map.refSceneHostVM.MainScene.CPlaneView()
@@ -25,7 +25,7 @@
<Button Command="{Binding Ok_Command}"
ToolTip="{Binding SaveAsToolTip}"
Style="{StaticResource SaveStrategy_Button}">
<Image Source="/Resources/NewPage/Ok.png"
<Image Source="{StaticResource Ok_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</StackPanel>
@@ -14,6 +14,8 @@ Public Class GeneralParametersStrategyVM
#Region "FIELDS & PROPERTIES"
Private PADLOCK_IMAGE As String = "pack://application:,,,/Resources/NewPage/padlock.png"
' Evento per chiusura finestra
Public Event m_CloseWindow(bDialogResult As Boolean)
@@ -76,7 +78,7 @@ Public Class GeneralParametersStrategyVM
Case Else
If Not Map.refMainMenuVM.UserAdmin_IsChecked Then
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, Visibility.Visible, Visibility.Collapsed))
Map.refMainMenuVM.SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock.png")
Map.refMainMenuVM.SetUnloackImage(PADLOCK_IMAGE)
End If
End Select
Next
@@ -505,7 +507,7 @@ Public Class BooleanGenericParameter
End Property
Friend Sub SetbIsBooleanModify(value As Boolean)
m_bIsBooleanModify = value
If m_bIsBooleanModify Then
If m_bIsBooleanModify AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(Visibility.Visible)
End If
NotifyPropertyChanged(NameOf(bIsBooleanModify))
@@ -530,10 +532,7 @@ Public Class BooleanGenericParameter
#Region "METHODS"
Friend Overrides Function Serialize() As JsonParametersHelper
Dim sValue As String = "false"
If bValue Then
sValue = "true"
End If
Dim sValue As String = If(bValue, "true", "false")
Dim JsonParametersHelper As New JsonParametersHelper(sName, sNameNge, sValue, "b")
Return JsonParametersHelper
End Function
@@ -601,7 +600,7 @@ Public Class DoubleGenericParameter
End Property
Friend Sub SetbIsDoubleModify(value As Boolean)
m_bIsDoubleModify = value
If m_bIsDoubleModify Then
If m_bIsDoubleModify AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(Visibility.Visible)
End If
NotifyPropertyChanged(NameOf(bIsDoubleModify))
@@ -677,7 +676,7 @@ Public Class StringGenericParameter
End Property
Friend Sub SetbIsStringModify(value As Boolean)
m_bIsStringModify = value
If m_bIsStringModify Then
If m_bIsStringModify AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(Visibility.Visible)
End If
NotifyPropertyChanged(NameOf(bIsStringModify))
@@ -766,7 +765,7 @@ Public Class ComboGenericParameter
End Property
Friend Sub SetbIsComboBoxModify(value As Boolean)
m_bIsComboBoxModify = value
If m_bIsComboBoxModify Then
If m_bIsComboBoxModify AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(Visibility.Visible)
End If
NotifyPropertyChanged(NameOf(bIsComboBoxModify))
@@ -821,7 +820,7 @@ Public Class ListGenericParameter
Return m_SelValue
End Get
Set(value As ToolParameter)
If Not IsNothing(value) Then
If Not IsNothing(value) AndAlso Not IsNothing(m_SelValue) Then
If m_SelValue.sUUID <> value.sUUID Then
Map.refStrategyManagerVM.SetbIsModifyStrategy(True)
SetbIsListModify(True)
@@ -922,7 +921,7 @@ Public Class ListGenericParameter
End Property
Friend Sub SetbIsListModify(value As Boolean)
m_bIsListModify = value
If m_bIsListModify Then
If m_bIsListModify AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(Visibility.Visible)
End If
NotifyPropertyChanged(NameOf(bIsListModify))
@@ -1136,8 +1135,8 @@ Class GroupVisibilityConverter
Dim prop As PropertyInfo = item.GetType().GetProperty("sMinUserLevel")
If Not IsNothing(prop) Then
Dim levelObj = prop.GetValue(item)
Dim level As Integer
If Not IsNothing(levelObj) AndAlso Integer.TryParse(levelObj.ToString(), level) AndAlso level <> 5 Then
Dim level As Integer = 0
If Not IsNothing(levelObj) AndAlso Integer.TryParse(levelObj.ToString(), level) AndAlso level <> 5 AndAlso level <> 10 Then
Return Visibility.Visible
ElseIf Map.refMainMenuVM.UserAdmin_IsChecked Then
Return Visibility.Visible
@@ -35,7 +35,7 @@
<Button Command="{Binding Ok_Command}"
ToolTip="{Binding SaveAsToolTip}"
Style="{StaticResource GeneralParametersWnd_Button}">
<Image Source="/Resources/NewPage/Ok.png"
<Image Source="{StaticResource Ok_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</UniformGrid>
@@ -11,6 +11,8 @@ Public Class GeneralParametersWndVM
#Region "FIELDS & PROPERTIES"
Private PADLOCK_IMAGE As String = "pack://application:,,,/Resources/NewPage/padlock.png"
Friend Event m_CloseWindow(bDialogResult As Boolean)
Private m_GeneralParametersList As New ObservableCollection(Of ProjectParameters)
@@ -91,12 +93,12 @@ Public Class GeneralParametersWndVM
Sub New(nType As BWType)
' leggo cartella dei setup delle strategie
Dim AISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(nType, True)
Dim AISetupPaths As String() = Directory.GetFiles(AISetupDirPath)
Dim AISetupPaths As String() = Directory.GetFiles(AISetupDirPath).Where(Function(f) Path.GetExtension(f).ToLower() <> ".ini").ToArray()
For Each AiSetup In AISetupPaths
m_StrategySetupList.Add(Path.GetFileNameWithoutExtension(AiSetup))
Next
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(Map.refStrategyManagerVM.SelStrategyType.Id)
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(nType)
Dim sGeneralParametersFilePath As String = sStrategiesDirPath & "\" & GENERALPARAMETERS_FILE & ".json"
If File.Exists(sGeneralParametersFilePath) Then
Dim sReadedFiles As String = File.ReadAllText(sGeneralParametersFilePath)
@@ -110,7 +112,7 @@ Public Class GeneralParametersWndVM
Case Else
If Not Map.refMainMenuVM.UserAdmin_IsChecked Then
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, Visibility.Visible, Visibility.Collapsed))
Map.refMainMenuVM.SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock.png")
Map.refMainMenuVM.SetUnloackImage(PADLOCK_IMAGE)
End If
End Select
Next
@@ -119,15 +121,25 @@ Public Class GeneralParametersWndVM
' Leggo info se presenti
Dim nBTLInfoLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, PROJECTINFO)
' leggo file default config
Map.refMainWindowVM.MainWindowM.GetDefaultConfigDirPath(nType, True)
Dim sInfo As String = String.Empty
Dim sDefaultConfigFile As String = String.Empty
Dim sTrimDefaultConfig As String = String.Empty
EgtGetInfo(nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup)
If IsNothing(m_SelStrategySetup) Then
If GetMainPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sDefaultConfigFile) <> 0 Then
sTrimDefaultConfig = System.IO.Path.GetFileNameWithoutExtension(sDefaultConfigFile)
m_SelStrategySetup = sTrimDefaultConfig
EgtGetInfo(nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup)
If m_SelStrategySetup Is String.Empty Then
If EgtUILib.GetPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sDefaultConfigFile, Map.refMainWindowVM.MainWindowM.sDefaultConfig) <> 0 Then
m_SelStrategySetup = sDefaultConfigFile
Else
' restituisce la lista dei file presenti nella cartella con le relative informazioni
Dim StrategySetupListFile As List(Of FileInfo) = m_StrategySetupList.Where(Function(f) File.Exists(AISetupDirPath & "\" & f & ".json")).
Select(Function(f) New FileInfo(AISetupDirPath & "\" & f & ".json")).
OrderByDescending(Function(fi) fi.LastWriteTime).ToList()
' restituisce l'ultimo file modificato
If StrategySetupListFile.Any() Then
sDefaultConfigFile = Path.GetFileNameWithoutExtension(StrategySetupListFile.First().Name)
End If
sDefaultConfigFile = m_StrategySetupList.FirstOrDefault(Function(x) x = sDefaultConfigFile)
m_SelStrategySetup = sDefaultConfigFile
End If
End If
For Each GeneralParameter In m_GeneralParametersList
@@ -198,58 +210,33 @@ Public Class GeneralParametersWndVM
Friend Sub SaveProjectParameters()
Dim sInfo As String = String.Empty
Dim sDefaultConfigFile As String = String.Empty
Dim sTrimDefaultConfig As String = String.Empty
Dim nBTLInfoLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, PROJECTINFO)
If m_bSaveGeneralParameters Then
EgtSetInfo(nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup)
If m_SelStrategySetup Is String.Empty Then
If GetMainPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sDefaultConfigFile) <> 0 Then
sTrimDefaultConfig = System.IO.Path.GetFileNameWithoutExtension(sDefaultConfigFile)
m_SelStrategySetup = sTrimDefaultConfig
EgtSetInfo(nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup)
End If
EgtSetInfo(nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup)
If m_SelStrategySetup Is String.Empty Then
If EgtUILib.GetPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sDefaultConfigFile, Map.refMainWindowVM.MainWindowM.sDefaultConfig) <> 0 Then
m_SelStrategySetup = sDefaultConfigFile
EgtSetInfo(nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup)
End If
For Each GeneralParameter In m_GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
EgtSetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
Case GetType(DoubleGenericParameter)
EgtSetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue)
Case GetType(ComboGenericParameter)
EgtSetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue)
Case GetType(StringGenericParameter)
EgtSetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue)
Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
EgtSetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, sInfo)
End If
Next
End Select
Next
Else
EgtRemoveInfo(nBTLInfoLayerId, AI_SETUP)
For Each GeneralParameter In m_GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
EgtRemoveInfo(nBTLInfoLayerId, GeneralParameter.sNameNge)
Case GetType(DoubleGenericParameter)
EgtRemoveInfo(nBTLInfoLayerId, GeneralParameter.sNameNge)
Case GetType(ComboGenericParameter)
EgtRemoveInfo(nBTLInfoLayerId, GeneralParameter.sNameNge)
Case GetType(StringGenericParameter)
EgtRemoveInfo(nBTLInfoLayerId, GeneralParameter.sNameNge)
Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
EgtRemoveInfo(nBTLInfoLayerId, GeneralParameter.sNameNge)
End If
Next
End Select
Next
End If
For Each GeneralParameter In m_GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
EgtSetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
Case GetType(DoubleGenericParameter)
EgtSetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue)
Case GetType(ComboGenericParameter)
EgtSetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue)
Case GetType(StringGenericParameter)
EgtSetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue)
Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
EgtSetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, sInfo)
End If
Next
End Select
Next
End Sub
#End Region ' Methods
@@ -113,14 +113,14 @@
IsEnabled="{Binding OpenToolListIsEnable}"
Command="{Binding OpenToolListCommand}"
Style="{StaticResource ProjectParameters_Button}">
<Image Source="/Resources/NewPage/+.png"
<Image Source="{StaticResource Plus_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button ToolTip="{Binding DeselectAllToolTip}"
IsEnabled="{Binding ActiveToolListIsEnable}"
Command="{Binding DeselectAllCommand}"
Style="{StaticResource CloseProjectParameters_Button}">
<Image Source="/Resources/NewPage/deselectall.png"
<Image Source="{StaticResource DeselectAll_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</StackPanel>
@@ -148,14 +148,14 @@
<Button ToolTip="{Binding CloseToolListToolTip}"
Command="{Binding CloseToolListCommand}"
Style="{StaticResource ProjectParameters_Button}">
<Image Source="/Resources/PDFEditor/Delete.png"
<Image Source="{StaticResource Delete_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button ToolTip="{Binding SelectAllToolTip}"
IsEnabled="{Binding AvailableToolListIsEnable}"
Command="{Binding SelectAllCommand}"
Style="{StaticResource ProjectParameters_Button}">
<Image Source="/Resources/NewPage/selectall.png"
<Image Source="{StaticResource SelectAll_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</StackPanel>
@@ -6,7 +6,7 @@
<ToggleButton ToolTip="{Binding GetDistToolTip}"
IsChecked="{Binding GetDistIsChecked}"
Style="{StaticResource ToolBar_ToggleButton}">
<Image Source="/Resources/InstrumentPanel/GetDist+.png"
<Image Source="{StaticResource GetDist_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</ToggleButton>
@@ -15,7 +15,7 @@
Visibility="{Binding ChangeParam_Visibility}"
IsEnabled="{Binding InstrumentPanel_IsEnabled}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/InstrumentPanel/ChangeParam.png"
<Image Source="{StaticResource ChangeParam_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
@@ -24,15 +24,11 @@
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
AlternationCount="2"
AreRowDetailsFrozen="True"
EnableRowVirtualization="True"
EnableColumnVirtualization="True"
VirtualizingStackPanel.VirtualizationMode="Recycling"
VirtualizingStackPanel.IsVirtualizing="True"
VirtualizingPanel.IsVirtualizingWhenGrouping="True"
VirtualizingPanel.ScrollUnit="Pixel"
RenderOptions.CachingHint="Cache"
VirtualizingPanel.CacheLength="10"
VirtualizingPanel.CacheLengthUnit="Pixel"
VirtualizingPanel.CacheLength="2"
VirtualizingPanel.CacheLengthUnit="Page"
RowBackground="{StaticResource BeamWall_BLackSqueeze}"
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
Style="{StaticResource Optimizer_DataGrid}">
@@ -51,29 +47,27 @@
<Expander Style="{StaticResource BTLPartList_Expander}">
<Expander.Header>
<StackPanel Style="{StaticResource PartManager_StackPanel}">
<TextBlock Text="{Binding Path=Name}"
Style="{StaticResource BTLPartList_TextBlock}"/>
<TextBlock Text="{Binding Path=Name, Converter={StaticResource ProjIdToBtlFileName}}"
Style="{StaticResource BTLPartList_TextBlock}"/>
<Button Command="{Binding Tag.Data_Command, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
CommandParameter="{Binding Path=Name}"
ToolTip="{Binding Tag.Data_ToolTip, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
Style="{StaticResource BTLPartList_Button}">
<Image Source="/Resources/NewPage/adjustment.png"
<Image Source="{StaticResource Adjustment_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding Tag.AddPart_Command, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
CommandParameter="{Binding Path=Name}"
ToolTip="{Binding Tag.AddPart_ToolTip, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
Style="{StaticResource BTLPartList_Button}">
<Image Source="/Resources/LeftPanel/AddPart.png"
<Image Source="{StaticResource AddPart_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding Tag.UpdateBTL_Command, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
CommandParameter="{Binding Path=Name}"
ToolTip="{Binding Tag.UpdateBTL_ToolTip, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
Style="{StaticResource BTLPartList_Button}">
<Image Source="/Resources/ProjectManager/UpdateBTL.png"
<Image Source="{StaticResource UpdateBTL_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</StackPanel>
@@ -278,7 +272,7 @@
<DataGridTemplateColumn x:Key="colROT" SortMemberPath="dROT">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<Image Source="/Resources/NewPage/RotateIntestazione.png"
<Image Source="{StaticResource HeaderRotate_Image}"
Style="{StaticResource BTLPartList_Image}"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
@@ -296,7 +290,7 @@
ToolTip="{Binding ForwardRotation_ToolTip}"
IsEnabled="{Binding RotatePart_IsEnabled}"
Style="{StaticResource BTLPanel_Button}">
<Image Source="/Resources/NewPage/Rotate.png"
<Image Source="{StaticResource Rotate_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</Grid>
@@ -307,7 +301,7 @@
<DataGridTemplateColumn x:Key="colFLIP">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<Image Source="/Resources/NewPage/InversionIntestazione.png"
<Image Source="{StaticResource HeaderInversion_Image}"
Style="{StaticResource BTLPartList_Image}"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
@@ -322,7 +316,7 @@
<DataGridTemplateColumn x:Key="colVERIFY">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<Image Source="/Resources/NewPage/VerifyIntestazione.png"
<Image Source="{StaticResource HeaderVerify_Image}"
Style="{StaticResource BTLPartList_Image}"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
@@ -332,7 +326,7 @@
Command="{Binding Verify_Command}"
IsEnabled="{Binding Verify_IsEnabled}"
Style="{StaticResource BTLPanel_Button}">
<Image Source="/Resources/CALCPanel/Verify.png"
<Image Source="{StaticResource Verify_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</DataTemplate>
@@ -342,7 +336,7 @@
<DataGridTemplateColumn x:Key="colADD">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<Image Source="/Resources/NewPage/AddToRawPartIntestazione.png"
<Image Source="{StaticResource HeaderAddToRawPart_Image}"
Style="{StaticResource BTLPartList_Image}"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
@@ -353,7 +347,7 @@
ToolTip="{Binding AddToRawPart_ToolTip}"
IsEnabled="{Binding BTLPartManager_IsEnabled}"
Style="{StaticResource BTLPanel_Button}">
<Image Source="/Resources/LeftPanel/AddToRawPart.png"
<Image Source="{StaticResource AddToRawPart_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</DataTemplate>
@@ -363,29 +357,19 @@
<DataGridTemplateColumn x:Key="colSETTING">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<Image Source="/Resources/NewPage/SettingIntestazione.png"
<Image Source="{StaticResource HeaderSetting_Image}"
Style="{StaticResource BTLPartList_Image}"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel>
<Button Command="{Binding ShowPopUpSettingBtnCommand}"
ToolTip="{Binding Settings_Command_ToolTip}"
<Button ToolTip="{Binding Settings_Command_ToolTip}"
Style="{StaticResource BTLPanel_Button}"
Click="OpenPopUp_Click">
<Image Source="/Resources/NewPage/Setting.png"
<Image Source="{StaticResource Setting_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Popup Style="{StaticResource BTLPartList_PopUp}">
<Popup.VerticalOffset>
<MultiBinding Converter="{StaticResource DataGridCellBorderThicknessConverter}">
<Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}"/>
<Binding Path="ActualWidth" ElementName="SettingsBtn"/>
</MultiBinding>
</Popup.VerticalOffset>
<OPTIMIZER:BTLPartManagerV/>
</Popup>
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
@@ -407,6 +391,9 @@
ItemsSource="{Binding BTLFeatureVMList}"
SelectedItem="{Binding SelBTLFeatureVM, UpdateSourceTrigger=PropertyChanged}"
PreviewMouseWheel="ListBox_PreviewMouseWheel"
VirtualizingPanel.IsVirtualizing="True"
VirtualizingPanel.VirtualizationMode="Recycling"
ScrollViewer.CanContentScroll="True"
Style="{StaticResource BTLPartList_ListBox}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
@@ -509,7 +496,7 @@
Command="{Binding EditFeature_Command}"
Click="SelectButton_Click"
Style="{StaticResource EditFeature_Button}">
<Image Source="/Resources/CALCPanel/Edit.png"
<Image Source="{StaticResource Edit_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</Grid>
@@ -1,5 +1,4 @@
Imports System.Reflection
Imports System.Windows.Controls.Primitives
Public Class BTLPartListV
@@ -73,8 +72,7 @@ Public Class BTLPartListV
parent = VisualTreeHelper.GetParent(parent)
End While
If Not IsNothing(parent) Then
Dim row As DataGridRow = DirectCast(parent, DataGridRow)
Dim popup As Popup = TryCast(TreeHelperManager.FindVisualChild(Of Popup)(row), Popup)
Dim popup As New BTLPartListPopUpV()
If Not IsNothing(popup) Then
popup.PlacementTarget = btn ' Associa il popup al bottone
popup.IsOpen = True ' Mostra il popup
@@ -197,7 +197,7 @@ Public Class BTLPartListVM
Map.SetRefPartListVM(Me)
' carico le colonne della datagrid
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(Path.ChangeExtension(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, ".json"), S_PARTLIST, PartColumns)
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_PARTLIST, PartColumns)
m_colPart_Do = PartColumns.FirstOrDefault(Function(x) x.Key = COL_DO)
End Sub
@@ -93,7 +93,7 @@
<Button ToolTip="{Binding Strategy_ToolTip}"
Command="{Binding Strategy_Command}"
Style="{StaticResource FeatureInPartInRawPartList_Button}">
<Image Source="/Resources/CALCPanel/Verify.png"
<Image Source="{StaticResource Verify_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</DataTemplate>
@@ -64,7 +64,7 @@ Public Class FeatureInPartInRawPartListVM
Map.SetRefFeatureInPartInRawPartListVM(Me)
' carico le colonne della datagrid
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(Path.ChangeExtension(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, ".json"), S_FEATUREINPARTINRAWPARTLIST, FeatureInPartInRawPartColumns)
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_FEATUREINPARTINRAWPARTLIST, FeatureInPartInRawPartColumns)
m_colFeatureInPartInRawPart_Do = FeatureInPartInRawPartColumns.FirstOrDefault(Function(x) x.Key = COL_DO)
m_colFeatureInPartInRawPart_Priority = FeatureInPartInRawPartColumns.FirstOrDefault(Function(x) x.Key = COL_PRIORITY)
End Sub
@@ -136,13 +136,13 @@
<Button Command="{Binding Ok_Command}"
ToolTip="{Binding Ok_Msg}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/NewPage/Ok.png"
<Image Source="{StaticResource Ok_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding Cancel_Command}"
ToolTip="{Binding Cancel_Msg}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/PDFEditor/Delete.png"
<Image Source="{StaticResource Delete_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</StackPanel>
@@ -111,7 +111,7 @@ Public Class PParameterListVM
Map.SetRefPParameterListVM(Me)
' carico le colonne della datagrid
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(Path.ChangeExtension(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, ".json"), S_PARAMETERLIST_P, PParameterListColumns)
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_PARAMETERLIST_P, PParameterListColumns)
' recupero riferimento a colonna Value
m_colPParam_Value = PParameterListColumns.FirstOrDefault(Function(x) x.Key = COL_VALUE)
@@ -144,7 +144,6 @@ Public Class PParameterListVM
Public Sub Ok()
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.ResetCalcFeature()
Map.refProjectVM.BTLStructureVM.SelBTLPart.ResetCalcPart()
If Map.refProdManagerVM.ListProjAsseBase.Count > 0 Then Map.refProjectVM.UpdatePart()
Map.refForcedStrategyPanelVM.ForcedStrategy()
Map.refProjectVM.SetRawPartManagerVisibility(Visibility.Visible)
Map.refProjectVM.SetStrategyManagerVisibility(Visibility.Collapsed)
@@ -11,6 +11,14 @@
CanUserDeleteRows="False"
SelectionMode="Single"
Margin="2.5,0,0,5"
EnableRowVirtualization="True"
EnableColumnVirtualization="True"
VirtualizingStackPanel.IsVirtualizing="True"
VirtualizingPanel.IsVirtualizingWhenGrouping="True"
VirtualizingPanel.ScrollUnit="Pixel"
RenderOptions.CachingHint="Cache"
VirtualizingPanel.CacheLength="10"
VirtualizingPanel.CacheLengthUnit="Pixel"
ColumnLayouts="{Binding RawPartColumns}"
BeginningEdit="RawPartList_BeginningEdit"
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
@@ -36,7 +44,7 @@
<DataGridTextColumn x:Key="colNAME" Binding="{Binding Name}" SortMemberPath="nName">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.ID_Msg, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
<TextBlock Text="{Binding Path=DataContext.ID_Msg, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.CellStyle>
@@ -84,7 +92,7 @@
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.StartOffset_Msg,
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.EditingElementStyle>
@@ -98,7 +106,7 @@
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.W_Msg,
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.EditingElementStyle>
@@ -126,7 +134,7 @@
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.L_Msg,
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.EditingElementStyle>
@@ -154,7 +162,7 @@
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.Material_Msg,
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
@@ -163,7 +171,7 @@
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.Used_Msg,
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
@@ -172,7 +180,7 @@
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.Waste_Msg,
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
@@ -180,7 +188,7 @@
<DataGridTemplateColumn x:Key="colVERIFY">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<Image Source="/Resources/NewPage/VerifyIntestazione.png"
<Image Source="{StaticResource HeaderVerify_Image}"
Style="{StaticResource BTLPartList_Image}"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
@@ -190,7 +198,7 @@
Command="{Binding Verify_Command}"
IsEnabled="{Binding Verify_IsEnabled}"
Style="{StaticResource BTLPanel_Button}">
<Image Source="/Resources/CALCPanel/Verify.png"
<Image Source="{StaticResource Verify_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</DataTemplate>
@@ -209,7 +217,7 @@
Command="{Binding Simulate_Command}"
IsEnabled="{Binding Simulate_IsEnabled}"
Style="{StaticResource BTLPanel_Button}">
<Image Source="/Resources/CALCPanel/Simulate.png"
<Image Source="{StaticResource Simulate_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</DataTemplate>
@@ -219,7 +227,7 @@
<DataGridTemplateColumn x:Key="colPROD">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<Image Source="/Resources/NewPage/ProduceRawPartIntestazione.png"
<Image Source="{StaticResource HeaderProduceRawPart_Image}"
Style="{StaticResource BTLPartList_Image}"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
@@ -229,7 +237,7 @@
ToolTip="{Binding ProduceRawPart_ToolTip}"
IsEnabled="{Binding RawPartManagerIsEnabled}"
Style="{StaticResource BTLPanel_Button}">
<Image Source="/Resources/TopPanel/ProduceRawPart.png"
<Image Source="{StaticResource ProduceRawPart_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</DataTemplate>
@@ -239,66 +247,18 @@
<DataGridTemplateColumn x:Key="colSETTING">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<Image Source="/Resources/NewPage/SettingIntestazione.png"
<Image Source="{StaticResource HeaderSetting_Image}"
Style="{StaticResource BTLPartList_Image}"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel Margin="2">
<Button Command="{Binding ShowPopUpSettingBtnCommand}"
ToolTip="{Binding Settings_Command_ToolTip}"
Style="{StaticResource BTLPanel_Button}"
Click="Button_Click">
<Image Source="/Resources/NewPage/Setting.png"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Popup AllowsTransparency="True"
PopupAnimation="Scroll"
StaysOpen="False">
<StackPanel Style="{StaticResource BTLPartManager_StackPanel}">
<!--COPY - Copia-->
<Button Command="{Binding CopyRawPart_Command}"
ToolTip="{Binding CopyRawPart_ToolTip}"
Click="ClosePopUp_Click"
Style="{StaticResource LP_Button}">
<Image Source="/Resources/TopPanel/CopyRawPart.png"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<!--DELETE - Elimina-->
<Button Command="{Binding RemoveRawPart_Command}"
ToolTip="{Binding RemoveRawPart_ToolTip}"
Click="ClosePopUp_Click"
Style="{StaticResource LP_Button}">
<Image Source="/Resources/NewPage/Remove.png"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<!--CAM - CAM-->
<Button ToolTip="{Binding Simulate_ToolTip}"
Command="{Binding Simulate_Command}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/CALCPanel/Simulate.png"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<!--REORDER - Riordina-->
<Button Command="{Binding ReOrderPart_Command}"
ToolTip="{Binding ReOrderPart_ToolTip}"
Click="ClosePopUp_Click"
Style="{StaticResource LP_Button}">
<Image Source="/Resources/TopPanel/ReOrderPart.png"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<!--RESET - Reset-->
<Button Command="{Binding ResetCalc_Command}"
ToolTip="{Binding ResetCalc_ToolTip}"
Click="ClosePopUp_Click"
Style="{StaticResource LP_Button}">
<Image Source="/Resources/CALCPanel/ResetCalc.png"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</StackPanel>
</Popup>
</StackPanel>
<Button Click="Button_Click"
ToolTip="{Binding Settings_Command_ToolTip}"
Style="{StaticResource BTLPanel_Button}">
<Image Source="{StaticResource Setting_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
@@ -319,6 +279,14 @@
SelectionMode="Single"
Margin="15,0,0,5"
BeginningEdit="PartInRawPartList_BeginningEdit"
EnableRowVirtualization="True"
EnableColumnVirtualization="True"
VirtualizingStackPanel.IsVirtualizing="True"
VirtualizingPanel.IsVirtualizingWhenGrouping="True"
VirtualizingPanel.ScrollUnit="Pixel"
RenderOptions.CachingHint="Cache"
VirtualizingPanel.CacheLength="10"
VirtualizingPanel.CacheLengthUnit="Pixel"
ColumnLayouts="{Binding DataContext.PartInRawPartColumns, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"
ColumnHeaderStyle="{StaticResource RawPart_DataGridColumnHeader}"
GridLinesVisibility="None"
@@ -408,7 +376,7 @@
<DataGridTemplateColumn x:Key="colROT" SortMemberPath="dROT">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<Image Source="/Resources/NewPage/RotateIntestazioneRawPart.png"
<Image Source="{StaticResource HeaderRotateRawPart_Image}"
Style="{StaticResource BTLPartList_Image}"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
@@ -424,7 +392,7 @@
<Button Grid.Column="1"
Command="{Binding ForwardRotation_Command}"
Style="{StaticResource Rotation_Button}">
<Image Source="/Resources/NewPage/Rotate.png"
<Image Source="{StaticResource Rotate_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</Grid>
@@ -435,7 +403,7 @@
<DataGridTemplateColumn x:Key="colFLIP">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<Image Source="/Resources/NewPage/InversionIntestazioneRawPart.png"
<Image Source="{StaticResource HeaderInversionRawPart_Image}"
Style="{StaticResource BTLPartList_Image}"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
@@ -545,7 +513,7 @@
<Button Command="{Binding MoveUpPart_Command}"
ToolTip="{Binding MoveUpPart_ToolTip}"
Style="{StaticResource Move_Button}">
<Image Source="/Resources/NewPage/MoveUp.png"
<Image Source="{StaticResource MoveUp_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</DataTemplate>
@@ -563,7 +531,7 @@
<Button Command="{Binding MoveDownPart_Command}"
ToolTip="{Binding MoveDownPart_ToolTip}"
Style="{StaticResource Move_Button}">
<Image Source="/Resources/NewPage/MoveDown.png"
<Image Source="{StaticResource MoveDown_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</DataTemplate>
@@ -581,7 +549,7 @@
<Button Command="{Binding RemovePart_Command}"
ToolTip="{Binding RemovePart_ToolTip}"
Style="{StaticResource Move_Button}">
<Image Source="/Resources/NewPage/Remove.png"
<Image Source="{StaticResource Remove_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</DataTemplate>
@@ -1,6 +1,5 @@
Imports EgtBEAMWALL.Core
Imports EgtUILib.EgtInterface
Imports System.Windows.Controls.Primitives
Public Class RawPartListV
@@ -35,15 +34,13 @@ Public Class RawPartListV
Dim parent As DependencyObject = btn
' Cerca il Popup nel Visual Tree
While parent IsNot Nothing AndAlso Not TypeOf parent Is DataGridRow
While Not IsNothing(parent) AndAlso TypeOf parent IsNot DataGridRow
parent = VisualTreeHelper.GetParent(parent)
End While
If parent IsNot Nothing Then
Dim row As DataGridRow = DirectCast(parent, DataGridRow)
Dim popup As Popup = TryCast(TreeHelperManager.FindVisualChild(Of Popup)(row), Popup)
If popup IsNot Nothing Then
Dim popup As New RawPartListPopUpV()
If Not IsNothing(popup) Then
popup.PlacementTarget = btn ' Associa il popup al bottone
popup.IsOpen = True ' Mostra il popup
End If
@@ -73,16 +70,6 @@ Public Class RawPartListV
End If
End Sub
Private Sub ClosePopUp_Click(sender As Object, e As RoutedEventArgs)
Dim Button As Button = DirectCast(sender, Button)
Dim StackPanel As StackPanel = DirectCast(Button.Parent, StackPanel)
Dim Popup As Primitives.Popup = DirectCast(StackPanel.Parent, Primitives.Popup)
If Not IsNothing(Popup) Then
Popup.IsOpen = False
End If
End Sub
Private Sub EgwDataGrid_PreviewMouseWheel(sender As Object, e As MouseWheelEventArgs)
e.Handled = True
Dim parent As EgwWPFBaseLib.EgwDataGrid = TryCast(sender, EgwWPFBaseLib.EgwDataGrid)
@@ -225,14 +225,14 @@ Public Class RawPartListVM
Friend Sub UpdateColumns(nProjectType As BWType)
If nProjectType = BWType.BEAM Then
' carico le colonne della datagrid
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(Path.ChangeExtension(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, ".json"), S_RAWPARTLIST_BEAM, RawPartColumns)
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_RAWPARTLIST_BEAM, RawPartColumns)
' carico le colonne della datagrid
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(Path.ChangeExtension(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, ".json"), S_PARTINRAWPARTLIST_BEAM, PartInRawPartColumns)
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_PARTINRAWPARTLIST_BEAM, PartInRawPartColumns)
ElseIf nProjectType = BWType.WALL Then
' carico le colonne della datagrid
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(Path.ChangeExtension(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, ".json"), S_RAWPARTLIST_WALL, RawPartColumns)
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_RAWPARTLIST_WALL, RawPartColumns)
' carico le colonne della datagrid
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(Path.ChangeExtension(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, ".json"), S_PARTINRAWPARTLIST_WALL, PartInRawPartColumns)
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_PARTINRAWPARTLIST_WALL, PartInRawPartColumns)
End If
NotifyPropertyChanged(NameOf(RawPartColumns))
NotifyPropertyChanged(NameOf(PartInRawPartColumns))
@@ -32,7 +32,7 @@
Command="{Binding VerifyAll_Command}"
IsEnabled="{Binding VerifyAll_IsEnabled}"
Style="{StaticResource Verify_Button}">
<Image Source="/Resources/CALCPanel/VerifyAll.png"
<Image Source="{StaticResource VerifyAll_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Grid.Column="1"
@@ -40,7 +40,7 @@
ToolTip="{Binding ResetCalc_ToolTip}"
IsEnabled="{Binding CALCPanel_IsEnabled}"
Style="{StaticResource Verify_Button}">
<Image Source="/Resources/CALCPanel/ResetCalc.png"
<Image Source="{StaticResource ResetCalc_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Grid.Column="2"
@@ -48,7 +48,7 @@
ToolTip="{Binding FilterAll_ToolTip}"
Command="{Binding ShowPopUpFilterBtnCommand}"
Style="{StaticResource Verify_Button}">
<Image Source="/Resources/LeftPanel/All_Filter.png"
<Image Source="{StaticResource AllFilter_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Popup IsOpen="{Binding IsFilterBtnOpen}"
@@ -112,7 +112,7 @@
ToolTip="{Binding RotateAll_ToolTip}"
IsEnabled="{Binding RotateAll_IsEnabled}"
Style="{StaticResource LP_Button}">
<Image Source="/Resources/NewPage/Rotate.png"
<Image Source="{StaticResource Rotate_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Grid.Column="6" Visibility="Collapsed"
@@ -120,7 +120,7 @@
ToolTip="{Binding InvertAll_ToolTip}"
IsEnabled="{Binding RotateAll_IsEnabled}"
Style="{StaticResource LP_Button}">
<Image Source="/Resources/NewPage/Inversion.png"
<Image Source="{StaticResource Inversion_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Grid.Column="7" Visibility="Collapsed"
@@ -128,7 +128,7 @@
ToolTip="{Binding MultipleModify_ToolTip}"
IsEnabled="{Binding RotateAll_IsEnabled}"
Style="{StaticResource MacroFeaturen_Button}">
<Image Source="/Resources/CALCPanel/Edit.png"
<Image Source="{StaticResource Edit_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</Grid>
@@ -216,9 +216,6 @@ Public Class LeftPanelVM
If (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM)) Then Return
' imposto flag per calcolo
Map.refCALCPanelVM.SetCalculating(True)
Map.refMyStatusBarVM.SetLoadingProgress(0)
Map.refMyStatusBarVM.SetOutputMessage("")
MyExecProcessManager.nProjIndex = 0
For PartIndex As Integer = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1
Map.refProjectVM.BTLStructureVM.BTLPartVMList(PartIndex).SetIsRowEnabled(False)
Next
@@ -329,10 +326,8 @@ Public Class LeftPanelVM
Public Sub ResetCalc()
If (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM)) Then Return
Map.refMyStatusBarVM.SetLoadingProgress(0)
Map.refMyStatusBarVM.SetOutputMessage("")
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = True
MyExecProcessManager.nProjIndex = 0
Map.refCALCPanelVM.SetCalculating(False)
For Each Part In Map.refProjectVM.BTLStructureVM.BTLPartVMList
If Part.nGlobalState <> CalcStates.NOTCALCULATED Then
' resetto stato dei calcoli
@@ -301,20 +301,6 @@ Public Class MyMachGroupVM
End Get
End Property
Private m_IsSettingBtnOpen As Boolean = False
Public Property IsSettingBtnOpen As Boolean
Get
Return m_IsSettingBtnOpen
End Get
Set(value As Boolean)
m_IsSettingBtnOpen = value
End Set
End Property
Friend Sub SetIsSettingBtnOpen(bIsSettingBtnOpen As Boolean)
m_IsSettingBtnOpen = bIsSettingBtnOpen
NotifyPropertyChanged(NameOf(IsSettingBtnOpen))
End Sub
Private m_IsRowEnabled As Boolean = True
Public ReadOnly Property IsRowEnabled As Boolean
Get
@@ -373,7 +359,6 @@ Public Class MyMachGroupVM
#End Region ' Messages
' Definizione comandi
Private m_cmdShowPopUpSettingBtnCmd As ICommand
Private m_cmdVerify As ICommand
Private m_cmdSimulate As ICommand
Private m_cmdProduceRawPart As ICommand
@@ -535,7 +520,7 @@ Public Class MyMachGroupVM
BeamWallMachGroup.DeleteMachGroup()
Dim LogFile As String() = File.ReadAllLines(sLogPath)
If LogFile.Count >= 2 AndAlso Not IsNothing(LogFile(1)) Then
MessageBox.Show(LogFile(1), EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, LogFile(1), EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error)
End If
Return Nothing
End If
@@ -612,7 +597,7 @@ Public Class MyMachGroupVM
BeamWallMachGroup.DeleteMachGroup()
Dim LogFile As String() = File.ReadAllLines(sLogPath)
If LogFile.Count >= 2 AndAlso Not IsNothing(LogFile(1)) Then
MessageBox.Show(LogFile(1), EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, LogFile(1), EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error)
End If
Return Nothing
End If
@@ -715,7 +700,7 @@ Public Class MyMachGroupVM
Next
sPartToAdd &= Environment.NewLine & "Aggiungerli?"
If bPartToAdd Then
If MessageBox.Show(sPartToAdd, "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, sPartToAdd, "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
For Each Part In SelParts
If Not Part.CanAddPartToCount() Then Part.AddNewPartToAdded()
Next
@@ -935,27 +920,6 @@ Public Class MyMachGroupVM
#Region "COMMANDS"
#Region "ShowPopUpSettingBtnCommand"
Public ReadOnly Property ShowPopUpSettingBtnCommand As ICommand
Get
If m_cmdShowPopUpSettingBtnCmd Is Nothing Then
m_cmdShowPopUpSettingBtnCmd = New Command(AddressOf ShowPopUpSettingBtn)
End If
Return m_cmdShowPopUpSettingBtnCmd
End Get
End Property
Public Sub ShowPopUpSettingBtn(ByVal param As Object)
If m_IsSettingBtnOpen Then
SetIsSettingBtnOpen(False)
Else
SetIsSettingBtnOpen(True)
End If
End Sub
#End Region ' ShowPopUpSettingBtnCommand
#Region "VerifyCommand"
Public ReadOnly Property Verify_Command As ICommand
@@ -969,9 +933,6 @@ Public Class MyMachGroupVM
Friend Sub Verify()
If ((IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM))) Then Return
Map.refMyStatusBarVM.SetLoadingProgress(0)
Map.refMyStatusBarVM.SetOutputMessage("")
MyExecProcessManager.nProdIndex = -1
Map.refCALCPanelVM.Verify(ProjectType.PROD)
Return
End Sub
@@ -1072,7 +1033,7 @@ Public Class MyMachGroupVM
' verifico se modalita' supervisore attiva
If GetPrivateProfileInt(S_GENERAL, K_SUPERVISOR, 1, CurrentMachine.sMachIniFile) = 1 Then
If Not Produce(Map.refMachGroupPanelVM.SelectedMachGroup, ErrorMsg) AndAlso Not String.IsNullOrWhiteSpace(ErrorMsg) Then
MessageBox.Show(ErrorMsg)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, ErrorMsg)
End If
Else
' altrimenti lo copio se path disponibile
@@ -1090,9 +1051,9 @@ Public Class MyMachGroupVM
Dim sMachGroupFilePath As String = Map.refProdManagerVM.CurrProd.sProdDirPath & "\" & Map.refMachGroupPanelVM.SelectedMachGroup.Name.ToString() & ".cnc"
Dim sNewPath As String = sSaveCncPath & "\" & Map.refProdManagerVM.CurrProd.sProdId & "-" & Map.refMachGroupPanelVM.SelectedMachGroup.Name.ToString() & sSaveExt
File.Copy(sMachGroupFilePath, sNewPath, True)
MessageBox.Show(String.Format("File copied! You can find it at {0}", {sNewPath}), "Info", MessageBoxButton.OK, MessageBoxImage.Information)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(62584), {sNewPath}), EgtMsg(15003), MessageBoxButton.OK, MessageBoxImage.Information)
Catch ex As Exception
MessageBox.Show(String.Format("Copy to {0} folder failed!", {sSaveCncPath}), "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(62585), {sSaveCncPath}), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
End Try
End If
End If
@@ -1176,7 +1137,7 @@ Public Class MyMachGroupVM
End Property
Public Sub RemoveRawPartCmd()
If MessageBox.Show(EgtMsg(62574) & Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.Name & " ?", EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62574) & Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.Name & " ?", EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
RemoveRawPart()
Else
Return
@@ -1200,7 +1161,9 @@ Public Class MyMachGroupVM
' se barra gia' assegnata a supervisore, esco
If SelMachGroup.nProduction_State >= ItemState.Assigned Then Return
SelMachGroup.DeleteMachGroup()
If Not IsNothing(Map.refMachGroupPanelVM.SelectedMachGroup) Then Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(0)
If Not IsNothing(Map.refMachGroupPanelVM.SelectedMachGroup) Then
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(0)
End If
End If
EgtDraw()
' se nessun grezzo, rimetto tutti i pezzi invisibili
@@ -1249,11 +1212,8 @@ Public Class MyMachGroupVM
End Property
Public Sub ResetCalc()
If ((IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM))) Then Return
Map.refMyStatusBarVM.SetLoadingProgress(0)
Map.refMyStatusBarVM.SetOutputMessage("")
If IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Return
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = True
MyExecProcessManager.nProdIndex = 0
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
If IsNothing(SelMachGroup) Then Return
' se barra gia' assegnata a supervisore, esco
@@ -762,7 +762,7 @@ Public Class PartVM
Public Sub RemovePart()
If IsNothing(ProjectManagerVM.CurrProd) Then Return
If MessageBox.Show(EgtMsg(62575), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62575), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
' Recupero indice elemento selezionato in lista
Dim Index As Integer = ParentMachGroupVM.PartVMList.IndexOf(SelMachGroup.PartVMList.FirstOrDefault(Function(x) x.nPartId = nPartId))
@@ -33,7 +33,7 @@
ToolTip="{Binding ChooseMachine_ToolTip}"
Command="{Binding ChooseMachine_Command}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/CALCPanel/ChooseMachine.png"
<Image Source="{StaticResource ChooseMachine_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Grid Grid.Column="3"
@@ -28,6 +28,7 @@ Public Class MachinePanelVM
' imposto macchina in DbGeometrico
If Not IsNothing(value) AndAlso EgtSetCurrMachine(value.Name) Then
m_SelectedMachine = value
ProjectManagerVM.CurrProd.SetMachine(SelectedMachine.Name)
' crea l'elenco dei parametri della macchina corrente
SelectedMachine.CreateMachParams()
' aggiorno lista strategie
@@ -269,7 +270,7 @@ Public Class MachinePanelVM
' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa)
If Not EgtTdbReload() Then
EgtOutLog("Impossible reloading tool Db")
MessageBox.Show(EgtMsg(31130), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(31130), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
@@ -291,7 +292,7 @@ Public Class MachinePanelVM
' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa)
If Not EgtMdbReload() Then
EgtOutLog("Impossible reloading machining Db")
MessageBox.Show(EgtMsg(31408), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(31408), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
Dim MachDbWindowVM As New EgtWPFLib5.MachiningDbWindowVM(CurrentMachine.sMachIniFile, Map.refSceneHostVM.MainScene.GetCtx(), "Stone")
@@ -311,7 +312,7 @@ Public Class MachinePanelVM
' verifico che il file di configurazione attrezzaggio (lua) della macchina esista
If Not File.Exists(CurrentMachine.sMachDir & "\Scripts\" & SETUP_LUA) Then
EgtOutLog("SetUp error: SetUp configuration file doesn't exist ")
MessageBox.Show(EgtMsg(6477), EgtMsg(6471), MessageBoxButton.OK, MessageBoxImage.Error)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(6477), EgtMsg(6471), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
' carico Lua che contiene le funzioni per ottenere le posizioni valide dell'utensile selezionato,
@@ -330,7 +331,7 @@ Public Class MachinePanelVM
EgtLuaGetGlobIntVar("STU.ERR", nErr)
If nErr = 0 Then
If EgtGetHeadExitCount(sHead) = 0 Then
MessageBox.Show(EgtMsg(6478), EgtMsg(6471), MessageBoxButton.OK, MessageBoxImage.Error)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(6478), EgtMsg(6471), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
End If
@@ -130,7 +130,7 @@ Public Class MacroFeatureWndVM
WriteMacro(sFeatureName)
RaiseEvent m_CloseWindow(True)
Else
MessageBox.Show(EgtMsg(61870), EgtMsg(30007))
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61870), EgtMsg(30007))
End If
End Sub
@@ -36,7 +36,7 @@
Command="{Binding SendFeedbackCommand}"
ToolTip="{Binding SendFeedbackToolTip}"
Style="{StaticResource SendFeedback_Button}">
<Image Source="/Resources/MainMenu/Send.png"
<Image Source="{StaticResource Send_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
+20 -15
View File
@@ -12,6 +12,11 @@ Public Class MainMenuVM
#Region "FIELDS & PROPERTIES"
Private CONFIGURATION_IMAGE As String = "pack://application:,,,/Resources/NewPage/configuration.png"
Private ISCONFIGURATION_IMAGE As String = "pack://application:,,,/Resources/NewPage/configurationIsChecked.png"
Private PADLOCK_IMAGE As String = "pack://application:,,,/Resources/NewPage/padlock.png"
Private UNPADLOCK_IMAGE As String = "pack://application:,,,/Resources/NewPage/padlock.png"
Public Enum UserLevel As Integer
USER = 1
ADVANCED = 5
@@ -36,7 +41,7 @@ Public Class MainMenuVM
Set(value As Boolean)
If value Then
SelPage = Pages.OPTIMIZERPAGE
SetConfigurationImagePath("pack://application:,,,/Resources/NewPage/configuration.png")
SetConfigurationImagePath(CONFIGURATION_IMAGE)
End If
End Set
End Property
@@ -48,7 +53,7 @@ Public Class MainMenuVM
Set(value As Boolean)
If value Then
SelPage = Pages.SUPERVISOR
SetConfigurationImagePath("pack://application:,,,/Resources/NewPage/configuration.png")
SetConfigurationImagePath(CONFIGURATION_IMAGE)
End If
End Set
End Property
@@ -60,7 +65,7 @@ Public Class MainMenuVM
Set(value As Boolean)
If value Then
SelPage = Pages.CONFIG
SetConfigurationImagePath("pack://application:,,,/Resources/NewPage/configuration.png")
SetConfigurationImagePath(CONFIGURATION_IMAGE)
End If
End Set
End Property
@@ -72,9 +77,9 @@ Public Class MainMenuVM
Set(value As Boolean)
If value Then
SelPage = Pages.CONFIGPROGRAM
SetConfigurationImagePath("pack://application:,,,/Resources/NewPage/configurationIsChecked.png")
SetConfigurationImagePath(ISCONFIGURATION_IMAGE)
Else
SetConfigurationImagePath("pack://application:,,,/Resources/NewPage/configuration.png")
SetConfigurationImagePath(CONFIGURATION_IMAGE)
End If
End Set
End Property
@@ -124,7 +129,7 @@ Public Class MainMenuVM
NotifyPropertyChanged(NameOf(ConfigProgram_IsChecked))
End Sub
Private m_sConfigurationImagePath As String = "pack://application:,,,/Resources/NewPage/configuration.png"
Private m_sConfigurationImagePath As String = CONFIGURATION_IMAGE
Public ReadOnly Property sConfigurationImagePath As String
Get
Return m_sConfigurationImagePath
@@ -182,7 +187,7 @@ Public Class MainMenuVM
NotifyPropertyChanged(NameOf(AdminFontWeight))
End Sub
Private m_UnloackImage As String = "pack://application:,,,/Resources/NewPage/padlock.png"
Private m_UnloackImage As String = PADLOCK_IMAGE
Public ReadOnly Property UnloackImage As String
Get
Return m_UnloackImage
@@ -202,12 +207,12 @@ Public Class MainMenuVM
m_bUnlockAllIsChecked = value
If m_bUnlockAllIsChecked Then
If UnLockParameter() Then
SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock-unlock.png")
SetUnloackImage(UNPADLOCK_IMAGE)
Else
Return
End If
Else
SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock.png")
SetUnloackImage(PADLOCK_IMAGE)
End If
If Not IsNothing(Map.refForcedStrategyPanelVM.SelStrategy) Then
If m_bUnlockAllIsChecked Then
@@ -411,7 +416,7 @@ Public Class MainMenuVM
Case Else
If Not m_bUserAdmin_IsChecked Then
UserLevelVisibility(ParamItem, If(ParamItem.sMinUserLevel = UserLevel.USER, Visibility.Visible, Visibility.Collapsed))
SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock.png")
SetUnloackImage(PADLOCK_IMAGE)
End If
End Select
Next
@@ -425,7 +430,7 @@ Public Class MainMenuVM
Case Else
If Not m_bUserAdmin_IsChecked Then
UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, Visibility.Visible, Visibility.Collapsed))
SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock.png")
SetUnloackImage(PADLOCK_IMAGE)
End If
End Select
Next
@@ -439,7 +444,7 @@ Public Class MainMenuVM
If InputPwdWnd.ShowDialog() Then
If GetMainPrivateProfileString(S_STRATEGY, K_PARAMPASSWORD, "", sPwdIni) <> 0 Then
If sPwdIni <> InputPwdWndVM.sPassword Then
MessageBox.Show("Password Errata", EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Error)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(63040), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Error)
Return False
End If
End If
@@ -549,7 +554,7 @@ Public Class MainMenuVM
Public Sub SendFeedback(ByVal param As Object)
If SelPage = Pages.OPTIMIZERPAGE AndAlso IsNothing(ProjectManagerVM.CurrProd) Then
MessageBox.Show(EgtMsg(61891), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61891), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
' Recupero indirizzo a cui spedire la mail
@@ -557,7 +562,7 @@ Public Class MainMenuVM
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(30510), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(30510), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
' Recupero numero chiave
@@ -661,7 +666,7 @@ Public Class MainMenuVM
bEx = True
End Try
If bEx OrElse EgtWPFLib5.MapiMailMessage.m_ErrorCode <> 0 Then
MessageBox.Show(String.Format(EgtMsg(30512), sSupportAddress, sZipToCreate), EgtMsg(15003), MessageBoxButton.OK, MessageBoxImage.Information)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(30512), sSupportAddress, sZipToCreate), EgtMsg(15003), MessageBoxButton.OK, MessageBoxImage.Information)
Else
Map.refMyStatusBarVM.SetOutputMessage(EgtMsg(30514))
End If
@@ -184,6 +184,13 @@ Public Class MainWindowM
End Get
End Property
Private m_sDefaultConfig As String = String.Empty
Public ReadOnly Property sDefaultConfig As String
Get
Return m_sDefaultConfig
End Get
End Property
#End Region ' FIELDS
#Region "CONSTRUCTOR"
@@ -213,7 +220,7 @@ Public Class MainWindowM
' Impostazione path BTL Ini File
BTLIniFile.m_sBTLIniFile = m_sConfigDir & "\" & BTLFEATURES_FILE_NAME
' Impostazione path Ini file DataGrid
DataGridColumnsIniFile.m_sDataGridColumnsIniFile = m_sConfigDir & "\" & OPTIMIZERDATAGRIDCOLUMNS_FILE_NAME
DataGridColumnsIniFile.m_sDataGridColumnsIniFile = m_sConfigDir & "\" & DATAGRIDCOLUMNS_FILE_NAME
' Impostazione path Ini file Dimensioni
DimensionsIniFile.m_sDimensionsIniFile = m_sConfigDir & "\" & ConstDims.DIMENSIONS_FILE_NAME
' Impostazione path resources dir
@@ -492,6 +499,20 @@ Public Class MainWindowM
Return GetStrategiesDirPath(StrategyType) & "\" & STANDARD_DIR
End Function
''' <summary>
''' Funzione che crea il file ini di configurazione delle strategie
''' </summary>
''' <param name="StrategyType"></param>
Friend Sub GetDefaultConfigDirPath(StrategyType As BWType, bProdPage As Boolean)
' Percorso SetUpDir
Dim sAISetUpDir As String = GetAISetupDirPath(StrategyType, bProdPage)
' Creo File ini di configurazione di default delle strategie
m_sDefaultConfig = sAISetUpDir & "\" & CONFIG_FILE_NAME
If Not File.Exists(m_sDefaultConfig) Then
File.Create(m_sDefaultConfig)
End If
End Sub
#End Region ' METHODS
End Class
@@ -39,7 +39,7 @@ Public Class MainWindowV
Private Sub MainWindowV_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs)
If Map.refCALCPanelVM.bCalculating Then
MessageBox.Show(Application.Current.MainWindow, "Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(63041), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
e.Cancel = True
Return
End If
@@ -239,7 +239,7 @@ Public Class MainWindowVM
End If
Dim TimeFromLastBackup As TimeSpan = DateTime.Now - LastBackupDate
If TimeFromLastBackup > TimeSpan.FromDays(Map.refConfigurationPageVM.SelReminder.Id) Then
If MessageBox.Show(Application.Current.MainWindow, String.Format(EgtMsg(61987), Map.refConfigurationPageVM.SelReminder.Name), EgtMsg(15002), MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.Yes Then
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(61987), Map.refConfigurationPageVM.SelReminder.Name), EgtMsg(15002), MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.Yes Then
Map.refConfigurationPageVM.Backup(True)
End If
End If
@@ -369,16 +369,16 @@ Public Class MainWindowVM
End If
' verifico se sono in modifica percorso libero
If Map.refFreeContourManagerVM.bIsActive Then
MessageBox.Show(EgtMsg(61994))
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61994))
Return
End If
' verifico se sto facendo backup
If Map.refConfigurationPageVM.bBackupRunning Then
MessageBox.Show(Application.Current.MainWindow, EgtMsg(62101), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning) 'Backup running! Impossible closing the software until finish the backup process!
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62101), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning) 'Backup running! Impossible closing the software until finish the backup process!
Return
End If
If Map.refConfigurationPageVM.bRestoreRunning Then
MessageBox.Show(Application.Current.MainWindow, EgtMsg(62102), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning) 'Restore running! Impossible closing the software until finish the restore process!
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62102), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning) 'Restore running! Impossible closing the software until finish the restore process!
Return
End If
' Gestisco eventuale file corrente modificato
@@ -421,7 +421,7 @@ Public Class MainWindowVM
{S_PARTINRAWPARTLIST_BEAM, Map.refRawPartListVM.PartInRawPartColumns},
{S_FEATUREINPARTINRAWPARTLIST, Map.refFeatureInPartInRawPartListVM.FeatureInPartInRawPartColumns},
{S_PARAMETERLIST_P, Map.refPParameterListVM.PParameterListColumns}}
EgwWPFBaseLib.EgwDataGrid.WriteColumnLayout(Path.ChangeExtension(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, ".json"), DataGridColumnDictionary)
EgwWPFBaseLib.EgwDataGrid.WriteColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, DataGridColumnDictionary)
' Termino il Model
m_MainWindowM.Close()
' Termino il programma
@@ -33,14 +33,14 @@
<RadioButton Grid.Row="1"
IsChecked="{Binding LeftIsChecked}"
Style="{StaticResource ToolBar_ToggleButton}">
<Image Source="/Resources/MovePartInRawPart/MoveLeftParts.png"
<Image Source="{StaticResource MoveLeftParts_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</RadioButton>
<RadioButton Grid.Row="1"
Grid.Column="1"
IsChecked="{Binding RightIsChecked}"
Style="{StaticResource ToolBar_ToggleButton}">
<Image Source="/Resources/MovePartInRawPart/MoveRightParts.png"
<Image Source="{StaticResource MoveRightParts_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</RadioButton>
</Grid>
@@ -145,10 +145,10 @@ Public Class MovePartInRawPartWndVM
End If
RaiseEvent m_CloseWindow(True)
Else
MessageBox.Show(EgtMsg(61947), EgtMsg(30007))
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61947), EgtMsg(30007))
End If
Else
MessageBox.Show(EgtMsg(61948), EgtMsg(30007))
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61948), EgtMsg(30007))
End If
End Sub
@@ -71,7 +71,7 @@ Public Class MultiCopyRawPartWndVM
If Not IsNothing(m_nQuantity) AndAlso m_nQuantity > 0 AndAlso m_nQuantity < 99 Then
RaiseEvent m_CloseWindow(True)
Else
MessageBox.Show(EgtMsg(61887), EgtMsg(30007))
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61887), EgtMsg(30007))
End If
End Sub
@@ -67,5 +67,5 @@ Imports System.Windows
' Revision
'
<Assembly: AssemblyVersion("3.1.1.1")>
<Assembly: AssemblyFileVersion("3.1.1.1")>
<Assembly: AssemblyVersion("3.1.2.6")>
<Assembly: AssemblyFileVersion("3.1.2.6")>
@@ -612,10 +612,10 @@ Public Class NestingRunningWndVM
If File.Exists(sLogPath) Then
Dim LogFile As String() = File.ReadAllLines(sLogPath)
If LogFile.Count >= 2 AndAlso Not IsNothing(LogFile(1)) Then
MessageBox.Show(LogFile(1), EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, LogFile(1), EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error)
End If
Else
MessageBox.Show("Impossible creating rawpart", EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61973), EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error)
End If
' se nessun grezzo, rimetto tutti i pezzi invisibili
If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count = 0 Then
@@ -746,7 +746,7 @@ Public Class NestingRunningWndVM
Friend Sub Cancel()
' chiedo conferma
If MessageBox.Show("Are you sure you want to stop the nesting?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.No Then Return
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62560), EgtMsg(15002), MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.No Then Return
' fermo il nesting
Map.refOptimizePanelVM.m_StopNesting = True
End Sub
@@ -144,7 +144,7 @@ Public Class NewOpenProjectFileDialogVM
Dim ProjListIndex As Integer = m_ProjectList.IndexOf(SelProject)
' verifico se proj selezionato e' il corrente
If Not IsNothing(ProjectManagerVM.CurrProj) AndAlso SelProject.ProjFileList.Any(Function(x) x.nProjId = ProjectManagerVM.CurrProj.nProjId) Then
Dim m_MessageBoxResult As MessageBoxResult = MessageBox.Show(Application.Current.MainWindow, EgtMsg(61872), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Warning)
Dim m_MessageBoxResult As MessageBoxResult = EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61872), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Warning)
If m_ProjectType = ProjectType.PROJ AndAlso m_MessageBoxResult = MessageBoxResult.Cancel Then
Return
Else
@@ -153,7 +153,7 @@ Public Class NewOpenProjectFileDialogVM
End If
' verifico se prod selezionato e' il corrente
If Not IsNothing(ProjectManagerVM.CurrProd) AndAlso SelProject.ProdFileVM.nProdId = ProjectManagerVM.CurrProd.nProdId Then
Dim m_MessageBoxResult As MessageBoxResult = MessageBox.Show(Application.Current.MainWindow, EgtMsg(61872), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Warning)
Dim m_MessageBoxResult As MessageBoxResult = EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61872), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Warning)
If m_ProjectType = ProjectType.PROD AndAlso m_MessageBoxResult = MessageBoxResult.Cancel Then
Return
Else
@@ -208,6 +208,10 @@ Public Class NewOpenProjectFileDialogVM
Next
End If
End If
' Abilito pulsante assemblato
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = True
' Salvo modifiche a colonne
EgwWPFBaseLib.EgwDataGrid.WriteColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_NEWOPENPROJFILEDLG_PROD, ProdColumns)
CloseWindow(False)
End Sub
@@ -12,8 +12,6 @@ Public Class OpenProjectFileDialogVM
Public Overrides Function Init(ProjectType As ProjectType, Optional CurrProjectList As List(Of ProjectFileVM) = Nothing, Optional GoToProd As Boolean = False) As Boolean?
m_ProjectType = ProjectType
m_GoToProd = GoToProd
' carico colonne
LoadColumns(ProjectType)
NotifyPropertyChanged(NameOf(FilterTypeList))
m_SelFilterType = m_FilterTypeList(0)
' carico lista progetti
@@ -119,12 +117,12 @@ Public Class OpenProjectFileDialogVM
If m_ProjectType = ProjectType.PROD Then
' verifico se prod selezionato e' il corrente
If Not IsNothing(ProjectManagerVM.CurrProd) AndAlso SelProject.nProdId = ProjectManagerVM.CurrProd.nProdId Then
MessageBox.Show(EgtMsg(61872), EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Warning)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61872), EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Warning)
Return
End If
' verifico se ci sono grezzi mandati al supervisore
If DbControllers.m_ProdController.IsAnyInSupervisor(SelProject.nProdId) Then
MessageBox.Show(EgtMsg(61874), EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Warning)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61874), EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Warning)
Return
End If
Map.refProdManagerVM.m_MruFiles.Remove(SelProject.sProdPath)
@@ -11,7 +11,7 @@
<Button ToolTip="{Binding Warehouse_ToolTip}"
Command="{Binding Warehouse_Command}"
Style="{StaticResource Warehouse_Button}">
<Image Source="/Resources/OptimizePanel/Warehouse.png"
<Image Source="{StaticResource Warehouse_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
@@ -425,7 +425,7 @@ Public Class OptimizePanelVM
Next
Next
If Not String.IsNullOrWhiteSpace(sResult) Then
MessageBox.Show(Application.Current.MainWindow, sResult, "", MessageBoxButton.OK, MessageBoxImage.Warning)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, sResult, "", MessageBoxButton.OK, MessageBoxImage.Warning)
End If
End Sub
@@ -83,13 +83,13 @@
Command="{Binding Parameter_Command}"
ToolTip="{Binding Parameters_ToolTip}"
Style="{StaticResource Parameter_Button}">
<Image Source="/Resources/InstrumentPanel/Analyze.png"
<Image Source="{StaticResource Analyze_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Image Grid.RowSpan="3"
Grid.Column="1"
Source="/Resources/NewPage/pezzo.png"
Source="{StaticResource Part_Image}"
Style="{StaticResource Piece_Image}"/>
<UniformGrid Grid.Row="2"
@@ -98,14 +98,14 @@
<Button Command="{Binding Ok_Command}"
ToolTip="{Binding SaveAsToolTip}"
Style="{StaticResource Back_Button}">
<Image Source="/Resources/NewPage/Ok.png"
<Image Source="{StaticResource Ok_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding Back_Command}"
ToolTip="{Binding Back_Msg}"
Style="{StaticResource Back_Button}">
<Image Source="/Resources/PDFEditor/Delete.png"
<Image Source="{StaticResource Delete_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</UniformGrid>
+1 -1
View File
@@ -31,7 +31,7 @@
Command="{Binding Optimizer_Command}"
ToolTip="{Binding Statistics_Msg}"
Style="{StaticResource Optmizer_Button}">
<Image Source="/Resources/InstrumentPanel/Statistics.png"
<Image Source="{StaticResource Statistics_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</Grid>
@@ -0,0 +1,16 @@
<Popup x:Class="BTLPartListPopUpV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
Style="{StaticResource BTLPartList_PopUp}">
<Popup.Resources>
<OPTIMIZER:DataGridCellBorderThicknessConverter x:Key="DataGridCellBorderThicknessConverter"/>
</Popup.Resources>
<Popup.VerticalOffset>
<MultiBinding Converter="{StaticResource DataGridCellBorderThicknessConverter}">
<Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}"/>
<Binding Path="ActualWidth" ElementName="SettingsBtn"/>
</MultiBinding>
</Popup.VerticalOffset>
<OPTIMIZER:BTLPartManagerV/>
</Popup>
@@ -0,0 +1,3 @@
Public Class BTLPartListPopUpV
End Class
@@ -0,0 +1,49 @@
<Popup x:Class="RawPartListPopUpV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
Style="{StaticResource Filter_PopUp}">
<Border Style="{StaticResource BTLPartManager_Border}">
<StackPanel Style="{StaticResource BTLPartManager_StackPanel}">
<!--COPY - Copia-->
<Button Command="{Binding CopyRawPart_Command}"
ToolTip="{Binding CopyRawPart_ToolTip}"
Click="ClosePopUp_Click"
Style="{StaticResource LP_Button}">
<Image Source="{StaticResource CopyRawPart_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<!--DELETE - Elimina-->
<Button Command="{Binding RemoveRawPart_Command}"
ToolTip="{Binding RemoveRawPart_ToolTip}"
Click="ClosePopUp_Click"
Style="{StaticResource LP_Button}">
<Image Source="{StaticResource Remove_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<!--CAM - CAM-->
<Button ToolTip="{Binding Simulate_ToolTip}"
Command="{Binding Simulate_Command}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="{StaticResource Simulate_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<!--REORDER - Riordina-->
<Button Command="{Binding ReOrderPart_Command}"
ToolTip="{Binding ReOrderPart_ToolTip}"
Click="ClosePopUp_Click"
Style="{StaticResource LP_Button}">
<Image Source="{StaticResource ReOrderPart_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<!--RESET - Reset-->
<Button Command="{Binding ResetCalc_Command}"
ToolTip="{Binding ResetCalc_ToolTip}"
Click="ClosePopUp_Click"
Style="{StaticResource LP_Button}">
<Image Source="{StaticResource ResetCalc_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</StackPanel>
</Border>
</Popup>
@@ -0,0 +1,14 @@
Public Class RawPartListPopUpV
Private Sub ClosePopUp_Click(sender As Object, e As RoutedEventArgs)
Dim Button As Button = DirectCast(sender, Button)
Dim StackPanel As StackPanel = DirectCast(Button.Parent, StackPanel)
Dim Border As Border = DirectCast(StackPanel.Parent, Border)
Dim Popup As Primitives.Popup = DirectCast(Border.Parent, Primitives.Popup)
If Not IsNothing(Popup) Then
Popup.IsOpen = False
End If
End Sub
End Class
@@ -8,7 +8,7 @@
<Button Command="{Binding ImportBTL_Command}"
ToolTip="{Binding ImportBTL_ToolTip}"
Style="{StaticResource BTLProd_Button}">
<Image Source="/Resources/NewPage/fileimport.png"
<Image Source="{StaticResource FileImport_Image}"
Style="{StaticResource BTL_Image}"/>
</Button>
<Button Name="ImportBtn"
@@ -29,14 +29,14 @@
<Button Command="{Binding New_Command}"
ToolTip="{Binding NewToolTip}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/NewPage/newdocument.png"
<Image Source="{StaticResource NewDocument_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding AddProj_Command}"
ToolTip="{Binding AddProj_ToolTip}"
Visibility="{Binding AddProj_Visibility}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/ProjectManager/AddProj.png"
<Image Source="{StaticResource AddProj_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</StackPanel>
@@ -60,7 +60,7 @@
</ContextMenu.Resources>
</ContextMenu>
</Button.ContextMenu>
<Image Source="/Resources/NewPage/openfolder.png"
<Image Source="{StaticResource OpenFolder_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Name="OpenBtn"
@@ -80,7 +80,7 @@
<Button Command="{Binding ImportProject_Command}"
ToolTip="{Binding ImportProject_ToolTip}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/NewPage/import.png"
<Image Source="{StaticResource Import_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</Border>
@@ -90,7 +90,7 @@
<Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}"
Style="{StaticResource PrManagerNew_Button}">
<Image Source="/Resources/NewPage/diskette.png"
<Image Source="{StaticResource Diskette_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Name="SaveBtn"
@@ -110,7 +110,7 @@
<Button Command="{Binding ExportProject_Command}"
ToolTip="{Binding ExportProject_ToolTip}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/NewPage/export.png"
<Image Source="{StaticResource Export_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</Border>
@@ -12,6 +12,9 @@ Public Class ProdManagerVM
#Region "FIELDS & PROPERTIES"
Private DOWN_IMAGE As String = "pack://application:,,,/Resources/NewPage/down.png"
Private UP_IMAGE As String = "pack://application:,,,/Resources/NewPage/up.png"
' Nome file NGE con i pezzi selezionati per effettuare UpdateBTL
Friend Const UPDATEBTL_NGE As String = "UpdateBTL.nge"
@@ -168,7 +171,7 @@ Public Class ProdManagerVM
End Set
End Property
Private m_BtlImage As String = "pack://application:,,,/Resources/NewPage/down.png"
Private m_BtlImage As String = DOWN_IMAGE
Public ReadOnly Property BtlImage As String
Get
Return m_BtlImage
@@ -179,7 +182,7 @@ Public Class ProdManagerVM
NotifyPropertyChanged(NameOf(BtlImage))
End Sub
Private m_OpenImage As String = "pack://application:,,,/Resources/NewPage/down.png"
Private m_OpenImage As String = DOWN_IMAGE
Public ReadOnly Property OpenImage As String
Get
Return m_OpenImage
@@ -190,7 +193,7 @@ Public Class ProdManagerVM
NotifyPropertyChanged(NameOf(OpenImage))
End Sub
Private m_SaveImage As String = "pack://application:,,,/Resources/NewPage/down.png"
Private m_SaveImage As String = DOWN_IMAGE
Public ReadOnly Property SaveImage As String
Get
Return m_SaveImage
@@ -434,7 +437,7 @@ Public Class ProdManagerVM
Else
NewProject()
End If
MessageBox.Show(Application.Current.MainWindow, "Error! Failed loading MachGroups!", EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error opening file
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62581), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error opening file
EgtOutLog("Errore! Caricamento dei gruppi di lavorazione fallito!")
Return False
End If
@@ -447,6 +450,10 @@ Public Class ProdManagerVM
Part.CalcBTLPartVolume()
Next
Core.ViewPanelVM.UpdateBWType(nType)
' imposto macchina del progetto
Map.refMachinePanelVM.SelectedMachine = Map.refMachinePanelVM.MachineList.FirstOrDefault(Function(x) String.Equals(x.Name, ProjectManagerVM.CurrProd.sMachine, StringComparison.OrdinalIgnoreCase))
Map.refMachinePanelVM.SetSelMachineName(Map.refMachinePanelVM.SelectedMachine.Name)
Map.refMachinePanelVM.SetStrategyManagerIsChecked(True)
' aggiorno le colonne in base al tipo progetto
Map.refRawPartListVM.UpdateColumns(nType)
Map.refFeatureInPartInRawPartListVM.UpdateColumns(nType)
@@ -492,16 +499,21 @@ Public Class ProdManagerVM
GetMainPrivateProfileString(S_GENERAL, K_LASTIMPDIR, "", sDir)
' apro finestra scelta file
Dim sImportFilePath As String = ""
Dim BTLDlg As New Microsoft.Win32.OpenFileDialog() With {
.DefaultExt = ".btl",
.Filter = "BTL (*.btl)|*.btl" &
"|BTLX (*.btlx)|*.btlx",
.InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
.CheckFileExists = True,
.ValidateNames = True}
Dim BTLDlg As New EgtBEAMWALL.Core.EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
.Title = EgtMsg(61840),
.Filter = "BTL (*.btl)|*.btl" &
"|BTLX (*.btlx)|*.btlx",
.FilterIndex = 1,
.InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
.CheckFileExists = True,
.ValidateNames = True,
.Mode = 1}
If BTLDlg.ShowDialog() Then
sImportFilePath = BTLDlg.FileName
Else
' Abilito pulsante assemblato
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = True
Return False
End If
Dim sProjDir As String = ""
@@ -513,7 +525,7 @@ Public Class ProdManagerVM
Dim ToDeleteProj As ProjFileM = DbControllers.m_ProjController.FindByProjIdConv(nAlreadyImported)
' se esiste gia' un'ottimizzazione
If ToDeleteProj.nProdId > 0 Then
Select Case MessageBox.Show(EgtMsg(61942), "Information", MessageBoxButton.YesNo, MessageBoxImage.Information) ' BTL file already imported and optimized. Do you want to import it again?
Select Case EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61942), EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Information) ' BTL file already imported and optimized. Do you want to import it again?
Case MessageBoxResult.Yes
' lo importo, quindi non devo fare nulla
Case MessageBoxResult.No
@@ -582,7 +594,7 @@ Public Class ProdManagerVM
' verifico tipo di file e recupero flag di importazione
Dim nFileType As Integer = EgtGetFileType(sBtlCopyPath)
If nFileType <> FT.BTL AndAlso nFileType <> FT.BTLX Then
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10005), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' File type unknown - Error
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(10005), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' File type unknown - Error
EgtOutLog("Errore! Estensione progetto sconosciuta!")
Return False
End If
@@ -629,7 +641,7 @@ Public Class ProdManagerVM
End If
End Select
If EgtGetFirstPart() = GDB_ID.NULL Then
MessageBox.Show("Imported file is Empty!", "Warning!", MessageBoxButton.OK, MessageBoxImage.Warning)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62582), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
Return False
End If
@@ -680,9 +692,9 @@ Public Class ProdManagerVM
GeneralParametersWndVM.SetbSaveGeneralParameters(True)
GeneralParametersWndVM.SaveProjectParameters()
m_BTLDataWnd = New BTLDataWndVM()
m_BTLDataWnd = New BTLDataWndVM(nType)
m_BTLDataWnd.Read(nProjId, nType)
m_BTLDataWnd.SaveInfoBTL()
m_BTLDataWnd.SaveInfoBTL(nType)
' Controllo se effettuare import + verifica
If Map.refConfigurationPageVM.bVerifyImportBTL_IsChecked Then
@@ -694,13 +706,13 @@ Public Class ProdManagerVM
LoadingWndHelper.UpdateLoadingWnd(ActiveIds.IMPORTBTL, 2, EgtMsg(63005), 50, 70) ' Loading parts
' leggo struttura BTL per liste
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(0))
CopyBuilding()
' aggiorno Db
Dim ExportDate As DateTime
Dim sBTLFileName As String = Path.GetFileNameWithoutExtension(sImportFilePath)
DateTime.TryParse(Map.refProjectVM.BTLStructureVM.BTLStructureM.m_sEXPDATE & " " &
Map.refProjectVM.BTLStructureVM.BTLStructureM.m_sEXPTIME, ExportDate)
DbControllers.m_ProjController.UpdateInfo(nProjId, sBTLFileName, sBTLFileName, Map.refProjectVM.BTLStructureVM.sLISTNAME, ExportDate, nType, Machine.Name)
CopyBuilding()
' se progetto pareti e vista ruotata
If nType = BWType.WALL AndAlso (CurrentMachine.ViewDir = VT.ISO_NW OrElse CurrentMachine.ViewDir = VT.ISO_NE) Then
' ruoto le pareti di 180 per raddrizzarle rispetto alla vista
@@ -738,7 +750,7 @@ Public Class ProdManagerVM
' verifico tipo di file e recupero flag di importazione
Dim nFileType As Integer = EgtGetFileType(sBtlCopyPath)
If nFileType <> FT.BTL AndAlso nFileType <> FT.BTLX Then
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10005), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' File type unknown - Error
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(10005), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' File type unknown - Error
EgtOutLog("Errore! Estensione progetto sconosciuta!")
Return False
End If
@@ -784,7 +796,7 @@ Public Class ProdManagerVM
End Select
' verifico che abbia importato qualcosa
If EgtGetGroupObjs(GDB_ID.ROOT) <= nGroupQty Then
MessageBox.Show("Imported file is Empty!", "Warning!", MessageBoxButton.OK, MessageBoxImage.Warning)
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62582), EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
Return False
End If
'LoadingWndHelper.UpdateLoadingWnd(ActiveIds.IMPORTBTL, 2, EgtMsg(63005), 50, 70) ' Loading parts
@@ -831,9 +843,9 @@ Public Class ProdManagerVM
GeneralParametersWndVM.SetbSaveGeneralParameters(True)
GeneralParametersWndVM.SaveProjectParameters()
m_BTLDataWnd = New BTLDataWndVM()
m_BTLDataWnd = New BTLDataWndVM(nType)
m_BTLDataWnd.Read(nProjId, nType)
m_BTLDataWnd.SaveInfoBTL()
m_BTLDataWnd.SaveInfoBTL(nType)
' Controllo se effettuare import + verifica
If Map.refConfigurationPageVM.bVerifyImportBTL_IsChecked Then
@@ -982,6 +994,10 @@ Public Class ProdManagerVM
GeneralParametersWndVM.SetbSaveGeneralParameters(True)
GeneralParametersWndVM.SaveProjectParameters()
m_BTLDataWnd = New BTLDataWndVM(nType)
m_BTLDataWnd.Read(nProjId, nType)
m_BTLDataWnd.SaveInfoBTL(nType)
' leggo struttura BTL per liste
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(0))
CopyBuilding()
@@ -1037,7 +1053,7 @@ Public Class ProdManagerVM
End If
LoadingWndHelper.OpenLoadingWnd(ActiveIds.OPENPROD, 3, EgtMsg(63004), EgtMsg(63001), 50) ' Optimization opening ' Loading project geometries
If Not File.Exists(sFilePath) Then
MessageBox.Show(EgtMsg(61871))
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61871))
EgtOutLog("Errore! File da aprire non trovato!")
Return False
End If
@@ -1046,7 +1062,7 @@ Public Class ProdManagerVM
If IsNothing(OpenProjectMachine) Then
' rimuovo il file in apertura dalla lista degli MRU
m_MruFiles.Remove(sFilePath)
MessageBox.Show(EgtMsg(61885), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61885), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error
EgtOutLog("Errore! Macchina del progetto da aprire non trovata!")
Return False
End If
@@ -1058,7 +1074,7 @@ Public Class ProdManagerVM
Else
NewProject()
End If
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10003) & " '" & sFilePath & "'", EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error opening file
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(10003) & " '" & sFilePath & "'", EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error opening file
EgtOutLog("Errore! Caricamento del progetto fallito!")
Return False
End If
@@ -1070,9 +1086,11 @@ Public Class ProdManagerVM
' leggo struttura BTL
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(0))
CopyBuilding()
' Controllo se ci sono strategie forzate
ForcedStrategy(Map.refProjectVM.BTLStructureVM.BTLPartVMList)
If IsNothing(Map.refProjectVM.BTLStructureVM) Then
m_MruFiles.Remove(sFilePath)
If Not IsNothing(ProjectManagerVM.CurrProd) AndAlso sFilePath <> ProjectManagerVM.CurrProd.sProdPath Then
@@ -1080,7 +1098,7 @@ Public Class ProdManagerVM
Else
NewProject()
End If
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10003) & " '" & sFilePath & "'", EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error opening file
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(10003) & " '" & sFilePath & "'", EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error opening file
EgtOutLog("Errore! Caricamento dei pezzi btl fallito!")
Return False
End If
@@ -1108,7 +1126,7 @@ Public Class ProdManagerVM
Else
NewProject()
End If
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10003) & " '" & sFilePath & "'", EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error opening file
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(10003) & " '" & sFilePath & "'", EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error opening file
EgtOutLog("Errore! Caricamento dei gruppi di lavorazione fallito!")
Return False
End If
@@ -1184,7 +1202,7 @@ Public Class ProdManagerVM
If Not Map.refSceneHostVM.SaveProject() Then
m_MruFiles.Remove(CurrProd.sProdPath)
Dim sMsg As String = EgtMsg(10004) & " '" & CurrProd.sProdPath & "'" 'Error saving file
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
EgtOutLog("Salvataggio progetto non riuscito")
Return False
End If
@@ -1281,7 +1299,7 @@ Public Class ProdManagerVM
End Try
' se almeno un errore, mostro log
If bGlobalError Then
MessageBox.Show(Application.Current.MainWindow, sImportMessage, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, sImportMessage, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
End If
End If
End If
@@ -1378,6 +1396,35 @@ Public Class ProdManagerVM
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
End Sub
Private Sub ForcedStrategy(BTLPartVMList As ObservableCollection(Of BTLPartVM))
' Mostro le strategie forzate
Dim bValue As Boolean = False
Dim bValueForced As Boolean = False
For Each BTLPartParam As BTLPartVM In BTLPartVMList
For Each FeatureParam As BTLFeatureVM In BTLPartParam.BTLFeatureVMList
bValue = False
EgtGetInfo(FeatureParam.nFeatureId, ConstBeam.STRATEGY & FeatureParam.nFeatureId & "_FORCED", bValue)
If bValue Then
BTLPartParam.SetStrategyModify_Visibility(Visibility.Visible)
FeatureParam.SetbStrategy_Visibility(Visibility.Visible)
End If
For Each StrategySetupParam As StrategySetup In Map.refStrategyManagerVM.StrategySetupList
For Each StrategyFeatureParam As StrategyFeature In StrategySetupParam.StrategyFeatureList
For Each TopologyParam As Topology In StrategyFeatureParam.TopologyList
For Each StrategyParam As Strategy In TopologyParam.StrategyList
For Each Param As StrategyParameter In StrategyParam.ParameterList
bValueForced = False
EgtGetInfo(FeatureParam.nFeatureId, StrategyParam.sStrategyId & "_" & Param.sNameNge & "_FORCED", bValueForced)
If bValueForced Then FeatureParam.SetbStrategy_Visibility(Visibility.Visible)
Next
Next
Next
Next
Next
Next
Next
End Sub
#End Region ' Methods
#Region "COMMANDS"
@@ -1394,7 +1441,7 @@ Public Class ProdManagerVM
End Property
Public Sub NewProject()
SetBtlImage("pack://application:,,,/Resources/NewPage/down.png")
SetBtlImage(DOWN_IMAGE)
CreateNewProd(False)
Return
End Sub
@@ -1479,8 +1526,7 @@ Public Class ProdManagerVM
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible)
If Not CreateNewProd() Then
Dim sErrMsg As String = "Errore! Creazione del progetto fallita!"
EgtOutLog(sErrMsg)
EgtOutLog("Errore! Creazione del progetto fallita!")
End If
Return
End Sub
@@ -1499,16 +1545,24 @@ Public Class ProdManagerVM
End Property
Public Function ExportProject(Optional sExportFileName As String = Nothing) As String
SetSaveImage("pack://application:,,,/Resources/NewPage/down.png")
SetSaveImage(DOWN_IMAGE)
If ProdFileVM.VerifyProjectModification(CurrProd) = MessageBoxResult.Cancel Then Return Nothing
If IsNothing(CurrProd) Then Return Nothing
' apro finestra di salvataggio progetto
Dim ExportDlg As New Microsoft.Win32.SaveFileDialog() With {.DefaultExt = ".ngexp",
.Filter = "ProjectExport (*.ngexp)|*.ngexp",
.FileName = CurrProd.nProdId.ToString("0000") & " - " & CurrProd.sBTLFileName & " - ProjectExport"}
Dim ExportDlg As New EgtBEAMWALL.Core.EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
.Title = EgtMsg(61838),
.Filter = "ProjectExport (*.ngexp)|*.ngexp",
.FilterIndex = 1,
.FileName = CurrProd.nProdId.ToString("0000") & " - " & CurrProd.sName & " - ProjectExport.ngexp",
.Mode = 1}
If IsNothing(sExportFileName) Then
If ExportDlg.ShowDialog() <> True Then Return Nothing
If ExportDlg.ShowDialog() <> True Then
' Abilito pulsante assemblato
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = True
Return Nothing
End If
End If
LoadingWndHelper.OpenLoadingWnd(ActiveIds.EXPORTPROJECT, 2, EgtMsg(63010), EgtMsg(63016), 30) ' Project exporting ' Adding export info
@@ -1569,7 +1623,7 @@ Public Class ProdManagerVM
End Using
Catch ex1 As Exception
EgtOutLog("Exception in zip: " & ex1.ToString())
MessageBox.Show("Error in export file creation!")
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62561))
End Try
' elimino layer di esportazione
EgtErase(nImpExpPartId)
@@ -1597,19 +1651,27 @@ Public Class ProdManagerVM
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = False
Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Collapsed)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible)
SetOpenImage("pack://application:,,,/Resources/NewPage/down.png")
SetOpenImage(DOWN_IMAGE)
Dim TempCurrProd As ProjectFileVM = CurrProd
If ProdFileVM.VerifyProjectModification(TempCurrProd) Then Return
Dim sDir As String = String.Empty
GetMainPrivateProfileString(S_GENERAL, K_LASTNGEXPDIR, "", sDir)
' apro finestra scelta file
Dim ImportDlg As New Microsoft.Win32.OpenFileDialog() With {.DefaultExt = ".ngexp",
.Filter = "ProjectExport (*.ngexp)|*.ngexp",
.InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
.CheckFileExists = True,
.ValidateNames = True}
If ImportDlg.ShowDialog() <> True Then Return
Dim ImportDlg As New EgtBEAMWALL.Core.EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
.Title = EgtMsg(61839),
.Filter = "ProjectExport (*.ngexp)|*.ngexp",
.FilterIndex = 1,
.InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
.CheckFileExists = True,
.ValidateNames = True,
.Mode = 1}
If ImportDlg.ShowDialog() <> True Then
' Abilito pulsante assemblato
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = True
Return
End If
' creo cartella temporanea di estrazione in Temp
Dim sProjectimportDir As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\ProjectImport"
@@ -1621,7 +1683,7 @@ Public Class ProdManagerVM
ZipFile.ExtractToDirectory(ImportDlg.FileName, sProjectimportDir)
Catch ex1 As Exception
EgtOutLog("Exception in zip: " & ex1.ToString())
MessageBox.Show("Impossibile importare file", "Errore")
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62562), EgtMsg(15001))
Return
End Try
@@ -1632,7 +1694,7 @@ Public Class ProdManagerVM
Dim bOk = EgtOpenFile(sProjFromPath(0))
If Not bOk Then
LoadingWndHelper.CloseLoadingWnd(ActiveIds.IMPORTPROJECT)
MessageBox.Show("Impossibile aprire il file", "Errore")
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62552), EgtMsg(15001))
Return
End If
@@ -1647,7 +1709,7 @@ Public Class ProdManagerVM
EgtGetInfo(nImpExpPartId, BTL_GEN_PROJTYPE, nType)
If IsNothing(Machine) OrElse nType = BWType.NULL Then
LoadingWndHelper.CloseLoadingWnd(ActiveIds.IMPORTPROJECT)
MessageBox.Show(EgtMsg(61885), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61885), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error
Return
End If
@@ -1677,7 +1739,7 @@ Public Class ProdManagerVM
End If
nBTLInfoLayerId = EgtGetNextName(nBTLInfoLayerId, BTLINFO)
End While
If Not ImportProjIdList.Count > 0 Then MessageBox.Show("Nessun progetto trovato all'interno del file importato", "Errore")
If Not ImportProjIdList.Count > 0 Then EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62563), EgtMsg(15001))
' carico i proj
For nProjIndex = 0 To ImportProjIdList.Count - 1
@@ -1781,8 +1843,6 @@ Public Class ProdManagerVM
End If
If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 AndAlso GetMainPrivateProfileInt(S_MACH, K_EXPORTBWE, 0) = 1 Then
Map.refMyStatusBarVM.SetLoadingProgress(0)
Map.refMyStatusBarVM.SetOutputMessage("")
' lancio verifica perche' importato
Map.refCALCPanelVM.VerifyAll(ProjectType.PROJ)
End If
@@ -1857,9 +1917,9 @@ Public Class ProdManagerVM
End Property
Public Sub AddProj()
SetBtlImage("pack://application:,,,/Resources/NewPage/down.png")
SetBtlImage(DOWN_IMAGE)
If Not CreateNewProj(CurrProd, 0) Then
MessageBox.Show("Errore! Aggiunta file fallita!")
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62583))
End If
Return
End Sub
@@ -1884,16 +1944,21 @@ Public Class ProdManagerVM
Dim sDir As String = String.Empty
GetMainPrivateProfileString(S_GENERAL, K_LASTIMPDIR, "", sDir)
Dim sFile As String = ""
Dim BTLDlg As New Microsoft.Win32.OpenFileDialog() With {
.DefaultExt = ".btl",
.Filter = "BTL (*.btl)|*.btl" &
"|BTLX (*.btlx)|*.btlx",
.InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
.CheckFileExists = True,
.ValidateNames = True}
Dim BTLDlg As New EgtBEAMWALL.Core.EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
.Title = EgtMsg(63038),
.Filter = "BTL (*.btl)|*.btl" &
"|BTLX (*.btlx)|*.btlx",
.FilterIndex = 1,
.InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
.CheckFileExists = True,
.ValidateNames = True,
.Mode = 1}
If BTLDlg.ShowDialog() Then
sFile = BTLDlg.FileName
Else
' Abilito pulsante assemblato
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = True
Return
End If
Dim nNewProjId As Integer = 0
@@ -1902,7 +1967,7 @@ Public Class ProdManagerVM
Dim sBTLFileName As String = Path.GetFileNameWithoutExtension(sFile)
Dim nAlreadyImported As Integer = DbControllers.m_ProjController.AlreadyImported(sBTLFileName)
If nAlreadyImported > 0 Then
Select Case MessageBox.Show(EgtMsg(61942), "Information", MessageBoxButton.YesNo, MessageBoxImage.Information) ' BTL file already imported and optimized. Do you want to import it again?
Select Case EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61942), EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Information) ' BTL file already imported and optimized. Do you want to import it again?
Case MessageBoxResult.Yes
' lo importo, quindi non devo fare nulla
Case MessageBoxResult.No
@@ -2009,12 +2074,12 @@ Public Class ProdManagerVM
Public Sub ShowPopUpStartBtn(ByVal param As Object)
If m_IsStartBtnOpen Then
SetBtlImage("pack://application:,,,/Resources/NewPage/down.png")
SetOpenImage("pack://application:,,,/Resources/NewPage/up.png")
SetSaveImage("pack://application:,,,/Resources/NewPage/up.png")
SetBtlImage(DOWN_IMAGE)
SetOpenImage(UP_IMAGE)
SetSaveImage(UP_IMAGE)
SetIsStartBtnOpen(False)
Else
SetBtlImage("pack://application:,,,/Resources/NewPage/up.png")
SetBtlImage(UP_IMAGE)
SetIsStartBtnOpen(True)
End If
End Sub
@@ -2034,12 +2099,12 @@ Public Class ProdManagerVM
Public Sub ShowPopUpSaveBtn(ByVal param As Object)
If m_IsSaveBtnOpen Then
SetOpenImage("pack://application:,,,/Resources/NewPage/down.png")
SetSaveImage("pack://application:,,,/Resources/NewPage/up.png")
SetBtlImage("pack://application:,,,/Resources/NewPage/up.png")
SetOpenImage(DOWN_IMAGE)
SetSaveImage(UP_IMAGE)
SetBtlImage(UP_IMAGE)
SetIsSaveBtnOpen(False)
Else
SetOpenImage("pack://application:,,,/Resources/NewPage/up.png")
SetOpenImage(UP_IMAGE)
SetIsSaveBtnOpen(True)
End If
End Sub
@@ -2059,12 +2124,12 @@ Public Class ProdManagerVM
Public Sub ShowPopUpBtlBtn(ByVal param As Object)
If m_IsBtlBtnOpen Then
SetSaveImage("pack://application:,,,/Resources/NewPage/down.png")
SetOpenImage("pack://application:,,,/Resources/NewPage/up.png")
SetBtlImage("pack://application:,,,/Resources/NewPage/up.png")
SetSaveImage(DOWN_IMAGE)
SetOpenImage(UP_IMAGE)
SetBtlImage(UP_IMAGE)
SetIsBtlBtnOpen(False)
Else
SetSaveImage("pack://application:,,,/Resources/NewPage/up.png")
SetSaveImage(UP_IMAGE)
SetIsBtlBtnOpen(True)
End If
End Sub
+6 -6
View File
@@ -1,8 +1,8 @@
<UserControl x:Class="ProjectV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
DataContext="{StaticResource ProjectVM}">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
DataContext="{StaticResource ProjectVM}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{Binding GridDims[3].GridLen, Mode=TwoWay}"/>
@@ -15,7 +15,7 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="{Binding GridDims[2].GridLen, Mode=TwoWay}"/>
</Grid.RowDefinitions>
<OPTIMIZER:TopPanelV Grid.ColumnSpan="3"/>
<OPTIMIZER:LeftPanelTopV Grid.Row="1"/>
@@ -26,7 +26,7 @@
<OPTIMIZER:RightPanelTopV Grid.Row="1"
Grid.Column="2"/>
<OPTIMIZER:SceneBuildingV Grid.Row="1"
Grid.Column="2"
Grid.RowSpan="4"
+22 -11
View File
@@ -426,7 +426,7 @@ Public Class ProjectVM
Map.refMainMenuVM.SetMainMenuIsEnabled(bIsEnabled)
Map.refPartManagerVM.SetPartManagerIsEnabled(bIsEnabled)
Map.refLeftPanelVM.SetLeftPanelIsEnabled(bIsEnabled)
Map.refBTLPartManagerVM.SetBTLPartManagerIsEnabled(bIsEnabled)
If Not IsNothing(Map.refBTLPartManagerVM) Then Map.refBTLPartManagerVM.SetBTLPartManagerIsEnabled(bIsEnabled)
Map.refRawPartManagerVM.SetRawPartManagerIsEnabled(bIsEnabled)
Map.refOptimizePanelVM.SetOptimizePanelIsEnabled(bIsEnabled)
Map.refFeatureManagerVM.SetFeatureManagerIsEnabled(bIsEnabled)
@@ -547,21 +547,32 @@ Public Class ProjectVM
''' </summary>
Friend Sub UpdatePart()
Dim IdAsseBase As Integer = Map.refProdManagerVM.ListProjAsseBase(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPROJ)
Dim IdPart As Integer = Map.refSceneShowBuldingVM.MapInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId)
Dim IdPart As Integer = 0
Dim NewId As Integer = 0
' Setto il nuovo contesto
EgtSetCurrentContext(Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx())
If EgtBeamGetBuildingIsOn(IdAsseBase) Then EgtBeamShowBuilding(IdAsseBase, False)
If Map.refSceneShowBuldingVM.MapInfo.TryGetValue(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, IdPart) Then
EgtErase(IdPart)
If EgtBeamGetBuildingIsOn(IdAsseBase) Then EgtBeamShowBuilding(IdAsseBase, False)
Dim NewId As Integer = EgtCopyEx(Map.refSceneHostVM.MainScene.GetCtx(), Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx(), 0)
EgtErase(IdPart)
EgtChangeId(NewId, IdPart)
EgtBeamCalcSolid(IdPart)
EgtBeamShowSolid(IdPart, True)
EgtBeamShowBuilding(IdAsseBase, True)
NewId = EgtCopyEx(Map.refSceneHostVM.MainScene.GetCtx(), Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx(), 0)
EgtChangeId(NewId, IdPart)
EgtBeamCalcSolid(IdPart)
EgtBeamShowSolid(IdPart, True)
EgtBeamShowBuilding(IdAsseBase, True)
Else
NewId = EgtCopyEx(Map.refSceneHostVM.MainScene.GetCtx(), Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx(), 0)
Map.refSceneShowBuldingVM.MapInfo.Add(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, NewId)
EgtBeamCalcSolid(NewId)
EgtBeamShowSolid(NewId, True)
EgtZoom(ZM.ALL)
End If
' Ritorno al contesto corrente
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
@@ -726,7 +737,7 @@ Public Class ProjectVM
Next
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(Visibility.Collapsed)
End If
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.ResetCalcFeature()
If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.ResetCalcFeature()
Map.refProjectVM.BTLStructureVM.SelBTLPart.ResetCalcPart()
If Map.refProdManagerVM.ListProjAsseBase.Count > 0 Then UpdatePart()
Map.refProjectVM.SetRawPartManagerVisibility(Visibility.Visible)
@@ -46,7 +46,7 @@ Public Class ProdFileVM
Dim VerifyResult As MessageBoxResult = MessageBoxResult.None
' verifico se progetto modificato, e chiedo se salvare
If EgtGetModified() OrElse CurrProject.bIsNew OrElse Map.refCALCPanelVM.IsMachineModified() Then
VerifyResult = MessageBox.Show(EgtMsg(61875), "", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
VerifyResult = EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61875), "", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
Select Case VerifyResult
Case MessageBoxResult.Yes
' salvo proj
@@ -36,7 +36,7 @@ Public Class ProjFileVM
sProjectDirPath = CurrProject.sProjDirPath
' verifico se progetto modificato, e chiedo se salvare
If EgtGetModified() OrElse CurrProject.bIsNew OrElse Map.refCALCPanelVM.IsMachineModified() Then
Select Case MessageBox.Show(EgtMsg(61875), "", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
Select Case EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61875), "", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
Case MessageBoxResult.Yes
' salvo proj
If Not IsNothing(Map.refProdManagerVM) Then
@@ -136,7 +136,7 @@ Public Class ProjectTypeWndVM
RaiseEvent m_CloseWindow(True)
Else
' se non seleziono nessuna macchina lo segnalo con un MessageBox
MessageBox.Show(EgtMsg(61880), EgtMsg(30009))
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61880), EgtMsg(30009))
End If
End Sub
@@ -11,7 +11,7 @@
ToolTip="{Binding NewRawPart_ToolTip}"
IsEnabled="{Binding BTLPartManager_IsEnabled}"
Style="{StaticResource RawPartManager_Button}">
<Image Source="/Resources/LeftPanel/NewRawPart.png"
<Image Source="{StaticResource NewRawPart_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<StackPanel Grid.Column="1"
@@ -21,28 +21,28 @@
IsEnabled="{Binding RawPartManagerIsEnabled}"
Visibility="{Binding ProduceRawPart_Visibility}"
Style="{StaticResource LP_Button}">
<Image Source="/Resources/TopPanel/ProduceAllRawPart.png"
<Image Source="{StaticResource ProduceAllRawPart_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button ToolTip="{Binding VerifyAll_ToolTip}"
Command="{Binding VerifyAll_Command}"
IsEnabled="{Binding VerifyAll_IsEnabled}"
Style="{StaticResource LP_Button}">
<Image Source="/Resources/CALCPanel/VerifyAll.png"
<Image Source="{StaticResource VerifyAll_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding ResetCalc_Command}"
ToolTip="{Binding ResetCalc_ToolTip}"
IsEnabled="{Binding CALCPanel_IsEnabled}"
Style="{StaticResource LP_Button}">
<Image Source="/Resources/CALCPanel/ResetCalc.png"
<Image Source="{StaticResource ResetCalc_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding RemoveAllRawPart_Command}"
ToolTip="{Binding RemoveAllRawPart_ToolTip}"
IsEnabled="{Binding RawPartManagerIsEnabled}"
Style="{StaticResource LP_Button}">
<Image Source="/Resources/NewPage/Remove.png"
<Image Source="{StaticResource Remove_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
<Button Command="{Binding MovePartInRawPart_Command}"
@@ -50,7 +50,7 @@
IsEnabled="{Binding RawPartManagerIsEnabled}"
Visibility="{Binding MovePartInRawPart_Visibility}"
Style="{StaticResource LP_Button}">
<Image Source="/Resources/TopPanel/MovePartInRawPart.png"
<Image Source="{StaticResource MovePartInRawPart_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</StackPanel>

Some files were not shown because too many files have changed in this diff Show More