コード例 #1
0
		public void Push(MirrorOperation operation)
		{
			if (operation == null)
				throw new ArgumentNullException("operation");

			var control = new MirrorOperationControl(operation)
			{
				Dock = DockStyle.Top
			};
			panel.Controls.Add(control);
			control.BringToFront();

			control.Aborted += (s, e) => { RemoveControl(control); };
			operation.Finished += (s, e) =>
			{
				RemoveControl(control);

				if (!OperationControls.Any())
				{
					if (AllFinished != null)
						AllFinished(this, EventArgs.Empty);
				}
				else
					TriggerNextOperation();
			};

			TriggerNextOperation();
		}
コード例 #2
0
		private void RemoveControl(MirrorOperationControl control)
		{
			if (panel.Controls.Contains(control))
				panel.Controls.Remove(control);
		}
コード例 #3
0
 public Status(MirrorOperationControl control)
 {
     _control = control;
 }