SarmaxWall 1.6k5 :

- aggiunta possibilità di minimizzare il programma
- migliorata lettura parametri modificabili da Options
- aggiunti anticipi accensione/spegnimento colla.
This commit is contained in:
Dario Sassi
2015-11-14 16:29:33 +00:00
parent 6a7401e9d6
commit c5afe8df93
9 changed files with 72 additions and 27 deletions
+3 -1
View File
@@ -79,9 +79,11 @@ Module ConstIni
Public Const K_PROCESSOR As String = "Processor"
Public Const K_OFFSETX As String = "OffsetX"
Public Const K_OFFSETY As String = "OffsetY"
Public Const K_OFFSETGLUE As String = "OffsetGlue"
Public Const K_ONADVANCE As String = "OnAdvance"
Public Const K_OFFADVANCE As String = "OffAdvance"
Public Const K_PLANKX As String = "PlankX"
Public Const K_PLANKNUMINLAYER As String = "PlankNumInLayer"
Public Const K_OFFSETGLUE As String = "OffsetGlue"
Public Const K_MINDIST As String = "MinDist"
Public Const K_STEP As String = "Step"
Public Const K_ENABLEDRAG As String = "EnableDrag"
+10 -4
View File
@@ -25,7 +25,8 @@
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
@@ -42,9 +43,14 @@
<Image Source="Resources/Open.png" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</ToggleButton>
<Button Grid.Column="7" Click="ExitBtn_Click" >
<Image Source="Resources/X.png" Width="65" Height="65" HorizontalAlignment="Center"
<Button Grid.Column="7" Click="MinimizeBtn_Click" >
<Image Source="Resources/Minimize.png" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
<Button Grid.Column="8" Click="ExitBtn_Click" >
<Image Source="Resources/X.png" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
+7 -3
View File
@@ -153,7 +153,6 @@ Class MainWindow
m_OptionsPageUC = New OptionsPageUC
m_OpenPageUC = New OpenPageUC
m_NumericKeyboardWD = New NumericKeyboardWD
m_AboutBoxWD = New AboutBoxWD
'Posizionemento nella griglia delle Page UserControl
m_ImportPageUC.SetValue(Grid.ColumnProperty, 0)
@@ -223,9 +222,8 @@ Class MainWindow
Private Sub MainWindow_Loaded(sender As Object, e As RoutedEventArgs)
'Assegno NumericKeyboardWD e AboutBoxWD come child della MainWindow
'Assegno NumericKeyboardWD come child della MainWindow
m_NumericKeyboardWD.Owner = Me
m_AboutBoxWD.Owner = Me
'Seleziono la Tab e la Page di apertura
MainWindowGrid.Children.Add(m_PlacePageUC)
@@ -235,6 +233,8 @@ Class MainWindow
End Sub
Private Sub Border_MouseDown(sender As Object, e As MouseButtonEventArgs)
m_AboutBoxWD = New AboutBoxWD
m_AboutBoxWD.Owner = Me
m_AboutBoxWD.Top = Me.Top + (Me.Height / 2 - m_AboutBoxWD.Height / 2)
m_AboutBoxWD.Left = Me.Left + (Me.Width / 2 - m_AboutBoxWD.Width / 2)
m_AboutBoxWD.Show()
@@ -354,6 +354,10 @@ Class MainWindow
End If
End Sub
Private Sub MinimizeBtn_Click(sender As Object, e As RoutedEventArgs)
Me.WindowState = Windows.WindowState.Minimized
End Sub
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs)
' Recupero flag di modificato, per salvarlo nel progetto
Dim bModif As Boolean = EgtGetModified()
+2 -2
View File
@@ -60,5 +60,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.6.11.3")>
<Assembly: AssemblyFileVersion("1.6.11.3")>
<Assembly: AssemblyVersion("1.6.11.5")>
<Assembly: AssemblyFileVersion("1.6.11.5")>
+17 -7
View File
@@ -14,8 +14,8 @@
<!-- Definizione della ImportPage -->
<Grid Name="OptionsPageGrid" >
<Grid.RowDefinitions>
<RowDefinition Height="5*"/>
<RowDefinition Height="5*"/>
<RowDefinition Height="7*"/>
<RowDefinition Height="3*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
@@ -31,14 +31,14 @@
<RowDefinition Height="0.5*"/>
<RowDefinition Height="2.5*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="3*"/>
</Grid.RowDefinitions>
<Label Name="MachineOptionsLbl" Grid.ColumnSpan="2" VerticalAlignment="Center" FontSize="15"
FontWeight="Bold" />
<!-- Definizione della Grid per caratteristiche incollaggio -->
<Border Grid.Column="0" Grid.Row="1" Grid.RowSpan="2" BorderThickness="1" BorderBrush="Black" CornerRadius="3"
<Border Grid.Column="0" Grid.Row="1" Grid.RowSpan="3" BorderThickness="1" BorderBrush="Black" CornerRadius="3"
Margin="1">
<Grid >
<Grid.ColumnDefinitions>
@@ -50,6 +50,8 @@
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Label Name="GlueingParametersLbl" Grid.ColumnSpan="2" VerticalAlignment="Center" HorizontalAlignment="Center"
@@ -69,8 +71,18 @@
<TextBox Name="ExtraGlueTxBx" Grid.Column="1" Grid.Row="3" Style="{StaticResource NumericKeyboard}"
FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center" Width="60"
TextAlignment="Right"/>
<TextBlock Name="OnAdvanceLbl" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="15" TextWrapping="WrapWithOverflow" Width="180" TextAlignment="Center" />
<TextBox Name="OnAdvanceTxBx" Grid.Column="1" Grid.Row="4" Style="{StaticResource NumericKeyboard}"
FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center" Width="60"
TextAlignment="Right"/>
<TextBlock Name="OffAdvanceLbl" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="15" TextWrapping="WrapWithOverflow" Width="180" TextAlignment="Center" />
<TextBox Name="OffAdvanceTxBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource NumericKeyboard}"
FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center" Width="60"
TextAlignment="Right"/>
</Grid>
</Grid>
</Border>
@@ -155,8 +167,6 @@
<RowDefinition Height="0.5*"/>
<RowDefinition Height="1.5*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Label Name="SoftwareOptionsLbl" Grid.ColumnSpan="2" VerticalAlignment="Center" FontSize="15"
+14
View File
@@ -29,6 +29,8 @@ Public Class OptionsPageUC
LanguageMsgLbl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 23) 'The new language become the current one from the next software run - La nuova lingua diventerà corrente dal prossimo avvio del programma
ProjectNumberLbl.Content = EgtMsg(MSG_OPTIONSPAGEUC + 24) 'Language selection - Numero progetti da salvare
PlankOnHolesTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 25)
OnAdvanceLbl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 26)
OffAdvanceLbl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 27)
' Associo TextBox e Label
Dim TempLabel1 As New Label
@@ -46,6 +48,12 @@ Public Class OptionsPageUC
Dim TempLabel5 As New Label
TempLabel5.Content = PlankNumForLayerLbl.Text
PlankNumForLayerTxBx.Tag = TempLabel5
Dim TempLabel6 As New Label
TempLabel6.Content = OnAdvanceLbl.Text
OnAdvanceTxBx.Tag = TempLabel6
Dim TempLabel7 As New Label
TempLabel7.Content = OffAdvanceLbl.Text
OffAdvanceTxBx.Tag = TempLabel7
End Sub
@@ -60,6 +68,10 @@ Public Class OptionsPageUC
ExtraRawPartYTxBx.Text = dExtraRawY
Dim dExtraGlue As Double = GetPrivateProfileDouble(S_MACHINE, K_OFFSETGLUE, 0, m_MainWindow.GetIniFile())
ExtraGlueTxBx.Text = dExtraGlue
Dim dOnAdvance As Double = GetPrivateProfileDouble(S_MACHINE, K_ONADVANCE, 0, m_MainWindow.GetIniFile())
OnAdvanceTxBx.Text = dOnAdvance
Dim dOffAdvance As Double = GetPrivateProfileDouble(S_MACHINE, K_OFFADVANCE, 0, m_MainWindow.GetIniFile())
OffAdvanceTxBx.Text = dOffAdvance
Dim dPlankWidth As Double = GetPrivateProfileDouble(S_MACHINE, K_PLANKX, 0, m_MainWindow.GetIniFile())
PlankWidthTxBx.Text = dPlankWidth
Dim nPlankNumForLayer As Integer = GetPrivateProfileInt(S_MACHINE, K_PLANKNUMINLAYER, 0, m_MainWindow.GetIniFile())
@@ -103,6 +115,8 @@ Public Class OptionsPageUC
WritePrivateProfileString(S_MACHINE, K_OFFSETX, ExtraRawPartXTxBx.Text, m_MainWindow.GetIniFile())
WritePrivateProfileString(S_MACHINE, K_OFFSETY, ExtraRawPartYTxBx.Text, m_MainWindow.GetIniFile())
WritePrivateProfileString(S_MACHINE, K_OFFSETGLUE, ExtraGlueTxBx.Text, m_MainWindow.GetIniFile())
WritePrivateProfileString(S_MACHINE, K_ONADVANCE, OnAdvanceTxBx.Text, m_MainWindow.GetIniFile())
WritePrivateProfileString(S_MACHINE, K_OFFADVANCE, OffAdvanceTxBx.Text, m_MainWindow.GetIniFile())
WritePrivateProfileString(S_MACHINE, K_PLANKX, PlankWidthTxBx.Text, m_MainWindow.GetIniFile())
WritePrivateProfileString(S_MACHINE, K_PLANKNUMINLAYER, PlankNumForLayerTxBx.Text, m_MainWindow.GetIniFile())
Dim nGantries As Integer = 0
+16 -10
View File
@@ -143,11 +143,7 @@ Public Class PlacePageUC
End If
EgtEnableModified()
' carico i parametri di posizionamento
m_dOffsetX = GetPrivateProfileDouble(S_MACHINE, K_OFFSETX, 0, m_MainWindow.GetIniFile())
m_dOffsetX = Math.Max(0, m_dOffsetX)
m_dOffsetY = GetPrivateProfileDouble(S_MACHINE, K_OFFSETY, 0, m_MainWindow.GetIniFile())
m_dOffsetY = Math.Max(0, m_dOffsetY)
m_dPlankX = GetPrivateProfileDouble(S_MACHINE, K_PLANKX, 200, m_MainWindow.GetIniFile())
' quelli modificabili da Options si leggono sempre appena sotto
m_dMinDist = GetPrivateProfileDouble(S_MACHINE, K_MINDIST, 0, m_MainWindow.GetIniFile())
' carico e calcolo i parametri di movimento
m_dStep = GetPrivateProfileDouble(S_MACHINE, K_STEP, 0, m_MainWindow.GetIniFile())
@@ -166,6 +162,12 @@ Public Class PlacePageUC
Else
EgtSetCurrentContext(PlaceScene.GetCtx())
End If
' carico parametri di posizionamento modificabili da Options
m_dOffsetX = GetPrivateProfileDouble(S_MACHINE, K_OFFSETX, 0, m_MainWindow.GetIniFile())
m_dOffsetX = Math.Max(0, m_dOffsetX)
m_dOffsetY = GetPrivateProfileDouble(S_MACHINE, K_OFFSETY, 0, m_MainWindow.GetIniFile())
m_dOffsetY = Math.Max(0, m_dOffsetY)
m_dPlankX = GetPrivateProfileDouble(S_MACHINE, K_PLANKX, 200, m_MainWindow.GetIniFile())
' inibisco selezione diretta da Scene
PlaceScene.SetStatusNull()
@@ -592,19 +594,23 @@ Public Class PlacePageUC
' Carico direttamente da ini
Dim dExtraGlue As Double = GetPrivateProfileDouble(S_MACHINE, K_OFFSETGLUE, 0, m_MainWindow.GetIniFile())
EgtLuaSetGlobNumVar("PROC.EXTRAGLUE", Math.Max(0, dExtraGlue))
Dim dOnAdvance As Double = GetPrivateProfileDouble(S_MACHINE, K_ONADVANCE, 0, m_MainWindow.GetIniFile())
EgtLuaSetGlobNumVar("PROC.ONADVANCE", Math.Max(0, dOnAdvance))
Dim dOffAdvance As Double = GetPrivateProfileDouble(S_MACHINE, K_OFFADVANCE, 0, m_MainWindow.GetIniFile())
EgtLuaSetGlobNumVar("PROC.OFFADVANCE", Math.Max(0, dOffAdvance))
Dim bPlankOnHoles As Boolean = (GetPrivateProfileInt(S_MACHINE, K_PLANKONHOLES, 1, m_MainWindow.GetIniFile()) <> 0)
EgtLuaSetGlobBoolVar("PROC.PLANKONHOLES", bPlankOnHoles)
' Carico da interfaccia
EgtLuaEvalNumExpr(LayerThicknessTxBx.Text, m_dLayerThick)
WritePrivateProfileString(S_MACHINE, K_LAYERTHICK, m_dLayerThick, m_MainWindow.GetIniFile())
EgtLuaSetGlobNumVar("PROC.LAYTH", m_dLayerThick)
Dim dPlankWidth As Double = GetPrivateProfileDouble(S_MACHINE, K_PLANKX, 0, m_MainWindow.GetIniFile())
EgtLuaSetGlobNumVar("PROC.PLANKWIDTH", dPlankWidth)
Dim nPlankNumOnLay = GetPrivateProfileInt(S_MACHINE, K_PLANKNUMINLAYER, 0, m_MainWindow.GetIniFile())
EgtLuaSetGlobNumVar("PROC.LAYPLANKNBR", nPlankNumOnLay)
' Carico da interfaccia
EgtLuaEvalNumExpr(LayerThicknessTxBx.Text, m_dLayerThick)
WritePrivateProfileString(S_MACHINE, K_LAYERTHICK, m_dLayerThick, m_MainWindow.GetIniFile())
EgtLuaSetGlobNumVar("PROC.LAYTH", m_dLayerThick)
Dim dTemp As Double
EgtLuaEvalNumExpr(PlankNumFirstLayerTxBx.Text, dTemp)
m_nPlankNumOnTop = CInt(dTemp + 0.10000000000000001)
m_nPlankNumOnTop = CInt(dTemp + 0.1)
WritePrivateProfileString(S_MACHINE, K_PLANKNUMONTOP, m_nPlankNumOnTop, m_MainWindow.GetIniFile())
EgtLuaSetGlobNumVar("PROC.TOPPLANKNBR", m_nPlankNumOnTop)
' eseguo
Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

+3
View File
@@ -279,6 +279,9 @@
<ItemGroup>
<Resource Include="Resources\HalfTurnRotate.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\Minimize.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\SarmaxWall\SarmaxWallR32.exe