private void DraggingMessage(PointerState po, string tokenid) { if (Dragging == null) { return; } Token.AddNew(new EventTokenTriggerToolDragging { TokenID = tokenid, Name = Dragging.Name, ToolButtonType = Dragging.GetType(), Pointer = po, Sender = this, }); if (tokenid == TokenIdFinished || tokenid == TokenIdCancelling) { Dragging = null; Status["IsEnableSelectingBox"].ValueB = true; } else { Status["IsEnableSelectingBox"].ValueB = false; } }
private void Interval_Elapsed(object sender, ElapsedEventArgs e) { Token.AddNew(new IntervalEventTokenTrigger { Name = Name, DT = DateTime.Now, TokenID = TokensGeneral.IntervalElapsed, Sender = this, Remarks = "auto fire fcIntervalAutoToken)", }); }
/// <summary> /// UWP Control event handling : List selection change /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void TargetListView_SelectionChanged(object sender, SelectionChangedEventArgs e) { // Bridge from UWP event to Gui.Token var tar = e.AddedItems.LastOrDefault() as TemplateTipModel; if (tar != Hot.ActiveTemplate) { Token.AddNew(new EventTokenTemplateChangedTrigger { TargetTemplate = tar, Sender = this, Remarks = "Select changed List View to change active template", }); } }
private void findPartsForTooltip(PointerState po) { var tr = Parts .GetParts <ITooltipResponse>(TargetLayer, ttr => ttr.SelectingScore(TargetPane, po.Position) <= 1.0f) .FirstOrDefault(); if (tr != null) { var text = Mes.Get(tr.ToolTipUid); if (tr.Equals(CurrentParts) == false && CurrentText != text) { Token.AddNew(new EventTokenTriggerTooltip { TokenID = TokenIDShow, Text = text, IsUpperPositionDefault = po.DeviceType == PointerState.DeviceTypes.Touch || po.DeviceType == PointerState.DeviceTypes.Pen, Position = po.Position, Sender = this, Remarks = "to show tooltip", }); CurrentText = text; CurrentParts = tr; } } else { if (string.IsNullOrEmpty(CurrentText) == false && string.IsNullOrWhiteSpace(CurrentText) == false) { Token.AddNew(new EventTokenTriggerTooltip { TokenID = TokenIDHide, Sender = this, Remarks = "to hide tooltip", }); CurrentText = string.Empty; CurrentParts = null; } } }