コード例 #1
0
        /// <inheritdoc/>
        public bool InvokeCommand <TCommand>(TCommand command)
        {
            if (command != null && !_context.IsDismissed)
            {
                if (CommandUtilities.TryUnpack(command, out Commands cmd))
                {
                    if (cmd == Commands.Ok)
                    {
                        _context.Dismiss(MessageBoxResult.Ok);
                    }
                    else
                    {
                        _context.Dismiss(MessageBoxResult.Cancel);
                    }

                    return(true);
                }
            }

            return(false);
        }
コード例 #2
0
 private void OnTimer(float time)
 {
     _context.Dismiss();
 }
コード例 #3
0
 /// <summary>
 /// Dismissses this controller.
 /// </summary>
 /// <seealso cref="IsDismissed"/>
 protected void Dismiss()
 {
     _context.Dismiss();
 }