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 ) ); } }
public AnnotationEditForm( GraphForm graphForm ) { InitializeComponent(); ownerGraphForm = graphForm; PointDataMap<SeemsPointAnnotation> annotationMap = ownerGraphForm.CurrentPointAnnotations; foreach( SeemsPointAnnotation annotation in annotationMap.Values ) annotationListBox.Items.Add( new AnnotationListItem( annotation ) ); }
protected void OnGraphFormGotFocus(Manager sender, GraphForm graphForm) { if (GraphFormGotFocus != null) GraphFormGotFocus(sender, graphForm); }
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; }
public GraphForm CreateGraph() { GraphForm graphForm = new GraphForm(this); graphForm.ZedGraphControl.PreviewKeyDown += new PreviewKeyDownEventHandler( graphForm_PreviewKeyDown ); graphForm.ItemGotFocus += new EventHandler( form_GotFocus ); return graphForm; }
private void showDataStacked(GraphForm hostGraph, GraphItem item ) { Pane pane = new Pane(); pane.Add( item ); hostGraph.PaneList.Add( pane ); hostGraph.Refresh(); }
private void showDataOverlay(GraphForm hostGraph, GraphItem item ) { hostGraph.PaneList[0].Add( item ); hostGraph.Refresh(); }
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(); }
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; } }
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; }*/ }
private void showDataOverlay( GraphForm hostGraph, ManagedDataSource managedDataSource, DataGridViewRow row ) { showDataOverlay( hostGraph, managedDataSource, row.Tag as GraphItem ); }
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 ) ); } }
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] ); }
public GraphForm CreateGraph() { GraphForm graphForm = new GraphForm(); graphForm.ZedGraphControl.PreviewKeyDown += new PreviewKeyDownEventHandler( graphForm_PreviewKeyDown ); return graphForm; }