VERSION 5.00 Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX" Begin VB.Form Form32 BorderStyle = 4 'Fixed ToolWindow ClientHeight = 2130 ClientLeft = 45 ClientTop = 300 ClientWidth = 4740 Icon = "Form32.frx":0000 LinkTopic = "Form3" MaxButton = 0 'False MDIChild = -1 'True MinButton = 0 'False ScaleHeight = 2130 ScaleWidth = 4740 ShowInTaskbar = 0 'False Begin VB.ListBox List2 Height = 1620 Left = 2400 TabIndex = 8 Top = 360 Visible = 0 'False Width = 2175 End Begin VB.ListBox List1 Height = 1620 Left = 120 TabIndex = 7 Top = 360 Visible = 0 'False Width = 2175 End Begin MSComDlg.CommonDialog CMD1 Left = 600 Top = 1680 _ExtentX = 847 _ExtentY = 847 _Version = 393216 End Begin VB.Frame Frame2 Caption = "Final Magma" BeginProperty Font Name = "Arial" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00008000& Height = 1455 Left = 2400 TabIndex = 4 Top = 120 Width = 2175 Begin VB.CommandButton Command4 Caption = "Select from Samples" BeginProperty Font Name = "Arial" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 120 TabIndex = 6 Top = 360 Width = 1935 End Begin VB.CommandButton Command3 Caption = "Open file" BeginProperty Font Name = "Arial" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 120 TabIndex = 5 Top = 960 Width = 1935 End End Begin VB.CommandButton Command5 Caption = "OK (SpaceBar)" BeginProperty Font Name = "Arial" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 3000 TabIndex = 1 Top = 1680 Width = 1575 End Begin VB.Frame Frame1 Caption = "Initial Magma" BeginProperty Font Name = "Arial" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00008000& Height = 1455 Left = 120 TabIndex = 0 Top = 120 Width = 2175 Begin VB.CommandButton Command2 Caption = "Open file" BeginProperty Font Name = "Arial" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 120 TabIndex = 3 Top = 960 Width = 1935 End Begin VB.CommandButton Command1 Caption = "Select from Samples" BeginProperty Font Name = "Arial" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 120 TabIndex = 2 Top = 360 Width = 1935 End End End Attribute VB_Name = "Form32" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Sub Command1_Click() If Fileopen = True Then For ia = 1 To Numcamp1 List1.AddItem NomeCamp(ia) Next ia List1.Visible = True End If Form32.Command5.SetFocus End Sub Private Sub Command2_Click() On Error GoTo esci For ia = 1 To 11 Form30.Text1(ia).Visible = False Next ia For ia = 1 To NumOx Form30.Text1(ia).Visible = True Form30.Text1(ia).Text = "nd" Next ia CMD1.DialogTitle = "Open Data file for Initial Magma(.txt) ..." CMD1.Filter = "*.txt" CMD1.FileName = "*.txt" CMD1.ShowOpen file$ = CMD1.FileName Close #1 Open file$ For Input As #1 PBTOT = 0 Do While Not EOF(1) Input #1, aa Input #1, bb For ia = 1 To NumOx If aa = OX(ia) Then PB(ia) = bb PBTOT = PBTOT + PB(ia) Form30.Text1(ia).Text = PB(ia) End If Next ia Loop Form30.Text1(NumOx + 1).Visible = True Form30.Text1(NumOx + 1).Text = PBTOT Form30.Label2.Visible = True esci: Form32.Command5.SetFocus End Sub Private Sub Command3_Click() On Error GoTo esci For ia = 1 To 11 Form30.Text2(ia).Visible = False Next ia For ia = 1 To NumOx Form30.Text2(ia).Visible = True Form30.Text2(ia).Text = "nd" Next ia CMD1.DialogTitle = "Open Data file for Final Magma(.txt) ..." CMD1.Filter = "*.txt" CMD1.FileName = "*.txt" CMD1.ShowOpen file$ = CMD1.FileName Close #1 Open file$ For Input As #1 PFTOT = 0 Do While Not EOF(1) Input #1, aa Input #1, bb For ia = 1 To NumOx If aa = OX(ia) Then PF(ia) = bb PFTOT = PFTOT + PF(ia) Form30.Text2(ia).Text = PF(ia) End If Next ia Loop Form30.Text2(NumOx + 1).Visible = True Form30.Text2(NumOx + 1).Text = PFTOT Form30.Label3(0).Visible = True Form32.Command5.SetFocus esci: End Sub Private Sub Command4_Click() If Fileopen = True Then For ia = 1 To Numcamp1 List2.AddItem NomeCamp(ia) Next ia List2.Visible = True End If Form32.Command5.SetFocus End Sub Private Sub Command5_Click() Unload Form32 End Sub Private Sub List1_Click() For ia = 1 To 11 Form30.Text1(ia).Visible = False Next ia For ia = 1 To NumOx Form30.Text1(ia).Visible = True Form30.Text1(ia).Text = "nd" Next ia nome$ = List1.Text For ia1 = 1 To Numcamp1 If nome$ = NomeCamp(ia1) Then wwww = ia1 GoTo poi End If Next ia1 poi: PBTOT = 0 For ia = 1 To NumOx For ia1 = 1 To Numelem If Elementi(ia1) = OX(ia) Then If DatiOrigine(wwww, ia1) <= 0 Then PB(ia) = 0 Else PB(ia) = DatiOrigine(wwww, ia1) End If PBTOT = PBTOT + PB(ia) Form30.Text1(ia).Text = PB(ia) GoTo poi1 End If Next ia1 poi1: Next ia Form30.Text1(NumOx + 1).Visible = True Form30.Text1(NumOx + 1).Text = PBTOT Form30.Label2.Visible = True List1.Visible = False End Sub Private Sub List1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 32 Then Command5_Click End If End Sub Private Sub List2_Click() For ia = 1 To 11 Form30.Text2(ia).Visible = False Next ia For ia = 1 To NumOx Form30.Text2(ia).Visible = True Form30.Text2(ia).Text = "nd" Next ia nome$ = List2.Text For ia1 = 1 To Numcamp1 If nome$ = NomeCamp(ia1) Then wwww = ia1 GoTo poi End If Next ia1 poi: PFTOT = 0 For ia = 1 To NumOx For ia1 = 1 To Numelem If Elementi(ia1) = OX(ia) Then If DatiOrigine(wwww, ia1) <= 0 Then PF(ia) = 0 Else PF(ia) = DatiOrigine(wwww, ia1) End If PFTOT = PFTOT + PF(ia) Form30.Text2(ia).Text = PF(ia) GoTo poi1 End If Next ia1 poi1: Next ia Form30.Text2(NumOx + 1).Visible = True Form30.Text2(NumOx + 1).Text = PFTOT Form30.Label3(0).Visible = True List2.Visible = False End Sub Private Sub List2_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 32 Then Command5_Click End If End Sub