Beispiel #1
0
		public void Show(PresenterItem presenterItem)
		{
			_presenterItem = presenterItem;
			UpdateBounds();
			_transform.ScaleX = 1;
			_transform.ScaleY = 1;
		}
Beispiel #2
0
		public PresenterItem CreatePresenterItem(ElementBase elementBase)
		{
			var presenterItem = new PresenterItem(elementBase);
			Add(presenterItem);
			presenterItem.CreatePainter();
			return presenterItem;
		}
Beispiel #3
0
		public void Show(PresenterItem presenterItem)
		{
			if (_timer.IsEnabled || Parent != null)
				Hide();
			_flushControl.SetPresenterItem(presenterItem);
			_flushControl.Show();
			AdornerLayer adornerLayer = AdornerLayer.GetAdornerLayer(Canvas);
			if (adornerLayer != null)
				adornerLayer.Add(this);
			_timer.Start();
		}
Beispiel #4
0
		public ProcedurePainter(PresenterItem presenterItem)
			: base(presenterItem.DesignerCanvas, presenterItem.Element)
		{
			PresenterItem = presenterItem;
			Item = CreateItem(presenterItem);

			PresenterItem.IsPoint = false;
			PresenterItem.ShowBorderOnMouseOver = true;
			PresenterItem.Cursor = Cursors.Hand;
			PresenterItem.ClickEvent += (s, e) =>
				ProcedureArgumentsViewModel.Run(Item);
			_tooltip = new ProcedureTooltipViewModel(Item);
		}
		public void Navigate(PresenterItem presenterItem)
		{
			_flushAdorner.Show(presenterItem);
		}
Beispiel #6
0
		public void Hide()
		{
			_presenterItem = null;
			_transform.ScaleX = 0;
			_transform.ScaleY = 0;
		}
Beispiel #7
0
		private Procedure CreateItem(PresenterItem presenterItem)
		{
			var element = presenterItem.Element as ElementProcedure;
			return element == null ? null : PlanPresenter.Cache.Get<Procedure>(element.ProcedureUID);
		}
Beispiel #8
0
		public void SetPresenterItem(PresenterItem presenterItem)
		{
			PresenterItem = presenterItem;
			SetPresenterItem();
		}