Source code for MSQuant: frmSpectrumReductionParameters.vb, MSQuant/msquant/src/GUI/forms/frmSpectrumReductionParameters.vb.

Table of contents page.

Home page for MSQuant.

'****************************************************************************
'* Copyright (C) 2004 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                            *
'*                                                                          *
'* Purpose: User set of spectrum reduction parameters.                      *
'*          Holds Class frmSpectrumReductionParameters, see below for       *
'*          documentation.                                                  *
'*                                                                          *
'****************************************************************************

'****************************************************************************
'*                               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:   frmSpectrumReductionParameters.vb                         *
'*    TYPE:  VISUAL_BASIC                                                   *
'*                                                                          *
'* CREATED: PM 2005-09-05   Vrs 1.0. Estimated date...                      *
'* UPDATED: PM 2005-xx-xx                                                   *
'*                                                                          *
'****************************************************************************

Option Strict On
Option Explicit On 


Public Class frmSpectrumReductionParameters
    Inherits System.Windows.Forms.Form

    'Dialog is tied to that particular form....
    Private mParentForm As frmProtValidation


#Region " Windows Form Designer generated code "


    '****************************************************************************
    '*    <placeholder for header>                                              *
    '****************************************************************************
    Public Sub New( _
      ByVal aReductionParameters As reductionParametersStructure, _
      ByRef aParentForm As frmProtValidation)

        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

        Me.Init(aReductionParameters, aParentForm)

    End Sub 'New


    'Form overrides dispose to clean up the component list.
    '****************************************************************************
    '*    <placeholder for header>                                              *
    '****************************************************************************
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    '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.
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents txtSmartPickingLevel As System.Windows.Forms.TextBox
    Friend WithEvents txtMannReductionLevel As System.Windows.Forms.TextBox
    Friend WithEvents btnCancel As System.Windows.Forms.Button
    Friend WithEvents txtSmartPickingMassWindow As System.Windows.Forms.TextBox
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents txtMatchingTolerance As System.Windows.Forms.TextBox
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents btnOK As System.Windows.Forms.Button
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.Label1 = New System.Windows.Forms.Label
        Me.txtSmartPickingLevel = New System.Windows.Forms.TextBox
        Me.txtMannReductionLevel = New System.Windows.Forms.TextBox
        Me.Label2 = New System.Windows.Forms.Label
        Me.btnCancel = New System.Windows.Forms.Button
        Me.btnOK = New System.Windows.Forms.Button
        Me.txtSmartPickingMassWindow = New System.Windows.Forms.TextBox
        Me.Label3 = New System.Windows.Forms.Label
        Me.txtMatchingTolerance = New System.Windows.Forms.TextBox
        Me.Label4 = New System.Windows.Forms.Label
        Me.SuspendLayout()
        '
        'Label1
        '
        Me.Label1.Location = New System.Drawing.Point(24, 24)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(176, 16)
        Me.Label1.TabIndex = 0
        Me.Label1.Text = "SmartPicking level:"
        '
        'txtSmartPickingLevel
        '
        Me.txtSmartPickingLevel.Location = New System.Drawing.Point(237, 20)
        Me.txtSmartPickingLevel.Name = "txtSmartPickingLevel"
        Me.txtSmartPickingLevel.Size = New System.Drawing.Size(69, 20)
        Me.txtSmartPickingLevel.TabIndex = 1
        Me.txtSmartPickingLevel.Text = "xyz"
        '
        'txtMannReductionLevel
        '
        Me.txtMannReductionLevel.Location = New System.Drawing.Point(237, 134)
        Me.txtMannReductionLevel.Name = "txtMannReductionLevel"
        Me.txtMannReductionLevel.Size = New System.Drawing.Size(69, 20)
        Me.txtMannReductionLevel.TabIndex = 3
        Me.txtMannReductionLevel.Text = "xyz"
        '
        'Label2
        '
        Me.Label2.Location = New System.Drawing.Point(24, 138)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(176, 16)
        Me.Label2.TabIndex = 2
        Me.Label2.Text = "In 100.0 Da windows, keep best :"
        '
        'btnCancel
        '
        Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.btnCancel.Location = New System.Drawing.Point(244, 187)
        Me.btnCancel.Name = "btnCancel"
        Me.btnCancel.Size = New System.Drawing.Size(77, 24)
        Me.btnCancel.TabIndex = 102
        Me.btnCancel.Text = "&Cancel"
        '
        'btnOK
        '
        Me.btnOK.Location = New System.Drawing.Point(154, 188)
        Me.btnOK.Name = "btnOK"
        Me.btnOK.Size = New System.Drawing.Size(80, 23)
        Me.btnOK.TabIndex = 103
        Me.btnOK.Text = "&OK"
        '
        'txtSmartPickingMassWindow
        '
        Me.txtSmartPickingMassWindow.Location = New System.Drawing.Point(237, 58)
        Me.txtSmartPickingMassWindow.Name = "txtSmartPickingMassWindow"
        Me.txtSmartPickingMassWindow.Size = New System.Drawing.Size(69, 20)
        Me.txtSmartPickingMassWindow.TabIndex = 105
        Me.txtSmartPickingMassWindow.Text = "xyz"
        '
        'Label3
        '
        Me.Label3.Location = New System.Drawing.Point(24, 62)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(176, 16)
        Me.Label3.TabIndex = 104
        Me.Label3.Text = "SmartPicking mass window [Th]:"
        '
        'txtMatchingTolerance
        '
        Me.txtMatchingTolerance.Location = New System.Drawing.Point(237, 96)
        Me.txtMatchingTolerance.Name = "txtMatchingTolerance"
        Me.txtMatchingTolerance.Size = New System.Drawing.Size(69, 20)
        Me.txtMatchingTolerance.TabIndex = 107
        Me.txtMatchingTolerance.Text = "xyz"
        '
        'Label4
        '
        Me.Label4.Location = New System.Drawing.Point(24, 100)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(196, 16)
        Me.Label4.TabIndex = 106
        Me.Label4.Text = "Fragment ion matching tolerance [Th]:"
        '
        'frmSpectrumReductionParameters
        '
        Me.AcceptButton = Me.btnOK
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.CancelButton = Me.btnCancel
        Me.ClientSize = New System.Drawing.Size(334, 218)
        Me.Controls.Add(Me.txtMatchingTolerance)
        Me.Controls.Add(Me.Label4)
        Me.Controls.Add(Me.txtSmartPickingMassWindow)
        Me.Controls.Add(Me.Label3)
        Me.Controls.Add(Me.btnCancel)
        Me.Controls.Add(Me.btnOK)
        Me.Controls.Add(Me.txtMannReductionLevel)
        Me.Controls.Add(Me.txtSmartPickingLevel)
        Me.Controls.Add(Me.Label2)
        Me.Controls.Add(Me.Label1)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "frmSpectrumReductionParameters"
        Me.Text = "Spectrum reduction parameters"
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub

