Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using DiceExpressions.Model;
- using DiceExpressions.ViewModels;
- using Reactive.Bindings;
- using ReactiveUI;
- using PType = System.Double;
- namespace DiceExpressions.ViewModel
- {
- public class DiceExpressionsViewModel : ViewModelBase
- {
- private string _plot;
- public DiceExpressionsViewModel()
- {
- var d1 = new Die(20);
- var d2 = new Constant<PType>((PType)1.7);
- var d3=d1+d2;
- var d4 = d1.ArithMult(3);
- var d5 = d1.ArithMult(d1);
- _plot = d5.Plot();
- Plot2 = new ReactiveProperty<string>(d5.Plot());
- d5.GetOxyPlotSvg("Test");
- d5.SaveOxyPlotPdf("test.pdf");
- }
- public ReactiveProperty<string> Plot2 { get; }
- public string Plot
- {
- get { return _plot; }
- set { this.RaiseAndSetIfChanged(ref _plot, value); }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement