Exemplo n.º 1
0
 public NavigateToProductFinderCmd(IDialogVM productFinder)
 {
     _productFinder    = productFinder;
     DisplayName       = "Product Search";
     DoCanExecuteCheck = () => true;
     DoExecute         = o => Navigate();
 }
Exemplo n.º 2
0
 public SubmitDialogCmd(IDialogVM dialog)
 {
     DisplayName = "Submit";
     DoExecute  += o =>
     {
         dialog.Submit();
         dialog.CloseCmd.Execute(null);
     };
 }
Exemplo n.º 3
0
        public void OpenDialog(IDialogVM ws)
        {
            var dialogPresenter = Application.Current.MainWindow as IDialogPresenter;

            if (dialogPresenter != null)
            {
                dialogPresenter.ShowModalDialog(ws);
            }
        }
Exemplo n.º 4
0
 public DialogWindow(Window parent, IDialogVM ws)
 {
     Resources   = parent.Resources;
     ws.CloseCmd = CloseCommand = new CloseCommandVM(Close);
     DataContext = this;
     InitializeComponent();
     Owner                  = parent;
     Width                  = 500;
     Height                 = 500;
     WindowStyle            = WindowStyle.None;
     ShowInTaskbar          = false;
     WindowStartupLocation  = WindowStartupLocation.CenterOwner;
     ResizeMode             = ResizeMode.NoResize;
     ContentControl.Content = ws;
 }
Exemplo n.º 5
0
        public void ShowAsynchModalDialog(IDialogVM ws)
        {
            var w = new DialogWindow(this, ws);

            w.Show();
        }