'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Public Class frmFilesRelocation
Private mResultFile As String
Private mRawFile As String
Private mOKed As Boolean
Private mOnlyOneRawFile As Boolean
'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Public Sub New(ByRef anInResultFile As String, ByRef anInrawFile As String)
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
mResultFile = anInResultFile
mRawFile = anInrawFile
mOKed = False
mOnlyOneRawFile = False
End Sub 'Constructor.
'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Public Function wasOKed() _
As Boolean
Return mOKed
End Function 'wasOKed
'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Public Function getResultFile() _
As String
Return mResultFile
End Function 'getResultFile
'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Public Function getRawFile() _
As String
Return mRawFile
End Function 'getRawFile
'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Public Function getOnlyOneRawFile() _
As Boolean
Return mOnlyOneRawFile
End Function 'getOnlyOneRawFile
'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Private Sub frmFilesRelocation_Load( _
ByVal aSender As System.Object, ByVal anEvent As System.EventArgs) _
Handles MyBase.Load
txtMascotResultFile.Text = mResultFile
txtSomeRawFile.Text = mRawFile
chkOnlyOneRawFile.Checked = mOnlyOneRawFile
End Sub 'frmFilesRelocation_Load
'Copied from DTASC. Move it to a common place in the application.
'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Private Function userSelectInputFile( _
ByRef anInTitle As String, _
ByRef aFilter As String, _
ByRef anOutInputFileName As String) _
As Boolean
Dim toReturn As Boolean = False
anOutInputFileName = ""
OpenFileDialog1.RestoreDirectory() = False 'do not restore directory
OpenFileDialog1.Title = anInTitle
OpenFileDialog1.DereferenceLinks = True
OpenFileDialog1.Filter = aFilter
OpenFileDialog1.FileName = ""
If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
anOutInputFileName = OpenFileDialog1.FileName
toReturn = True
End If
Return toReturn
End Function 'userSelectInputFile
'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Private Sub btnOK_Click( _
ByVal aSender As System.Object, ByVal anEvent As System.EventArgs) _
Handles btnOK.Click
mResultFile = txtMascotResultFile.Text
mRawFile = txtSomeRawFile.Text
mOnlyOneRawFile = chkOnlyOneRawFile.Checked
mOKed = True
Me.Close()
End Sub 'btnOK_Click
'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Private Sub btnCancel_Click( _
ByVal aSender As System.Object, ByVal anEvent As System.EventArgs) _
Handles btnCancel.Click
Me.Close()
End Sub 'btnCancel_Click
'Changed PM_BROWSE_FILES_RELOCATEDIALOG 2008-07-30
'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Private Sub btnBrowseMascotFile_Click( _
ByVal aSender As System.Object, ByVal anEvent As System.EventArgs) _
Handles btnBrowseMascotFile.Click
Dim mascotFile As String = Nothing
If userSelectInputFile( _
"Select Mascot result file", _
"HTML files (*.html)(*.htm)|*.html;*.htm", _
mascotFile) Then
txtMascotResultFile.Text = mascotFile
End If
End Sub 'btnBrowseMascotFile_Click
'Changed PM_BROWSE_FILES_RELOCATEDIALOG 2008-07-30
'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Private Sub btnBrowseRawFile_Click( _
ByVal aSender As System.Object, ByVal anEvent As System.EventArgs) _
Handles btnBrowseRawFile.Click
Dim rawFile As String = Nothing
If userSelectInputFile( _
"Select raw spectrum file", _
"Analyst, Finnegan or Micromass files (*.wiff)(*.raw)|*.wiff;*.raw", _
rawFile) Then
txtSomeRawFile.Text = rawFile
End If
End Sub 'btnBrowseRawFile_Click
End Class 'frmFilesRelocation
Generated by script codePublish.pl at 2009-01-05T15:20:59.