Exemplo n.º 1
0
            private DialogResult ShowWindow(object model)
            {
                object lastAction          = null;
                object lastActionParameter = null;
                var    window = new DialogWindow(model, context, options);

                window.Form.OnAction += (s, e) =>
                {
                    lastAction          = e.ActionContext.Action;
                    lastActionParameter = e.ActionContext.ActionParameter;
                };

                window.ShowDialog();

                if (options.BringToFront)
                {
                    window.BringIntoView();
                }

                if (options.TopMost)
                {
                    window.Topmost = true;
                }

                return(new DialogResult(window.Form.Value, lastAction, lastActionParameter));
            }