'****************************************************************************
'* Copyright (C) 2008 Peter Mortensen and Matthias Mann *
'* This file is part of MSQuant. *
'* *
'* MSQuant is distributed under the terms of *
'* the GNU General Public License. See src/COPYING.TXT or *
'* <http://www.gnu.org/licenses/gpl.txt> for details. *
'* *
'* MSQuant is free software; you can redistribute it *
'* and/or modify it under the terms of the GNU *
'* General Public License as published by the Free *
'* Software Foundation; either version 2 of the *
'* License, or (at your option) any later version. *
'* *
'* MSQuant is distributed in the hope that it will be *
'* useful, but WITHOUT ANY WARRANTY; without even the *
'* implied warranty of MERCHANTABILITY or FITNESS FOR *
'* A PARTICULAR PURPOSE. See the GNU General Public *
'* License for more details. *
'* *
'* You should have received a copy of the GNU General *
'* Public License along with MSQuant; if not, write to *
'* the Free Software Foundation, Inc., 59 Temple *
'* Place, Suite 330, Boston, MA 02111-1307 USA *
'* *
'* *
'****************************************************************************
'****************************************************************************
'* CEBI *
'* Software Development Group *
'* Peter Mortensen *
'* E-mail: NUKESPAMMERSdrmortensen@get2netZZZZZZ.dk *
'* WWW: http://www.cebi.sdu.dk/ *
'* *
'* Program for post-processing of result from search in mass *
'* spectrometric data. *
'* *
'* FILENAME: frmRecalibRealityCheck.vb *
'* TYPE: VISUAL_BASIC *
'* *
'* CREATED: PM 2008-03-26 Vrs 1.0. *
'* UPDATED: PM 2008-xx-xx *
'* *
'****************************************************************************
'Future:
' 1.
Imports SDUPrecalibrator 'For Structure recalibLimitsStructure.
'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Public Class frmRecalibRealityCheck
Private mRecalibLimits As recalibLimitsStructure
Public Event realityCheckDialogDismissed( _
ByVal aSender As Object, _
ByVal anEvent As realityCheckEventArgs)
'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Public Sub New( _
ByVal anInrecalibLimits As recalibLimitsStructure)
'These 2 patterned on the older generated code for .NET 1.0/1.1.
'Is this the right way to do it????
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
Me.Init(anInrecalibLimits)
End Sub 'New
'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Private Sub frmRecalibRealityCheck_Load( _
ByVal aSender As System.Object, ByVal anEvent As System.EventArgs) _
Handles MyBase.Load
fillInForm(mRecalibLimits)
End Sub 'frmRecalibRealityCheck_Load()
'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Private Sub Init(ByVal anInrecalibLimits As recalibLimitsStructure)
mRecalibLimits = anInrecalibLimits
End Sub 'Init
'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Private Sub fillInForm(ByVal anInRecalibLimits As recalibLimitsStructure)
txtStartDataPoints.Text = anInRecalibLimits.startDatapoints
txtEndDataPoints.Text = anInRecalibLimits.endDatapoints
txtStartSlope.Text = anInRecalibLimits.startSlope
txtEndSlope.Text = anInRecalibLimits.endSlope
txtStartOffset.Text = anInRecalibLimits.startOffset
txtEndOffset.Text = anInRecalibLimits.endOffset
End Sub 'fillInForm
'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Private Sub btnOK_Click( _
ByVal aSender As System.Object, ByVal anEvent As System.EventArgs) _
Handles btnOK.Click
'No validation for now....
Try
Dim newValues As recalibLimitsStructure = _
SDUPrecalibrator.defaultRecalibLimits()
newValues.startDatapoints = CInt(txtStartDataPoints.Text)
newValues.endDatapoints = CInt(txtEndDataPoints.Text)
newValues.startSlope = CDbl(txtStartSlope.Text)
newValues.endSlope = CDbl(txtEndSlope.Text)
newValues.startOffset = CDbl(txtStartOffset.Text)
newValues.endOffset = CDbl(txtEndOffset.Text)
'Changed PM_PEPTIDEFILTER_GENERALISED 2007-08-27
'mParentForm.setPeptideFilterSpecification(newValues)
RaiseEvent realityCheckDialogDismissed( _
aSender, New realityCheckEventArgs(newValues))
Me.Close()
Catch exceptionObject As Exception
AppCommon2.displayStandardExceptionInfo( _
exceptionObject, _
"Could not read values dialog in dialog. Some numeric fields may hold letters, etc.")
Exit Sub
End Try
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()
'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Private Sub btnFtdefaults_Click( _
ByVal aSender As System.Object, _
ByVal anEvent As System.EventArgs) _
Handles btnFtdefaults.Click
txtStartSlope.Text = "1.00000000000"
txtEndSlope.Text = "1.000005"
End Sub 'btnFtdefaults_Click
'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Private Sub btnProgramDefaults_Click( _
ByVal aSender As System.Object, _
ByVal anEvent As System.EventArgs) _
Handles btnProgramDefaults.Click
Dim programDefaults As recalibLimitsStructure = _
SDUPrecalibrator.defaultRecalibLimits()
fillInForm(programDefaults)
End Sub 'btnProgramDefaults_Click
End Class 'Class frmRecalibRealityCheck
'Helper class for realityCheckDialogDismissed event.
'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Public Class realityCheckEventArgs
Inherits System.EventArgs
Private mRecalibLimits As recalibLimitsStructure
'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Public Sub New(ByVal aSomeValue As recalibLimitsStructure)
mRecalibLimits = aSomeValue
End Sub
'****************************************************************************
'* <placeholder for header> *
'****************************************************************************
Public Function getFilter() _
As recalibLimitsStructure
Return mRecalibLimits
End Function 'getFilter
End Class 'pepFilterDismissedEventArgs
Generated by script codePublish.pl at 2009-01-05T15:20:59.