コード例 #1
0
ファイル: Manager.cs プロジェクト: AlexandreBurel/pwiz-mzdb
 protected void OnGraphFormGotFocus(Manager sender, GraphForm graphForm)
 {
     if (GraphFormGotFocus != null)
         GraphFormGotFocus(sender, graphForm);
 }
コード例 #2
0
ファイル: seems.cs プロジェクト: lgatto/proteowizard
 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;
     }
 }
コード例 #3
0
ファイル: seems.cs プロジェクト: lgatto/proteowizard
		public seemsForm()
        {
			InitializeComponent();

            ToolStripManager.RenderMode = ToolStripManagerRenderMode.Professional;

			this.Load += seems_Load;
			this.Resize += seems_Resize;
			this.LocationChanged += seems_LocationChanged;

			seemsRegistryKey = Registry.CurrentUser.OpenSubKey( seemsRegistryLocation );
			if( seemsRegistryKey != null )
				seemsRegistryKey.Close();

			recentFilesMenu = new MruStripMenu( recentFilesFileMenuItem, new MruStripMenu.ClickedHandler( recentFilesFileMenuItem_Click ), seemsRegistryLocation + "\\Recent File List", true );

            browseToFileDialog = new OpenDataSourceDialog();
			browseToFileDialog.InitialDirectory = "C:\\";

            DockPanelManager.RenderMode = DockPanelRenderMode.VisualStyles;

            manager = new Manager(dockPanel);

            Manager.GraphFormGotFocus += new GraphFormGotFocusHandler(Manager_GraphFormGotFocus);
            Manager.LoadDataSourceProgress += new LoadDataSourceProgressEventHandler(Manager_LoadDataSourceProgress);
		}
コード例 #4
0
ファイル: seems.cs プロジェクト: lgatto/proteowizard
        public void Manager_LoadDataSourceProgress (Manager sender, string status, int percentage, CancelEventArgs e)
        {
            if (toolStrip1.InvokeRequired)
            {
                LoadDataSourceProgressEventHandler d = new LoadDataSourceProgressEventHandler(Manager_LoadDataSourceProgress);
                Invoke(d, new object[] { sender, status, percentage, e });
            }
            else
            {
                if (toolStrip1.IsDisposed)
                {
                    e.Cancel = true;
                    return;
                }

                if (status.Length > 0)
                {
                    toolStripStatusLabel1.Text = status;
                    toolStripStatusLabel1.Visible = true;
                }
                else
                    toolStripStatusLabel1.Visible = false;

                switch (percentage)
                {
                    case 100:
                        toolStripProgressBar1.Visible = false;
                        break;
                    default:
                        toolStripProgressBar1.Visible = true;
                        toolStripProgressBar1.Minimum = 0;
                        toolStripProgressBar1.Maximum = 100;
                        toolStripProgressBar1.Value = percentage;
                        break;
                }

                toolStrip1.Refresh();
            }
        }
