public void PushSelectionInput(ISelectionInput input) { if (inputRequests.Count > 0) { var top = inputRequests.Peek(); top.CloseSelectionInput(); if (top.Supersceded(input)) { inputRequests.Pop(); } } inputRequests.Push(input); input.BeginSelectionInput(); }
public static ISelectionInputDto MapSelectionInputToDto(ISelectionInput src) { if (src == null) { return(null); } Lazy <SelectionInputDto> input = new Lazy <SelectionInputDto>(() => new SelectionInputDto { DisplayName = src.DisplayName, Id = src.Id, Delimiter = src.Delimiter, HelpToolTip = src.HelpToolTip, NumberToSelect = src.NumberToSelect, SelectItems = src.SelectItems, AvailableOnRemove = src.AvailableOnRemove, AvailableOnChange = src.AvailableOnChange, AvailableOnAdd = src.AvailableOnAdd }); return(input.Value); }
public bool Supersceded(ISelectionInput other) { itemSupersceded?.Invoke(); return(true); }
public bool Supersceded(ISelectionInput other) { // todo: stop placing the thingo at the placo return(false); }
public void RemoveSelectionInput(ISelectionInput input) { inputRequests = new Stack <ISelectionInput>(inputRequests.Where(x => x != input)); }
public bool Supersceded(ISelectionInput other) { return(false); }