Xwt.Dialog.Respond C# (CSharp) Method

Respond() public method

public Respond ( Xwt.Command cmd ) : void
cmd Xwt.Command
return void
        public void Respond(Command cmd)
        {
            resultCommand = cmd;
            responding = true;
            if (!loopEnded && !requestingClose) {
                Backend.EndLoop ();
            }
        }

Usage Example

Ejemplo n.º 1
0
        public void TwoResponds()
        {
            // When Respond is called twice before leaving an event handler, the last call is the good one

            using (var win = new Dialog()) {
                Application.TimeoutInvoke(10, delegate {
                    win.Respond(Command.Ok);
                    win.Respond(Command.Apply);
                    return(false);
                });
                var cmd = win.Run();
                Assert.AreEqual(Command.Apply, cmd);
            }
        }
All Usage Examples Of Xwt.Dialog::Respond