コード例 #1
0
        public IEnumerable<UIAlertAction> GetAlertActionsForCheckpoint(CheckPoint selected,Action<Command> handler,iNavigatableDialog dialog=null)
        {
            var commands = this.Commands.AsEnumerable();

            if (dialog != null)
                commands = commands.Where(c=>c.Key!="Edit");

            return commands
                .Select(c=>c.Value)
                .Where (c => c.ShouldDecorate (selected))
                .Select(c=>{
                    if(c is IDialogBoundCommand  && dialog!=null)
                        ((IDialogBoundCommand)c).ExistingDialog=(iNavigatableDialog)dialog;
                    return c;
                })
                .Select (c => c.AsAlertAction (InstrumentationDecorator("Alert",c,selected,tc=>handler(tc))));
        }
コード例 #2
0
 public AddRelativeTargetCommand(iNavigatableDialog existing)
     : this()
 {
     this.ExistingDialog = existing;
 }