// Function to handle Calculate Button Click event private void BtnCalculate_Click(object sender, RoutedEventArgs e) { pcVM.Calculate(); if (CO == null) { CO = new CalculatorOutput(pcVM); CO.Closed += CalculatorOutput_Closed; CO.Show(); } }
private void CalculatorOutput_Closed(object sender, EventArgs e) { CO = null; }