Source code for MSQuant: frmToolBarProteinValidation.vb, MSQuant/msquant/src/GUI/forms/frmToolBarProteinValidation.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: GUI, Protein validation window. User can inspect                *
'*          the MS-MS spectra for the identified (and                       *
'*          inserted) peptides and check/uncheck the                        *
'*          peptides (validated/not validated)                              *
'*          Holds Class frmProtValidation,                                  *
'*                                                                          *
'****************************************************************************

'****************************************************************************
'*                               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:   temp1.vb                                                  *
'*    TYPE:  VISUAL_BASIC                                                   *
'*                                                                          *
'* CREATED: PM 2006-03-06   Vrs 1.0.                                        *
'* UPDATED: PM 2006-xx-xx                                                   *
'*                                                                          *
'****************************************************************************

Option Strict On
Option Explicit On 


Public Enum proteinValidationCommandEnum
    enumAcceptPeptide = 307
    enumRejectPeptide
    enumAcceptProtein
    enumRejectProtein
    enumQuantitateProtein
End Enum 'proteinValidationCommandEnum


Public Class frmToolBarProteinValidation

    Inherits System.Windows.Forms.Form

    Private mParentForm As frmProtValidation


#Region " Windows Form Designer generated code "

    Public Sub New(ByRef aParentForm As frmProtValidation)
        MyBase.New()

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

        'Add any initialization after the InitializeComponent() call

        init(aParentForm)
    End Sub 'New


    'Form overrides dispose to clean up the component list.
    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 ToolBar1 As System.Windows.Forms.ToolBar
    Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
    Friend WithEvents TBB_AccPept As System.Windows.Forms.ToolBarButton
    Friend WithEvents TBB_RejectPept As System.Windows.Forms.ToolBarButton
    Friend WithEvents TBB_sep As System.Windows.Forms.ToolBarButton
    Friend WithEvents TBB_AccProt As System.Windows.Forms.ToolBarButton
    Friend WithEvents TBB_RejectProt As System.Windows.Forms.ToolBarButton
    Friend WithEvents TBB_Quantitate As System.Windows.Forms.ToolBarButton
    Friend WithEvents TBB_sep2 As System.Windows.Forms.ToolBarButton
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container
        Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmToolBarProteinValidation))
        Me.ToolBar1 = New System.Windows.Forms.ToolBar
        Me.TBB_AccPept = New System.Windows.Forms.ToolBarButton
        Me.TBB_RejectPept = New System.Windows.Forms.ToolBarButton
        Me.TBB_sep = New System.Windows.Forms.ToolBarButton
        Me.TBB_AccProt = New System.Windows.Forms.ToolBarButton
        Me.TBB_RejectProt = New System.Windows.Forms.ToolBarButton
        Me.TBB_Quantitate = New System.Windows.Forms.ToolBarButton
        Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
        Me.TBB_sep2 = New System.Windows.Forms.ToolBarButton
        Me.SuspendLayout()
        '
        'ToolBar1
        '
        Me.ToolBar1.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.TBB_AccPept, Me.TBB_RejectPept, Me.TBB_sep, Me.TBB_AccProt, Me.TBB_RejectProt, Me.TBB_sep2, Me.TBB_Quantitate})
        Me.ToolBar1.DropDownArrows = True
        Me.ToolBar1.ImageList = Me.ImageList1
        Me.ToolBar1.Location = New System.Drawing.Point(0, 0)
        Me.ToolBar1.Name = "ToolBar1"
        Me.ToolBar1.ShowToolTips = True
        Me.ToolBar1.Size = New System.Drawing.Size(394, 90)
        Me.ToolBar1.TabIndex = 0
        '
        'TBB_AccPept
        '
        Me.TBB_AccPept.ImageIndex = 5
        Me.TBB_AccPept.Text = "Acc Pept>>"
        '
        'TBB_RejectPept
        '
        Me.TBB_RejectPept.ImageIndex = 0
        Me.TBB_RejectPept.Text = "Reject Pept>>"
        '
        'TBB_sep
        '
        Me.TBB_sep.Style = System.Windows.Forms.ToolBarButtonStyle.Separator
        '
        'TBB_AccProt
        '
        Me.TBB_AccProt.ImageIndex = 2
        Me.TBB_AccProt.Text = "Acc Prot>>"
        '
        'TBB_RejectProt
        '
        Me.TBB_RejectProt.ImageIndex = 3
        Me.TBB_RejectProt.Text = "Reject Prot>>"
        '
        'TBB_Quantitate
        '
        Me.TBB_Quantitate.ImageIndex = 4
        Me.TBB_Quantitate.Text = "Quantitate"
        '
        'ImageList1
        '
        Me.ImageList1.ImageSize = New System.Drawing.Size(64, 64)
        Me.ImageList1.ImageStream = CType(resources.GetObject("ImageList1.ImageStream"), System.Windows.Forms.ImageListStreamer)
        Me.ImageList1.TransparentColor = System.Drawing.Color.Transparent
        '
        'TBB_sep2
        '
        Me.TBB_sep2.Style = System.Windows.Forms.ToolBarButtonStyle.Separator
        '
        'frmToolBarProteinValidation
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(394, 90)
        Me.Controls.Add(Me.ToolBar1)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
        Me.Name = "frmToolBarProteinValidation"
        Me.Text = "Protein Validation Toolbar - www.cebi.sdu.dk & msquant.sourceforge.net"
        Me.TopMost = True
        Me.ResumeLayout(False)

    End Sub

#End Region


    '****************************************************************************
    '*    <placeholder for header>                                              *
    '****************************************************************************
    Private Sub init(ByRef aParentForm As frmProtValidation)
        mParentForm = aParentForm


        Me.Text = mParentForm.Text 'As each toolbar is (currently) associated
        '  with a particular Protein Validation Window we use the same
        '  text in the title bar (here in the toolbar) as the Protein
        '  Validation Window.
    End Sub 'init


    '****************************************************************************
    '*    <placeholder for header>                                              *
    '****************************************************************************
    Private Sub ToolBar1_ButtonClick( _
      ByVal aSender As System.Object, _
      ByVal anEvent As System.Windows.Forms.ToolBarButtonClickEventArgs) _
      Handles ToolBar1.ButtonClick

        Dim command As proteinValidationCommandEnum

        'Why isn't .Name of anEvent.Button available?
        Select Case anEvent.Button.Text
            Case "Acc Pept>>"
                command = proteinValidationCommandEnum.enumAcceptPeptide
            Case "Reject Pept>>"
                command = proteinValidationCommandEnum.enumRejectPeptide
            Case "Acc Prot>>"
                command = proteinValidationCommandEnum.enumAcceptProtein
            Case "Reject Prot>>"
                command = proteinValidationCommandEnum.enumRejectProtein
            Case "Quantitate"
                command = proteinValidationCommandEnum.enumQuantitateProtein
            Case Else
                Trace.Assert(False, _
                  "PIL ASSERT. Select Case never fall-through")
        End Select

        mParentForm.commandEx(command)

        If command = proteinValidationCommandEnum.enumAcceptProtein Or _
           command = proteinValidationCommandEnum.enumRejectProtein Then

            Me.Text = mParentForm.Text 'The protein changed in 
            '  the Protein Validation Window. Change it here in the
            '  toolbar's title bar as well.
        End If

        'Case "TBB_AccPept"
        'Case "TBB_RejectPept"
        'Case "TBB_AccProt"
        'Case "TBB_RejectProt"
        'Case "TBB_Quantitate"

        'MsgBox("Hello!")
    End Sub 'ToolBar1_ButtonClick


End Class 'frmToolBarProteinValidation



    

    

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