Compare commits

...

7 Commits

Author SHA1 Message Date
Nicola Pievani 0cc673b047 Nuova gestione chiave di protezione CUT_LIGHT 2024-02-09 17:58:33 +01:00
Nicola Pievani acc1365fd2 Correzione init chiave per CUT_LIGHT 2024-02-09 15:38:37 +01:00
Nicola Pievani 7dcf1fe8dc Inserita lettura Flag CUT_LIGHT 2024-02-09 15:09:53 +01:00
Nicola Pievani cd748dea7a Cambio nome variabile 2024-02-08 09:32:02 +01:00
Nicola Pievani c2f03a883a Inserito commeto per gestione chiave di protezione 2024-02-07 18:11:40 +01:00
Nicola Pievani 9b09eeaa9c Aggiunta variabile per gestione OnlyFrame 2024-02-07 18:04:59 +01:00
Nicola Pievani 919890e68d - Nascondo utensile PROBE - Pagina ASSISTENZA in scandeza - Correzione Text per spostamenti 2024-02-06 15:04:00 +01:00
15 changed files with 224 additions and 19 deletions
+10 -5
View File
@@ -23,7 +23,8 @@
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.25*"/>
</Grid.RowDefinitions>
@@ -44,13 +45,17 @@
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="KeyLbl" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="MachineLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Center"
<TextBlock Name="AssStatusLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="ProjectLbl" Grid.Column="1" Grid.Row="7" HorizontalAlignment="Center"
<TextBlock Name="MachineLbl" Grid.Column="1" Grid.Row="7" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="8" HorizontalAlignment="Center"
<TextBlock Name="ProjectLbl" Grid.Column="1" Grid.Row="8" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="9" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="15" />
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="10" IsCancel="True"
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="11" IsCancel="True"
Style="{DynamicResource OmagCut_WindowGrayTextButton}" Margin="1,0"/>
</Grid>
+13
View File
@@ -33,6 +33,19 @@ Public Class AboutBoxWD
#Else
KeyLbl.Text = sKey & " - " & sOpts
#End If
' COPIATO da codice CAM5
Dim sAssStatus As String = " discontinued"
Dim nAssLeftDays As Integer
If EgtGetKeyAssLeftDays(nAssLeftDays) And nAssLeftDays >= 0 Then
If nAssLeftDays > 30 Then
sAssStatus = "expires within " & nAssLeftDays.ToString() & " days"
ElseIf nAssLeftDays > 0 Then
sAssStatus = "to be renewed within " & nAssLeftDays.ToString() & " days"
Else
sAssStatus = "to be renewed by today"
End If
End If
AssStatusLbl.Text = sAssStatus
CopyrightLbl.Text = My.Application.Info.Copyright.ToString()
MachineLbl.Text = "Machine : " & m_MainWindow.m_CurrentMachine.sMachineName
ProjectLbl.Text = "Project : " & m_MainWindow.m_CurrentProjectPageUC.GetCurrentProjectName()
+4 -1
View File
@@ -3063,7 +3063,10 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
Else
m_dRegStep = Math.Max(dVal, 2 * EPS_SMALL)
End If
WritePrivateProfileString(S_NEST, K_STEP, StepMoveTxBx.Text, m_MainWindow.GetIniFile())
Dim dCurrVal As Double = 0
StringToLen(StepMoveTxBx.Text, dCurrVal)
DoubleToString(dCurrVal, 2)
WritePrivateProfileString(S_NEST, K_STEP, DoubleToString(dCurrVal, 2), m_MainWindow.GetIniFile())
End If
End Sub
-2
View File
@@ -343,7 +343,6 @@ Public Class SplitPageUC
EgtTrimCurveEndAtLen(nIdBridge, dLen - 10 * EPS_SMALL)
EgtTrimCurveStartAtLen(nIdBridge, 10 * EPS_SMALL)
End If
' EgtSaveFile("c:\EgtData\OmagCUT\Temp\Bridge.nge", NGE.BIN)
Dim nIdPart As Integer = GDB_ID.NULL
nIdPart = EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId)
While nIdPart <> GDB_ID.NULL
@@ -351,7 +350,6 @@ Public Class SplitPageUC
Dim nIdSurf As Integer = EgtGetFirstInGroup(nIdRegion)
While nIdSurf <> GDB_ID.NULL
If EgtGetType(nIdSurf) = GDB_TY.SRF_FRGN Then
' EgtSaveFile("c:\EgtData\OmagCUT\Temp\Bridge.nge", NGE.BIN)
' se la linea bridge interseca la superficie allora restitusco false
If EgtCurveWithRegionClassify(nIdBridge, nIdSurf) <> CREGC.OUT Then
EgtExtendCurveStartByLen(nIdBridge, 10 * EPS_SMALL)
+1
View File
@@ -19,6 +19,7 @@ Module ConstIni
Public Const K_DEBUG As String = "Debug"
Public Const K_LICENCE As String = "Licence"
Public Const K_NETKEY As String = "NetKey"
Public Const K_LOCKID As String = "LockId"
Public Const K_MESSAGESDIR As String = "MessagesDir"
Public Const K_MESSAGES As String = "Messages"
Public Const K_SUPPORT As String = "Support"
+1 -1
View File
@@ -1190,7 +1190,7 @@ Public Class DrawPageUC
If Keyboard.Modifiers And ModifierKeys.Shift Then
bExitPage = Not bExitPage
End If
If bExitPage Then
If bExitPage And m_MainWindow.FrameCutBtn.IsChecked Then
' Aggiorno ambiente principale
EgtZoom(ZM.ALL)
' Elimino nome del componente precedente
+63
View File
@@ -0,0 +1,63 @@
<Window x:Class="LicenseWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
FontFamily="{DynamicResource OmagCut_Font}"
Title="OpenFile" Height="500.6" Width="426.6" WindowStyle="None"
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
Background="Transparent">
<Border Style="{DynamicResource OmagCut_Border}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1.5*"/>
<RowDefinition Height="5.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1.5*"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3"
Orientation="Horizontal"
HorizontalAlignment="Center">
<TextBlock Name="IconTxBl" Foreground="White" FontSize="32"
VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Name="LicenseTxBl"
Foreground="White" FontSize="20"
VerticalAlignment="Center" HorizontalAlignment="Left"
TextWrapping="Wrap"/>
</StackPanel>
<StackPanel Grid.Column="1" Grid.Row="2" Orientation="Horizontal"
HorizontalAlignment="Center">
<ScrollViewer Name="MyScrollViewer" VerticalScrollBarVisibility="Auto">
<TextBlock Name="LicenseMsgTxBl" MaxWidth="340"
HorizontalAlignment="Center"
Foreground="{DynamicResource Omag_White}" FontSize="20" VerticalAlignment="Center"
TextWrapping="Wrap"/>
</ScrollViewer>
</StackPanel>
<Grid Grid.Column="1" Grid.Row="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
</Grid>
</Border>
</Window>
+37
View File
@@ -0,0 +1,37 @@
Public Class LicenseWindow
Private m_sMessage As String = String.Empty
Private m_sTitle As String = String.Empty
Public Sub New(Owner As Window, sMsg As String, sTitle As String)
Me.Owner = Owner
m_sMessage = sMsg
m_sTitle = sTitle
' La chiamata è richiesta dalla finestra di progettazione.
InitializeComponent()
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
End Sub
Public Sub Init() Handles Me.Initialized
IconTxBl.Text = "⚠️"
LicenseTxBl.Text = "Warning" & vbCrLf & m_sTitle
m_sMessage = m_sMessage.Replace("/n", "£")
Dim sItems As String() = m_sMessage.Split("£")
For Index As Integer = 0 To sItems.Count - 1
If Index = 0 Then
m_sMessage = sItems(Index)
Else
m_sMessage &= vbCrLf & sItems(Index)
End If
Next
LicenseMsgTxBl.Text = m_sMessage
End Sub
Public Sub Exit_Click() Handles ExitBtn.Click
Me.Close()
End Sub
End Class
+1 -1
View File
@@ -208,7 +208,7 @@ Public Class MachiningDbPageUC
MillTool.Clear()
bFound = EgtTdbGetFirstTool(MCH_TF.MILL, sToolName, nType)
While bFound
If nType = MCH_TY.MILL_STD Then MillTool.Add( sToolName)
If nType = MCH_TY.MILL_STD And sToolName.Trim.ToLower <> "probe" Then MillTool.Add(sToolName)
bFound = EgtTdbGetNextTool(MCH_TF.MILL, sToolName, nType)
End While
PocketTool.Clear()
+10 -1
View File
@@ -695,7 +695,16 @@ Public Class ToolsDbPageUC
Dim ToolName As String = String.Empty
Dim bFound As Boolean = EgtTdbGetFirstTool(nTType, ToolName, nType)
While bFound
If nType = nTType Then ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
Dim nDebug As Integer = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0, m_sIniFile)
If nType = nTType Then
If nTType <> MCH_TY.MILL_STD Then
' se utensile diverso da MILL
ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
ElseIf nTType <> MCH_TY.MILL_STD And ToolName.Trim.ToLower = "probe" And nDebug > 4 Then
' Se utensile MILL con nome "probe" aggiungo solo se livello debug maggiore di 4
ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
End If
End If
bFound = EgtTdbGetNextTool(nTType, ToolName, nType)
End While
ToolsList.Add(ToolCathegory)
+76 -4
View File
@@ -23,6 +23,9 @@ Class MainWindow
' Coefficiente di scalatura della finestra rispetto a standard
Friend m_dMWinScale As Double = 1
' Variabile che definisce l'avvio forzato in modalità FRAME
Friend m_OnlyFrame As Boolean = False
' Dichiarazione delle Page UserControl
Friend m_WorkInProgressPageUC As WorkInProgressPageUC
Friend m_CurrentProjectPageUC As CurrentProjectPageUC
@@ -101,6 +104,7 @@ Class MainWindow
REGISTRATION = 2 ^ 20 ' 1048576
SIMPLESTATISTICS = 2 ^ 21 ' 2097152
COMPOFRAME = 2 ^ 22 ' 4194304
CUT_LIGHT = 2 ^ 23 ' 8388608
End Enum
' Opzione nesting automatico
Private m_bAutoNest As Boolean = False
@@ -326,6 +330,16 @@ Class MainWindow
EgtSetNestKey(sNestKey)
Dim bNetHwKey As Boolean = (GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0, m_sIniFile) = 1)
EgtSetNetHwKey(bNetHwKey)
' Impostazioni per chiave di rete
Dim bNetKey As Boolean = (GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0, m_sIniFile) = 1)
EgtSetNetHwKey(bNetKey)
Dim sLockId As String = ""
EgtUILib.GetPrivateProfileString(S_LICENCE, K_LOCKID, "", sLockId, sLicFile)
If Not String.IsNullOrEmpty(sLockId) Then
EgtSetLockId(sLockId)
End If
' Verifico abilitazione nesting automatico
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
' Recupero opzioni della chiave
@@ -333,6 +347,12 @@ Class MainWindow
EgtGetKeyOptions(9423, 2512, 1, m_nKeyOptions)
' Verifico abilitazione prodotto
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
' Impostazione per programma OnlyFrame: solo se CUT_BASE non attivo
If Not bProd Then
m_OnlyFrame = GetKeyOption(KEY_OPT.CUT_LIGHT)
End If
' Inizializzazione generale di EgtInterface
m_nDebug = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0, m_sIniFile)
m_sVersion = My.Application.Info.Version.Major.ToString() & "." &
@@ -634,6 +654,28 @@ Class MainWindow
m_IdleTimer.Interval = TimeSpan.FromMilliseconds(100)
m_IdleTimer.Start()
Dim sAssStatus As String = " discontinued"
Dim nAssLeftDays As Integer
If EgtGetKeyAssLeftDays(nAssLeftDays) And nAssLeftDays >= 0 Then
If nAssLeftDays > 30 Then
sAssStatus = "expires within " & nAssLeftDays.ToString() & " days"
ElseIf nAssLeftDays > 0 Then
sAssStatus = "to be renewed within " & nAssLeftDays.ToString() & " days"
Else
sAssStatus = "to be renewed by today"
End If
End If
If (nAssLeftDays <= 7 And nAssLeftDays >= 0) Or nAssLeftDays = 14 Or nAssLeftDays = 21 Or nAssLeftDays = 28 Or nAssLeftDays = 364 Then
'Dim sText As String = "Fai ammenda," & vbCrLf & "gli aggiornamenti sono in fase di scadenza!"
'Dim sTitle As String = "⚠️ Warning!"
'Dim MissingKeyWnd As New EgtMsgBox(Me, sTitle, sText, EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
' finestra Custom
Dim MyLicWn As New LicenseWindow(Me, "FAI AMMENDA /nSTAI ACCORTO /ncontatta chi potrebbe aiutari, du seguito gli indirizzi utili per risolvere" &
" alcuni problemi, ricorda che NON FACCIAMO MIRACOLI : /n → Assorrata", "Assistance " & sAssStatus)
MyLicWn.Show()
End If
' inizilizzo
End Sub
@@ -1100,7 +1142,7 @@ Class MainWindow
End If
' Inizio la chiusura del programma (se NUM_OLD verifico di aver terminato il processo DripFeed)
EgtOutLog("Iniziato processo di chiusura programma")
m_IsClosingApplication = If( m_CNCommunication.m_nNCType = 1, 1, 2)
m_IsClosingApplication = If(m_CNCommunication.m_nNCType = 1, 1, 2)
Dim nCount As Integer = 0
While m_IsClosingApplication <> 2
If nCount > 5 Then
@@ -1238,11 +1280,16 @@ Class MainWindow
m_ProdLineTimer.Start()
End If
' di default attivo la pagina CadCut
m_ActivePage = MainWindow.Pages.CadCut
If m_OnlyFrame Then
m_ActivePage = MainWindow.Pages.FrameCut
Else
m_ActivePage = MainWindow.Pages.CadCut
End If
' seleziono il tipo di avvio
m_CurrentProjectPageUC.StartProgram()
' aggiorno la grafica
EgtZoom(ZM.ALL, True)
End Sub
Friend Sub EgtWPFInit()
@@ -1274,8 +1321,33 @@ Class MainWindow
Dim bHeadH1 As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
EgtSetCurrentContext(nCurrCtx)
' Aggiorno interfaccia
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS) AndAlso bHeadH1
If m_OnlyFrame Then
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS And m_ActivePage <> Pages.RawPart Then
Dim FrameWnd As New EgtMsgBox(Me, "NON PUOI", "La tua licenza non è abilitata CAD", EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
'' Gestione stato FastGrid
'm_CadCutPageUC.m_FastGridSlabManager.OnPreNewProject()
' Cancello progetto salvato con nome da file ini
WritePrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, "", GetIniFile())
' Scelta tavola della macchina
Dim nTabInd As Integer = m_CadCutPageUC.m_ProjectMgr.ChooseTable()
' Creo nuovo progetto
m_CurrentProjectPageUC.NewProject(nTabInd, False)
'' Gestione stato FastGrid
'm_CadCutPageUC.m_FastGridSlabManager.OnPostNewProject()
FrameCutBtn_Click(Nothing, Nothing)
CadCutBtn.IsEnabled = False
Else
FrameCutBtn.IsEnabled = True
CadCutBtn.IsEnabled = False
' Attivo il pulsante FRAME
'FrameCutBtn.IsChecked = True
'CadCutBtn.IsChecked = False
End If
Else
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS) AndAlso bHeadH1
End If
' DirectCutBtn.IsEnabled = bHeadH1
End Sub
+7
View File
@@ -209,6 +209,9 @@
<Compile Include="DrawImport\UnderDrillUC.xaml.vb">
<DependentUpon>UnderDrillUC.xaml</DependentUpon>
</Compile>
<Compile Include="LicenseWindow.xaml.vb">
<DependentUpon>LicenseWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Machine\AlarmsPageUC.xaml.vb">
<DependentUpon>AlarmsPageUC.xaml</DependentUpon>
</Compile>
@@ -485,6 +488,10 @@
<SubType>Designer</SubType>
<Generator>XamlIntelliSenseFileGenerator</Generator>
</Page>
<Page Include="LicenseWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Machine\AlarmsPageUC.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
+1 -1
View File
@@ -276,7 +276,7 @@ Public Class CurrentProjectPageUC
' se apro la finestra "OpenFolder" l'assegnazione dei Children è fatta direttamente nella classe ProjectMgrUC
If MyStartLancherWD.CurrSelection <> MODE_LAUNCHER.OpenFolder Then
' Carico sottopagina opportuna
If GetProjectType() <> PRJ_TYPE.FRAMES Then
If GetProjectType() <> PRJ_TYPE.FRAMES And Not m_MainWindow.m_OnlyFrame Then
CurrentProjectPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC)
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
m_MainWindow.CadCutBtn.IsChecked = True
-1
View File
@@ -2860,7 +2860,6 @@ Public Class RawPartPageUC
End If
EgtDraw()
'EgtSaveFile("C:\EgtData\OmagCUT\Temp\MyTest.nge", NGE.BIN)
Return True
End Function
-2
View File
@@ -383,8 +383,6 @@ Friend Module VeinMatching
ShowParkedParts()
' Ripristino il contesto corrente
EgtSetCurrentContext(nCurrCtx)
' EgtSaveFile("C:\EgtData\OmagCUT\Temp\MyVeinMatch.nge", NGE.TEXT)
Return True
End Function