public ProtocolModelsVm(AppIdentMainVm appIdentMainVm) { this.AppIdentMainVm = appIdentMainVm; this.SelectedAppProtocolModel = this.AppIdentMainVm.AppProtoModelEval?.ProtocolModels?.FirstOrDefault(); this.SelectedAppProtocolModels.CollectionChanged += (sender, args) => { try { this.SelectedApplicationProtocolModelChanged(args); } catch (Exception e) { Debugger.Break(); Console.WriteLine(e); } }; DispatcherHelper.UIDispatcher.Invoke(() => { this.SelectedAppProtocolModelsSeriesMappings = new SeriesMappingCollection(); }); this.SelectedAppProtocolModelsFeatureVectorValues.CollectionChanged += (sender, args) => { this.SelectedAppProtocolModelsSeriesMappings.Clear(); if (args.Action != NotifyCollectionChangedAction.Add) { return; } //this.SelectedAppProtocolModelsSeriesMappings.SuspendNotifications(); for (int i = 0; i < this.SelectedAppProtocolModelsFeatureVectorValues.Count; i++) { var mapping = new SeriesMapping { CollectionIndex = i, LegendLabel = this.SelectedAppProtocolModelsLabels[i] }; mapping.ItemMappings.Add(new ItemMapping("Name", DataPointMember.XCategory)); mapping.ItemMappings.Add(new ItemMapping("PositiveSigma", DataPointMember.Open)); mapping.ItemMappings.Add(new ItemMapping("Max", DataPointMember.High)); mapping.ItemMappings.Add(new ItemMapping("Min", DataPointMember.Low)); mapping.ItemMappings.Add(new ItemMapping("NegativeSigma", DataPointMember.Close)); mapping.SeriesDefinition = new CandleStickSeriesDefinition(); this.SelectedAppProtocolModelsSeriesMappings.Add(mapping); } this.OnPropertyChanged(nameof(this.SelectedAppProtocolModelsSeriesMappings)); //< !--< telerik:SeriesMapping LegendLabel = "{Binding SelectedAppProtocolModelsLabels[0]}" CollectionIndex = "0" > // < telerik:SeriesMapping.SeriesDefinition > // < telerik:CandleStickSeriesDefinition /> // </ telerik:SeriesMapping.SeriesDefinition > // < telerik:SeriesMapping.ItemMappings > // < telerik:ItemMapping DataPointMember = "Open" // FieldName = "PositiveSigma" /> // < telerik:ItemMapping DataPointMember = "High" // FieldName = "Max" /> // < telerik:ItemMapping DataPointMember = "Low" // FieldName = "Min" /> // < telerik:ItemMapping DataPointMember = "Close" // FieldName = "NegativeSigma" /> // < telerik:ItemMapping DataPointMember = "XCategory" // FieldName = "Name" /> // </ telerik:SeriesMapping.ItemMappings > //this.SelectedAppProtocolModelsSeriesMappings.ResumeNotifications(); }; }
public ProtocolModelsClusteringVm(AppIdentMainVm appIdentMainVm) { this.AppIdentMainVm = appIdentMainVm; this.AppIdentMainVm.EpiPrecMeasureObservable.Subscribe(this.InitializeClusters); }