Download presentation
Presentation is loading. Please wait.
Published bySharlene Powell Modified over 9 years ago
3
3 private void equalsButton_Click( object sender, RoutedEventArgs e) { calculateResult(); }
4
4
5
5
6
6 private void firstNumberTextBox_TextChanged( object sender,TextChangedEventArgs e) { calculateResult(); }
7
7 string oldFirstNumber = ""; private void firstNumberTextBox_TextChanged( object sender, TextChangedEventArgs e) { if (firstNumberTextBox.Text == oldFirstNumber) return; oldFirstNumber = firstNumberTextBox.Text; calculateResult(); }
8
8
9
9
10
10
11
11
12
12
13
13 public class AdderClass { private int topValue; public int TopValue { get { return topValue; } set { topValue = value; } } // repeat for bottomValue public int AnswerValue { get { return topValue + bottomValue;} } }
14
14
15
15 public interface INotifyPropertyChanged { // Summary: // Occurs when a property value changes. event PropertyChangedEventHandler PropertyChanged; }
16
16 PropertyChanged(this, new PropertyChangedEventArgs("AnswerValue"));
17
17 public int AnswerValue { get { return topValue + bottomValue; } }
18
18
19
19 xmlns:local="clr-namespace:AddingMachine"
20
20
21
21
22
22
23
23
24
24
25
25
26
26
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.