Spaces:
No application file
No application file
Upload 2 files
Browse files
Nesting/frmNestingOptions.frm
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
VERSION 5.00
|
| 2 |
+
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} frmNestingOptions
|
| 3 |
+
Caption = "Auto Nesting - Pengaturan"
|
| 4 |
+
ClientHeight = 4485
|
| 5 |
+
ClientLeft = 120
|
| 6 |
+
ClientTop = 465
|
| 7 |
+
ClientWidth = 8175
|
| 8 |
+
OleObjectBlob = "frmNestingOptions.frx":0000
|
| 9 |
+
StartUpPosition = 1 'CenterOwner
|
| 10 |
+
End
|
| 11 |
+
Attribute VB_Name = "frmNestingOptions"
|
| 12 |
+
Attribute VB_GlobalNameSpace = False
|
| 13 |
+
Attribute VB_Creatable = False
|
| 14 |
+
Attribute VB_PredeclaredId = True
|
| 15 |
+
Attribute VB_Exposed = False
|
| 16 |
+
Option Explicit
|
| 17 |
+
|
| 18 |
+
Public allowMultiWidth As Boolean
|
| 19 |
+
Public Confirmed As Boolean
|
| 20 |
+
Public MarginCm As Double
|
| 21 |
+
Public rollText As String
|
| 22 |
+
Public PreferredText As String
|
| 23 |
+
Public TolerancePct As Double
|
| 24 |
+
Public allowRotation As Boolean
|
| 25 |
+
|
| 26 |
+
Private Function ToNum(ByVal s As String) As Double
|
| 27 |
+
ToNum = Val(Replace(Trim$(s), ",", "."))
|
| 28 |
+
End Function
|
| 29 |
+
|
| 30 |
+
Private Sub UserForm_Initialize()
|
| 31 |
+
Confirmed = False
|
| 32 |
+
End Sub
|
| 33 |
+
|
| 34 |
+
Private Sub btnOK_Click()
|
| 35 |
+
If Len(Trim$(txtMargin.Text)) > 0 And Not IsNumeric(Replace(Trim$(txtMargin.Text), ".", ",")) _
|
| 36 |
+
And Not IsNumeric(Trim$(txtMargin.Text)) Then
|
| 37 |
+
MsgBox "Margin harus berupa angka.", vbExclamation, "Auto Nesting"
|
| 38 |
+
txtMargin.SetFocus
|
| 39 |
+
Exit Sub
|
| 40 |
+
End If
|
| 41 |
+
|
| 42 |
+
If Len(Trim$(txtRolls.Text)) = 0 Then
|
| 43 |
+
MsgBox "Daftar lebar roll wajib diisi.", vbExclamation, "Auto Nesting"
|
| 44 |
+
txtRolls.SetFocus
|
| 45 |
+
Exit Sub
|
| 46 |
+
End If
|
| 47 |
+
|
| 48 |
+
If Len(Trim$(txtPreferred.Text)) > 0 Then
|
| 49 |
+
If Not IsNumeric(Trim$(txtPreferred.Text)) Then
|
| 50 |
+
MsgBox "Roll terpasang harus berupa angka (atau kosongkan).", vbExclamation, "Auto Nesting"
|
| 51 |
+
txtPreferred.SetFocus
|
| 52 |
+
Exit Sub
|
| 53 |
+
End If
|
| 54 |
+
End If
|
| 55 |
+
|
| 56 |
+
MarginCm = ToNum(txtMargin.Text)
|
| 57 |
+
If MarginCm < 0# Then MarginCm = 0#
|
| 58 |
+
|
| 59 |
+
rollText = Trim$(txtRolls.Text)
|
| 60 |
+
PreferredText = Trim$(txtPreferred.Text)
|
| 61 |
+
|
| 62 |
+
TolerancePct = ToNum(txtTolerance.Text)
|
| 63 |
+
If TolerancePct < 0# Then TolerancePct = 0#
|
| 64 |
+
If TolerancePct > 50# Then TolerancePct = 50#
|
| 65 |
+
|
| 66 |
+
allowRotation = chkRotate.value
|
| 67 |
+
allowMultiWidth = chkMultiWidth.value
|
| 68 |
+
Confirmed = True
|
| 69 |
+
Me.Hide
|
| 70 |
+
End Sub
|
| 71 |
+
|
| 72 |
+
Private Sub btnCancel_Click()
|
| 73 |
+
Confirmed = False
|
| 74 |
+
Me.Hide
|
| 75 |
+
End Sub
|
| 76 |
+
|
| 77 |
+
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
|
| 78 |
+
If CloseMode = vbFormControlMenu Then
|
| 79 |
+
Confirmed = False
|
| 80 |
+
Me.Hide
|
| 81 |
+
Cancel = True
|
| 82 |
+
End If
|
| 83 |
+
End Sub
|
Nesting/frmNestingOptions.frx
ADDED
|
Binary file (4.12 kB). View file
|
|
|