Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9eb30b0697 | |||
| 0c73db4f52 | |||
| 23b2606cbc | |||
| 1f36c9a5b0 | |||
| ce20fa0eb3 | |||
| 52c0b6b194 | |||
| 60e72aaf22 |
@@ -587,7 +587,7 @@ Public Class BTLPartM
|
||||
Public ReadOnly Property nINPROD As Integer
|
||||
Get
|
||||
Dim INPROD As Integer = 0
|
||||
EgtDuploInRawCount(m_nPartId, INPROD)
|
||||
EgtDuploCount(m_nPartId, INPROD)
|
||||
Return INPROD
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -23,5 +23,8 @@
|
||||
Public Const COL_USAGE As String = "colUSAGE"
|
||||
Public Const COL_WASTE As String = "colWASTE"
|
||||
Public Const COL_ARCHIVED As String = "colARCHIVED"
|
||||
Public Const COL_PROJID As String = "colPROJID"
|
||||
Public Const COL_PRODID As String = "colPRODID"
|
||||
Public Const COL_CREATEDATE As String = "colCRTDATE"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -168,7 +168,4 @@ Public Module ConstIni
|
||||
Public Const K_EXTERNALFILEPATH As String = "ExternalFilePath"
|
||||
Public Const K_REMINDERFREQUENCY As String = "ReminderFrequency"
|
||||
|
||||
Public Const S_SPECIAL As String = "Special"
|
||||
Public Const K_SPECIALENABLE As String = "SpecialEnable"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -35,5 +35,5 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.5.12.2")>
|
||||
<Assembly: AssemblyFileVersion("2.5.12.2")>
|
||||
<Assembly: AssemblyVersion("2.5.8.1")>
|
||||
<Assembly: AssemblyFileVersion("2.5.8.1")>
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ComboBox ItemsSource="{Binding FilterTypeList}"
|
||||
SelectedItem="{Binding SelFilterType}"
|
||||
@@ -80,6 +81,17 @@
|
||||
Visibility="{Binding SearchText_Visibility}"/>
|
||||
<StackPanel Grid.Column="2"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Text="Page index"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<Button Content="<"
|
||||
Command="{Binding PrevPage_Command}" />
|
||||
<TextBlock Text="{Binding nPageIndex}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<Button Content=">"
|
||||
Command="{Binding NextPage_Command}" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="3"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding Rows_Msg}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<ComboBox ItemsSource="{Binding RowQuantityList}"
|
||||
@@ -92,7 +104,7 @@
|
||||
|
||||
<EgtBEAMWALL:EgtDataGrid x:Name="MainDataGrid"
|
||||
Grid.Row="1"
|
||||
ItemsSource="{Binding ProjectList}"
|
||||
ItemsSource="{Binding PageList}"
|
||||
SelectedItem="{Binding SelProject}"
|
||||
CanUserAddRows="False"
|
||||
AutoGenerateColumns="False"
|
||||
@@ -104,10 +116,12 @@
|
||||
Margin="5"
|
||||
RowDetailsVisibilityMode="Visible"
|
||||
CellEditEnding="MainDataGrid_CellEditEnding"
|
||||
BindingColumns="{Binding ProdColumns}">
|
||||
BindingColumns="{Binding ProdColumns}"
|
||||
Sorting="MainDataGrid_Sorting">
|
||||
<DataGrid.Resources>
|
||||
<!-- ProdId -->
|
||||
<DataGridTextColumn x:Key="colPRODID" Binding="{Binding sProdId}">
|
||||
<DataGridTextColumn x:Key="colPRODID"
|
||||
Binding="{Binding sProdId}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Id_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:NewOpenProjectFileDialogV}}}"/>
|
||||
@@ -115,7 +129,8 @@
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Name-->
|
||||
<DataGridTextColumn x:Key="colNAME" Binding="{Binding sName}">
|
||||
<DataGridTextColumn x:Key="colNAME"
|
||||
Binding="{Binding sName}">
|
||||
<DataGridTextColumn.Header>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -134,19 +149,23 @@
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<!-- Creation date -->
|
||||
<DataGridTextColumn x:Key="colCRTDATE" Binding="{Binding dtCreateDate}">
|
||||
<DataGridTextColumn x:Key="colCRTDATE"
|
||||
Binding="{Binding dtCreateDate}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.CreateDate_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:NewOpenProjectFileDialogV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<!-- Machine -->
|
||||
<DataGridTextColumn x:Key="colMACHINE" Binding="{Binding sMachine}">
|
||||
<DataGridTextColumn x:Key="colMACHINE"
|
||||
Binding="{Binding sMachine}"
|
||||
CanUserSort="False">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.Machine_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:NewOpenProjectFileDialogV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<!-- Archived -->
|
||||
<DataGridTemplateColumn x:Key="colARCHIVED">
|
||||
<DataGridTemplateColumn x:Key="colARCHIVED"
|
||||
CanUserSort="False">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Image Source="\Resources\OpenProjectFileDialog\Archived.png"
|
||||
|
||||
@@ -83,4 +83,182 @@ Public Class NewOpenProjectFileDialogV
|
||||
'm_OpenProjFileDialogVM.SetIsEditNameActive(False)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Private Sub MainDataGrid_Sorting(sender As Object, e As DataGridSortingEventArgs)
|
||||
' aggiorno direziona colonna
|
||||
Dim column As DataGridColumn = e.Column
|
||||
column.SortDirection = If((column.SortDirection <> ListSortDirection.Ascending), ListSortDirection.Ascending, ListSortDirection.Descending)
|
||||
'' ricalcolo colonne sort
|
||||
'Dim datagrid As DataGrid = sender
|
||||
'ProdItemComparer.RefreshColumns()
|
||||
'' lancio sort custom
|
||||
'm_OpenProjFileDialogVM.RefreshProdItemSort()
|
||||
m_OpenProjFileDialogVM.SortPageList()
|
||||
m_OpenProjFileDialogVM.UpdatePageList()
|
||||
e.Handled = True
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Friend Class ProdItemComparer
|
||||
Implements IComparer
|
||||
|
||||
Private Shared DataGrid As DataGrid
|
||||
Friend Shared Sub SetDataGrid(value As DataGrid)
|
||||
DataGrid = value
|
||||
End Sub
|
||||
|
||||
Private Shared m_OpenProjFileDialogVM As NewOpenProjectFileDialogVM
|
||||
Friend Shared Sub SetOpenProjFileDialogVM(value As NewOpenProjectFileDialogVM)
|
||||
m_OpenProjFileDialogVM = value
|
||||
End Sub
|
||||
|
||||
Private Shared m_ColumnList As New List(Of DataGridColumn)
|
||||
Private Shared m_EgtColumnList As New List(Of EgtDataGridColumn)
|
||||
|
||||
Friend Shared Sub RefreshColumns()
|
||||
m_ColumnList.Clear()
|
||||
m_EgtColumnList.Clear()
|
||||
For Each col In DataGrid.Columns
|
||||
If Not IsNothing(col.SortDirection) Then
|
||||
m_ColumnList.Add(col)
|
||||
m_EgtColumnList.Add(m_OpenProjFileDialogVM.ProdColumns(col.DisplayIndex))
|
||||
End If
|
||||
Next
|
||||
' Map.refRawPartListVM.SetRawPartListSorted(m_ColumnList.Count > 0)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Function Compare(x As Object, y As Object) As Integer Implements IComparer.Compare
|
||||
' Dim First As MyMachGroupVM = DirectCast(x, MyMachGroupVM)
|
||||
' Dim Second As MyMachGroupVM = DirectCast(y, MyMachGroupVM)
|
||||
' Dim bFirstProduced As Boolean = First.nProduction_State = Core.ItemState.WIP OrElse First.nProduction_State = Core.ItemState.Produced
|
||||
' Dim bSecondProduced As Boolean = Second.nProduction_State = Core.ItemState.WIP OrElse Second.nProduction_State = Core.ItemState.Produced
|
||||
' Dim bFirstInQueue As Boolean = First.bToBeProduced
|
||||
' Dim bSecondInQueue As Boolean = Second.bToBeProduced
|
||||
' ' verifico se gia' prodotti
|
||||
' If bFirstProduced AndAlso bSecondProduced Then
|
||||
' If First.nProductionIndex > Second.nProductionIndex Then
|
||||
' Return 1
|
||||
' ElseIf First.nProductionIndex < Second.nProductionIndex Then
|
||||
' Return -1
|
||||
' Else
|
||||
' Return 0
|
||||
' End If
|
||||
' ElseIf bFirstProduced Then
|
||||
' Return -1
|
||||
' ElseIf bSecondProduced Then
|
||||
' Return 1
|
||||
' ElseIf bFirstInQueue AndAlso bSecondInQueue Then
|
||||
' If First.nProductionIndex > Second.nProductionIndex Then
|
||||
' Return 1
|
||||
' ElseIf First.nProductionIndex < Second.nProductionIndex Then
|
||||
' Return -1
|
||||
' Else
|
||||
' Return 0
|
||||
' End If
|
||||
' ElseIf bFirstInQueue Then
|
||||
' Return -1
|
||||
' ElseIf bSecondInQueue Then
|
||||
' Return 1
|
||||
' Else
|
||||
' ' verifico ordine per colonne
|
||||
' Dim ColumnIndex = 0
|
||||
' While ColumnIndex <= m_EgtColumnList.Count - 1
|
||||
' Dim nDir As ListSortDirection = If(m_ColumnList(ColumnIndex).SortDirection, 1, -1)
|
||||
' Dim nCheck As Integer = Check(First, Second, nDir, m_EgtColumnList(ColumnIndex))
|
||||
' If nCheck <> 0 Then
|
||||
' Return nCheck
|
||||
' End If
|
||||
' ColumnIndex += 1
|
||||
' End While
|
||||
' ' se non trovo colonne, metto in ordine indice di produzione
|
||||
' If First.nProductionIndex > Second.nProductionIndex Then
|
||||
' Return 1
|
||||
' ElseIf First.nProductionIndex < Second.nProductionIndex Then
|
||||
' Return -1
|
||||
' Else
|
||||
' Return 0
|
||||
' End If
|
||||
' End If
|
||||
End Function
|
||||
|
||||
Private Function Check(First As MyMachGroupVM, Second As MyMachGroupVM, nDirection As Integer, Column As EgtDataGridColumn) As Integer
|
||||
Select Case Column.Name
|
||||
Case COL_NAME
|
||||
If First.nName > Second.nName Then
|
||||
Return 1 * nDirection
|
||||
ElseIf First.nName < Second.nName Then
|
||||
Return -1 * nDirection
|
||||
Else
|
||||
Return 0
|
||||
End If
|
||||
Case COL_STARTCUT
|
||||
If First.Id > Second.Id Then
|
||||
Return 1 * nDirection
|
||||
ElseIf First.Id < Second.Id Then
|
||||
Return -1 * nDirection
|
||||
Else
|
||||
Return 0
|
||||
End If
|
||||
Case COL_W
|
||||
If First.dW > Second.dW Then
|
||||
Return 1 * nDirection
|
||||
ElseIf First.dW < Second.dW Then
|
||||
Return -1 * nDirection
|
||||
Else
|
||||
Return 0
|
||||
End If
|
||||
Case COL_H
|
||||
If First.dH > Second.dH Then
|
||||
Return 1 * nDirection
|
||||
ElseIf First.dH < Second.dH Then
|
||||
Return -1 * nDirection
|
||||
Else
|
||||
Return 0
|
||||
End If
|
||||
Case COL_L
|
||||
If First.dL > Second.dL Then
|
||||
Return 1 * nDirection
|
||||
ElseIf First.dL < Second.dL Then
|
||||
Return -1 * nDirection
|
||||
Else
|
||||
Return 0
|
||||
End If
|
||||
Case COL_POSZ
|
||||
'If First.posz > Second.dL Then
|
||||
' Return 1 * nDirection
|
||||
'ElseIf First.dL < Second.dL Then
|
||||
' Return -1 * nDirection
|
||||
'Else
|
||||
' Return 0
|
||||
'End If
|
||||
Case COL_MATERIAL
|
||||
If First.sMATERIAL > Second.sMATERIAL Then
|
||||
Return 1 * nDirection
|
||||
ElseIf First.sMATERIAL < Second.sMATERIAL Then
|
||||
Return -1 * nDirection
|
||||
Else
|
||||
Return 0
|
||||
End If
|
||||
Case COL_USAGE
|
||||
If First.dUsage > Second.dUsage Then
|
||||
Return 1 * nDirection
|
||||
ElseIf First.dUsage < Second.dUsage Then
|
||||
Return -1 * nDirection
|
||||
Else
|
||||
Return 0
|
||||
End If
|
||||
Case COL_WASTE
|
||||
If First.dWaste > Second.dWaste Then
|
||||
Return 1 * nDirection
|
||||
ElseIf First.dWaste < Second.dWaste Then
|
||||
Return -1 * nDirection
|
||||
Else
|
||||
Return 0
|
||||
End If
|
||||
End Select
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@@ -19,7 +19,7 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
EXPORTDATE = 1
|
||||
End Enum
|
||||
|
||||
Private Enum FilterTypes As Integer
|
||||
Protected Enum FilterTypes As Integer
|
||||
NULL = 0
|
||||
ID = 1
|
||||
BTLFILENAME = 2
|
||||
@@ -36,9 +36,9 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
End Enum
|
||||
|
||||
Public Enum RowQuantities As Integer
|
||||
FIFTY = 0
|
||||
HUNDRED = 1
|
||||
HUNDREDANDFIFTY = 2
|
||||
TEN = 0
|
||||
TWENTY = 1
|
||||
THIRTY = 2
|
||||
End Enum
|
||||
|
||||
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
||||
@@ -67,6 +67,27 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_colProjId_Name As EgtDataGridColumn
|
||||
Public ReadOnly Property colProjId_Name As EgtDataGridColumn
|
||||
Get
|
||||
Return m_colProjId_Name
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_colProdId_Name As EgtDataGridColumn
|
||||
Public ReadOnly Property colProdId_Name As EgtDataGridColumn
|
||||
Get
|
||||
Return m_colProdId_Name
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_colCreateDate_Name As EgtDataGridColumn
|
||||
Public ReadOnly Property colCreateDate_Name As EgtDataGridColumn
|
||||
Get
|
||||
Return m_colCreateDate_Name
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_ProjColumns As New ObservableCollection(Of EgtDataGridColumn)
|
||||
Public Property ProjColumns As ObservableCollection(Of EgtDataGridColumn)
|
||||
Get
|
||||
@@ -106,7 +127,13 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public m_ProjectList_View As CollectionView = Nothing
|
||||
Private m_ProjectList_View As CollectionView = Nothing
|
||||
Public ReadOnly Property ProjectList_View As CollectionView
|
||||
Get
|
||||
Return m_ProjectList_View
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_ProjectList As New ObservableCollection(Of ProdItem)
|
||||
Public ReadOnly Property ProjectList As ObservableCollection(Of ProdItem)
|
||||
Get
|
||||
@@ -185,7 +212,8 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
Set(value As Integer)
|
||||
' aggiorno lista da Db
|
||||
RefreshProjectList()
|
||||
m_ProjectList_View.Refresh()
|
||||
'm_ProjectList_View.Refresh()
|
||||
UpdatePageList()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -227,7 +255,8 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
NotifyPropertyChanged(NameOf(Date_Visibility))
|
||||
' aggiorno lista da Db
|
||||
RefreshProjectList()
|
||||
m_ProjectList_View.Refresh()
|
||||
' m_ProjectList_View.Refresh()
|
||||
UpdatePageList()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -242,7 +271,8 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
WriteMainPrivateProfileString(S_OPENFILEDIALOG, K_STARTDATE, lStartDate.ToString())
|
||||
' aggiorno lista da Db
|
||||
RefreshProjectList()
|
||||
m_ProjectList_View.Refresh()
|
||||
' m_ProjectList_View.Refresh()
|
||||
UpdatePageList()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -257,7 +287,8 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
WriteMainPrivateProfileString(S_OPENFILEDIALOG, K_ENDDATE, lEndDate.ToString())
|
||||
' aggiorno lista da Db
|
||||
RefreshProjectList()
|
||||
m_ProjectList_View.Refresh()
|
||||
' m_ProjectList_View.Refresh()
|
||||
UpdatePageList()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -275,7 +306,7 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_SelRowQuantity As RowQuantities
|
||||
Protected m_SelRowQuantity As RowQuantities
|
||||
Public Property SelRowQuantity As Integer
|
||||
Get
|
||||
Return m_SelRowQuantity
|
||||
@@ -283,7 +314,8 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
Set(value As Integer)
|
||||
m_SelRowQuantity = value
|
||||
RefreshProjectList()
|
||||
m_ProjectList_View.Refresh()
|
||||
' m_ProjectList_View.Refresh()
|
||||
UpdatePageList()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -308,7 +340,8 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
If Not IsNothing(SearchDate) Then SearchDate.Clear()
|
||||
' setto il Tipo Filtro a NULL e refresho la lista dei progetti (in modo da averli visibili tutti)
|
||||
m_SelFilterType = m_FilterTypeList(0)
|
||||
m_ProjectList_View.Refresh()
|
||||
'm_ProjectList_View.Refresh()
|
||||
UpdatePageList()
|
||||
' ora setto il valore scelto come Tipo Filtro
|
||||
m_SelFilterType = value
|
||||
Select Case m_SelFilterType.Id
|
||||
@@ -332,7 +365,8 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_SearchText = value
|
||||
m_ProjectList_View.Refresh()
|
||||
'm_ProjectList_View.Refresh()
|
||||
UpdatePageList()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -390,9 +424,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.Visible = value
|
||||
RefreshProjectList()
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
@@ -419,6 +453,30 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
NotifyPropertyChanged(NameOf(bDelete_IsEnabled))
|
||||
End Sub
|
||||
|
||||
Private m_PageList_View As ListCollectionView = Nothing
|
||||
Public ReadOnly Property PageList_View As ListCollectionView
|
||||
Get
|
||||
Return m_PageList_View
|
||||
End Get
|
||||
End Property
|
||||
Protected m_PageList As New ObservableCollection(Of ProdItem)
|
||||
Public Property PageList As ObservableCollection(Of ProdItem)
|
||||
Get
|
||||
Return m_PageList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of ProdItem))
|
||||
m_PageList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nPageIndex As Integer = 1
|
||||
Public ReadOnly Property nPageIndex As Integer
|
||||
Get
|
||||
Return m_nPageIndex
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Protected m_ChangeOpenedProjectOnCancel As Boolean = False
|
||||
|
||||
#Region "Messages"
|
||||
@@ -545,6 +603,8 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
Private m_cmdDelete As ICommand
|
||||
Private m_cmdArchive As ICommand
|
||||
Private m_cmdCancel As ICommand
|
||||
Private m_cmdPrevPage As ICommand
|
||||
Private m_cmdNextPage As ICommand
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
@@ -555,6 +615,9 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
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_colProjId_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Name = COL_PROJID)
|
||||
m_colProdId_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Name = COL_PRODID)
|
||||
m_colCreateDate_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Name = COL_CREATEDATE)
|
||||
' leggo valori per filtri
|
||||
m_SelDayType = GetMainPrivateProfileInt(S_OPENFILEDIALOG, K_DAYTYPE, 0)
|
||||
Select Case m_SelDayType
|
||||
@@ -589,6 +652,29 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
Public Overridable Sub RefreshProjectList(Optional GoToProd As Boolean = False)
|
||||
End Sub
|
||||
|
||||
|
||||
Private m_ProdItemComparer As ProdItemComparer
|
||||
Friend ReadOnly Property ProdItemComparer As ProdItemComparer
|
||||
Get
|
||||
Return m_ProdItemComparer
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend Sub SetPageListView()
|
||||
m_PageList_View = CollectionViewSource.GetDefaultView(m_PageList)
|
||||
m_ProdItemComparer = New ProdItemComparer
|
||||
m_PageList_View.CustomSort = m_ProdItemComparer
|
||||
NotifyPropertyChanged(NameOf(PageList_View))
|
||||
End Sub
|
||||
|
||||
Friend Sub RefreshProdItemSort()
|
||||
m_PageList_View.CustomSort = m_ProdItemComparer
|
||||
End Sub
|
||||
|
||||
Friend Sub SortPageList()
|
||||
' m_ProjectList = New ObservableCollection(Of ProdItem)(m_ProjectList.OrderBy(Of Integer)(Function(x) If(String.IsNullOrWhiteSpace(x.sProdId), 0, CInt(x.sProdId))))
|
||||
End Sub
|
||||
|
||||
Protected Sub LoadColumns()
|
||||
'If ProjectType = ProjectType.PROJ Then
|
||||
' carico le colonne della datagrid
|
||||
@@ -650,17 +736,69 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
Return AllFilesInDir.Any(Function(x) Path.GetExtension(x).ToLower() = ".nge")
|
||||
End Function
|
||||
|
||||
Protected Function ProjectFilter(Proj As Object) As Boolean
|
||||
Dim bProjectOk As Boolean = True
|
||||
'If TypeOf Proj Is ProjFileVM Then
|
||||
Dim CurrProj As ProdItem = DirectCast(Proj, ProdItem)
|
||||
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso (
|
||||
(m_SelFilterType.Id = BTLDateTypes.EXPORTDATE AndAlso Not CurrProj.ProjFileList.Any(Function(x) SearchDate.Contains(DirectCast(x, ProjFileVM).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.BTLFILENAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
(m_SelFilterType.Id = FilterTypes.LISTNAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sListName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
(m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
|
||||
'Protected Function ProjectFilter(Proj As Object) As Boolean
|
||||
' Dim bProjectOk As Boolean = True
|
||||
' 'If TypeOf Proj Is ProjFileVM Then
|
||||
' Dim CurrProj As ProdItem = DirectCast(Proj, ProdItem)
|
||||
' If m_SelFilterType.Id <> FilterTypes.NULL AndAlso (
|
||||
' (m_SelFilterType.Id = BTLDateTypes.EXPORTDATE AndAlso Not CurrProj.ProjFileList.Any(Function(x) SearchDate.Contains(DirectCast(x, ProjFileVM).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.BTLFILENAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
' (m_SelFilterType.Id = FilterTypes.LISTNAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sListName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
' (m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
|
||||
' 'ElseIf TypeOf Proj Is ProdFileVM 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
|
||||
' Return bProjectOk
|
||||
'End Function
|
||||
|
||||
Public Overridable Function UpdatePageList() As Boolean
|
||||
Dim FilteredList As IEnumerable(Of ProdItem) = m_ProjectList.Where(Function(x)
|
||||
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso m_SearchText <> String.Empty AndAlso
|
||||
((m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso x.ProjFileList.Any(Function(y) DirectCast(y, ProjFileVM).sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
(m_SelFilterType.Id = FilterTypes.LISTNAME AndAlso x.ProjFileList.Any(Function(y) DirectCast(y, ProjFileVM).sListName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
(m_SelFilterType.Id = FilterTypes.MACHINE AndAlso x.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then Return False
|
||||
Return True
|
||||
End Function)
|
||||
Dim nPageRowQty As Integer = 0
|
||||
Select Case m_SelRowQuantity
|
||||
Case RowQuantities.TEN
|
||||
nPageRowQty = 10
|
||||
Case RowQuantities.TWENTY
|
||||
nPageRowQty = 20
|
||||
Case RowQuantities.THIRTY
|
||||
nPageRowQty = 30
|
||||
End Select
|
||||
Dim nStart = nPageIndex * nPageRowQty
|
||||
If (nPageIndex - 1) * nPageRowQty + 1 > FilteredList.Count() Then
|
||||
Return False
|
||||
End If
|
||||
' FilteredList = FilteredList.OrderBy(Of ProdItem)()
|
||||
' m_PageList = New ObservableCollection(Of ProdItem)(FilteredList.Skip((nPageIndex - 1) * nPageRowQty + 1).Take(nPageIndex * nPageRowQty).Select(Function(x) x))
|
||||
m_PageList.Clear()
|
||||
For Index = (nPageIndex - 1) * nPageRowQty + 1 To nPageIndex * nPageRowQty
|
||||
m_PageList.Add(FilteredList(Index))
|
||||
Next
|
||||
NotifyPropertyChanged(NameOf(PageList))
|
||||
Return True
|
||||
|
||||
'Dim bProjectOk As Boolean = True
|
||||
''If TypeOf Proj Is ProjFileVM Then
|
||||
'Dim CurrProj As ProdItem = DirectCast(PROJ, ProdItem)
|
||||
'If m_SelFilterType.Id <> FilterTypes.NULL AndAlso (
|
||||
' (m_SelFilterType.Id = BTLDateTypes.EXPORTDATE AndAlso Not CurrProj.ProjFileList.Any(Function(x) SearchDate.Contains(DirectCast(x, ProjFileVM).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.BTLFILENAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
' (m_SelFilterType.Id = FilterTypes.LISTNAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sListName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
' (m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
|
||||
'ElseIf TypeOf Proj Is ProdFileVM Then
|
||||
' Dim CurrProj As ProdFileVM = DirectCast(Proj, ProdFileVM)
|
||||
' If m_SelFilterType.Id <> FilterTypes.NULL AndAlso (
|
||||
@@ -670,6 +808,15 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
' (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
|
||||
' Return bProjectOk
|
||||
End Function
|
||||
|
||||
Protected Function ProjectFilter(CurrProj As ProdItem) As Boolean
|
||||
Dim bProjectOk As Boolean = True
|
||||
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso m_SearchText <> String.Empty AndAlso (
|
||||
(m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
(m_SelFilterType.Id = FilterTypes.LISTNAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sListName.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
|
||||
|
||||
@@ -775,6 +922,60 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
|
||||
#End Region ' Cancel
|
||||
|
||||
#Region "PrevPage"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do New.
|
||||
''' </summary>
|
||||
Public ReadOnly Property PrevPage_Command As ICommand
|
||||
Get
|
||||
If m_cmdPrevPage Is Nothing Then
|
||||
m_cmdPrevPage = New Command(AddressOf PrevPage)
|
||||
End If
|
||||
Return m_cmdPrevPage
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the New. This method is invoked by the NewCommand.
|
||||
''' </summary>
|
||||
Public Overridable Sub PrevPage()
|
||||
If m_nPageIndex > 1 Then
|
||||
m_nPageIndex -= 1
|
||||
End If
|
||||
UpdatePageList()
|
||||
NotifyPropertyChanged(NameOf(nPageIndex))
|
||||
End Sub
|
||||
|
||||
#End Region ' PrevPage
|
||||
|
||||
#Region "NextPage"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do New.
|
||||
''' </summary>
|
||||
Public ReadOnly Property NextPage_Command As ICommand
|
||||
Get
|
||||
If m_cmdNextPage Is Nothing Then
|
||||
m_cmdNextPage = New Command(AddressOf NextPage)
|
||||
End If
|
||||
Return m_cmdNextPage
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the New. This method is invoked by the NewCommand.
|
||||
''' </summary>
|
||||
Public Overridable Sub NextPage()
|
||||
m_nPageIndex += 1
|
||||
If Not UpdatePageList() Then
|
||||
m_nPageIndex -= 1
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(nPageIndex))
|
||||
End Sub
|
||||
|
||||
#End Region ' NextPage
|
||||
|
||||
#End Region ' Commands
|
||||
|
||||
End Class
|
||||
|
||||
@@ -5,9 +5,10 @@ Imports System.Windows
|
||||
Public Class ProdItem
|
||||
Inherits VMBase
|
||||
|
||||
Public Shared m_delIsModifiedSetUp As Action(Of Boolean)
|
||||
Public Shared m_delUpdateNameInDb As Action(Of Integer, String)
|
||||
Public Shared m_delIsModifiedSetUp As Action(Of Boolean)
|
||||
|
||||
Protected m_ProdFileVM As ProdFileVM
|
||||
Protected m_ProdFileVM As ProdFileVM
|
||||
Public ReadOnly Property ProdFileVM As ProdFileVM
|
||||
Get
|
||||
Return m_ProdFileVM
|
||||
@@ -32,10 +33,12 @@ Public Class ProdItem
|
||||
Return If(Not IsNothing(m_ProdFileVM), m_ProdFileVM.sName, "")
|
||||
End Get
|
||||
Set(value As String)
|
||||
If Not IsNothing(m_ProdFileVM) Then
|
||||
m_ProdFileVM.sName = value
|
||||
End If
|
||||
End Set
|
||||
If Not IsNothing(m_ProdFileVM) Then
|
||||
m_delUpdateNameInDb(m_ProdFileVM.nProdId, value)
|
||||
m_ProdFileVM.sName = value
|
||||
m_delIsModifiedSetUp(False)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property dtCreateDate As Date
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</providers>
|
||||
</entityFramework>
|
||||
<connectionStrings>
|
||||
<add name="DefaultConnection" connectionString="server=localhost;port=3306;User Id=steamware;password=steamware_password;Persist Security Info=True;database=EgtBwDb_000470;SslMode=none" providerName="MySql.Data.MySqlClient" />
|
||||
<add name="DefaultConnection" connectionString="server=localhost;port=3306;User Id=steamware;password=Egalware_24068!;Persist Security Info=True;database=EgtBwDb_000470;SslMode=none" providerName="MySql.Data.MySqlClient" />
|
||||
</connectionStrings>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
|
||||
@@ -80,21 +80,6 @@ namespace EgtBEAMWALL.DataLayer
|
||||
/// </summary>
|
||||
public DbSet<StatusMapModel> StatusMapList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Wharehouse materials management
|
||||
/// </summary>
|
||||
public DbSet<MaterialModel> MaterialsList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Wharehouse items management
|
||||
/// </summary>
|
||||
public DbSet<RawItemModel> RawItemList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Alias management
|
||||
/// </summary>
|
||||
public DbSet<AliasModel> AliasList { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EgtBEAMWALL.DataLayer.DatabaseModels
|
||||
{
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
[Table("AliasList")]
|
||||
public class AliasModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Famiglia di sinonimi
|
||||
/// </summary>
|
||||
[Column("Family", Order = 1), Key]
|
||||
public string Family { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Codice originale (da trasformare)
|
||||
/// </summary>
|
||||
[Column("ValueOriginal", Order = 2), Key]
|
||||
public string ValueOriginal { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Codice Alias <inheritdoccui viene convertito/>
|
||||
/// </summary>
|
||||
public string ValueAlias { get; set; } = "";
|
||||
}
|
||||
}
|
||||
@@ -1,102 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EgtBEAMWALL.DataLayer.DatabaseModels
|
||||
{
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
[Table("MaterialsList")]
|
||||
public partial class MaterialModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Init classe
|
||||
/// </summary>
|
||||
public MaterialModel()
|
||||
{
|
||||
RawItemList = new HashSet<RawItemModel>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Primary Key AUTO
|
||||
/// </summary>
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int MatId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Codice materiale (Identificativo esterno del magazzino in sync)
|
||||
/// </summary>
|
||||
public int MatExtId { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Codice Materiale
|
||||
/// </summary>
|
||||
public string MatCode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Descrizione Materiale
|
||||
/// </summary>
|
||||
public string MatDesc { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Lenght/Lunghezza in mm
|
||||
/// </summary>
|
||||
public decimal LMm { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// Width/Larghezza in mm
|
||||
/// </summary>
|
||||
public decimal WMm { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// Height (Thikness/Spessore) in mm
|
||||
/// </summary>
|
||||
public decimal HMm { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// ID dell'ultimo articolo (variante) usato per il materiale
|
||||
/// </summary>
|
||||
public int RawItemIdLast { get; set; } = 0;
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Lenght/Lunghezza in inch
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public decimal LIn
|
||||
{
|
||||
get => Math.Round(LMm / (decimal)25.4, 3);
|
||||
}
|
||||
/// <summary>
|
||||
/// Width/Larghezza in inch
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public decimal WIn
|
||||
{
|
||||
get => Math.Round(WMm / (decimal)25.4, 3);
|
||||
}
|
||||
/// <summary>
|
||||
/// Height/Altezza (Thikness/Spessore) in inch
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public decimal HIn
|
||||
{
|
||||
get => Math.Round(HMm / (decimal)25.4, 3);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Codice materiale x QR/Datamatrix
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public string MatDtmx
|
||||
{
|
||||
get => $"MT{MatExtId:00000000}";
|
||||
}
|
||||
#endif
|
||||
|
||||
public virtual ICollection<RawItemModel> RawItemList { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using static EgtBEAMWALL.Core.ConstBeam;
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EgtBEAMWALL.DataLayer.DatabaseModels
|
||||
{
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
//[Index(nameof(Installazione), nameof(Active), nameof(DiskStatus))]
|
||||
[Table("RawItemList")]
|
||||
public partial class RawItemModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Primary Key AUTO
|
||||
/// </summary>
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int RawItemId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ForeignKey Materiale
|
||||
/// </summary>
|
||||
public int MatId { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Qty available on wharehouse
|
||||
/// </summary>
|
||||
public int QtyAvail { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Check if is a Remnant
|
||||
/// </summary>
|
||||
public bool IsActive { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Item's Lenght
|
||||
/// </summary>
|
||||
public decimal LMm { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Item's Width
|
||||
/// </summary>
|
||||
public decimal WMm { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Item's Height (Thikness/Spessore) in mm
|
||||
/// </summary>
|
||||
public decimal HMm { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Note (optional)
|
||||
/// </summary>
|
||||
public string Note { get; set; } = "";
|
||||
|
||||
#if false
|
||||
[NotMapped]
|
||||
public decimal LIn
|
||||
{
|
||||
get => Math.Round(LMm / (decimal)25.4, 3);
|
||||
}
|
||||
[NotMapped]
|
||||
public decimal WIn
|
||||
{
|
||||
get => Math.Round(WMm / (decimal)25.4, 3);
|
||||
}
|
||||
[NotMapped]
|
||||
public decimal HIn
|
||||
{
|
||||
get => Math.Round(HMm / (decimal)25.4, 3);
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public decimal Area
|
||||
{
|
||||
get => LMm * WMm;
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public string ItemDtmx
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = $"MT99999999-{LMm * 1000:00000000}";
|
||||
if (MaterialNav != null)
|
||||
{
|
||||
answ = $"MT{MaterialNav.MatExtId:00000000}-{LMm * 1000:00000000}";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Navigation property to Material
|
||||
/// </summary>
|
||||
[ForeignKey("MatId")]
|
||||
public virtual MaterialModel MaterialNav { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -33,9 +33,9 @@ namespace EgtBEAMWALL.DataLayer
|
||||
public static string ADMIN_CONNECTION_STRING { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// DB Connection string, per effettuare migration riportare valore connessione admin cablato (server=localhost;port=3306;database=EgtBwDb_000102;uid=root;pwd=Egalware_24068!;)
|
||||
/// DB Connection string, per effettuare migration riportare valore connessione admin cablato (server=localhost;port=3306;database=EgtBwDb_000102;)
|
||||
/// </summary>
|
||||
public static string CONNECTION_STRING { get; set; } = "server=localhost;port=3306;database=EgtBwDb_000470;uid=root;pwd=Egalware_24068!";
|
||||
public static string CONNECTION_STRING { get; set; } = "";
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
|
||||
@@ -126,9 +126,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AdminContext.cs" />
|
||||
<Compile Include="DatabaseModels\AliasModel.cs" />
|
||||
<Compile Include="DatabaseModels\MaterialModel.cs" />
|
||||
<Compile Include="DatabaseModels\RawItemModel.cs" />
|
||||
<Compile Include="DatabaseModels\UserPrivModel.cs" />
|
||||
<Compile Include="DbConfig.cs" />
|
||||
<Compile Include="Controllers\LogMachineController.cs" />
|
||||
@@ -190,10 +187,6 @@
|
||||
<Compile Include="Migrations\202308250853396_AddProjArchivedField.designer.cs">
|
||||
<DependentUpon>202308250853396_AddProjArchivedField.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\202401181534084_AddAliasMaterialRawItemsModel.cs" />
|
||||
<Compile Include="Migrations\202401181534084_AddAliasMaterialRawItemsModel.designer.cs">
|
||||
<DependentUpon>202401181534084_AddAliasMaterialRawItemsModel.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\Configuration.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Utils.cs" />
|
||||
@@ -242,9 +235,6 @@
|
||||
<EmbeddedResource Include="Migrations\202308250853396_AddProjArchivedField.resx">
|
||||
<DependentUpon>202308250853396_AddProjArchivedField.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Migrations\202401181534084_AddAliasMaterialRawItemsModel.resx">
|
||||
<DependentUpon>202401181534084_AddAliasMaterialRawItemsModel.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
|
||||
Generated
-29
@@ -1,29 +0,0 @@
|
||||
// <auto-generated />
|
||||
namespace EgtBEAMWALL.DataLayer.Migrations
|
||||
{
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Data.Entity.Migrations.Infrastructure;
|
||||
using System.Resources;
|
||||
|
||||
[GeneratedCode("EntityFramework.Migrations", "6.4.4")]
|
||||
public sealed partial class AddAliasMaterialRawItemsModel : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(AddAliasMaterialRawItemsModel));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "202401181534084_AddAliasMaterialRawItemsModel"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
namespace EgtBEAMWALL.DataLayer.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
public partial class AddAliasMaterialRawItemsModel : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
CreateTable(
|
||||
"dbo.AliasList",
|
||||
c => new
|
||||
{
|
||||
Family = c.String(nullable: false, maxLength: 128, storeType: "nvarchar"),
|
||||
ValueOriginal = c.String(nullable: false, maxLength: 128, storeType: "nvarchar"),
|
||||
ValueAlias = c.String(unicode: false),
|
||||
})
|
||||
.PrimaryKey(t => new { t.Family, t.ValueOriginal });
|
||||
|
||||
CreateTable(
|
||||
"dbo.MaterialsList",
|
||||
c => new
|
||||
{
|
||||
MatId = c.Int(nullable: false, identity: true),
|
||||
MatExtId = c.Int(nullable: false),
|
||||
MatCode = c.String(unicode: false),
|
||||
MatDesc = c.String(unicode: false),
|
||||
LMm = c.Decimal(nullable: false, precision: 18, scale: 2),
|
||||
WMm = c.Decimal(nullable: false, precision: 18, scale: 2),
|
||||
HMm = c.Decimal(nullable: false, precision: 18, scale: 2),
|
||||
RawItemIdLast = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => t.MatId);
|
||||
|
||||
CreateTable(
|
||||
"dbo.RawItemList",
|
||||
c => new
|
||||
{
|
||||
RawItemId = c.Int(nullable: false, identity: true),
|
||||
MatId = c.Int(nullable: false),
|
||||
QtyAvail = c.Int(nullable: false),
|
||||
IsActive = c.Boolean(nullable: false),
|
||||
LMm = c.Decimal(nullable: false, precision: 18, scale: 2),
|
||||
WMm = c.Decimal(nullable: false, precision: 18, scale: 2),
|
||||
HMm = c.Decimal(nullable: false, precision: 18, scale: 2),
|
||||
Note = c.String(unicode: false),
|
||||
})
|
||||
.PrimaryKey(t => t.RawItemId)
|
||||
.ForeignKey("dbo.MaterialsList", t => t.MatId, cascadeDelete: true)
|
||||
.Index(t => t.MatId);
|
||||
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
DropForeignKey("dbo.RawItemList", "MatId", "dbo.MaterialsList");
|
||||
DropIndex("dbo.RawItemList", new[] { "MatId" });
|
||||
DropTable("dbo.RawItemList");
|
||||
DropTable("dbo.MaterialsList");
|
||||
DropTable("dbo.AliasList");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -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("2.5.12.2")]
|
||||
[assembly: AssemblyFileVersion("2.5.12.2")]
|
||||
[assembly: AssemblyVersion("2.5.8.1")]
|
||||
[assembly: AssemblyFileVersion("2.5.8.1")]
|
||||
|
||||
@@ -219,7 +219,6 @@ Friend Class MyComparer
|
||||
Return 0
|
||||
End If
|
||||
End Select
|
||||
Return 0
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@@ -437,10 +437,6 @@ Public Class LeftPanelVM
|
||||
New OPState("Reset", OPStates.End),
|
||||
New OPState("Unspecified", OPStates.Unspecified)
|
||||
}
|
||||
Case Else
|
||||
m_OPStateList = New List(Of OPState) From {
|
||||
New OPState("Unspecified", OPStates.Unspecified)
|
||||
}
|
||||
End Select
|
||||
' seleziono in partenza unspecified
|
||||
Dim UnspecifiedState As OPState = m_OPStateList.FirstOrDefault(Function(x) x.Id = OPStates.Unspecified)
|
||||
|
||||
@@ -317,7 +317,6 @@ Public Class MyMachGroupVM
|
||||
' segno pezzo da produrre
|
||||
MachGroup.m_bToBeProduced = True
|
||||
MachGroup.NotifyPropertyChanged(NameOf(MachGroup.Production_Background))
|
||||
Map.refSupervisorMachGroupPanelVM.MachGroupVMList_View.Refresh()
|
||||
|
||||
' sposto MachGroup in lista come ultimo dei pronti da produrre
|
||||
Dim OldIndex As Integer = Map.refProjectVM.SupervisorMachGroupPanelVM.MachGroupVMList.IndexOf(MachGroup)
|
||||
|
||||
@@ -46,6 +46,7 @@ Public Class SupervisorMachGroupPanelVM
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Private m_MachGroupVMListComparer As MyComparer
|
||||
Friend ReadOnly Property MachGroupVMListComparer As MyComparer
|
||||
Get
|
||||
|
||||
@@ -248,8 +248,8 @@ Public Class MainWindowM
|
||||
EgtSetLockId( sLockId)
|
||||
End If
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2512, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2512, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2508, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2508, 1, m_nKeyOptions)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
m_sLogFile = m_sTempDir & "\" & SUPGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
|
||||
@@ -70,5 +70,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.5.12.2")>
|
||||
<Assembly: AssemblyFileVersion("2.5.12.2")>
|
||||
<Assembly: AssemblyVersion("2.5.8.1")>
|
||||
<Assembly: AssemblyFileVersion("2.5.8.1")>
|
||||
|
||||
@@ -95,7 +95,9 @@ Public Class SupervisorManagerVM
|
||||
|
||||
|
||||
#End Region ' ToolTip
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
|
||||
@@ -93,14 +93,10 @@ Public Class BTLPartVM
|
||||
Dim LSTValues() As String = sSwapItem.Split(","c)
|
||||
If Not IsNothing(LSTValues(LSTValues.Count - 1)) AndAlso Integer.TryParse(LSTValues(LSTValues.Count - 1), nSwapItem) AndAlso nSwapItem > 0 Then
|
||||
Dim nMachgroupId As Integer = EgtGetParent(EgtGetParent(EgtGetParent(nSwapItem)))
|
||||
If nMachgroupId = GDB_ID.NULL Then
|
||||
EgtOutLog("Trovato Duplo Ghost")
|
||||
Else
|
||||
Dim MachGroupModel = DbControllers.m_MachGroupController.FindByMachGroupId(Map.refProjManagerVM.CurrProj.nProdId, nMachgroupId)
|
||||
If MachGroupModel.State > ItemState.ND Then
|
||||
bDuploInProduction = True
|
||||
Exit For
|
||||
End If
|
||||
Dim MachGroupModel = DbControllers.m_MachGroupController.FindByMachGroupId(Map.refProjManagerVM.CurrProj.nProdId, nMachgroupId)
|
||||
If MachGroupModel.State > ItemState.ND Then
|
||||
bDuploInProduction = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -398,8 +398,7 @@ Public Class BTLStructureVM
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not IsNothing(SelBTLPart) Then SelBTLParts.AddToList(SelBTLPart)
|
||||
|
||||
SelBTLParts.AddToList(SelBTLPart)
|
||||
If bByOptim Then
|
||||
m_bOnlySelectItem = False
|
||||
End If
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
Visibility="{Binding ChooseMachineBtn_Visibility}">
|
||||
<Image Source="/Resources/CALCPanel/ChooseMachine.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
<Grid Margin="0,0,5,0" Visibility="{Binding ChooseMachine_Visibility}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
|
||||
@@ -338,10 +338,6 @@
|
||||
<DependentUpon>SetUpV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SetUp\SetUpVM.vb" />
|
||||
<Compile Include="SpecialPanel\SpecialPanelV.xaml.vb">
|
||||
<DependentUpon>SpecialPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SpecialPanel\SpecialPanelVM.vb" />
|
||||
<Compile Include="StatisticsTimePanel\StatisticsTimePanelV.xaml.vb">
|
||||
<DependentUpon>StatisticsTimePanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -548,10 +544,6 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="SpecialPanel\SpecialPanelV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||
</Page>
|
||||
<Page Include="StatisticsTimePanel\StatisticsTimePanelV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -172,17 +172,13 @@ Public Class MyMachGroupPanelVM
|
||||
' elimino pezzo copia
|
||||
EgtRemovePartFromRawPart(nDuploId)
|
||||
EgtErase(nDuploId)
|
||||
' recupero gruppo di lavorazione e trave dell'interfaccia
|
||||
'' recupero gruppo di lavorazione e trave dell'interfaccia
|
||||
Dim BeamMachGroup As MyMachGroupVM = MachGroupVMList.FirstOrDefault(Function(x) x.Id = nMachGroupId)
|
||||
If Not IsNothing(BeamMachGroup) Then
|
||||
Dim Beam As PartVM = BeamMachGroup.PartVMList.FirstOrDefault(Function(x) x.nPartId = nDuploId)
|
||||
EgtSetCurrMachGroup(BeamMachGroup.Id)
|
||||
Beam.DeletePart()
|
||||
End If
|
||||
' reset necessario per poter ottenere nMachGroupId corretto
|
||||
EgtResetCurrMachGroup()
|
||||
' aggiorno dati utilizzo barra
|
||||
BeamMachGroup.UpdateUsage()
|
||||
Next
|
||||
' aggiorno quantita' in prod
|
||||
Dim BTLPart As BTLPartVM = CALCPanelVM.GetBTLPartVMFromBTLPartId(nPartId)
|
||||
|
||||
@@ -157,13 +157,6 @@ Public Class MainWindowM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_bSpecialPanel As Boolean = False
|
||||
Friend ReadOnly Property bSpecialPanel As Boolean
|
||||
Get
|
||||
Return m_bSpecialPanel
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' FIELDS
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
@@ -242,8 +235,8 @@ Public Class MainWindowM
|
||||
EgtSetLockId( sLockId)
|
||||
End If
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2512, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2512, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2508, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2508, 1, m_nKeyOptions)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
m_sLogFile = m_sTempDir & "\" & VWOPTGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
@@ -285,8 +278,6 @@ Public Class MainWindowM
|
||||
EgtSetUiUnits(GetMainPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0)
|
||||
' Leggo e imposto livello utilizzatore
|
||||
m_nUserLevel = Math.Min(m_nKeyLevel, GetMainPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
|
||||
' Recupero flag SpecialPanel
|
||||
m_bSpecialPanel = GetMainPrivateProfileInt(S_SPECIAL, K_SPECIALENABLE, 0) = 1
|
||||
' Imposto dir font Nfe e font default
|
||||
Dim sNfeDir As String = String.Empty
|
||||
GetMainPrivateProfileString(S_GEOMDB, K_NFEFONTDIR, "", sNfeDir)
|
||||
|
||||
@@ -70,5 +70,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.5.12.2")>
|
||||
<Assembly: AssemblyFileVersion("2.5.12.2")>
|
||||
<Assembly: AssemblyVersion("2.5.8.1")>
|
||||
<Assembly: AssemblyFileVersion("2.5.8.1")>
|
||||
|
||||
+108
-66
@@ -22,6 +22,7 @@ Public Class NewOpenProjectFileDialogVM
|
||||
|
||||
Public Overrides Function Init(ProjectType As ProjectType, Optional CurrProjectList As List(Of ProjectFileVM) = Nothing, Optional GoToProd As Boolean = False) As Boolean?
|
||||
m_ProjectType = ProjectType
|
||||
ProdItem.m_delUpdateNameInDb = AddressOf DbControllers.m_ProdController.UpdateDescription
|
||||
|
||||
NotifyPropertyChanged(NameOf(FilterTypeList))
|
||||
m_SelFilterType = m_FilterTypeList(0)
|
||||
@@ -33,8 +34,9 @@ Public Class NewOpenProjectFileDialogVM
|
||||
SetFixedProjectList(True)
|
||||
NotifyPropertyChanged(NameOf(ProjectList))
|
||||
End If
|
||||
m_ProjectList_View = CollectionViewSource.GetDefaultView(m_ProjectList)
|
||||
m_ProjectList_View.Filter = AddressOf ProjectFilter
|
||||
'm_ProjectList_View = CollectionViewSource.GetDefaultView(m_ProjectList)
|
||||
'm_ProjectList_View.Filter = AddressOf ProjectFilter
|
||||
UpdatePageList()
|
||||
End Function
|
||||
|
||||
Public Overrides Sub RefreshProjectList(Optional GoToProd As Boolean = False)
|
||||
@@ -44,19 +46,19 @@ Public Class NewOpenProjectFileDialogVM
|
||||
Dim dtEnd As DateTime
|
||||
Dim nRowQuantity As Integer = 20
|
||||
Select Case SelRowQuantity
|
||||
Case RowQuantities.FIFTY
|
||||
nRowQuantity = 50
|
||||
Case RowQuantities.HUNDRED
|
||||
nRowQuantity = 100
|
||||
Case RowQuantities.HUNDREDANDFIFTY
|
||||
nRowQuantity = 150
|
||||
Case RowQuantities.TEN
|
||||
nRowQuantity = 10
|
||||
Case RowQuantities.TWENTY
|
||||
nRowQuantity = 20
|
||||
Case RowQuantities.THIRTY
|
||||
nRowQuantity = 30
|
||||
End Select
|
||||
Select Case m_SelDayType
|
||||
Case DayTypes.LASTMONTH
|
||||
dtEnd = DateTime.Today + TimeSpan.FromDays(1)
|
||||
dtStart = dtEnd - TimeSpan.FromDays(30.5)
|
||||
dtEnd = DateTime.Today.AddDays(1)
|
||||
dtStart = dtEnd.AddMonths(-1)
|
||||
Case DayTypes.LAST3MONTHS
|
||||
dtEnd = DateTime.Today + TimeSpan.FromDays(1)
|
||||
dtEnd = DateTime.Today.AddDays(1)
|
||||
dtStart = dtEnd - TimeSpan.FromDays(30.5 * 3)
|
||||
Case DayTypes.LAST6MONTHS
|
||||
dtEnd = DateTime.Today + TimeSpan.FromDays(1)
|
||||
@@ -70,31 +72,48 @@ Public Class NewOpenProjectFileDialogVM
|
||||
End Select
|
||||
' leggo da db
|
||||
If m_ProjectType = ProjectType.PROJ Then
|
||||
Dim DbProjList As New List(Of ProjFileM)
|
||||
If m_SelBTLDateType = BTLDateTypes.CREATEDATE Then
|
||||
DbProjList = DbControllers.m_ProjController.GetLastDesc(dtStart, dtEnd, nRowQuantity * 3, True, bViewArchived)
|
||||
Else
|
||||
DbProjList = DbControllers.m_ProjController.GetLastByExpDesc(dtStart, dtEnd, nRowQuantity * 3, True, bViewArchived)
|
||||
End If
|
||||
For Each Project In DbProjList
|
||||
If IsNothing(Project.nProjId) OrElse Project.nProjId = 0 Then Continue For
|
||||
' verifico se ha prod
|
||||
If Not IsNothing(Project.nProdId) And Project.nProdId > 0 Then
|
||||
' verifico se prod e' gia' stato creato
|
||||
Dim SameProdItem As ProdItem = m_ProjectList.FirstOrDefault(Function(x) Not IsNothing(x.ProdFileVM) AndAlso Not IsNothing(x.ProdFileVM.nProdId) AndAlso x.ProdFileVM.nProdId = Project.nProdId)
|
||||
If Not IsNothing(SameProdItem) Then
|
||||
SameProdItem.ProjFileList.Add(New ProjFileVM(Project))
|
||||
Else
|
||||
' recupero Prod
|
||||
Dim NewDbProd As ProdFileM = DbControllers.m_ProdController.FindCoreByProdId(Project.nProdId)
|
||||
If Not IsNothing(NewDbProd) Then
|
||||
m_ProjectList.Add(New ProdItem(New ProdFileVM(NewDbProd), New ProjFileVM(Project)))
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
m_ProjectList.Add(New ProdItem(New ProjFileVM(Project)))
|
||||
End If
|
||||
Next
|
||||
'Dim DbProjList As New List(Of ProjFileM)
|
||||
'If m_SelBTLDateType = BTLDateTypes.CREATEDATE Then
|
||||
' DbProjList = DbControllers.m_ProjController.GetLastDesc(dtStart, dtEnd, 100000, True, bViewArchived)
|
||||
' 'DbProjList = DbControllers.m_ProjController.GetLastDesc(dtStart, dtEnd, nRowQuantity * 3, True, bViewArchived)
|
||||
'Else
|
||||
' DbProjList = DbControllers.m_ProjController.GetLastByExpDesc(dtStart, dtEnd, nRowQuantity * 3, True, bViewArchived)
|
||||
'End If
|
||||
'For Each Project In DbProjList
|
||||
' If IsNothing(Project.nProjId) OrElse Project.nProjId = 0 Then Continue For
|
||||
' ' verifico se ha prod
|
||||
' If Not IsNothing(Project.nProdId) And Project.nProdId > 0 Then
|
||||
' ' verifico se prod e' gia' stato creato
|
||||
' Dim SameProdItem As ProdItem = m_ProjectList.FirstOrDefault(Function(x) Not IsNothing(x.ProdFileVM) AndAlso Not IsNothing(x.ProdFileVM.nProdId) AndAlso x.ProdFileVM.nProdId = Project.nProdId)
|
||||
' If Not IsNothing(SameProdItem) Then
|
||||
' SameProdItem.ProjFileList.Add(New ProjFileVM(Project))
|
||||
' Else
|
||||
' ' recupero Prod
|
||||
' Dim NewDbProd As ProdFileM = DbControllers.m_ProdController.FindCoreByProdId(Project.nProdId)
|
||||
' If Not IsNothing(NewDbProd) Then
|
||||
' m_ProjectList.Add(New ProdItem(New ProdFileVM(NewDbProd), New ProjFileVM(Project)))
|
||||
' End If
|
||||
' End If
|
||||
' Else
|
||||
' m_ProjectList.Add(New ProdItem(New ProjFileVM(Project)))
|
||||
' End If
|
||||
'Next
|
||||
m_ProjectList = New ObservableCollection(Of Core.ProdItem)(DbControllers.m_ProdController.GetLastDescFull(dtStart, dtEnd, nRowQuantity * 3, True, bViewArchived))
|
||||
'Dim sMachine As String = ""
|
||||
'Dim sBtlFileName As String = ""
|
||||
'Dim sListName As String = ""
|
||||
'Dim bIsCreationDate As Boolean = True
|
||||
'If SelFilterType.Id = FilterTypes.ID Then
|
||||
' ' sMachine = SearchText
|
||||
'ElseIf SelFilterType.Id = FilterTypes.BTLFILENAME Then
|
||||
' sBtlFileName = SearchText
|
||||
'ElseIf SelFilterType.Id = FilterTypes.LISTNAME Then
|
||||
' sListName = SearchText
|
||||
'ElseIf SelFilterType.Id = FilterTypes.MACHINE Then
|
||||
' sMachine = SearchText
|
||||
'End If
|
||||
'm_ProjectList = New ObservableCollection(Of Core.ProdItem)(DbControllers.m_ProdController.GetLastDescFull(dtStart, dtEnd, bIsCreationDate, nRowQuantity * 3, True, sMachine, sBtlFileName, sListName, bViewArchived))
|
||||
NotifyPropertyChanged(NameOf(ProjectList))
|
||||
ElseIf m_ProjectType = ProjectType.PROD Then
|
||||
Dim DbProdList As New List(Of ProdFileM)
|
||||
DbProdList = DbControllers.m_ProdController.GetLastDesc(dtStart, dtEnd, nRowQuantity, True, bViewArchived)
|
||||
@@ -135,6 +154,59 @@ Public Class NewOpenProjectFileDialogVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Function UpdatePageList() As Boolean
|
||||
Dim FilteredList As IEnumerable(Of Core.ProdItem) = m_ProjectList.Where(Function(x)
|
||||
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso m_SearchText <> String.Empty AndAlso
|
||||
((m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso x.ProjFileList.Any(Function(y) DirectCast(y, ProjFileVM).sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
(m_SelFilterType.Id = FilterTypes.LISTNAME AndAlso x.ProjFileList.Any(Function(y) DirectCast(y, ProjFileVM).sListName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
(m_SelFilterType.Id = FilterTypes.MACHINE AndAlso x.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then Return False
|
||||
Return True
|
||||
End Function)
|
||||
Dim nPageRowQty As Integer = 0
|
||||
Select Case m_SelRowQuantity
|
||||
Case RowQuantities.TEN
|
||||
nPageRowQty = 10
|
||||
Case RowQuantities.TWENTY
|
||||
nPageRowQty = 20
|
||||
Case RowQuantities.THIRTY
|
||||
nPageRowQty = 30
|
||||
End Select
|
||||
Dim nStart = (nPageIndex - 1) * nPageRowQty
|
||||
Dim nEnd = Math.Min((nPageIndex * nPageRowQty), FilteredList.Count())
|
||||
If nStart > FilteredList.Count() Then
|
||||
Return False
|
||||
End If
|
||||
' FilteredList = FilteredList.OrderBy(Of ProdItem)()
|
||||
m_PageList = New ObservableCollection(Of ProdItem)(FilteredList.Skip(nStart).Take(nPageRowQty).Select(Function(x) x))
|
||||
'm_PageList.Clear()
|
||||
'For Index = nStart To nEnd
|
||||
' m_PageList.Add(FilteredList(Index))
|
||||
'Next
|
||||
NotifyPropertyChanged(NameOf(PageList))
|
||||
Return True
|
||||
|
||||
'Dim bProjectOk As Boolean = True
|
||||
''If TypeOf Proj Is ProjFileVM Then
|
||||
'Dim CurrProj As ProdItem = DirectCast(PROJ, ProdItem)
|
||||
'If m_SelFilterType.Id <> FilterTypes.NULL AndAlso (
|
||||
' (m_SelFilterType.Id = BTLDateTypes.EXPORTDATE AndAlso Not CurrProj.ProjFileList.Any(Function(x) SearchDate.Contains(DirectCast(x, ProjFileVM).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.BTLFILENAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
' (m_SelFilterType.Id = FilterTypes.LISTNAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sListName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
' (m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
|
||||
'ElseIf TypeOf Proj Is ProdFileVM 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
|
||||
' Return bProjectOk
|
||||
End Function
|
||||
|
||||
Public Overrides Sub Archive()
|
||||
If IsNothing(SelProject) Then Return
|
||||
If Not IsNothing(SelProject.ProdFileVM) Then
|
||||
@@ -250,33 +322,3 @@ Public Class NewOpenProjectFileDialogVM
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
|
||||
Public Class ProdItem
|
||||
Inherits Core.ProdItem
|
||||
|
||||
Public Overrides Property sName As String
|
||||
Get
|
||||
Return If(Not IsNothing(m_ProdFileVM), m_ProdFileVM.sName, "")
|
||||
End Get
|
||||
Set(value As String)
|
||||
If Not IsNothing(m_ProdFileVM) Then
|
||||
DbControllers.m_ProdController.UpdateDescription(m_ProdFileVM.nProdId, value)
|
||||
m_ProdFileVM.sName = value
|
||||
m_delIsModifiedSetUp(False)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(ProdFileVM As ProdFileVM, ProjFileVM As ProjFileVM)
|
||||
MyBase.New(ProdFileVM, ProjFileVM)
|
||||
End Sub
|
||||
|
||||
Sub New(ProjFileVM As ProjFileVM)
|
||||
MyBase.New(ProjFileVM)
|
||||
End Sub
|
||||
|
||||
Sub New(ProdFileVM As ProjectFileVM, ProjFileVMList As List(Of ProjectFileVM))
|
||||
MyBase.New(ProdFileVM, ProjFileVMList)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -438,7 +438,7 @@ Public Class ProjManagerVM
|
||||
Dim OpenFile As New NewOpenProjectFileDialogV(Application.Current.MainWindow, OpenProdFileDialogVM)
|
||||
Dim DialogResult As Boolean? = OpenFile.EgtShowDialog(ProjectType.PROJ)
|
||||
If IsNothing(DialogResult) OrElse Not DialogResult Then Return
|
||||
Dim TempProd As ProdItem = OpenProdFileDialogVM.SelProject
|
||||
Dim TempProd As Core.ProdItem = OpenProdFileDialogVM.SelProject
|
||||
If TempProd.ProjFileList.Count > 1 Then
|
||||
' apro dialogo di scelta Proj
|
||||
Dim OpenProjFileDialogVM As OpenProjectFileDialogVM = Nothing
|
||||
|
||||
@@ -52,8 +52,6 @@
|
||||
<EgtBEAMWALL:ViewPanelV DataContext="{StaticResource ViewPanelVM}"/>
|
||||
<EgtBEAMWALL:InstrumentPanelV DataContext="{StaticResource InstrumentPanelVM}"/>
|
||||
<EgtBEAMWALL:CalcPanelV DataContext="{StaticResource CALCPanelVM}"/>
|
||||
<EgtBEAMWALL:SpecialPanelV DataContext="{StaticResource SpecialPanelVM}"
|
||||
Visibility="{Binding DataContext.SpecialPanel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"/>
|
||||
<EgtBEAMWALL:FreeContourManagerV DataContext="{StaticResource FreeContourManagerVM}"
|
||||
Visibility="{Binding DataContext.FreeContourManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"/>
|
||||
</WrapPanel>
|
||||
|
||||
@@ -3,7 +3,6 @@ Imports EgtBEAMWALL.Core
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtUILib
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtBEAMWALL.DataLayer.Controllers
|
||||
|
||||
Public Class ProjectVM
|
||||
Inherits VMBase
|
||||
@@ -12,12 +11,6 @@ Public Class ProjectVM
|
||||
|
||||
Private m_Calc_Timer As New DispatcherTimer
|
||||
|
||||
Friend Event OnPreControllerExec(sFilePath As String)
|
||||
Friend Event OnPostControllerExec()
|
||||
|
||||
' Flag per non salvare Script appena eseguito in elenco MruScript
|
||||
Private m_bScriptInMru As Boolean = True
|
||||
|
||||
Private Property m_GridDims As New ObservableCollection(Of GridDimension)
|
||||
Public Property GridDims As ObservableCollection(Of GridDimension)
|
||||
Get
|
||||
@@ -196,13 +189,6 @@ Public Class ProjectVM
|
||||
NotifyPropertyChanged("FreeContourManager_Visibility")
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property SpecialPanel_Visibility As Visibility
|
||||
Get
|
||||
Return If(Map.refMainWindowVM.MainWindowM.bSpecialPanel AndAlso Map.refMainWindowVM.MainWindowM.nUserLevel > 5, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Friend Sub NotifyAllPanelVisibility()
|
||||
NotifyPropertyChanged("LeftPanel_Visibility")
|
||||
NotifyPropertyChanged("TopPanel_Visibility")
|
||||
|
||||
@@ -59,8 +59,6 @@ Public Class MySceneHostVM
|
||||
PostInitializeScene()
|
||||
' Imposto stato gestione mouse diretto della scena a nessuno
|
||||
MainScene.SetStatusNull()
|
||||
' Imposto focus pulsante su false
|
||||
MainScene.SetFocusOnMove(False)
|
||||
' Recupero e imposto handle finestra principale
|
||||
Dim hMainWnd As IntPtr = New WindowInteropHelper(Application.Current.MainWindow).Handle
|
||||
EgtSetMainWindowHandle(hMainWnd)
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="SpecialPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
IsTopDockable="True" IsBottomDockable="False" IsLeftDockable="False"
|
||||
IsRightDockable="False" Style="{StaticResource ToolBar_EgtFloatingPanel}">
|
||||
|
||||
<ItemsControl ItemsSource="{Binding ButtonList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}"
|
||||
Visibility="{Binding Btn_Visibility}" IsEnabled="{Binding Btn_IsEnabled}">
|
||||
<Image Source="{Binding ImagePath}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
@@ -1,3 +0,0 @@
|
||||
Public Class SpecialPanelV
|
||||
|
||||
End Class
|
||||
@@ -1,202 +0,0 @@
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtBEAMWALL.Core
|
||||
|
||||
Public Class SpecialPanelVM
|
||||
|
||||
Private m_ButtonList As New List(Of ButtonItem)
|
||||
Public ReadOnly Property ButtonList As List(Of ButtonItem)
|
||||
Get
|
||||
Return m_ButtonList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in Map
|
||||
Map.SetRefSpecialPanelVM(Me)
|
||||
' se attivo, inizializzo i bottoni leggendoli da file ini
|
||||
If Map.refMainWindowVM.MainWindowM.bSpecialPanel Then
|
||||
Dim BtnIndex As Integer = 1
|
||||
Dim CurrBtn As ButtonItem = Nothing
|
||||
While GetPrivateProfileButton(S_SPECIAL, K_BUTTON & BtnIndex, "", CurrBtn)
|
||||
m_ButtonList.Add(CurrBtn)
|
||||
BtnIndex += 1
|
||||
End While
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Function SetSpecialPanelButtonsVisibility(IsMachMode As Boolean) As Boolean
|
||||
Dim bSpecialPanel_Visible As Boolean = False
|
||||
For Each BtnItem In m_ButtonList
|
||||
' verifico il valore di nDrawMachOrBoth del bottone e IsMachMode per rendere visibile o meno il bottone in ButtonList
|
||||
Select Case BtnItem.nDrawMachOrBoth
|
||||
Case 0 ' bottone nascosto
|
||||
BtnItem.m_Btn_Visibility = Visibility.Collapsed
|
||||
Case 1 ' bottone visibile solo in Draw
|
||||
BtnItem.m_Btn_Visibility = If(Not IsMachMode, Visibility.Visible, Visibility.Collapsed)
|
||||
Case 2 ' bottone visibile solo in Machining
|
||||
BtnItem.m_Btn_Visibility = If(IsMachMode, Visibility.Visible, Visibility.Collapsed)
|
||||
Case 3 ' bottone visibile sia in Draw che in Machining
|
||||
BtnItem.m_Btn_Visibility = Visibility.Visible
|
||||
End Select
|
||||
' se anche uno solo è visibile anche lo SpecialPanel dovrà esserlo
|
||||
If BtnItem.Btn_Visibility = Visibility.Visible Then bSpecialPanel_Visible = True
|
||||
'BtnItem.OnPropertyChanged(NameOf(BtnItem.Btn_Visibility))
|
||||
BtnItem.NotifyPropertyChanged(NameOf(BtnItem.Btn_Visibility))
|
||||
Next
|
||||
Return bSpecialPanel_Visible
|
||||
End Function
|
||||
|
||||
Friend Sub SpecialPanelIsEnabled(SpecialPanelBtn_IsEnabled As Boolean)
|
||||
For Each BtnItem In m_ButtonList
|
||||
BtnItem.m_Btn_IsEnabled = SpecialPanelBtn_IsEnabled
|
||||
'BtnItem.OnPropertyChanged(NameOf(BtnItem.Btn_IsEnabled))
|
||||
BtnItem.NotifyPropertyChanged(NameOf(BtnItem.Btn_IsEnabled))
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Function GetPrivateProfileButton(sSection As String, sKey As String, sBaseDir As String, ByRef ReadButtonItem As ButtonItem) As Boolean
|
||||
ReadButtonItem = Nothing
|
||||
Dim sVal As String = String.Empty
|
||||
GetMainPrivateProfileString(sSection, sKey, "", sVal)
|
||||
If String.IsNullOrWhiteSpace(sVal) Then Return False
|
||||
Dim sItems() As String = sVal.Split(","c)
|
||||
If sItems.Count() >= 1 Then
|
||||
Dim sLuaPath As String = sItems(0)
|
||||
Dim sImagePath As String = If(sItems.Count() >= 2, sItems(1), "")
|
||||
Dim sToolTip As String = If(sItems.Count() >= 3, sItems(2), "")
|
||||
Dim sDrawMachOrBoth As String = If(sItems.Count() >= 4 AndAlso Not String.IsNullOrWhiteSpace(sItems(3)), sItems(3), "1")
|
||||
If Not String.IsNullOrWhiteSpace(sBaseDir) And Not String.IsNullOrWhiteSpace(sLuaPath) Then
|
||||
If sLuaPath.Contains(".lua") Then sLuaPath = sBaseDir & "\" & sLuaPath
|
||||
If Not String.IsNullOrWhiteSpace(sImagePath) Then sImagePath = sBaseDir & "\" & sImagePath
|
||||
End If
|
||||
ReadButtonItem = New ButtonItem(sSection, sLuaPath, sImagePath, sToolTip, sDrawMachOrBoth)
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
|
||||
Public Class ButtonItem
|
||||
Inherits VMBase
|
||||
|
||||
Friend Shared WithEvents m_ProjectVM As ProjectVM
|
||||
Private Shared m_sCurrBarName As String
|
||||
|
||||
Private m_sBarName As String
|
||||
Private m_sImagePath As String
|
||||
Public ReadOnly Property ImagePath As String
|
||||
Get
|
||||
Return m_sImagePath
|
||||
End Get
|
||||
End Property
|
||||
Private m_sLuaCmdPath As String
|
||||
Private m_sToolTip As String
|
||||
Public ReadOnly Property ToolTip As String
|
||||
Get
|
||||
Return m_sToolTip
|
||||
End Get
|
||||
End Property
|
||||
Private m_nDrawMachOrBoth As Integer
|
||||
Public ReadOnly Property nDrawMachOrBoth As Integer
|
||||
Get
|
||||
Return m_nDrawMachOrBoth
|
||||
End Get
|
||||
End Property
|
||||
Friend m_Btn_Visibility As Visibility
|
||||
Public ReadOnly Property Btn_Visibility As Visibility
|
||||
Get
|
||||
Return m_Btn_Visibility
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend m_Btn_IsEnabled As Boolean = True
|
||||
Public ReadOnly Property Btn_IsEnabled As Boolean
|
||||
Get
|
||||
Return m_Btn_IsEnabled
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdLuaExec As ICommand
|
||||
|
||||
Sub New( sBarName As String, sLuaCmdPath As String, sImagePath As String, sToolTip As String, sDrawMachOrBoth As String)
|
||||
m_sBarName = sBarName
|
||||
If File.Exists(sImagePath) Then
|
||||
' per lasciare libere le immagini le copio (potrebbe fallire perchè bloccate da altro eseguibile)
|
||||
Dim sNewPath As String = Path.Combine(Map.refMainWindowVM.MainWindowM.sResourcesRoot, sBarName & "_" & Path.GetFileName(sImagePath))
|
||||
Try
|
||||
File.Copy( sImagePath, sNewPath, True)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
m_sImagePath = sNewPath
|
||||
Else
|
||||
m_sImagePath = Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\" & sImagePath
|
||||
End If
|
||||
m_sLuaCmdPath = sLuaCmdPath
|
||||
m_sToolTip = sToolTip
|
||||
If Not Integer.TryParse(sDrawMachOrBoth, m_nDrawMachOrBoth) Then m_nDrawMachOrBoth = 0
|
||||
End Sub
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "LuaExecCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do New.
|
||||
''' </summary>
|
||||
Public ReadOnly Property LuaExecCommand As ICommand
|
||||
Get
|
||||
If m_cmdLuaExec Is Nothing Then
|
||||
m_cmdLuaExec = New Command(AddressOf LuaExec)
|
||||
End If
|
||||
Return m_cmdLuaExec
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the New. This method is invoked by the NewCommand.
|
||||
''' </summary>
|
||||
Public Sub LuaExec(ByVal param As Object)
|
||||
If String.IsNullOrWhiteSpace(m_sLuaCmdPath) Then Return
|
||||
If Not File.Exists(m_sLuaCmdPath) Then Return
|
||||
If Not Path.GetExtension(m_sLuaCmdPath).ToLower = ".lua" Then Return
|
||||
' Abilito eventi se comando lua termina con Beam\Process.lua
|
||||
m_sCurrBarName = m_sBarName
|
||||
Dim bRaiseEvent As Boolean = ( m_sBarName = "Beam" OrElse m_sBarName = "Wall")
|
||||
' eseguo file Lua
|
||||
EgtBEAMWALL.ViewerOptimizer.LuaExec.ExecScript(m_sLuaCmdPath, bRaiseEvent)
|
||||
m_sCurrBarName = Nothing
|
||||
End Sub
|
||||
|
||||
'Private Shared Sub OnPreControllerExec(sFilePath As String) Handles m_ProjectVM.OnPreControllerExec
|
||||
' If m_sCurrBarName = "Beam" Then
|
||||
' EgtLuaCreateGlobTable("BEAM")
|
||||
' EgtLuaSetGlobStringVar("BEAM.BASEDIR", IniFile.m_sBeamDirPath)
|
||||
' If EgtGetUserLevel() >= 9 AndAlso GetPrivateProfileInt(S_LUA, K_BWSIM, 0) = 1 then EgtLuaSetGlobBoolVar("BEAM.BW", true)
|
||||
' ElseIf m_sCurrBarName = "Wall" Then
|
||||
' EgtLuaCreateGlobTable("WALL")
|
||||
' EgtLuaSetGlobStringVar("WALL.BASEDIR", IniFile.m_sWallDirPath)
|
||||
' If EgtGetUserLevel() >= 9 AndAlso GetPrivateProfileInt(S_LUA, K_BWSIM, 0) = 1 then EgtLuaSetGlobBoolVar("WALL.BW", true)
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
'Private Shared Sub OnPostControllerExec() Handles m_ProjectVM.OnPostControllerExec
|
||||
' If m_sCurrBarName = "Beam" Then
|
||||
' EgtLuaResetGlobVar("BEAM")
|
||||
' ElseIf m_sCurrBarName = "Wall" Then
|
||||
' EgtLuaResetGlobVar("WALL")
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
#End Region ' LuaExecCommand
|
||||
|
||||
#End Region ' Commands
|
||||
|
||||
End Class
|
||||
@@ -68,8 +68,6 @@ Public Module DbControllers
|
||||
DataLayer.DbConfig.CheckMigrateDb()
|
||||
DataLayer.DbConfig.CheckUser(sUser, sPwd, m_bNetwork AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK))
|
||||
DataLayer.DbConfig.CheckViews(sUser, sPwd)
|
||||
' riattivare il dump per il backup
|
||||
'DataLayer.DbConfig.DumpDB("C:\Program Files\MariaDB 10.5\bin\mysqldump", "c:\Temp\Pippo.sql")
|
||||
If m_bNetwork AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK) Then
|
||||
' imposto cartella condivisa
|
||||
GetMainPrivateProfileString(S_GENERAL, K_SHAREDFOLDER, Map.refMainWindowVM.MainWindowM.sDataDir, sSharedFolder)
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
<OmagOFFICE:MachiningTabVM x:Key="MachiningTabVM"/>
|
||||
<OmagOFFICE:SimulTabVM x:Key="SimulTabVM"/>-->
|
||||
<EgtBEAMWALL:MyMachGroupPanelVM x:Key="MachGroupPanelVM"/>
|
||||
<EgtBEAMWALL:SpecialPanelVM x:Key="SpecialPanelVM"/>
|
||||
|
||||
<!--Colori predefiniti-->
|
||||
<SolidColorBrush x:Key="Omag_Blue" Color="#FF095CA8" />
|
||||
@@ -311,13 +310,6 @@
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
|
||||
<Style x:Key="DrawPanelButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="30"/>
|
||||
</Style>
|
||||
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- TextBlock -->
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtBEAMWALL.DataLayer.Controllers
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
@@ -204,17 +203,4 @@ Module LuaExec
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
' Special Panel
|
||||
Friend Sub ExecScript(sFilePath As String, Optional bRaiseEvent As Boolean = False)
|
||||
EgtLuaExecFile(sFilePath)
|
||||
|
||||
'Dim bMachiningMode As Boolean = EgtGetCurrMachGroup() <> GDB_ID.NULL
|
||||
'If Not bMachiningMode And EgtGetCurrLayer() = GDB_ID.NULL Then
|
||||
' Dim nCurrPart As Integer = EgtGetCurrPart()
|
||||
' If nCurrPart = GDB_ID.NULL Or Not EgtSetCurrPartLayer(nCurrPart, EgtGetFirstLayer(nCurrPart, True)) Then
|
||||
' EgtResetCurrPartLayer()
|
||||
' End If
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
|
||||
@@ -34,7 +34,6 @@ Module Map
|
||||
Private m_refFeatureManagerVM As FeatureManagerVM
|
||||
Private m_refAddSectionXMaterialWndVM As AddSectionXMaterialWndVM
|
||||
Private m_refStatisticsTimePanelVM As StatisticsTimePanelVM
|
||||
Private m_refSpecialPanelVM As SpecialPanelVM
|
||||
'Private m_refOpenProjectFileDialogVM As OpenProjectFileDialogVM
|
||||
'Private m_refRawPartTabVM As RawPartTabVM
|
||||
'Private m_refNestingTabVM As NestingTabVM
|
||||
@@ -242,12 +241,6 @@ Module Map
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property refSpecialPanelVM As SpecialPanelVM
|
||||
Get
|
||||
Return m_refSpecialPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'Public ReadOnly Property refOpenProjectFileDialogVM As OpenProjectFileDialogVM
|
||||
' Get
|
||||
' Return m_refOpenProjectFileDialogVM
|
||||
@@ -460,12 +453,6 @@ Module Map
|
||||
Return Not IsNothing(m_refStatisticsTimePanelVM)
|
||||
End Function
|
||||
|
||||
Friend Function SetRefSpecialPanelVM(SpecialPanelVM As SpecialPanelVM) As Boolean
|
||||
m_refSpecialPanelVM = SpecialPanelVM
|
||||
Return Not IsNothing(m_refSpecialPanelVM)
|
||||
End Function
|
||||
|
||||
|
||||
'Friend Function SetRefOpenProjectFileDialogVM(OpenProjectFileDialogVM As OpenProjectFileDialogVM) As Boolean
|
||||
' m_refOpenProjectFileDialogVM = OpenProjectFileDialogVM
|
||||
' Return Not IsNothing(m_refOpenProjectFileDialogVM)
|
||||
@@ -539,7 +526,7 @@ Module Map
|
||||
Not IsNothing(m_refStatisticsVM) AndAlso Not IsNothing(m_refPParameterListVM) AndAlso
|
||||
Not IsNothing(m_refQParameterListVM) AndAlso Not IsNothing(m_refFeatureManagerVM) AndAlso
|
||||
Not IsNothing(m_refAddSectionXMaterialWndVM) AndAlso Not IsNothing(m_refStatisticsTimePanelVM) AndAlso
|
||||
Not IsNothing(m_refSpecialPanelVM) AndAlso LibMap.EndInit()
|
||||
LibMap.EndInit()
|
||||
End Function
|
||||
|
||||
#End Region ' Init
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user