Ejemplo n.º 1
0
        protected void ActivatePropertyPath(PropertyPath propertyPath)
        {
            IEnumerable <PropertyPath> activatedPaths = new[] { propertyPath };

            if (UseTransformedView && ViewEditor.ViewTransformer != null)
            {
                activatedPaths = ViewEditor.ViewTransformer.TransformView(ViewInfo, activatedPaths).Value;
            }
            ViewEditor.ActivatePropertyPath(activatedPaths.First());
        }
Ejemplo n.º 2
0
 protected void SetViewInfo(ViewInfo viewInfo, IEnumerable <PropertyPath> selectedPaths)
 {
     if (UseTransformedView && null != ViewEditor.ViewTransformer)
     {
         var keyValuePair = ViewEditor.ViewTransformer.UntransformView(viewInfo, selectedPaths);
         viewInfo      = keyValuePair.Key;
         selectedPaths = keyValuePair.Value;
     }
     ViewEditor.SetViewInfo(viewInfo, selectedPaths);
 }
Ejemplo n.º 3
0
 private void AddColumns(ViewEditor viewEditor, params PropertyPath[] propertyPaths)
 {
     RunUI(() =>
     {
         foreach (var propertyPath in propertyPaths)
         {
             Assert.IsTrue(viewEditor.ChooseColumnsTab.TrySelect(propertyPath), "Unable to select {0}",
                 propertyPath);
             viewEditor.ChooseColumnsTab.AddSelectedColumn();
         }
     });
 }
Ejemplo n.º 4
0
 private PropertyPath GetSelectedPath(ViewEditor viewEditor)
 {
     PropertyPath selectedPath = null;
     RunUI(() =>
     {
         var tree = viewEditor.ActiveAvailableFieldsTree;
         var column = tree.GetTreeColumn(tree.SelectedNode);
         if (null != column)
         {
             selectedPath = column.PropertyPath;
         }
     });
     return selectedPath;
 }
 public static void SetPivotReplicate(ViewEditor viewEditor, bool pivotReplicate)
 {
     viewEditor.ViewEditorWidgets.OfType<PivotReplicateAndIsotopeLabelWidget>().First().SetPivotReplicate(pivotReplicate);
 }
Ejemplo n.º 6
0
 private string[] CheckPreview(ViewEditor viewEditor, Action<DocumentGridForm, SrmDocument> checkPreview)
 {
     string[] columnNames = null;
     var dlg = ShowDialog<DocumentGridForm>(viewEditor.ShowPreview);
     WaitForConditionUI(() => dlg.IsComplete);
     RunUI(() =>
     {
         checkPreview(dlg, SkylineWindow.DocumentUI);
         columnNames = dlg.ColumnHeaderNames;
     });
     OkDialog(dlg, dlg.Close);
     return columnNames;
 }