public ScanAnnotationSettingsForm( GraphForm graphForm )
		{
			InitializeComponent();

			mzMatchToleranceUnitList.Add( "Da/z" );
			//mzMatchToleranceUnitList.Add( "ppm" );
			//mzMatchToleranceUnitList.Add( "resolving power" );

			ownerGraphForm = graphForm;

			matchToleranceUnitsComboBox.Items.AddRange( (object[]) mzMatchToleranceUnitList.ToArray() );
			matchToleranceUnitsComboBox.SelectedIndex = (int) ownerGraphForm.ScanAnnotationSettings.MatchToleranceUnit;
			matchToleranceCheckbox.Checked = ownerGraphForm.ScanAnnotationSettings.MatchToleranceOverride;
			matchToleranceTextBox.Text = ownerGraphForm.ScanAnnotationSettings.MatchTolerance.ToString();
			showMzLabelsCheckbox.Checked = ownerGraphForm.ScanAnnotationSettings.ShowPointMZs;
			showIntensityLabelsCheckbox.Checked = ownerGraphForm.ScanAnnotationSettings.ShowPointIntensities;

			if( !matchToleranceCheckbox.Checked )
			{
				matchToleranceTextBox.Enabled = false;
				matchToleranceUnitsComboBox.Enabled = false;
			}

			showMatchedAnnotationsCheckbox.Checked = ownerGraphForm.ScanAnnotationSettings.ShowMatchedAnnotations;
			showUnmatchedAnnotationsCheckbox.Checked = ownerGraphForm.ScanAnnotationSettings.ShowUnmatchedAnnotations;

			foreach( LabelToAliasAndColorPair itr in ownerGraphForm.ScanAnnotationSettings.LabelToAliasAndColorMap )
			{
				aliasAndColorMappingListBox.Items.Add( new LabelToAliasAndColorListItem( itr ) );
			}
		}
		public ChromatogramAnnotationSettingsForm( GraphForm graphForm )
		{
			InitializeComponent();

			matchToleranceUnitList.Add( "sec." );
			//matchToleranceUnitList.Add( "min." );
			//matchToleranceUnitList.Add( "hours" );

			ownerGraphForm = graphForm;

			matchToleranceUnitsComboBox.Items.AddRange( (object[]) matchToleranceUnitList.ToArray() );
			matchToleranceUnitsComboBox.SelectedIndex = (int) ownerGraphForm.ChromatogramAnnotationSettings.MatchToleranceUnit;
			matchToleranceCheckbox.Checked = ownerGraphForm.ChromatogramAnnotationSettings.MatchToleranceOverride;
			matchToleranceTextBox.Text = ownerGraphForm.ChromatogramAnnotationSettings.MatchTolerance.ToString();
			showTimeLabelsCheckbox.Checked = ownerGraphForm.ChromatogramAnnotationSettings.ShowPointTimes;
			showTotalIntensityLabelsCheckbox.Checked = ownerGraphForm.ChromatogramAnnotationSettings.ShowPointIntensities;

			if( !matchToleranceCheckbox.Checked )
			{
				matchToleranceTextBox.Enabled = false;
				matchToleranceUnitsComboBox.Enabled = false;
			}

			showMatchedAnnotationsCheckbox.Checked = ownerGraphForm.ChromatogramAnnotationSettings.ShowMatchedAnnotations;
			showUnmatchedAnnotationsCheckbox.Checked = ownerGraphForm.ChromatogramAnnotationSettings.ShowUnmatchedAnnotations;

			foreach( LabelToAliasAndColorPair itr in ownerGraphForm.ChromatogramAnnotationSettings.LabelToAliasAndColorMap )
			{
				aliasAndColorMappingListBox.Items.Add( new LabelToAliasAndColorListItem( itr ) );
			}
		}
Exemplo n.º 3
0
        public AnnotationEditForm( GraphForm graphForm )
        {
            InitializeComponent();

            ownerGraphForm = graphForm;

            PointDataMap<SeemsPointAnnotation> annotationMap = ownerGraphForm.CurrentPointAnnotations;
            foreach( SeemsPointAnnotation annotation in annotationMap.Values )
                annotationListBox.Items.Add( new AnnotationListItem( annotation ) );
        }
Exemplo n.º 4
0
 protected void OnGraphFormGotFocus(Manager sender, GraphForm graphForm)
 {
     if (GraphFormGotFocus != null)
         GraphFormGotFocus(sender, graphForm);
 }
Exemplo n.º 5
0
        public GraphForm OpenGraph( bool giveFocus )
        {
            GraphForm graphForm = new GraphForm(this);
            graphForm.ZedGraphControl.PreviewKeyDown += new PreviewKeyDownEventHandler( graphForm_PreviewKeyDown );
            graphForm.ItemGotFocus += new EventHandler( form_GotFocus );
            graphForm.Show( DockPanel, DockState.Document );
            if( giveFocus )
                graphForm.Activate();

            return graphForm;
        }
