Ejemplo n.º 1
0
        public OEMView()
        {
            ovm = new OEMViewModel();
            this.InitializeComponent();
            // ovm.OpenCompleteBlade = new RelayCommand(() => { CompleteBladeView.IsEnabled = true; com });
            this.DataContext = ovm;

            Messenger.Default.Register <NotificationMessage>(this, (nm) =>
            {
                //Check which message you've sent
                if (nm.Notification == "OpenCompleteBlades")
                {
                    //If the DataContext is the same ViewModel where you've called the Messenger
                    if (nm.Sender == this.DataContext)
                    {
                        //Do something here, for example call a function. I'm closing the view:
                        CompleteBladeView.IsEnabled = true;
                    }
                    if (SolutionHelper.BusinessCustomer())
                    {
                        commercialCompleteBlade.IsOpen = true;
                    }
                    else
                    {
                        consumerCompleteBlade.IsOpen = true;
                    }
                }
            });
        }
Ejemplo n.º 2
0
        private async void addSPToSolutionButton_Click(object sender, RoutedEventArgs e)
        {
            await svm.AddProductsToSolution();

            CompleteBladeView.IsEnabled = true;
            if (SolutionHelper.BusinessCustomer())
            {
                commercialCompleteBlade.IsOpen = true;
            }
            else
            {
                consumerCompleteBlade.IsOpen = true;
            }
        }
Ejemplo n.º 3
0
        private async void addSPToSolutionButton_Click(object sender, RoutedEventArgs e)
        {
            await svm.AddProductsToSolution();

            CompleteBladeView.IsEnabled = true;
            if (SolutionHelper.BusinessCustomer())
            {
                commercialCompleteBlade.IsOpen        = true;
                SurfaceSelectionStackPanel.Visibility = Visibility.Collapsed;
            }
            else
            {
                consumerCompleteBlade.IsOpen          = true;
                SurfaceSelectionStackPanel.Visibility = Visibility.Collapsed;
            }
        }
Ejemplo n.º 4
0
        private async void addSPToSolutionButton_Click(object sender, RoutedEventArgs e)
        {
            if (await svm.AddProductsToSolution()) //Navigate to the next step in the process if the method returns true in dicating the customer does not want to add an accessory
            {
                CompleteBladeView.IsEnabled = true;

                if (SolutionHelper.BusinessCustomer())
                {
                    commercialCompleteBlade.IsOpen = true;
                }
                else
                {
                    consumerCompleteBlade.IsOpen = true;
                }
            }
        }