Multiple use single GUI
This commit is contained in:
parent
461c285e77
commit
f70aa5d716
|
|
@ -1,4 +1,5 @@
|
|||
Public Class AppForm
|
||||
Public Shared fillMode As Boolean
|
||||
|
||||
|
||||
Sub AppForm_Load() Handles MyBase.Load
|
||||
|
|
@ -11,6 +12,7 @@
|
|||
Database.Retrive_Database()
|
||||
End Sub
|
||||
Private Sub Button_Individual_Click(sender As Object, e As EventArgs) Handles Button_Individual.Click
|
||||
fillMode = False
|
||||
Panel_Start.Controls.Clear()
|
||||
Individual.TopLevel = False
|
||||
Panel_Start.Controls.Add(Individual)
|
||||
|
|
@ -18,9 +20,10 @@
|
|||
End Sub
|
||||
|
||||
Private Sub Button_Multiple_Click(sender As Object, e As EventArgs) Handles Button_Multiple.Click
|
||||
fillMode = True
|
||||
Panel_Start.Controls.Clear()
|
||||
Multiple.TopLevel = False
|
||||
Panel_Start.Controls.Add(Multiple)
|
||||
Multiple.Show()
|
||||
Individual.TopLevel = False
|
||||
Panel_Start.Controls.Add(Individual)
|
||||
Individual.Show()
|
||||
End Sub
|
||||
End Class
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class Individual
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
<System.Diagnostics.DebuggerNonUserCode()>
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
|
|
@ -20,11 +20,14 @@ Partial Class Individual
|
|||
'NOTE: The following procedure is required by the Windows Form Designer
|
||||
'It can be modified using the Windows Form Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.Panel_Data = New System.Windows.Forms.Panel()
|
||||
Me.Label7 = New System.Windows.Forms.Label()
|
||||
Me.Label6 = New System.Windows.Forms.Label()
|
||||
Me.Label5 = New System.Windows.Forms.Label()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.CheckBox_Whole_Mesh = New System.Windows.Forms.CheckBox()
|
||||
Me.Button_Export_GUI = New System.Windows.Forms.Button()
|
||||
Me.Button_Export_SW = New System.Windows.Forms.Button()
|
||||
Me.Label_Heading = New System.Windows.Forms.Label()
|
||||
|
|
@ -37,7 +40,6 @@ Partial Class Individual
|
|||
Me.Label_Type = New System.Windows.Forms.Label()
|
||||
Me.TextBox_Length = New System.Windows.Forms.TextBox()
|
||||
Me.ComboBox_Mesh = New System.Windows.Forms.ComboBox()
|
||||
Me.ComboBox_Width = New System.Windows.Forms.ComboBox()
|
||||
Me.ComboBox_Thickness = New System.Windows.Forms.ComboBox()
|
||||
Me.ComboBox_Height = New System.Windows.Forms.ComboBox()
|
||||
Me.ComboBox_Material = New System.Windows.Forms.ComboBox()
|
||||
|
|
@ -53,10 +55,6 @@ Partial Class Individual
|
|||
Me.Panel_Grating = New System.Windows.Forms.Panel()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.Label5 = New System.Windows.Forms.Label()
|
||||
Me.Label6 = New System.Windows.Forms.Label()
|
||||
Me.Label7 = New System.Windows.Forms.Label()
|
||||
Me.Panel_Data.SuspendLayout()
|
||||
Me.Panel_Recesses.SuspendLayout()
|
||||
Me.Panel_Grating.SuspendLayout()
|
||||
|
|
@ -70,7 +68,6 @@ Partial Class Individual
|
|||
Me.Panel_Data.Controls.Add(Me.Label5)
|
||||
Me.Panel_Data.Controls.Add(Me.Label4)
|
||||
Me.Panel_Data.Controls.Add(Me.Label3)
|
||||
Me.Panel_Data.Controls.Add(Me.CheckBox_Whole_Mesh)
|
||||
Me.Panel_Data.Controls.Add(Me.Button_Export_GUI)
|
||||
Me.Panel_Data.Controls.Add(Me.Button_Export_SW)
|
||||
Me.Panel_Data.Controls.Add(Me.Label_Heading)
|
||||
|
|
@ -83,7 +80,6 @@ Partial Class Individual
|
|||
Me.Panel_Data.Controls.Add(Me.Label_Type)
|
||||
Me.Panel_Data.Controls.Add(Me.TextBox_Length)
|
||||
Me.Panel_Data.Controls.Add(Me.ComboBox_Mesh)
|
||||
Me.Panel_Data.Controls.Add(Me.ComboBox_Width)
|
||||
Me.Panel_Data.Controls.Add(Me.ComboBox_Thickness)
|
||||
Me.Panel_Data.Controls.Add(Me.ComboBox_Height)
|
||||
Me.Panel_Data.Controls.Add(Me.ComboBox_Material)
|
||||
|
|
@ -91,29 +87,59 @@ Partial Class Individual
|
|||
Me.Panel_Data.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Panel_Data.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.Panel_Data.Name = "Panel_Data"
|
||||
Me.Panel_Data.Size = New System.Drawing.Size(290, 772)
|
||||
Me.Panel_Data.Size = New System.Drawing.Size(315, 772)
|
||||
Me.Panel_Data.TabIndex = 0
|
||||
'
|
||||
'Label7
|
||||
'
|
||||
Me.Label7.AutoSize = True
|
||||
Me.Label7.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label7.Location = New System.Drawing.Point(269, 462)
|
||||
Me.Label7.Name = "Label7"
|
||||
Me.Label7.Size = New System.Drawing.Size(23, 13)
|
||||
Me.Label7.TabIndex = 24
|
||||
Me.Label7.Text = "mm"
|
||||
'
|
||||
'Label6
|
||||
'
|
||||
Me.Label6.AutoSize = True
|
||||
Me.Label6.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label6.Location = New System.Drawing.Point(269, 421)
|
||||
Me.Label6.Name = "Label6"
|
||||
Me.Label6.Size = New System.Drawing.Size(23, 13)
|
||||
Me.Label6.TabIndex = 23
|
||||
Me.Label6.Text = "mm"
|
||||
'
|
||||
'Label5
|
||||
'
|
||||
Me.Label5.AutoSize = True
|
||||
Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label5.Location = New System.Drawing.Point(269, 328)
|
||||
Me.Label5.Name = "Label5"
|
||||
Me.Label5.Size = New System.Drawing.Size(23, 13)
|
||||
Me.Label5.TabIndex = 22
|
||||
Me.Label5.Text = "mm"
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.AutoSize = True
|
||||
Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label4.Location = New System.Drawing.Point(269, 281)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(23, 13)
|
||||
Me.Label4.TabIndex = 21
|
||||
Me.Label4.Text = "mm"
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label3.Location = New System.Drawing.Point(260, 237)
|
||||
Me.Label3.Location = New System.Drawing.Point(269, 237)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(23, 13)
|
||||
Me.Label3.TabIndex = 20
|
||||
Me.Label3.Text = "mm"
|
||||
'
|
||||
'CheckBox_Whole_Mesh
|
||||
'
|
||||
Me.CheckBox_Whole_Mesh.AutoSize = True
|
||||
Me.CheckBox_Whole_Mesh.Location = New System.Drawing.Point(110, 387)
|
||||
Me.CheckBox_Whole_Mesh.Name = "CheckBox_Whole_Mesh"
|
||||
Me.CheckBox_Whole_Mesh.Size = New System.Drawing.Size(122, 17)
|
||||
Me.CheckBox_Whole_Mesh.TabIndex = 19
|
||||
Me.CheckBox_Whole_Mesh.Text = "Whole Mesh Widths"
|
||||
Me.CheckBox_Whole_Mesh.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button_Export_GUI
|
||||
'
|
||||
Me.Button_Export_GUI.Location = New System.Drawing.Point(35, 690)
|
||||
|
|
@ -216,7 +242,7 @@ Partial Class Individual
|
|||
'
|
||||
Me.TextBox_Length.Location = New System.Drawing.Point(110, 458)
|
||||
Me.TextBox_Length.Name = "TextBox_Length"
|
||||
Me.TextBox_Length.Size = New System.Drawing.Size(146, 20)
|
||||
Me.TextBox_Length.Size = New System.Drawing.Size(155, 20)
|
||||
Me.TextBox_Length.TabIndex = 7
|
||||
'
|
||||
'ComboBox_Mesh
|
||||
|
|
@ -225,25 +251,16 @@ Partial Class Individual
|
|||
Me.ComboBox_Mesh.FormattingEnabled = True
|
||||
Me.ComboBox_Mesh.Location = New System.Drawing.Point(110, 233)
|
||||
Me.ComboBox_Mesh.Name = "ComboBox_Mesh"
|
||||
Me.ComboBox_Mesh.Size = New System.Drawing.Size(146, 21)
|
||||
Me.ComboBox_Mesh.Size = New System.Drawing.Size(155, 21)
|
||||
Me.ComboBox_Mesh.TabIndex = 6
|
||||
'
|
||||
'ComboBox_Width
|
||||
'
|
||||
Me.ComboBox_Width.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.ComboBox_Width.FormattingEnabled = True
|
||||
Me.ComboBox_Width.Location = New System.Drawing.Point(110, 418)
|
||||
Me.ComboBox_Width.Name = "ComboBox_Width"
|
||||
Me.ComboBox_Width.Size = New System.Drawing.Size(146, 21)
|
||||
Me.ComboBox_Width.TabIndex = 4
|
||||
'
|
||||
'ComboBox_Thickness
|
||||
'
|
||||
Me.ComboBox_Thickness.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.ComboBox_Thickness.FormattingEnabled = True
|
||||
Me.ComboBox_Thickness.Location = New System.Drawing.Point(110, 323)
|
||||
Me.ComboBox_Thickness.Name = "ComboBox_Thickness"
|
||||
Me.ComboBox_Thickness.Size = New System.Drawing.Size(146, 21)
|
||||
Me.ComboBox_Thickness.Size = New System.Drawing.Size(155, 21)
|
||||
Me.ComboBox_Thickness.TabIndex = 3
|
||||
'
|
||||
'ComboBox_Height
|
||||
|
|
@ -252,7 +269,7 @@ Partial Class Individual
|
|||
Me.ComboBox_Height.FormattingEnabled = True
|
||||
Me.ComboBox_Height.Location = New System.Drawing.Point(110, 278)
|
||||
Me.ComboBox_Height.Name = "ComboBox_Height"
|
||||
Me.ComboBox_Height.Size = New System.Drawing.Size(146, 21)
|
||||
Me.ComboBox_Height.Size = New System.Drawing.Size(155, 21)
|
||||
Me.ComboBox_Height.TabIndex = 2
|
||||
'
|
||||
'ComboBox_Material
|
||||
|
|
@ -261,7 +278,7 @@ Partial Class Individual
|
|||
Me.ComboBox_Material.FormattingEnabled = True
|
||||
Me.ComboBox_Material.Location = New System.Drawing.Point(110, 142)
|
||||
Me.ComboBox_Material.Name = "ComboBox_Material"
|
||||
Me.ComboBox_Material.Size = New System.Drawing.Size(146, 21)
|
||||
Me.ComboBox_Material.Size = New System.Drawing.Size(155, 21)
|
||||
Me.ComboBox_Material.TabIndex = 1
|
||||
'
|
||||
'ComboBox_Type
|
||||
|
|
@ -270,7 +287,7 @@ Partial Class Individual
|
|||
Me.ComboBox_Type.FormattingEnabled = True
|
||||
Me.ComboBox_Type.Location = New System.Drawing.Point(110, 101)
|
||||
Me.ComboBox_Type.Name = "ComboBox_Type"
|
||||
Me.ComboBox_Type.Size = New System.Drawing.Size(146, 21)
|
||||
Me.ComboBox_Type.Size = New System.Drawing.Size(155, 21)
|
||||
Me.ComboBox_Type.TabIndex = 0
|
||||
'
|
||||
'Panel_Recesses
|
||||
|
|
@ -357,9 +374,9 @@ Partial Class Individual
|
|||
Me.Panel_Grating.BackColor = System.Drawing.Color.White
|
||||
Me.Panel_Grating.Controls.Add(Me.Label2)
|
||||
Me.Panel_Grating.Controls.Add(Me.Label1)
|
||||
Me.Panel_Grating.Location = New System.Drawing.Point(290, 120)
|
||||
Me.Panel_Grating.Location = New System.Drawing.Point(315, 120)
|
||||
Me.Panel_Grating.Name = "Panel_Grating"
|
||||
Me.Panel_Grating.Size = New System.Drawing.Size(1105, 652)
|
||||
Me.Panel_Grating.Size = New System.Drawing.Size(1080, 652)
|
||||
Me.Panel_Grating.TabIndex = 2
|
||||
'
|
||||
'Label2
|
||||
|
|
@ -382,46 +399,6 @@ Partial Class Individual
|
|||
Me.Label1.TabIndex = 0
|
||||
Me.Label1.Text = "W"
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.AutoSize = True
|
||||
Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label4.Location = New System.Drawing.Point(260, 281)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(23, 13)
|
||||
Me.Label4.TabIndex = 21
|
||||
Me.Label4.Text = "mm"
|
||||
'
|
||||
'Label5
|
||||
'
|
||||
Me.Label5.AutoSize = True
|
||||
Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label5.Location = New System.Drawing.Point(260, 326)
|
||||
Me.Label5.Name = "Label5"
|
||||
Me.Label5.Size = New System.Drawing.Size(23, 13)
|
||||
Me.Label5.TabIndex = 22
|
||||
Me.Label5.Text = "mm"
|
||||
'
|
||||
'Label6
|
||||
'
|
||||
Me.Label6.AutoSize = True
|
||||
Me.Label6.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label6.Location = New System.Drawing.Point(260, 422)
|
||||
Me.Label6.Name = "Label6"
|
||||
Me.Label6.Size = New System.Drawing.Size(23, 13)
|
||||
Me.Label6.TabIndex = 23
|
||||
Me.Label6.Text = "mm"
|
||||
'
|
||||
'Label7
|
||||
'
|
||||
Me.Label7.AutoSize = True
|
||||
Me.Label7.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label7.Location = New System.Drawing.Point(260, 462)
|
||||
Me.Label7.Name = "Label7"
|
||||
Me.Label7.Size = New System.Drawing.Size(23, 13)
|
||||
Me.Label7.TabIndex = 24
|
||||
Me.Label7.Text = "mm"
|
||||
'
|
||||
'Individual
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
|
|
@ -447,7 +424,6 @@ Partial Class Individual
|
|||
Friend WithEvents Panel_Data As Panel
|
||||
Friend WithEvents TextBox_Length As TextBox
|
||||
Friend WithEvents ComboBox_Mesh As ComboBox
|
||||
Friend WithEvents ComboBox_Width As ComboBox
|
||||
Friend WithEvents ComboBox_Thickness As ComboBox
|
||||
Friend WithEvents ComboBox_Height As ComboBox
|
||||
Friend WithEvents ComboBox_Material As ComboBox
|
||||
|
|
@ -471,7 +447,6 @@ Partial Class Individual
|
|||
Friend WithEvents Button_Export_GUI As Button
|
||||
Friend WithEvents Button_Export_SW As Button
|
||||
Friend WithEvents Button_Settings As Button
|
||||
Friend WithEvents CheckBox_Whole_Mesh As CheckBox
|
||||
Friend WithEvents Label2 As Label
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents Label3 As Label
|
||||
|
|
|
|||
|
|
@ -28,8 +28,92 @@ Public Class Individual
|
|||
Me.Height = AppForm.Height
|
||||
ComboBox_Type.Items.Add("Pressure Welded")
|
||||
ComboBox_Type.Items.Add("Type A")
|
||||
|
||||
If AppForm.fillMode = True Then
|
||||
Init_Multiple()
|
||||
Else
|
||||
Init_Individual()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Init_Individual()
|
||||
Me.Panel_Data.BackColor = Color.AliceBlue
|
||||
Me.Panel_Recesses.BackColor = Color.LightGray
|
||||
|
||||
Dim CheckTemp As New CheckBox With {
|
||||
.Name = "CheckBox_Whole_Mesh",
|
||||
.Text = "Whole Mesh Widths",
|
||||
.Left = 110,
|
||||
.Top = 387,
|
||||
.Font = New Font("Microsoft Sans Serif", 7.8),
|
||||
.Checked = True,
|
||||
.Enabled = False,
|
||||
.AutoSize = True,
|
||||
.BackColor = Color.Transparent
|
||||
}
|
||||
AddHandler CheckTemp.CheckedChanged, AddressOf CheckBox_Whole_Mesh_CheckedChanged
|
||||
Me.Panel_Data.Controls.Add(CheckTemp)
|
||||
|
||||
Dim WidthDropTemp As New ComboBox With {
|
||||
.Name = "ComboBox_Width",
|
||||
.Left = 110,
|
||||
.Top = 418,
|
||||
.Width = 155,
|
||||
.Enabled = False,
|
||||
.DropDownStyle = ComboBoxStyle.DropDownList
|
||||
}
|
||||
AddHandler WidthDropTemp.KeyPress, AddressOf ComboBox_Width_KeyPress
|
||||
AddHandler WidthDropTemp.TextChanged, AddressOf ComboBox_Width_TextChanged
|
||||
Me.Panel_Data.Controls.Add(WidthDropTemp)
|
||||
End Sub
|
||||
|
||||
Private Sub Init_Multiple()
|
||||
Me.Panel_Data.BackColor = Color.Salmon
|
||||
Me.Panel_Recesses.BackColor = Color.LightPink
|
||||
|
||||
Dim LabelTemp As New Label With {
|
||||
.Name = "Label_Max_Load",
|
||||
.Text = "Max Load",
|
||||
.Left = 35,
|
||||
.Top = 525,
|
||||
.AutoSize = True,
|
||||
.Font = New Font("Microsoft Sans Serif", 10)
|
||||
}
|
||||
Me.Panel_Data.Controls.Add(LabelTemp)
|
||||
|
||||
|
||||
Dim textBoxTemp As New TextBox With {
|
||||
.Name = "TextBox_Max_Load",
|
||||
.Text = "5",
|
||||
.Left = 110,
|
||||
.Top = 525,
|
||||
.Width = 155,
|
||||
.TextAlign = HorizontalAlignment.Right,
|
||||
.Font = New Font("Microsoft Sans Serif", 7.8)
|
||||
}
|
||||
Me.Panel_Data.Controls.Add(textBoxTemp)
|
||||
|
||||
Dim LabelTemp2 As New Label With {
|
||||
.Name = "Label_Max_Load_Unit",
|
||||
.Text = "kN/m²",
|
||||
.Left = 269,
|
||||
.Top = 529,
|
||||
.Font = New Font("Microsoft Sans Serif", 8)
|
||||
}
|
||||
Me.Panel_Data.Controls.Add(LabelTemp2)
|
||||
|
||||
Dim WidthTextTemp As New ComboBox With {
|
||||
.Name = "TextBox_Width",
|
||||
.Left = 110,
|
||||
.Top = 418,
|
||||
.Width = 155,
|
||||
.Enabled = False
|
||||
}
|
||||
AddHandler WidthTextTemp.KeyPress, AddressOf ComboBox_Width_KeyPress
|
||||
AddHandler WidthTextTemp.TextChanged, AddressOf ComboBox_Width_TextChanged
|
||||
Me.Panel_Data.Controls.Add(WidthTextTemp)
|
||||
End Sub
|
||||
|
||||
' ---------------------------------- Individual Templates ----------------------------------
|
||||
' --- TextBox Template ---
|
||||
|
|
@ -87,17 +171,17 @@ Public Class Individual
|
|||
End Sub
|
||||
|
||||
' --- When user checkes/uncheckes whole meshes ---
|
||||
Private Sub CheckBox_Whole_Mesh_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox_Whole_Mesh.CheckedChanged
|
||||
Private Sub CheckBox_Whole_Mesh_CheckedChanged(sender As Object, e As EventArgs)
|
||||
User_Input.WholeMeshWidthsChanged(sender, e)
|
||||
End Sub
|
||||
|
||||
' --- Grating width changed ---
|
||||
Private Sub WidthB_TextChanged(sender As Object, e As EventArgs) Handles ComboBox_Width.TextChanged
|
||||
Private Sub ComboBox_Width_TextChanged(sender As Object, e As EventArgs)
|
||||
User_Input.WidthChanged(sender, e)
|
||||
End Sub
|
||||
|
||||
' --- Check if width is a number ---
|
||||
Private Sub ComboBox_Width_KeyPress(sender As Object, e As KeyPressEventArgs) Handles ComboBox_Width.KeyPress
|
||||
Private Sub ComboBox_Width_KeyPress(sender As Object, e As KeyPressEventArgs)
|
||||
User_Input.Check_IfNumber(e)
|
||||
End Sub
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@
|
|||
angleRecessPoints.Columns.Add("GUI X", GetType(Integer))
|
||||
angleRecessPoints.Columns.Add("GUI Y", GetType(Integer))
|
||||
|
||||
Individual.CheckBox_Whole_Mesh.Checked = True
|
||||
|
||||
pointsMeasurements.Add("Lmes", {1, 2, 1})
|
||||
pointsMeasurements.Add("Wmes", {2, 3, 2})
|
||||
|
|
|
|||
|
|
@ -274,18 +274,24 @@
|
|||
|
||||
Public Shared Sub WholeMeshWidthsChanged(sender As Object, e As EventArgs)
|
||||
If sender.Checked Then
|
||||
Individual.ComboBox_Width.DropDownStyle = ComboBoxStyle.DropDownList
|
||||
Dim temp As ComboBox = Individual.Controls("ComboBox_Width")
|
||||
temp.DropDownStyle = ComboBoxStyle.DropDownList
|
||||
'Individual.Controls("ComboBox_Width").DropDownStyle = ComboBoxStyle.DropDownList
|
||||
Else
|
||||
Individual.ComboBox_Width.DropDownStyle = ComboBoxStyle.DropDown
|
||||
'Individual.ComboBox_Width.DropDownStyle = ComboBoxStyle.DropDown
|
||||
Dim temp As ComboBox = Individual.Controls("ComboBox_Width")
|
||||
temp.DropDownStyle = ComboBoxStyle.DropDownList
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Shared Sub ThicknessChanged(sender As Object, e As EventArgs)
|
||||
Individual.ComboBox_Width.Enabled = True
|
||||
Individual.ComboBox_Width.Items.Clear()
|
||||
'Individual.ComboBox_Width.Enabled = True
|
||||
'Individual.ComboBox_Width.Items.Clear()
|
||||
Individual.TextBox_Length.Text = 1000
|
||||
Individual.TextBox_Length.Enabled = True
|
||||
Individual.CheckBox_Whole_Mesh.Enabled = True
|
||||
If AppForm.fillMode = False Then
|
||||
Individual.Panel_Data.Controls("CheckBox_Whole_Mesh").Enabled = True
|
||||
End If
|
||||
|
||||
loadBarThickness = CInt(Individual.ComboBox_Thickness.Text)
|
||||
|
||||
|
|
@ -324,7 +330,7 @@
|
|||
Dim wholeMeshesDT As DataTable = Database.database.Tables("Whole Meshes")
|
||||
For i = 0 To wholeMeshesDT.Rows.Count - 1
|
||||
If Not IsDBNull(wholeMeshesDT.Rows(i)(wholeMeshesColumn)) Then
|
||||
Individual.ComboBox_Width.Items.Add(wholeMeshesDT.Rows(i)(wholeMeshesColumn))
|
||||
'Individual.ComboBox_Width.Items.Add(wholeMeshesDT.Rows(i)(wholeMeshesColumn))
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
|
@ -332,14 +338,14 @@
|
|||
|
||||
|
||||
Public Shared Sub WidthChanged(sender As Object, e As EventArgs)
|
||||
If Individual.ComboBox_Width.Text <> "" Then
|
||||
If CInt(Individual.ComboBox_Width.Text) >= Individual.ComboBox_Width.Items(Individual.ComboBox_Width.Items.Count - 1) AndAlso
|
||||
CInt(Individual.ComboBox_Width.Text) <= Individual.ComboBox_Width.Items(0) Then
|
||||
Data.gratingW = CInt(Individual.ComboBox_Width.Text)
|
||||
Draw_Grating.Update_GratingPoints()
|
||||
End If
|
||||
Enable_Recesses()
|
||||
End If
|
||||
'If Individual.ComboBox_Width.Text <> "" Then
|
||||
' If CInt(Individual.ComboBox_Width.Text) >= Individual.ComboBox_Width.Items(Individual.ComboBox_Width.Items.Count - 1) AndAlso
|
||||
' CInt(Individual.ComboBox_Width.Text) <= Individual.ComboBox_Width.Items(0) Then
|
||||
' Data.gratingW = CInt(Individual.ComboBox_Width.Text)
|
||||
' Draw_Grating.Update_GratingPoints()
|
||||
' End If
|
||||
' Enable_Recesses()
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Public Shared Sub LengthChanged(sender As Object, e As EventArgs)
|
||||
|
|
@ -355,11 +361,11 @@
|
|||
End Sub
|
||||
|
||||
Private Shared Sub Enable_Recesses()
|
||||
If Individual.ComboBox_Width.Text <> "" AndAlso Individual.TextBox_Length.Text <> "" Then
|
||||
Individual.Button_Angle_Corner.Enabled = True
|
||||
Individual.Button_Square_Corner.Enabled = True
|
||||
Individual.Button_Square_Side.Enabled = True
|
||||
End If
|
||||
'If Individual.ComboBox_Width.Text <> "" AndAlso Individual.TextBox_Length.Text <> "" Then
|
||||
' Individual.Button_Angle_Corner.Enabled = True
|
||||
' Individual.Button_Square_Corner.Enabled = True
|
||||
' Individual.Button_Square_Side.Enabled = True
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
|
@ -384,7 +390,7 @@
|
|||
gratingTable.Rows.Add()
|
||||
|
||||
gratingTable.Rows(0)("SERRATED") = False 'Hämta från GUI
|
||||
gratingTable.Rows(0)("WIDTH") = CInt(Individual.ComboBox_Width.Text)
|
||||
'gratingTable.Rows(0)("WIDTH") = CInt(Individual.ComboBox_Width.Text)
|
||||
gratingTable.Rows(0)("LENGTH") = CInt(Individual.TextBox_Length.Text)
|
||||
gratingTable.Rows(0)("LOADBAR_THICKNESS") = CInt(Individual.ComboBox_Thickness.Text)
|
||||
gratingTable.Rows(0)("LOADBAR_HEIGHT") = CInt(Individual.ComboBox_Height.Text)
|
||||
|
|
|
|||
Loading…
Reference in New Issue