예제 #1
0
        /// <Summary>
        /// PreviousPage runs when the Back Button is clicked and raises a PreviousPage
        /// Event
        /// </Summary>
        private void PreviousPage(object sender, CommandEventArgs e)
        {
            if (CurrentPage > 0)
            {
                int PrevPage = CurrentPage;
                WizardCancelEventArgs wce = new WizardCancelEventArgs(CurrentPage, PrevPage, Pages);
                OnBeforePageChanged(wce);
                if (wce.Cancel == false)
                {
                    //Event Not Cancelled by Event Consumer
                    CurrentPage--;
                    WizardEventArgs we = new WizardEventArgs(CurrentPage, PrevPage, Pages);
                    OnAfterPageChanged(we);
                }
            }

            DisplayCurrentPage();
        }
예제 #2
0
        /// <Summary>
        /// NextPage runs when the Next Button is clicked and raises a NextPage Event
        /// </Summary>
        private void NextPage(object sender, CommandEventArgs e)
        {
            //If we are not on the last page Create a New WizardEventArgs Object
            //and trigger a Previous Page Event
            if (CurrentPage < Pages.Count - 1)
            {
                int PrevPage = CurrentPage;
                WizardCancelEventArgs wce = new WizardCancelEventArgs(CurrentPage, PrevPage, Pages);
                OnBeforePageChanged(wce);
                if (wce.Cancel == false)
                {
                    //Event Not Cancelled by Event Consumer
                    CurrentPage++;
                    WizardEventArgs we = new WizardEventArgs(CurrentPage, PrevPage, Pages);
                    OnAfterPageChanged(we);
                }
            }

            DisplayCurrentPage();
        }
예제 #3
0
        /// <Summary>
        /// PreviousPage runs when the Back Button is clicked and raises a PreviousPage
        /// Event
        /// </Summary>
        private void PreviousPage( object sender, CommandEventArgs e )
        {
            if (CurrentPage > 0)
            {
                int PrevPage = CurrentPage;
                WizardCancelEventArgs wce = new WizardCancelEventArgs(CurrentPage, PrevPage, Pages);
                OnBeforePageChanged(wce);
                if (wce.Cancel == false)
                {
                    //Event Not Cancelled by Event Consumer
                    CurrentPage--;
                    WizardEventArgs we = new WizardEventArgs(CurrentPage, PrevPage, Pages);
                    OnAfterPageChanged(we);
                }
            }

            DisplayCurrentPage();
        }
예제 #4
0
 protected virtual void OnFinishWizard(WizardEventArgs e)
 {
     //Invokes the delegates.
     if (FinishWizardEvent != null)
     {
         FinishWizardEvent(this, e);
     }
 }
예제 #5
0
 protected virtual void OnAfterPageChanged(WizardEventArgs e)
 {
     //Invokes the delegates.
     if (AfterPageChangedEvent != null)
     {
         AfterPageChangedEvent(this, e);
     }
 }
예제 #6
0
        /// <Summary>
        /// NextPage runs when the Next Button is clicked and raises a NextPage Event
        /// </Summary>
        private void NextPage( object sender, CommandEventArgs e )
        {
            //If we are not on the last page Create a New WizardEventArgs Object
            //and trigger a Previous Page Event
            if (CurrentPage < Pages.Count - 1)
            {
                int PrevPage = CurrentPage;
                WizardCancelEventArgs wce = new WizardCancelEventArgs(CurrentPage, PrevPage, Pages);
                OnBeforePageChanged(wce);
                if (wce.Cancel == false)
                {
                    //Event Not Cancelled by Event Consumer
                    CurrentPage++;
                    WizardEventArgs we = new WizardEventArgs(CurrentPage, PrevPage, Pages);
                    OnAfterPageChanged(we);
                }
            }

            DisplayCurrentPage();
        }
예제 #7
0
 /// <Summary>
 /// Finish runs when the Back Button is clicked and raises a FinishWizard Event
 /// </Summary>
 private void Finish( object sender, CommandEventArgs e )
 {
     //Create a New WizardEventArgs Object and trigger a Finish Event
     WizardEventArgs we = new WizardEventArgs(CurrentPage, Pages);
     OnFinishWizard(we);
 }