Ejemplo n.º 1
0
 public ExperimentCrumb(BaseLevelExperimentViewModel viewModel)
 {
     Value       = viewModel;
     DisplayText = viewModel.Title;
     if (viewModel is SubLevelExperimentViewModel)
     {
         var node = ((TraceLab.Core.Experiments.CompositeComponentGraph)viewModel.GetExperiment()).OwnerNode;
         DisplayText = node.Data.Metadata.Label;
     }
 }
 public ExperimentCrumb(BaseLevelExperimentViewModel viewModel)
 {
     Value = viewModel;
     DisplayText = viewModel.Title;
     if (viewModel is SubLevelExperimentViewModel)
     {
         var node = ((TraceLab.Core.Experiments.CompositeComponentGraph)viewModel.GetExperiment()).OwnerNode;
         DisplayText = node.Data.Metadata.Label;
     }
 }
Ejemplo n.º 3
0
        public override bool Equals(object obj)
        {
            BaseLevelExperimentViewModel experimentWrapper = obj as BaseLevelExperimentViewModel;

            if (experimentWrapper != null)
            {
                return(m_experiment.Equals(experimentWrapper.GetExperiment()));
            }

            IExperiment experiment = obj as IExperiment; //at this moment it is not known it is not TopLevelExperimentViewModel, so it is actual m_experiment

            if (experiment != null)
            {
                return(m_experiment.Equals(experiment));
            }

            return(base.Equals(obj));
        }