protected override void OnStartup(StartupEventArgs args) { CalculatorEngine ce = new CalculatorEngine(); CalculatorViewModel vm = new CalculatorViewModel(ce); CalculatorView cv = new CalculatorView(); cv.DataContext = vm; cv.Show(); }
public Form1() { InitializeComponent(); currentValue = "0"; InvalidateResultTextBox(); calculatorView = CalculatorView.Standard; InvalidateCalculatorView(); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var view = new CalculatorView(); var model = new CalculatorModel(); var presenter = new CalculatorPresenter(view, model); presenter.StartView(); }
private void ScientificToolStripMenuItem_Click(object sender, EventArgs e) { calculatorView = CalculatorView.Scientific; InvalidateCalculatorView(); }
private void StandardToolStripMenuItem_Click(object sender, EventArgs e) { calculatorView = CalculatorView.Standard; InvalidateCalculatorView(); }
public Controller() { Calculator = new Calculator(); CalculatorView = new CalculatorView(); }