Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public partial class MainPage : PhoneApplicationPage
- {
- // Constructor
- public MainPage()
- {
- InitializeComponent();
- DataContext = this;
- WorkoutStatus = "Idle";
- RepsRemaining = 0;
- TimeRemaining = 0.00;
- }
- private string workoutStatus { get; set; }
- public string WorkoutStatus
- {
- get { return WorkoutStatus; }
- set
- {
- if (WorkoutStatus == value) return;
- workoutStatus = value;
- NotifyPropertyChanged("WorkoutStatus");
- }
- }
- private int repsRemaining;
- public int RepsRemaining
- {
- get { return repsRemaining; }
- set
- {
- if (repsRemaining == value) return;
- repsRemaining = value;
- NotifyPropertyChanged("RepsRemaining");
- }
- }
- private double timeRemaining;
- public double TimeRemaining
- {
- get { return timeRemaining; }
- set
- {
- if (timeRemaining == value) return;
- timeRemaining = value;
- NotifyPropertyChanged("TimeRemaining");
- }
- }
- public event PropertyChangedEventHandler PropertyChanged;
- public void NotifyPropertyChanged(string propertyName)
- {
- if (PropertyChanged != null)
- {
- PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
- }
- }
Add Comment
Please, Sign In to add comment