コード例 #5
0
ファイル: seems.cs プロジェクト: pombredanne/BICEPS
        public seems( string[] args )
        {
            InitializeComponent();

            this.Load += seems_Load;
            this.Resize += seems_Resize;
            this.LocationChanged += seems_LocationChanged;

            seemsRegistryKey = Registry.CurrentUser.OpenSubKey( seemsRegistryLocation );
            if( seemsRegistryKey != null )
                seemsRegistryKey.Close();

            recentFilesMenu = new MruStripMenu( recentFilesFileMenuItem, new MruStripMenu.ClickedHandler( recentFilesFileMenuItem_Click ), seemsRegistryLocation + "\\Recent File List", true );

            dockPanel.DocumentStyle = DigitalRune.Windows.Docking.DocumentStyle.DockingMdi;

            browseToFileDialog = new OpenFileDialog();
            browseToFileDialog.Filter =
                "Any spectra format (*.mzML;*.mzData;*.mzXML;*.xml;*.raw;*.wiff;*.mgf;*.dta;fid;*.baf;*.yep)|*.mzML;*.mzData;*.mzXML;*.xml;*.raw;*.wiff;*.mgf;*.dta;fid;*.baf;*.yep|" +
                "mzML (*.mzML;*.xml)|*.mzML;*.xml|" +
                "mzData (*.mzData;*.xml)|*.mzData;*.xml|" +
                "mzXML (*.mzXML;*.xml)|*.mzXML;*.xml|" +
                "RAW (*.RAW)|*.raw|" +
                "WIFF (*.WIFF)|*.wiff|" +
                "Bruker (fid;*.baf;*.yep)|fid;*.baf;*.yep|" +
                "MGF (*.mgf)|*.mgf|" +
                "DTA (*.dta)|*.dta";
            browseToFileDialog.FilterIndex = 0;
            browseToFileDialog.InitialDirectory = "C:\\";

            manager = new Manager(this);

            if( args.Length > 0 )
            {
                this.BringToFront();
                this.Focus();
                this.Activate();
                this.Show();
                Application.DoEvents();

                try
                {
                    openFile( args[0] );

                    if( args.Length > 1 )
                    {
                        try
                        {
                            //browserForm.ElementNumberComboBox.SelectedIndex = Convert.ToInt32( args[1] );
                        } catch
                        {
                        }
                    }
                } catch( Exception ex )
                {
                    string message = ex.Message;
                    if( ex.InnerException != null )
                        message += "\n\nAdditional information: " + ex.InnerException.Message;
                    MessageBox.Show( message,
                                    "Error recovering from crash",
                                    MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1,
                                    0, false );
                }
            }
        }
