Ejemplo n.º 1
0
            public void message(string msg)
            {
                _controller._messageText = msg;
                SimpleDefaultMainAction action = new SimpleDefaultMainAction(_controller, delegate
                {
                    _controller.SetMessageText();
                });

                _controller.invoke(action);
            }
Ejemplo n.º 2
0
        public void BeginInvoke(AsyncDelegate del)
        {
            ControllerMainAction mainAction = new SimpleDefaultMainAction(this, del);

            try
            {
                if (!View.IsHandleCreated)
                {
                    return;
                }
                View.BeginInvoke(new AsyncDelegate(mainAction.run), null);
            }
            catch (ObjectDisposedException)
            {
                //happens because there is no synchronization between the lifecycle of a form and callbacks of background threads.
                //catch silently
            }
        }
Ejemplo n.º 3
0
        public void Invoke(AsyncDelegate del, bool wait)
        {
            ControllerMainAction mainAction = new SimpleDefaultMainAction(this, del);

            invoke(mainAction, wait);
        }