コード例 #1
0
        public bool PromptForPreviewAcceptance(IEnumerable <PreviewResult> actions)
        {
            var result = false;

            if (actions.Any())
            {
                UIDispatcher.Invoke(() =>
                {
                    var w         = new PreviewWindow(_context);
                    w.DataContext = new PreviewWindowModel(actions);

                    if (StandaloneSwitch.IsRunningStandalone &&
                        _detailControl != null)
                    {
                        var win = Window.GetWindow(_detailControl);
                        w.Owner = win;
                    }

                    result = w.ShowModal() == true;
                });
            }
            else
            {
                return(true);
            }

            return(result);
        }
コード例 #2
0
ファイル: NuGetUI.cs プロジェクト: WeilerWebServices/NuGet
        public bool PromptForPreviewAcceptance(IEnumerable<PreviewResult> actions)
        {
            var result = false;

            if (actions.Any())
            {
                InvokeOnUIThread(() =>
                {
                    var w = new PreviewWindow(UIContext);
                    w.DataContext = new PreviewWindowModel(actions);

                    result = w.ShowModal() == true;
                });
            }
            else
            {
                return true;
            }

            return result;
        }
コード例 #3
0
        public bool PromptForPreviewAcceptance(IEnumerable <PreviewResult> actions)
        {
            var result = false;

            if (actions.Any())
            {
                UIDispatcher.Invoke(() =>
                {
                    var w         = new PreviewWindow(UIContext);
                    w.DataContext = new PreviewWindowModel(actions);

                    result = w.ShowModal() == true;
                });
            }
            else
            {
                return(true);
            }

            return(result);
        }
コード例 #4
0
        public bool PromptForPreviewAcceptance(IEnumerable<PreviewResult> actions)
        {
            bool result = false;

            UIDispatcher.Invoke(() =>
            {
                var w = new PreviewWindow();
                w.DataContext = new PreviewWindowModel(actions);

                if (StandaloneSwitch.IsRunningStandalone && DetailControl != null)
                {
                    Window win = Window.GetWindow(DetailControl);
                    w.Owner = win;
                }

                result = w.ShowModal() == true;
            });

            return result;
        }