Example #1
0
 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();
 }
Example #2
0
        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);
        }
Example #3
0
 public bool Supersceded(ISelectionInput other)
 {
     itemSupersceded?.Invoke();
     return(true);
 }
 public bool Supersceded(ISelectionInput other)
 {
     // todo: stop placing the thingo at the placo
     return(false);
 }
Example #5
0
 public void RemoveSelectionInput(ISelectionInput input)
 {
     inputRequests = new Stack <ISelectionInput>(inputRequests.Where(x => x != input));
 }
Example #6
0
 public bool Supersceded(ISelectionInput other)
 {
     return(false);
 }