public ViewModel() { _curr4Draw = new RobotDynamics(); _curr4Draw.Rebuild(); Model1Rx = new VMPropRx <PlotModel, SolPoint>(() => { var Model1 = GetNewModel("params", "X", "Y"); bSer = new LineSeries() { Title = "Body", // StrokeThickness = 2, Color = OxyColors.Green }; Model1.Series.Add(bSer); return(Model1); }, (sp, pm) => { _curr4Draw.SynchMeTo(sp); Draw(sp.T, pm); return(pm); } ); SolPointList = new VMPropRx <List <SolPoint>, SolPoint>( () => new List <SolPoint>(), (sp, lst) => { lst.Add(sp); return(lst); }); }
public ViewModel() { _curr4Draw = new OneDemExample(); _curr4Draw.Rebuild(); Model1Rx = new VMPropRx <PlotModel, SolPoint>(() => { var Model1 = GetNewModel("params", "X", "p,Ro,V"); P = new ScatterSeries() { Title = "P", MarkerType = MarkerType.Triangle, MarkerSize = 2, MarkerFill = OxyColors.Green }; Model1.Series.Add(P); Ro = new ScatterSeries() { Title = "Ro", MarkerType = MarkerType.Diamond, MarkerSize = 2, MarkerFill = OxyColors.DarkOrange }; Model1.Series.Add(Ro); V = new ScatterSeries() { Title = "V", MarkerType = MarkerType.Circle, MarkerSize = 2, MarkerFill = OxyColors.Blue }; Model1.Series.Add(V); E = new ScatterSeries() { Title = "E", MarkerType = MarkerType.Circle, MarkerSize = 2, MarkerFill = OxyColors.Red }; Model1.Series.Add(E); return(Model1); }, (sp, pm) => { _curr4Draw.SynchMeTo(sp); Draw(sp.T, pm); return(pm); } ); SolPointList = new VMPropRx <List <SolPoint>, SolPoint>( () => new List <SolPoint>(), (sp, lst) => { lst.Add(sp); return(lst); }); }
public ViewModelPTUR() { _curr4Draw = new PTURDyn(); _curr4Draw.Rebuild(); Model1Rx = new VMPropRx <PlotModel, SolPoint>(() => { var Model1 = GetNewModel("params", "X", "Y"); Pos = new LineSeries() { Title = "Traect", // StrokeThickness = 2, Color = OxyColors.Green }; Model1.Series.Add(Pos); Trg = new LineSeries() { Title = "Trg", // StrokeThickness = 2, Color = OxyColors.Red }; Model1.Series.Add(Trg); return(Model1); }, (sp, pm) => { _curr4Draw.SynchMeTo(sp); Draw(sp.T, pm); return(pm); } ); SolPointList = new VMPropRx <List <SolPoint>, SolPoint>( () => new List <SolPoint>(), (sp, lst) => { lst.Add(sp); return(lst); }); }
public ViewModel(Sph2D curr) { _curr4Draw = MainWindow.GetTest(); _curr4Draw.Rebuild(); Fill0s(curr); Model1Rx = new VMPropRx <PlotModel, SolPoint>( () => { var Model1 = GetNewModel("params", "X", "p,Ro,V"); P = new ScatterSeries() { Title = "P", MarkerType = MarkerType.Triangle, MarkerSize = 2, //ColorAxisKey = colorAxis.Key, }; Model1.Series.Add(P); Ro = new ScatterSeries() { Title = "Ro", MarkerType = MarkerType.Diamond, MarkerSize = 2, //ColorAxisKey = colorAxis.Key }; Model1.Series.Add(Ro); V = new ScatterSeries() { Title = "V", MarkerType = MarkerType.Circle, MarkerSize = 2, // ColorAxisKey = colorAxis.Key }; Model1.Series.Add(V); E = new ScatterSeries() { Title = "E", MarkerType = MarkerType.Circle, MarkerSize = 2, // ColorAxisKey = colorAxis.Key }; Model1.Series.Add(E); colorSer2D = new ScatterSeries() { Title = "Color", MarkerType = MarkerType.Circle, MarkerSize = 2, ColorAxisKey = colorAxis.Key }; Model1.Series.Add(colorSer2D); return(Model1); }, (sp, pm) => { _curr4Draw.SynchMeTo(sp); switch (DrawState) { case 1: { Draw2D(sp.T, pm, WichGraph); break; } default: Draw(sp.T, pm); break; } return(pm); }); SolPointList = new VMPropRx <List <SolPoint>, SolPoint>( () => new List <SolPoint>(), (sp, lst) => { lst.Add(sp); return(lst); }); }