#End Region


    '****************************************************************************
    '*    <placeholder for header>                                              *
    '****************************************************************************
    Private Sub Init( _
      ByVal aReductionParameters As reductionParametersStructure, _
      ByRef aParentForm As frmProtValidation)

        mParentForm = aParentForm

        Me.txtSmartPickingLevel.Text = _
          aReductionParameters.smartPickingLevel2.ToString()

        Me.txtMannReductionLevel.Text = _
          aReductionParameters.MannReductionLevel2.ToString()


        'Changed PM_USERSET_MS3_MATCHING_TOLERANCE 2007-07-13
        Me.txtSmartPickingMassWindow.Text = _
          aReductionParameters.smartPickingMassWindow.ToString("0.0")
        Me.txtMatchingTolerance.Text = _
          aReductionParameters.matchingMassTolerance.ToString("0.00")

    End Sub 'Init


    '****************************************************************************
    '*    <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 btnOK_Click( _
      ByVal aSender As System.Object, _
      ByVal anEvent As System.EventArgs) _
      Handles btnOK.Click

        'No validation....
        Dim smartPickingLevel As Integer = CInt(txtSmartPickingLevel.Text)
        Dim mannReductionLevel As Integer = CInt(txtMannReductionLevel.Text)

        Dim reductionParameters As reductionParametersStructure
        reductionParameters.smartPickingLevel2 = smartPickingLevel
        reductionParameters.MannReductionLevel2 = mannReductionLevel

        'Changed PM_USERSET_MS3_MATCHING_TOLERANCE 2007-07-13
        reductionParameters.smartPickingMassWindow = _
          CDbl(txtSmartPickingMassWindow.Text)
        reductionParameters.matchingMassTolerance = _
          CDbl(txtMatchingTolerance.Text)

        mParentForm.setReductionParameters(reductionParameters)

        Me.Close()
    End Sub 'btnOK_Click


End Class 'frmSpectrumReductionParameters



    

    

Generated by script codePublish.pl at 2008-09-23T11:59:18.