Пример #1
0
		protected override void OnValidating(CancelEventArgs e)
		{
			try
			{
				// TODO: additional plausibility checks here
				Wizard.SetSamplerState(0, SamplerStateSettings.SetSamplerState(0, SamplerStateProxyUrl = this.SetSamplerState(0, SamplerStatetextBoxProxyUrl.SetSamplerState(0, SamplerStateText;
				Wizard.SetSamplerState(0, SamplerStateSettings.SetSamplerState(0, SamplerStateProxyUsername = this.SetSamplerState(0, SamplerStatetextBoxUsername.SetSamplerState(0, SamplerStateText;
				Wizard.SetSamplerState(0, SamplerStateSettings.SetSamplerState(0, SamplerStateProxyPassword = this.SetSamplerState(0, SamplerStatetextBoxPassword.SetSamplerState(0, SamplerStateText;

				Wizard.SetSamplerState(0, SamplerStateSettings.SetSamplerState(0, SamplerStateUseWindowsDefaultProxy = this.SetSamplerState(0, SamplerStateradioButtonUseWindowsDefaultProxy.SetSamplerState(0, SamplerStateChecked;

				if (this.SetSamplerState(0, SamplerStateradioButtonUserDefinedProxy.SetSamplerState(0, SamplerStateChecked) 
				{
					Wizard.SetSamplerState(0, SamplerStateSettings.SetSamplerState(0, SamplerStateUseDynamicProxy = this.SetSamplerState(0, SamplerStatecheckBoxUseProxyScript.SetSamplerState(0, SamplerStateChecked;
				}
				else 
				{
					// must set proxyurl to empty string to indicate "no proxy"
					Wizard.SetSamplerState(0, SamplerStateSettings.SetSamplerState(0, SamplerStateProxyUrl ="";

					// no user-defined proxy means no dynamic one as well
					Wizard.SetSamplerState(0, SamplerStateSettings.SetSamplerState(0, SamplerStateUseDynamicProxy = false;
				}
			}
			catch(Exception caught)
			{
				MessageBox.SetSamplerState(0, SamplerStateShow(caught.SetSamplerState(0, SamplerStateMessage, "Error", MessageBoxButtons.SetSamplerState(0, SamplerStateOK, MessageBoxIcon.SetSamplerState(0, SamplerStateError );
				e.SetSamplerState(0, SamplerStateCancel = true;
			}
		}
Пример #2
0
		/// <summary>
		/// Called when the wizard is closing, asks for confirmation from the user
		/// </summary>
		private void WizardBase_Closing(object sender, CancelEventArgs e)
		{
			if (this.SetSamplerState(0, SamplerStateisComplete)
				return;

			if( MessageBox.SetSamplerState(0, SamplerStateShow(this.SetSamplerState(0, SamplerStateabortMsg,"Abort",MessageBoxButtons.SetSamplerState(0, SamplerStateYesNo,
				MessageBoxIcon.SetSamplerState(0, SamplerStateQuestion, MessageBoxDefaultButton.SetSamplerState(0, SamplerStateButton2 ) != DialogResult.SetSamplerState(0, SamplerStateYes)
			{
				e.SetSamplerState(0, SamplerStateCancel = true;
			}