public ActionLayout(ICalculatorPlugin calc, CalculatorHost application)
     : this()
 {
     _calc = calc;
     _app = application;
     this.Title.Text = calc.Name;
     foreach (Operation op in calc.Operations){
         var b = new Button {Tag = op, Content = op.Name};
         b.Click += b_Click;
         Actions.Children.Add(b);
     }
     ValidateButtons(application.Stack.Items.Count);
     application.StackChanged += _stackChangedHandler;
 }
Example #2
0
 public ActionLayout(CalculatorBase calc, CalculatorHost application) : this()
 {
     _calc           = calc;
     _app            = application;
     this.Title.Text = calc.Name;
     foreach (Operation op in calc.Operations)
     {
         Button b = new Button();
         b.Tag     = op;
         b.Content = op.Name;
         b.Click  += new RoutedEventHandler(b_Click);
         Actions.Children.Add(b);
     }
     ValidateButtons(application.Stack.Items.Count);
     application.StackChanged += _stackChangedHandler;
 }
Example #3
0
 public ActionLayout(CalculatorBase calc, CalculatorHost application)
     : this()
 {
     _calc = calc;
     _app = application;
     this.Title.Text = calc.Name;
     foreach (Operation op in calc.Operations)
     {
         Button b = new Button();
         b.Tag = op;
         b.Content = op.Name;
         b.Click += new RoutedEventHandler(b_Click);
         Actions.Children.Add(b);
     }
     ValidateButtons(application.Stack.Items.Count);
     application.StackChanged += _stackChangedHandler;
 }