Example #1
0
 void OperationModelUpdated(object sender, OperationModelUpdatedEventArgs e)
 {
     if (e is VisualOperationModelUpdatedEventArgs)
     {
         render();
     }
 }
        private void OperationModel_OperationModelUpdated(object sender, OperationModelUpdatedEventArgs e)
        {
            var model = (OperationModel)sender;

            if (model is IFilterProviderOperationModel &&
                e is FilterOperationModelUpdatedEventArgs &&
                ((e as FilterOperationModelUpdatedEventArgs).FilterOperationModelUpdatedEventType == FilterOperationModelUpdatedEventType.Links))
            {
                ((IFilterProviderOperationModel)model).ClearFilterModels();
            }

            if (!(e is FilterOperationModelUpdatedEventArgs) || (e is FilterOperationModelUpdatedEventArgs &&
                                                                 ((e as FilterOperationModelUpdatedEventArgs).FilterOperationModelUpdatedEventType != FilterOperationModelUpdatedEventType.FilterModels)))
            {
                MainModel.QueryExecuter.ExecuteOperationModel(model, true);
            }
        }
 void OperationModelUpdated(object sender, OperationModelUpdatedEventArgs e)
 {
     if (e is FilterOperationModelUpdatedEventArgs &&
         ((FilterOperationModelUpdatedEventArgs)e).FilterOperationModelUpdatedEventType == FilterOperationModelUpdatedEventType.ClearFilterModels)
     {
         _plotRendererContentProvider.UpdateFilterModels(new List <FilterModel>());
     }
     if (e is FilterOperationModelUpdatedEventArgs &&
         ((FilterOperationModelUpdatedEventArgs)e).FilterOperationModelUpdatedEventType == FilterOperationModelUpdatedEventType.FilterModels)
     {
         _plotRendererContentProvider.UpdateFilterModels((sender as HistogramOperationModel).FilterModels.ToList());
         render();
     }
     if (e is VisualOperationModelUpdatedEventArgs)
     {
         render();
     }
 }
 private void Current_OperationModelUpdated(object sender, OperationModelUpdatedEventArgs e)
 {
     _host.FireOperationModelUpdated(new BrushOperationModelUpdatedEventArgs());
 }
 public void FireOperationModelUpdated(OperationModelUpdatedEventArgs args)
 {
     _host.FireOperationModelUpdated(args);
 }
 public void FireOperationModelUpdated(OperationModelUpdatedEventArgs args)
 {
     throw new NotImplementedException();
 }
Example #7
0
        private void OperationModel_OperationModelUpdated(object sender, OperationModelUpdatedEventArgs e)
        {
            if (_mainModel.IsDefaultHypothesisEnabled)
            {
                var model = sender as HistogramOperationModel;

                var filter       = "";
                var filterModels = new List <FilterModel>();
                filter = FilterModel.GetFilterModelsRecursive(model, new List <IFilterProviderOperationModel>(), filterModels, true);

                if (!filterModels.Any())
                {
                    if (model.StatisticalComparisonOperationModel != null)
                    {
                        RemoveStatisticalComparisonOperationModel(model.StatisticalComparisonOperationModel);
                        model.StatisticalComparisonOperationModel = null;
                    }
                }
                else
                {
                    bool anyComparison = false;
                    foreach (var statisticalComparisonOperationViewModel in ComparisonViewController.Instance.StatisticalComparisonViews.Keys)
                    {
                        foreach (var ovm in statisticalComparisonOperationViewModel.OperationViewModels)
                        {
                            if (ovm.OperationModel == model)
                            {
                                anyComparison = true;
                                break;
                            }
                        }
                    }

                    if (!anyComparison)
                    {
                        StatisticalComparisonOperationModel statModel = model.StatisticalComparisonOperationModel;
                        bool add = false;
                        if (model.StatisticalComparisonOperationModel == null)
                        {
                            statModel = new StatisticalComparisonOperationModel(model.SchemaModel);
                            var a1 = model.GetAttributeUsageTransformationModel(AttributeUsage.X).FirstOrDefault();
                            if ((a1.AttributeModel as AttributeFieldModel).InputDataType == InputDataTypeConstants.FLOAT ||
                                (a1.AttributeModel as AttributeFieldModel).InputDataType == InputDataTypeConstants.INT)
                            {
                                //statModel.TestType = TestType.ttest;
                            }
                            model.StatisticalComparisonOperationModel = statModel;
                            add = true;
                        }
                        foreach (var m in statModel.StatisticallyComparableOperationModels.ToArray())
                        {
                            statModel.RemoveStatisticallyComparableOperationModel(m);
                        }
                        statModel.AddStatisticallyComparableOperationModel(model);
                        statModel.AddStatisticallyComparableOperationModel(
                            OperationViewModelFactory.CreateDefaultHistogramOperationViewModel(
                                model.SchemaModel,
                                model.GetAttributeUsageTransformationModel(AttributeUsage.X).First().AttributeModel, new Pt()).HistogramOperationModel);


                        if (add)
                        {
                            this.AddStatisticalComparisonOperationModel(statModel);
                        }
                    }
                }
            }
        }
Example #8
0
        private void StatisticalComparisonOperationModel_OperationModelUpdated(object sender, OperationModelUpdatedEventArgs e)
        {
            var model = (StatisticalComparisonOperationModel)sender;

            if (model.StatisticallyComparableOperationModels.Count == 2 && !(e is BrushOperationModelUpdatedEventArgs))
            {
                model.ComparisonOrder        = _nextComparisonOrder++;
                _modelToSaveViewModel[model] = new StatisticalComparisonSaveViewModel();

                var filter       = "";
                var filterModels = new List <FilterModel>();
                filter = FilterModel.GetFilterModelsRecursive(model.StatisticallyComparableOperationModels[0], new List <IFilterProviderOperationModel>(), filterModels, true);
                _modelToSaveViewModel[model].FilterDist0 = filter;

                filter       = "";
                filterModels = new List <FilterModel>();
                filter       = FilterModel.GetFilterModelsRecursive(model.StatisticallyComparableOperationModels[1], new List <IFilterProviderOperationModel>(), filterModels, true);
                _modelToSaveViewModel[model].FilterDist1 = filter;

                model.ExecutionId += 1;
                MainViewController.Instance.MainModel.QueryExecuter.ExecuteOperationModel(model, false);
            }
        }
Example #9
0
 private void FromOperationModel_OperationModelUpdated(object sender, OperationModelUpdatedEventArgs e)
 {
     fireFilterOperationModelUpdated(FilterOperationModelUpdatedEventType.Links);
 }
 public virtual void FireOperationModelUpdated(OperationModelUpdatedEventArgs args)
 {
     OperationModelUpdated?.Invoke(this, args);
 }
Example #11
0
 private void StatComp_OperationModelUpdated(object sender, OperationModelUpdatedEventArgs e)
 {
     FireOperationModelUpdated(e);
 }