public void Dispose() { hourInput.TextChanged -= HandleHourChange; minuteInput.TextChanged -= HandleMinuteChange; setButton.Click -= HandleSetButtonClick; hourInput.Text = null; minuteInput.Text = null; hourInput = null; minuteInput = null; validHour = null; validMinute = null; initialWindow = null; hourInput = null; minuteInput = null; setButton = null; unsetButton = null; stopButton = null; kinect = null; kinectController = null; timer = null; }
public void Setup(Grid initialWindow, Grid inputGrid, TextBox hourInput, TextBox minuteInput, Button setButton, Button unsetButton, Button stopButton, KinectController kinectController) { this.initialWindow = initialWindow; this.inputGrid = inputGrid; this.hourInput = hourInput; this.minuteInput = minuteInput; this.setButton = setButton; this.unsetButton = unsetButton; this.stopButton = stopButton; this.kinect = kinectController.kinect; this.kinectController = kinectController; hourInput.TextChanged += HandleHourChange; minuteInput.TextChanged += HandleMinuteChange; setButton.Click += HandleSetButtonClick; unsetButton.Click += HandleUnsetButtonClick; }