예제 #1
0
        // ReSharper disable once UnusedMember.Local
        // ReSharper disable once UnusedParameter.Local
        async partial void ButtonTouchUpInside(UIButton sender)
        {
            // Starts evaluating the pre-condition.
            var isPreConditionSatisfied = await _preCondition();

            // We'll only execute the command if
            // the pre-condition holds.
            if (isPreConditionSatisfied)
            {
                _command.Execute(_arguments);
            }
        }
예제 #2
0
        private void Execute(IApplicationCommand cmd, bool log, bool audit)
        {
            if (audit && cmd.Audit)
            {
                AuditCommand(cmd);
            }

            if (HasPermissionOnCmd(cmd))
            {
                cmd.Execute();
            }
            else
            {
                ShowNoPermissionMessage();
            }
        }