Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 55ef0b7fcb | |||
| 4ded60f9f7 | |||
| 9e830bf2a5 | |||
| 1c84885a44 | |||
| f2694511e5 |
@@ -190,6 +190,9 @@
|
|||||||
<DependentUpon>CadCutPageUC.xaml</DependentUpon>
|
<DependentUpon>CadCutPageUC.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="CAM\CamAuto.vb" />
|
<Compile Include="CAM\CamAuto.vb" />
|
||||||
|
<Compile Include="Project\CicloStartWD.xaml.vb">
|
||||||
|
<DependentUpon>CicloStartWD.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Project\StartLauncheWDr.xaml.vb">
|
<Compile Include="Project\StartLauncheWDr.xaml.vb">
|
||||||
<DependentUpon>StartLauncheWDr.xaml</DependentUpon>
|
<DependentUpon>StartLauncheWDr.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -414,6 +417,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="Project\CicloStartWD.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="Project\StartLauncheWDr.xaml">
|
<Page Include="Project\StartLauncheWDr.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
|||||||
+10
-1
@@ -921,7 +921,16 @@
|
|||||||
<TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" />
|
<TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
<!--DataTemplate testo ed immagine-->
|
<DataTemplate x:Key="FileNameLsBxItem">
|
||||||
|
<DockPanel>
|
||||||
|
<TextBlock Text="{Binding GraphicName}" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
|
||||||
|
DockPanel.Dock="Left" Width="130"/>
|
||||||
|
<TextBlock Text="{Binding sDate}" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
|
||||||
|
DockPanel.Dock="Right" />
|
||||||
|
</DockPanel>
|
||||||
|
</DataTemplate>
|
||||||
|
|
||||||
|
<!--DataTemplate testo ed immagine-->
|
||||||
<DataTemplate x:Key="DataTemplateItem">
|
<DataTemplate x:Key="DataTemplateItem">
|
||||||
<Grid >
|
<Grid >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
|||||||
+43
-17
@@ -537,28 +537,54 @@
|
|||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
|
<!--Selezione il tipo di avvio del programma-->
|
||||||
|
<GroupBox Name="StartLauncherGpBx"
|
||||||
|
Grid.Column="3" Grid.RowSpan="3" Grid.ColumnSpan="1"
|
||||||
|
Style="{DynamicResource OmagCut_GroupBox}">
|
||||||
|
<Grid >
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="4*"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.25*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.25*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<ComboBox Name="StartLauncherCmBx" Grid.Column="1" Grid.Row="1" Style="{StaticResource OmagCut_ComboBox}">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</GroupBox>
|
||||||
|
|
||||||
<GroupBox Name="FeedbackGpBx"
|
<GroupBox Name="FeedbackGpBx"
|
||||||
Grid.Column="4" Grid.RowSpan="3" Grid.ColumnSpan="1"
|
Grid.Column="4" Grid.RowSpan="3" Grid.ColumnSpan="1"
|
||||||
Style="{DynamicResource OmagCut_GroupBox}">
|
Style="{DynamicResource OmagCut_GroupBox}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="0.25*"/>
|
<ColumnDefinition Width="0.25*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="0.25*"/>
|
<ColumnDefinition Width="0.25*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Button Name="FeedbackBtn"
|
<Button Name="FeedbackBtn"
|
||||||
Grid.Row="1" Grid.Column="1"
|
Grid.Row="1" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Image Source="{DynamicResource SendImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource SendImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ Public Class OptionsPageUC
|
|||||||
Private UnitsList() As String = {"inch", "mm"}
|
Private UnitsList() As String = {"inch", "mm"}
|
||||||
Private ThemesList() As String = {"Classic", "Dark"}
|
Private ThemesList() As String = {"Classic", "Dark"}
|
||||||
|
|
||||||
|
Private StartLauncherList() As String = {"Last Project", "New Project", "Open Folder", "Show Window"}
|
||||||
|
|
||||||
Private Sub OptionsPageUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub OptionsPageUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
|
|
||||||
' Associazione della lista linguaggi alla combobox
|
' Associazione della lista linguaggi alla combobox
|
||||||
@@ -28,6 +30,11 @@ Public Class OptionsPageUC
|
|||||||
ThemesCmBx.SelectedIndex = GetPrivateProfileInt(S_GENERAL, K_THEME, 0, m_MainWindow.GetIniFile())
|
ThemesCmBx.SelectedIndex = GetPrivateProfileInt(S_GENERAL, K_THEME, 0, m_MainWindow.GetIniFile())
|
||||||
Themes_StartUp()
|
Themes_StartUp()
|
||||||
|
|
||||||
|
' Carico la lista con il tipo di avvio
|
||||||
|
StartLauncherCmBx.ItemsSource = StartLauncherList
|
||||||
|
' 0-New, 1-Last, 2-Open, 3-Window
|
||||||
|
StartLauncherCmBx.SelectedIndex = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||||
|
|
||||||
' Rendo invisibile il GroupBox dei Temi la versione corrente
|
' Rendo invisibile il GroupBox dei Temi la versione corrente
|
||||||
' ThemesGpBx.Visibility = Windows.Visibility.Collapsed
|
' ThemesGpBx.Visibility = Windows.Visibility.Collapsed
|
||||||
|
|
||||||
@@ -102,7 +109,7 @@ Public Class OptionsPageUC
|
|||||||
ToleranceEMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 21)
|
ToleranceEMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 21)
|
||||||
AffondamentoMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 27)
|
AffondamentoMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 27)
|
||||||
LarghezzaMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 28)
|
LarghezzaMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 28)
|
||||||
|
StartLauncherGpBx.Header = "Avvio Programma"
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub UpdateSlabDxf()
|
Private Sub UpdateSlabDxf()
|
||||||
@@ -304,6 +311,11 @@ Public Class OptionsPageUC
|
|||||||
WritePrivateProfileString(S_GENERAL, K_MESSAGES, m_MainWindow.m_CurrLanguage.LanguageName, m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_GENERAL, K_MESSAGES, m_MainWindow.m_CurrLanguage.LanguageName, m_MainWindow.GetIniFile())
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub StartLauncherCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles StartLauncherCmBx.SelectionChanged
|
||||||
|
Dim nIndex As Integer = StartLauncherCmBx.SelectedIndex
|
||||||
|
WritePrivateProfileString(S_GENERAL, K_AUTOLOADLASTPROJ, StartLauncherCmBx.SelectedIndex, m_MainWindow.GetIniFile())
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub UnitsOfMeasureCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles UnitsOfMeasureCmBx.SelectionChanged
|
Private Sub UnitsOfMeasureCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles UnitsOfMeasureCmBx.SelectionChanged
|
||||||
Dim bMM As Boolean = (UnitsOfMeasureCmBx.SelectedIndex <> 0)
|
Dim bMM As Boolean = (UnitsOfMeasureCmBx.SelectedIndex <> 0)
|
||||||
EgtSetUiUnits(bMM)
|
EgtSetUiUnits(bMM)
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
<Window x:Class="CicloStartWD"
|
||||||
|
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}"
|
||||||
|
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||||
|
Title="SaveNameWD" Height="200" Width="426.5" ShowInTaskbar="False">
|
||||||
|
|
||||||
|
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||||
|
<Border Style="{DynamicResource OmagCut_Border}">
|
||||||
|
<Grid x:Name="SaveNameGrid">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="4*"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Name="CicloStartTxbl" Grid.Column="1" Grid.Row="1"
|
||||||
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
|
|
||||||
|
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="1">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||||
|
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||||
|
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
</Window>
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib
|
||||||
|
Imports System.IO
|
||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports System.ComponentModel
|
||||||
|
Class CicloStartWD
|
||||||
|
|
||||||
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
|
|
||||||
|
Public Sub New(Owner As Window)
|
||||||
|
Me.Owner = Owner
|
||||||
|
InitializeComponent()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' inizializzo la finestra
|
||||||
|
Private Sub StartLauncherWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
|
' posiziono la fistra in centro alla pagina
|
||||||
|
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||||
|
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||||
|
' imopposto il messaggio di avvio
|
||||||
|
CicloStartTxbl.Text = "Avvio Ciclo-Start"
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' creo un progetto nuovo
|
||||||
|
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Ultimo progetto
|
||||||
|
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||||
|
' Aspetto e lo avvio
|
||||||
|
System.Threading.Thread.Sleep(300)
|
||||||
|
' avvio il ciclo start della macchina
|
||||||
|
m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_CycleStart()
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -173,11 +173,6 @@ Public Class CurrentProjectPageUC
|
|||||||
EgtInitMachMgr(m_MainWindow.GetMachinesRootDir(), m_MainWindow.GetToolMakersDir())
|
EgtInitMachMgr(m_MainWindow.GetMachinesRootDir(), m_MainWindow.GetToolMakersDir())
|
||||||
m_bFirst = False
|
m_bFirst = False
|
||||||
|
|
||||||
' ------------------ SELEZIONE AVVIO -----------------------------
|
|
||||||
'' apro la finstra di selezione di avvio del programma
|
|
||||||
'StartProgram()
|
|
||||||
' ------------------ SELEZIONE AVVIO -----------------------------
|
|
||||||
|
|
||||||
' Se richiesto, carico ultimo progetto
|
' Se richiesto, carico ultimo progetto
|
||||||
Dim bAutoLoadLast As Boolean = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile()) <> 0
|
Dim bAutoLoadLast As Boolean = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile()) <> 0
|
||||||
If bAutoLoadLast Then
|
If bAutoLoadLast Then
|
||||||
@@ -227,16 +222,20 @@ Public Class CurrentProjectPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub StartProgram()
|
Public Sub StartProgram()
|
||||||
|
' leggo il tipo di avvio del programma: 0-New, 1-Last, 2-Open, 3-Window
|
||||||
|
Dim nStart As Integer = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||||
|
|
||||||
Dim MyStartLancherWD As New StartLauncherWD(m_MainWindow)
|
Dim MyStartLancherWD As New StartLauncherWD(m_MainWindow)
|
||||||
MyStartLancherWD.ShowDialog()
|
' mostro la finestra di avvio solo se configirato (= 3)
|
||||||
|
If nStart = 3 Then
|
||||||
|
MyStartLancherWD.ShowDialog()
|
||||||
|
Else
|
||||||
|
MyStartLancherWD.CurrSelection = nStart
|
||||||
|
End If
|
||||||
|
|
||||||
' Se richiesto, carico ultimo progetto
|
|
||||||
Dim bAutoLoadLast As Boolean = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile()) <> 0
|
|
||||||
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||||
' se ultimo progetto
|
' se ultimo progetto (= 0)
|
||||||
If MyStartLancherWD.CurrSelection = 2 Then
|
If MyStartLancherWD.CurrSelection = 0 Then
|
||||||
bAutoLoadLast = True
|
|
||||||
|
|
||||||
' Stampo il numero di progetto con 4 decimali: 12 -> "0012"
|
' Stampo il numero di progetto con 4 decimali: 12 -> "0012"
|
||||||
Dim sPath As String = m_MainWindow.GetSaveDir() & "\" & m_nCurrProj.ToString("D4") & ".nge"
|
Dim sPath As String = m_MainWindow.GetSaveDir() & "\" & m_nCurrProj.ToString("D4") & ".nge"
|
||||||
' provo ad aprire l'ultimo progetto modificato
|
' provo ad aprire l'ultimo progetto modificato
|
||||||
@@ -249,8 +248,8 @@ Public Class CurrentProjectPageUC
|
|||||||
End If
|
End If
|
||||||
EgtResetModified()
|
EgtResetModified()
|
||||||
|
|
||||||
' apro il file selezionato all'avvio
|
' seleziono file da finestra di avvio (= 4)
|
||||||
ElseIf MyStartLancherWD.CurrSelection = 3 Then
|
ElseIf MyStartLancherWD.CurrSelection = 4 Then
|
||||||
If Not LoadProject(MyStartLancherWD.SelPath, False) Then
|
If Not LoadProject(MyStartLancherWD.SelPath, False) Then
|
||||||
' altrimenti apro un nuovo progetto
|
' altrimenti apro un nuovo progetto
|
||||||
NewProject()
|
NewProject()
|
||||||
@@ -260,9 +259,8 @@ Public Class CurrentProjectPageUC
|
|||||||
End If
|
End If
|
||||||
EgtResetModified()
|
EgtResetModified()
|
||||||
|
|
||||||
' se nuovo progetto o naviga direttorio
|
' se nuovo progetto (= 1) o naviga direttorio (= 2)
|
||||||
ElseIf MyStartLancherWD.CurrSelection = 1 Or MyStartLancherWD.CurrSelection = 0 Then
|
ElseIf MyStartLancherWD.CurrSelection = 1 Or MyStartLancherWD.CurrSelection = 0 Then
|
||||||
bAutoLoadLast = False
|
|
||||||
NewProject()
|
NewProject()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -588,6 +586,8 @@ Public Class CurrentProjectPageUC
|
|||||||
SetProjectMaterial()
|
SetProjectMaterial()
|
||||||
' Eseguo
|
' Eseguo
|
||||||
If Not SaveFile(sPath) Then Return False
|
If Not SaveFile(sPath) Then Return False
|
||||||
|
' aggiungo il file all'elenco dei file recenti
|
||||||
|
m_MruFiles.Add(sPath)
|
||||||
' Dichiaro progetto non modificato
|
' Dichiaro progetto non modificato
|
||||||
EgtResetModified()
|
EgtResetModified()
|
||||||
' Salvo eventuale VeinMatching
|
' Salvo eventuale VeinMatching
|
||||||
@@ -641,6 +641,8 @@ Public Class CurrentProjectPageUC
|
|||||||
If Not SaveFile(sPath) Then
|
If Not SaveFile(sPath) Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
' aggiungo il file all'elenco dei file recenti
|
||||||
|
m_MruFiles.Add(sPath)
|
||||||
' Dichiaro progetto non modificato
|
' Dichiaro progetto non modificato
|
||||||
EgtResetModified()
|
EgtResetModified()
|
||||||
Return True
|
Return True
|
||||||
|
|||||||
@@ -299,7 +299,6 @@ Public Class ProjectMgrUC
|
|||||||
ptMid.z = (ptEnd.z + ptStart.z) / 2 + dDiam / 2
|
ptMid.z = (ptEnd.z + ptStart.z) / 2 + dDiam / 2
|
||||||
|
|
||||||
'--------------------------- Imposto la posizione della macchina ----------------------------
|
'--------------------------- Imposto la posizione della macchina ----------------------------
|
||||||
|
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
@@ -446,8 +445,18 @@ Public Class ProjectMgrUC
|
|||||||
' se abilitato e non è restart, lancio eventuale lua post-trasmissione
|
' se abilitato e non è restart, lancio eventuale lua post-trasmissione
|
||||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.SIMPLESTATISTICS) And nPhaseRestart = 0 Then
|
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.SIMPLESTATISTICS) And nPhaseRestart = 0 Then
|
||||||
m_MainWindow.ExecSentProgScript(False)
|
m_MainWindow.ExecSentProgScript(False)
|
||||||
|
''-------------------Avvio il Ciclo-Start-------------------------
|
||||||
|
'Dim MyCicloStartWD As New CicloStartWD(m_MainWindow)
|
||||||
|
'MyCicloStartWD.ShowDialog()
|
||||||
|
''-------------------Avvio il Ciclo-Start-------------------------
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'-------------------Avvio il Ciclo-Start-------------------------
|
||||||
|
Dim MyCicloStartWD As New CicloStartWD(m_MainWindow)
|
||||||
|
MyCicloStartWD.ShowDialog()
|
||||||
|
'-------------------Avvio il Ciclo-Start-------------------------
|
||||||
|
|
||||||
' Altrimenti linea di produzione
|
' Altrimenti linea di produzione
|
||||||
Else
|
Else
|
||||||
' Verifico non sia già stato trasmesso
|
' Verifico non sia già stato trasmesso
|
||||||
@@ -490,12 +499,12 @@ Public Class ProjectMgrUC
|
|||||||
GetPrivateProfileInt(S_RAWPART, K_SLABID, 0, m_MainWindow.GetIniFile()) <> 0)
|
GetPrivateProfileInt(S_RAWPART, K_SLABID, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
If bSlabId Then
|
If bSlabId Then
|
||||||
Dim sBlock As String = ""
|
Dim sBlock As String = ""
|
||||||
GetPrivateProfileString( S_RAWPART, K_BLOCKNAME, "", sBlock, m_MainWindow.GetIniFile())
|
GetPrivateProfileString(S_RAWPART, K_BLOCKNAME, "", sBlock, m_MainWindow.GetIniFile())
|
||||||
Dim nSlabNbr As Integer = GetPrivateProfileInt( S_RAWPART, K_SLABNBR, 0, m_MainWindow.GetIniFile())
|
Dim nSlabNbr As Integer = GetPrivateProfileInt(S_RAWPART, K_SLABNBR, 0, m_MainWindow.GetIniFile())
|
||||||
nSlabNbr += 1
|
nSlabNbr += 1
|
||||||
Dim sSlabNbr As String = nSlabNbr.ToString()
|
Dim sSlabNbr As String = nSlabNbr.ToString()
|
||||||
WritePrivateProfileString( S_RAWPART, K_SLABNBR, sSlabNbr, m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_RAWPART, K_SLABNBR, sSlabNbr, m_MainWindow.GetIniFile())
|
||||||
Utility.SetBlockAndSlabNbr( sBlock, sSlabNbr)
|
Utility.SetBlockAndSlabNbr(sBlock, sSlabNbr)
|
||||||
End If
|
End If
|
||||||
' Salvo il progetto
|
' Salvo il progetto
|
||||||
m_CurrProjPage.SaveProject()
|
m_CurrProjPage.SaveProject()
|
||||||
@@ -523,6 +532,7 @@ Public Class ProjectMgrUC
|
|||||||
If AskTransm.m_nPressedBtn <> 1 Then Return
|
If AskTransm.m_nPressedBtn <> 1 Then Return
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Se non collegato alla macchina
|
' Se non collegato alla macchina
|
||||||
If Not m_MainWindow.m_bNCLink Then
|
If Not m_MainWindow.m_bNCLink Then
|
||||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90316)) 'Non connesso alla macchina
|
m_CurrProjPage.SetWarningMessage(EgtMsg(90316)) 'Non connesso alla macchina
|
||||||
@@ -537,6 +547,7 @@ Public Class ProjectMgrUC
|
|||||||
m_MainWindow.ExecSentProgScript(False, bAlreadySent)
|
m_MainWindow.ExecSentProgScript(False, bAlreadySent)
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Leggo variabile relativa al programma 1 (standard E80021)
|
' Leggo variabile relativa al programma 1 (standard E80021)
|
||||||
m_CurrNcComm.m_CN.n_DReadELS_handle = 0
|
m_CurrNcComm.m_CN.n_DReadELS_handle = 0
|
||||||
m_CurrNcComm.m_CN.ReadEls_Add_Parameter(m_CurrMachine.sVarProg1, 1)
|
m_CurrNcComm.m_CN.ReadEls_Add_Parameter(m_CurrMachine.sVarProg1, 1)
|
||||||
@@ -610,6 +621,7 @@ Public Class ProjectMgrUC
|
|||||||
Else
|
Else
|
||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90318)) 'La macchina non accetta il programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90318)) 'La macchina non accetta il programma CN
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
FontFamily="{DynamicResource OmagCut_Font}"
|
FontFamily="{DynamicResource OmagCut_Font}"
|
||||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||||
Title="SaveNameWD" Height="300" Width="426.5" ShowInTaskbar="False">
|
Title="SaveNameWD" Height="350" Width="426.5" ShowInTaskbar="False">
|
||||||
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||||
<Border Style="{DynamicResource OmagCut_Border}">
|
<Border Style="{DynamicResource OmagCut_Border}">
|
||||||
<Grid x:Name="SaveNameGrid">
|
<Grid x:Name="SaveNameGrid">
|
||||||
@@ -14,19 +14,21 @@
|
|||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0.2*"/>
|
<RowDefinition Height="0.1*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.2*"/>
|
<RowDefinition Height="0.2*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="0.2*"/>
|
<RowDefinition Height="0.2*"/>
|
||||||
|
<RowDefinition Height="0.4*"/>
|
||||||
|
<RowDefinition Height="0.1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="0.2*"/>
|
<RowDefinition Height="0.2*"/>
|
||||||
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!--Messaggio di tipo di avvio-->
|
<!--Messaggio: Selezione modalità di avvio-->
|
||||||
<TextBlock Name="SlectLauncherTxbl" Grid.Column="1" Grid.Row="1"
|
<TextBlock Name="SlectLauncherTxbl" Grid.Column="1" Grid.Row="1"
|
||||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
|
|
||||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="1">
|
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="1">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -39,32 +41,33 @@
|
|||||||
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<!--apri folder progetti-->
|
<!--ultimo progetto-->
|
||||||
<Button Name="OpenFolder" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
<Button Name="LastProject" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||||
ToolTip="OpenFolder">
|
ToolTip="LastProject">
|
||||||
<Image Source="{DynamicResource ZoomWinImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource CsvOpenImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<!--nuovo progetto-->
|
<!--nuovo progetto-->
|
||||||
<Button Name="NewProject" Grid.Column="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
<Button Name="NewProject" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||||
ToolTip="New Project">
|
ToolTip="New Project">
|
||||||
<Image Source="{DynamicResource CsvNewImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource CsvNewImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<!--ultimo progetto-->
|
<!--apri folder progetti-->
|
||||||
<Button Name="LastProject" Grid.Column="4" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
<Button Name="OpenFolder" Grid.Column="4" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||||
ToolTip="LastProject">
|
ToolTip="OpenFolder">
|
||||||
<Image Source="{DynamicResource CsvOpenImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource ZoomWinImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
<UniformGrid Grid.Column="1" Grid.Row="5">
|
||||||
|
<TextBlock Name="FileName" Grid.Column="1"
|
||||||
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
|
<TextBlock Name="DataFile" Grid.Column="1"
|
||||||
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
|
</UniformGrid>
|
||||||
<!--lista degli ultimi file aperti-->
|
<!--lista degli ultimi file aperti-->
|
||||||
<ListBox Name="FilesLsBx" Grid.Column="1" Grid.Row="5"
|
<ListBox Name="FilesLsBx" Grid.Column="1" Grid.Row="7" ItemTemplate="{DynamicResource FileNameLsBxItem}"
|
||||||
SelectionMode="Extended">
|
SelectionMode="Extended">
|
||||||
<ListBox.ItemContainerStyle>
|
|
||||||
<Style TargetType="ListBoxItem">
|
|
||||||
|
|
||||||
</Style>
|
|
||||||
</ListBox.ItemContainerStyle>
|
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,30 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib
|
Imports EgtWPFLib
|
||||||
|
Imports System.IO
|
||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports System.ComponentModel
|
||||||
Public Class StartLauncherWD
|
Public Class StartLauncherWD
|
||||||
|
|
||||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
|
' lista dei file recenti da visualizzare
|
||||||
|
Private m_RecentFileList As New ObservableCollection(Of FileNameLsBxItem)
|
||||||
|
|
||||||
Public Enum MODE_LAUNCHER As Integer
|
Public Enum MODE_LAUNCHER
|
||||||
OpenFolder = 0
|
LastProject
|
||||||
NewProject = 1
|
OpenFolder
|
||||||
LastProject = 2
|
NewProject
|
||||||
SelectedProject = 3
|
ShowWindow
|
||||||
|
SelectedProject
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
Private m_CurrSelection As MODE_LAUNCHER
|
Private m_CurrSelection As MODE_LAUNCHER
|
||||||
Public ReadOnly Property CurrSelection As MODE_LAUNCHER
|
Public Property CurrSelection As MODE_LAUNCHER
|
||||||
Get
|
Get
|
||||||
Return m_CurrSelection
|
Return m_CurrSelection
|
||||||
End Get
|
End Get
|
||||||
|
Set(value As MODE_LAUNCHER)
|
||||||
|
m_CurrSelection = value
|
||||||
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private m_SelPath As String = String.Empty
|
Private m_SelPath As String = String.Empty
|
||||||
@@ -30,15 +39,70 @@ Public Class StartLauncherWD
|
|||||||
InitializeComponent()
|
InitializeComponent()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
'--------------------------- lista dei file recenti -----------------------------------------------------------------------
|
||||||
|
Private Class FileNameLsBxItem
|
||||||
|
Implements INotifyPropertyChanged
|
||||||
|
|
||||||
|
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
|
||||||
|
|
||||||
|
Private m_sDate As String
|
||||||
|
Private m_sName As String
|
||||||
|
|
||||||
|
Public Property sDate As String
|
||||||
|
Get
|
||||||
|
Return m_sDate
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sDate = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property Name As String
|
||||||
|
Get
|
||||||
|
Return m_sName
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
If value <> m_sName Then
|
||||||
|
m_sName = value
|
||||||
|
NotifyPropertyChanged("Name")
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property GraphicName As String
|
||||||
|
Get
|
||||||
|
' recupero il nome del file con estensione, altrimenti -> Path.GetFileNameWithoutExtension(m_sName)
|
||||||
|
Return Path.GetFileNameWithoutExtension(m_sName)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Sub New(Name As String, dDate As Date)
|
||||||
|
Me.m_sName = Name
|
||||||
|
Me.m_sDate = dDate.ToString
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub NotifyPropertyChanged(propName As String)
|
||||||
|
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
'--------------------------- lista dei file recenti -----------------------------------------------------------------------
|
||||||
|
|
||||||
' inizializzo la finestra
|
' inizializzo la finestra
|
||||||
Private Sub StartLauncherWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub StartLauncherWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
|
FilesLsBx.ItemsSource = m_RecentFileList
|
||||||
' carico la liste dei file recenti
|
' carico la liste dei file recenti
|
||||||
FilesLsBx.ItemsSource = m_MainWindow.m_CurrentProjectPageUC.m_MruFiles.FileNames
|
For Each ItemFile In m_MainWindow.m_CurrentProjectPageUC.m_MruFiles.FileNames
|
||||||
|
m_RecentFileList.Add(New FileNameLsBxItem(ItemFile, File.GetLastAccessTime(ItemFile)))
|
||||||
|
Next
|
||||||
' posiziono la fistra in centro alla pagina
|
' posiziono la fistra in centro alla pagina
|
||||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||||
' imopposto il messaggio di avvio
|
' imopposto il messaggio di avvio
|
||||||
SlectLauncherTxbl.Text = "Seleziona modalità di avvio"
|
SlectLauncherTxbl.Text = "Seleziona modalità di avvio"
|
||||||
|
FileName.Text = "Progetti recenti"
|
||||||
|
DataFile.Text = "Ultima apertura"
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' lancio l'apertura della pagina dei progetti
|
' lancio l'apertura della pagina dei progetti
|
||||||
@@ -68,7 +132,8 @@ Public Class StartLauncherWD
|
|||||||
|
|
||||||
' quando viene rilasciato il mouse
|
' quando viene rilasciato il mouse
|
||||||
Private Sub SelectProject_MouseUp(sender As Object, e As RoutedEventArgs) Handles FilesLsBx.MouseDoubleClick, FilesLsBx.TouchUp
|
Private Sub SelectProject_MouseUp(sender As Object, e As RoutedEventArgs) Handles FilesLsBx.MouseDoubleClick, FilesLsBx.TouchUp
|
||||||
m_SelPath = FilesLsBx.SelectedItem
|
' recupero il nome selezionato
|
||||||
|
m_SelPath = FilesLsBx.SelectedItem.Name
|
||||||
m_CurrSelection = MODE_LAUNCHER.SelectedProject
|
m_CurrSelection = MODE_LAUNCHER.SelectedProject
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
Me.Close()
|
Me.Close()
|
||||||
|
|||||||
Reference in New Issue
Block a user