public void ApplySelection(IEnumerable <VisualPayload> payloads, InputModifiers inputModifiers) { if (!ChainView.Instance.IsBusy) { if (!inputModifiers.Equals(Modifiers)) { return; } ChainView.Instance.IsBusy = true; JobManager.Instance.StartJob(SelectionMode.ApplyMode(payloads), jobName: "ApplyMode", startImmediately: true, completionHandler: ChainView.UnBusy); } }
public void SendClickEvent(VisualPayload payload, InputModifiers inputModifiers) { if (!ChainView.Instance.IsBusy) { if (!inputModifiers.Equals(Modifiers)) { return; } ChainView.Instance.IsBusy = true; JobManager.Instance.StartJob(SelectionMode.ApplyMode(new List <VisualPayload>() { payload }), jobName: "ApplyMode", startImmediately: true, completionHandler: ChainView.UnBusy); } }
public void SelectTypedCriterion(T compareValue) { if (!InputModifiers.CurrentInputModifiers().Equals(RequiredModifiers)) { return; } var selectionList = new List <VisualPayload>(); //TargetSelectable.SelectablePayloads.Where(element => CriterionField(element.Data) == compareValue).ToList(); List <MutableObject> resolutionList = new List <MutableObject>(); for (var i = 0; i < ArrityLevels; i++) { resolutionList.Add(new MutableObject()); } foreach (var element in TargetSelectable.SelectablePayloads) { resolutionList.Add(element.Data); var criterionValue = CriterionField(resolutionList); //if (!typeof(T).IsAssignableFrom(compareValue.GetType())) // throw new Exception("Invalid type comparing values!"); if (CompareValues((T)criterionValue, compareValue)) { selectionList.Add(element); } resolutionList.RemoveAt(ArrityLevels); } if (!ChainView.Instance.IsBusy) { ChainView.Instance.IsBusy = true; JobManager.Instance.StartJob(SelectionMode.ApplyMode(selectionList), jobName: "Select Criterion", startImmediately: true, completionHandler: ChainView.UnBusy); } }