Exemplo n.º 1
0
        protected virtual bool RunSessionInternal()
        {
            ApplicationHandler.Instance.TriggerProcessModalSession(this);
            // Run the window modally until there are no events to process:
            var result = (int)app.RunModalSession(Session);

            // Give the main loop some time:
            NSRunLoop.Current.RunUntil(NSRunLoop.NSDefaultRunLoopMode, NSDate.DistantFuture);
            var continues = result == (int)NSRun.ContinuesResponse;

            if (Stopped && continues)
            {
                // we were told to continue, but we actually want to stop
                app.StopModal();
            }
            return(continues);
        }