private void nextButton_Click(object sender, EventArgs e) { _lastButtonPressed = BarButtonType.NextButton; CancelEventArgs ce = new CancelEventArgs(false); raisepreClickedButton(ce); if (!ce.Cancel) { if (_panelCollection.Count > 0) { _previousPanel = _currentPanel; if (_panelCollection.IndexOf(_currentPanel) < (_panelCollection.Count - 1)) { _currentPanel = _panelCollection[_panelCollection.IndexOf(_currentPanel) + 1]; ShowCurrentPanel(); //RefreshButtons(); } } } raisepostClickedButton(); }
private void cancelButton_Click(object sender, EventArgs e) { this._stopChange = true; this._lastButtonPressed = BarButtonType.CancelButton; CancelEventArgs ce = new CancelEventArgs(false); raisepreClickedButton(ce); if (!ce.Cancel) { raisepostClickedButton(); } }