CSharpUtils.Forms.ProgressForm.ProgressForm_Ended C# (CSharp) Метод

ProgressForm_Ended() публичный Метод

public ProgressForm_Ended ( ) : void
Результат void
		void ProgressForm_Ended()
		{
			if (WaitObject != null)
			{
				lock (WaitObject)
				{
					Monitor.Wait(WaitObject);
				}
			}

			for (int n = 0; n < 2; n++ )
			{
				if (!Visible) return;
				try
				{
					BeginInvoke(new Action(delegate()
					{
						/*
						try
						{
						}
						catch
						{
						}
						*/
						//DialogResult property to be set to DialogResult.Cancel
						DialogResult = Cancelled ? DialogResult.Cancel : DialogResult.OK;
						Close();
					}));
				}
				catch
				{
				}
				Thread.Sleep(20);
			}
		}