コード例 #6
0
ファイル: IDPickerForm.cs プロジェクト: lgatto/proteowizard
        public IDPickerForm (IList<string> args)
        {
            InitializeComponent();

            toolStripStatusLabel.Text = "Initializing...";

            Thread.CurrentThread.Priority = ThreadPriority.AboveNormal;

            this.args = args;

            defaultDataFilter = new DataFilter();

            manager = new Manager(dockPanel)
            {
                ShowChromatogramListForNewSources = false,
                ShowSpectrumListForNewSources = false,
                OpenFileUsesCurrentGraphForm = true,
            };

            progressMonitor = new ProgressMonitor();
            progressMonitor.ProgressUpdate += progressMonitor_ProgressUpdate;

            if (Program.IsHeadless)
                Load += IDPickerForm_Load;
            else
                Shown += IDPickerForm_Load;

            basicFilterControl = new BasicFilterControl();
            basicFilterControl.BasicFilterChanged += basicFilterControl_BasicFilterChanged;
            basicFilterControl.ApplyFilterChanges += basicFilterControl_ApplyFilterChanges;
            basicFilterControl.ShowQonverterSettings += ShowQonverterSettings;
            dataFilterPopup = new Popup(basicFilterControl) { FocusOnOpen = true };
            dataFilterPopup.Closed += dataFilterPopup_Closed;

            breadCrumbControl = new BreadCrumbControl() { Dock = DockStyle.Fill };
            breadCrumbControl.BreadCrumbClicked += breadCrumbControl_BreadCrumbClicked;
            breadCrumbPanel.Controls.Add(breadCrumbControl);

            fragmentationStatisticsForm = new FragmentationStatisticsForm(this);
            fragmentationStatisticsForm.Show(dockPanel, DockState.DockBottomAutoHide);
            fragmentationStatisticsForm.AutoHidePortion = 0.5;

            peakStatisticsForm = new PeakStatisticsForm(this);
            peakStatisticsForm.Show(dockPanel, DockState.DockBottomAutoHide);
            peakStatisticsForm.AutoHidePortion = 0.5;

            distributionStatisticsForm = new DistributionStatisticsForm(this);
            distributionStatisticsForm.Show(dockPanel, DockState.DockBottomAutoHide);
            distributionStatisticsForm.AutoHidePortion = 0.5;

            reassignPSMsForm = new RescuePSMsForm(this);
            reassignPSMsForm.Show(dockPanel, DockState.DockBottomAutoHide);
            reassignPSMsForm.AutoHidePortion = 0.5;

            ptmAttestationForm = new PTMAttestationForm(this);
            ptmAttestationForm.Show(dockPanel, DockState.DockBottomAutoHide);
            ptmAttestationForm.AutoHidePortion = 0.5;

            spectrumTableForm = new SpectrumTableForm();
            spectrumTableForm.Show(dockPanel, DockState.DockLeft);
            spectrumTableForm.AutoHidePortion = 0.5;

            proteinTableForm = new ProteinTableForm();
            proteinTableForm.Show(dockPanel, DockState.DockTop);
            proteinTableForm.AutoHidePortion = 0.5;

            peptideTableForm = new PeptideTableForm();
            peptideTableForm.Show(dockPanel, DockState.DockTop);
            peptideTableForm.AutoHidePortion = 0.5;

            proteinTableForm.Activate();

            modificationTableForm = new ModificationTableForm();
            modificationTableForm.Show(dockPanel, DockState.Document);
            modificationTableForm.AutoHidePortion = 0.5;

            analysisTableForm = new AnalysisTableForm();
            analysisTableForm.Show(dockPanel, DockState.Document);
            analysisTableForm.AutoHidePortion = 0.5;

            filterHistoryForm = new FilterHistoryForm();
            filterHistoryForm.Show(dockPanel, DockState.Document);
            filterHistoryForm.AutoHidePortion = 0.5;

            spectrumTableForm.SpectrumViewFilter += handleViewFilter;
            spectrumTableForm.SpectrumViewVisualize += spectrumTableForm_SpectrumViewVisualize;
            spectrumTableForm.FinishedSetData += handleFinishedSetData;
            spectrumTableForm.StartingSetData += handleStartingSetData;
            proteinTableForm.ProteinViewFilter += handleViewFilter;
            proteinTableForm.ProteinViewVisualize += proteinTableForm_ProteinViewVisualize;
            proteinTableForm.FinishedSetData += handleFinishedSetData;
            proteinTableForm.StartingSetData += handleStartingSetData;
            peptideTableForm.PeptideViewFilter += handleViewFilter;
            peptideTableForm.FinishedSetData += handleFinishedSetData;
            peptideTableForm.StartingSetData += handleStartingSetData;
            modificationTableForm.ModificationViewFilter += handleViewFilter;
            modificationTableForm.FinishedSetData += handleFinishedSetData;
            modificationTableForm.StartingSetData += handleStartingSetData;
            analysisTableForm.AnalysisViewFilter += handleViewFilter;
            analysisTableForm.FinishedSetData += handleFinishedSetData;
            analysisTableForm.StartingSetData += handleStartingSetData;
            filterHistoryForm.LoadPersistentDataFilter += handleLoadPersistentDataFilter;
            //filterHistoryForm.FinishedSetData += handleFinishedSetData;
            //filterHistoryForm.StartingSetData += handleStartingSetData;

            // hide DockPanel before initializing layout manager
            dockPanel.Visible = false;
            dockPanel.ShowDocumentIcon = true;

            persistentForms = new IPersistentForm[]
            {
                proteinTableForm,
                peptideTableForm,
                spectrumTableForm,
                analysisTableForm,
                filterHistoryForm
            };

            _layoutManager = new LayoutManager(this, dockPanel, persistentForms);

            // load last or default location and size
            _layoutManager.LoadMainFormSettings();

            // certain features are only enabled for development builds
            if (Application.ExecutablePath.Contains("build-nt-x86"))
            {
                // provide SQL logging for development builds
                logForm = new LogForm();
                logForm.AutoHidePortion = 0.25;
                Console.SetOut(logForm.LogWriter);

                developerToolStripMenuItem.ForeColor = SystemColors.MenuBar;
            }
            else
            {
                Console.SetOut(TextWriter.Null);

                developerToolStripMenuItem.Visible = false;
            }

            /*spyEventLogForm = new SpyEventLogForm();
            spyEventLogForm.AddEventSpy(new EventSpy("proteinTableForm", proteinTableForm));
            spyEventLogForm.AddEventSpy(new EventSpy("peptideTableForm", peptideTableForm));
            spyEventLogForm.AddEventSpy(new EventSpy("spectrumTableForm", spectrumTableForm));
            spyEventLogForm.AddEventSpy(new EventSpy("modificationTableForm", modificationTableForm));
            spyEventLogForm.Show(dockPanel, DockState.DockBottomAutoHide);*/
        }