示例#1
0
 /// <summary>
 /// Deactivates a page
 /// </summary>
 /// <param name="wizardPage"></param>
 /// <param name="throwExceptions"></param>
 /// <returns></returns>
 public bool DeactivatePage(IWizardPage wizardPage, WizardNavigationReasons reason, bool throwExceptions)
 {
     if (wizardPage != null)
     {
         try
         {
             wizardPage.Deactivate(reason);
             return(true);
         }
         catch (Exception ex)
         {
             Trace.WriteLine(ex);
             if (throwExceptions)
             {
                 throw new Exception(ex.Message, ex);
             }
         }
     }
     return(false);
 }
示例#2
0
		/// <summary>
		/// Deactivates a page
		/// </summary>
		/// <param name="wizardPage"></param>
		/// <param name="throwExceptions"></param>
		/// <returns></returns>
		public bool DeactivatePage(IWizardPage wizardPage, WizardNavigationReasons reason, bool throwExceptions)
		{
			if (wizardPage != null)
			{
				try
				{
					wizardPage.Deactivate(reason);
					return true;
				}
				catch(Exception ex)
				{
					Trace.WriteLine(ex);
					if (throwExceptions)
						throw new Exception(ex.Message, ex);
				}
			}
			return false;
		}