Exemplo n.º 6
0
 public GraphForm CreateGraph()
 {
     GraphForm graphForm = new GraphForm(this);
     graphForm.ZedGraphControl.PreviewKeyDown += new PreviewKeyDownEventHandler( graphForm_PreviewKeyDown );
     graphForm.ItemGotFocus += new EventHandler( form_GotFocus );
     return graphForm;
 }
Exemplo n.º 7
0
 private void showDataStacked(GraphForm hostGraph, GraphItem item )
 {
     Pane pane = new Pane();
     pane.Add( item );
     hostGraph.PaneList.Add( pane );
     hostGraph.Refresh();
 }
Exemplo n.º 8
0
 private void showDataOverlay(GraphForm hostGraph, GraphItem item )
 {
     hostGraph.PaneList[0].Add( item );
     hostGraph.Refresh();
 }
Exemplo n.º 9
0
 private void showData( GraphForm hostGraph, GraphItem item )
 {
     Pane pane;
     if( hostGraph.PaneList.Count == 0 || hostGraph.PaneList.Count > 1 )
     {
         hostGraph.PaneList.Clear();
         pane = new Pane();
         hostGraph.PaneList.Add( pane );
     } else
     {
         pane = hostGraph.PaneList[0];
         pane.Clear();
     }
     pane.Add( item );
     hostGraph.Refresh();
 }
Exemplo n.º 10
0
 void Manager_GraphFormGotFocus (Manager sender, GraphForm graphForm)
 {
     if (graphForm.FocusedPane != null && graphForm.FocusedItem.Tag is MassSpectrum)
     {
         AnnotationButton.Enabled = true;
         DataProcessingButton.Enabled = true;
     }
     else
     {
         AnnotationButton.Enabled = false;
         DataProcessingButton.Enabled = false;
     }
 }
Exemplo n.º 11
0
        private void seems_MdiChildActivate( object sender, EventArgs e )
        {
            if( CurrentGraphForm != null )
            {
                /*if( CurrentGraphForm.DataSource != null )
                {
                    dataSourceComboBox.SelectedItem = CurrentGraphForm.DataSource;
                    dataSourceComboBox.Refresh();
                }

                if( CurrentGraphForm.CurrentGraphItemIndex >= 0 )
                {
                    scanNumberComboBox.SelectedIndex = CurrentGraphForm.CurrentGraphItemIndex;
                    scanNumberComboBox.UpdateTextBox();
                    scanNumberComboBox.Refresh();
                }*/

                if( CurrentGraphForm != currentGraphForm )
                {
                    currentGraphForm = CurrentGraphForm;
                    /*CurrentGraphForm.LostFocus += new EventHandler( GraphForm_LostFocus );
                    CurrentGraphForm.ZedGraphControl.PreviewKeyDown += new PreviewKeyDownEventHandler( GraphForm_PreviewKeyDown );
                    CurrentGraphForm.FormClosing += new FormClosingEventHandler( GraphForm_FormClosing );
                    CurrentGraphForm.Resize += new EventHandler( GraphForm_Resize );
                    CurrentGraphForm.LocationChanged += new EventHandler( GraphForm_LocationChanged );*/
                    //pendingActivation = false;
                }
            }// else
            //	setScanControls( false );

            /*if( ActiveMdiChild == null )
            {
                dataSourceComboBox.Enabled = false;
            }*/
        }
Exemplo n.º 12
0
 private void showDataOverlay( GraphForm hostGraph, ManagedDataSource managedDataSource, DataGridViewRow row )
 {
     showDataOverlay( hostGraph, managedDataSource, row.Tag as GraphItem );
 }
Exemplo n.º 13
0
 private void showDataOverlay( GraphForm hostGraph, ManagedDataSource managedDataSource, GraphItem item )
 {
     if( item.IsChromatogram )
     {
         hostGraph.ShowDataOverlay( managedDataSource.Source, managedDataSource.Source.GetChromatogram( item.Index, true ) );
     } else
     {
         SpectrumList sl = managedDataSource.SpectrumProcessingForm.ProcessingListView.ProcessingWrapper( managedDataSource.Source.MSDataFile.run.spectrumList );
         hostGraph.ShowDataOverlay( managedDataSource.Source, managedDataSource.Source.GetMassSpectrum( item as MassSpectrum, sl ) );
     }
 }
Exemplo n.º 14
0
 public void UpdateGraph( GraphForm graphForm )
 {
     List<GraphItem> graphItems = graphForm.GraphItems;
     if( graphItems.Count == 0 )
         return;
     showData( graphForm, dataSourceMap[graphItems[0].Source.CurrentFilepath], graphItems[0] );
     for( int i = 1; i < graphItems.Count; ++i )
         showDataOverlay( graphForm, dataSourceMap[graphItems[i].Source.CurrentFilepath], graphItems[i] );
 }
Exemplo n.º 15
0
 public GraphForm CreateGraph()
 {
     GraphForm graphForm = new GraphForm();
     graphForm.ZedGraphControl.PreviewKeyDown += new PreviewKeyDownEventHandler( graphForm_PreviewKeyDown );
     return graphForm;
 }