Esempio n. 1
0
        private void MessageReceived(NotificationMessage notificationMessage)
        {
            Dispatcher.BeginInvoke(new Action(() =>
            {
                if (notificationMessage.Notification == Messages.NavigateToMainWindow)
                {
                    MainWindow = new BroadcastMainWindow();
                    MainWindow.Show();

                }
                else if (notificationMessage.Notification == AgentDialerViewModel.ShowApiExtensionWarning)
                {
                    MessageBox.Show(
                        "API extension ID is not set in General settings or it is invalid.",
                        "Error", MessageBoxButton.OK, MessageBoxImage.Error);
                }
                else if (notificationMessage.Notification == AgentDialerViewModel.ShowNoAgentsSelectedError)
                {
                    MessageBox.Show(
                        "No agents selected to handle calls.",
                        "Error", MessageBoxButton.OK, MessageBoxImage.Error);
                }
            }));
        }
        private void MessageReceived(NotificationMessage notificationMessage)
        {
            Dispatcher.BeginInvoke(new Action(() =>
            {
                if (notificationMessage.Notification == Messages.NavigateToMainWindow)
                {
                    var mainWindow = new BroadcastMainWindow();
                    mainWindow.Show();

                    Current.MainWindow = mainWindow;
                }
            }));
        }