///<summary></summary> protected void OnButtonClicked(OutlookButton myButton, bool myCancel) { if (this.ButtonClicked != null) { //previousSelected=SelectedIndex; ButtonClicked_EventArgs oArgs = new ButtonClicked_EventArgs(myButton, myCancel); this.ButtonClicked(this, oArgs); if (oArgs.Cancel) { SelectedIndex = previousSelected; Invalidate(); } } }
///<summary></summary> protected void OnButtonClicked(OutlookButton myButton,bool myCancel){ if(this.ButtonClicked != null){ //previousSelected=SelectedIndex; ButtonClicked_EventArgs oArgs = new ButtonClicked_EventArgs(myButton,myCancel); this.ButtonClicked(this,oArgs); if(oArgs.Cancel){ SelectedIndex=previousSelected; Invalidate(); } } }