protected void TestResultsGridManageViewsImport() { LiveResultsGrid liveResultsGrid = ShowDialog <LiveResultsGrid>(() => SkylineWindow.ShowResultsGrid(true)); foreach (var reportInfo in ListTestReportInfos()) { Settings.Default.PersistedViews.Clear(); ManageViewsForm manageViewsForm = ShowDialog <ManageViewsForm>(liveResultsGrid.ManageViews); string reportInfoPath = reportInfo.Path; RunUI(() => manageViewsForm.ImportViews(reportInfoPath)); VerifyReportsImported(PersistedViews.MainGroup, reportInfo); OkDialog(manageViewsForm, manageViewsForm.Close); } }
private void VerifyExpectedRatio(LiveResultsGrid resultsGridForm, float expectedRatio) { WaitForConditionUI(() => resultsGridForm.IsComplete); RunUI(() => { Assert.AreEqual(1, resultsGridForm.RowCount); var colRatio = resultsGridForm.FindColumn(PropertyPath.Root.Property(nameof(PeptideResult.RatioToStandard))); var colNormalizedArea = resultsGridForm.FindColumn(propertyPathNormalizedArea); var row = resultsGridForm.DataGridView.Rows[0]; AssertEx.AreEqual(expectedRatio, (double)row.Cells[colRatio.Index].Value, 1e-5); AssertEx.AreEqual(expectedRatio, (double)row.Cells[colNormalizedArea.Index].Value, 1e-5); }); }
private static void AddResultGridColumns(LiveResultsGrid resultsGridForm, params PropertyPath[] ratioPropertyNames) { string customViewName = "Custom " + resultsGridForm.BindingListSource.ViewInfo.Name; RunDlg <ViewEditor>(resultsGridForm.NavBar.CustomizeView, viewEditor => { viewEditor.ViewName = customViewName; foreach (var ratioPropertyName in ratioPropertyNames) { Assert.IsTrue(viewEditor.ChooseColumnsTab.TrySelect(ratioPropertyName)); viewEditor.ChooseColumnsTab.AddSelectedColumn(); } viewEditor.OkDialog(); }); WaitForConditionUI(() => resultsGridForm.IsComplete); }