예제 #1
0
        private void MessageReceived(NotificationMessage notificationMessage)
        {
            Dispatcher.BeginInvoke(new Action(() =>
            {
                if (notificationMessage.Notification == LoginViewModel.ShowLoginWindow)
                {
                    ShowWindow();
                }
                else if (notificationMessage.Notification == LoginViewModel.ShowWaitWindow)
                {
                    showWaitWindow = true;
                    if (ShowActivated)
                    {
                        ShowWaitWindow();
                    }
                    else
                    {
                        //var serverAddress = viewModel.UserInfo.ServerAddress;
                        //taskBarIcon.ShowBalloonTip("Ozeki call assistant", "Trying to connect to " + serverAddress, BalloonIcon.Info);
                    }
                }
                else if (notificationMessage.Notification == LoginViewModel.NavigateToMainWindow)
                {
                    CloseWaitWindow();

                    var mainWindow = new MainWindow2();
                    mainWindow.Show();

                    System.Windows.Application.Current.MainWindow = mainWindow;

                    Close();
                }
            }));
        }
예제 #2
0
        private void MessageReceived(NotificationMessage notificationMessage)
        {
            Dispatcher.BeginInvoke(new Action(() =>
                                       {
                                           if (notificationMessage.Notification == LoginViewModel.ShowLoginWindow)
                                           {
                                               ShowWindow();
                                           }
                                           else if (notificationMessage.Notification == LoginViewModel.ShowWaitWindow)
                                           {
                                               showWaitWindow = true;
                                               if (ShowActivated)
                                               {
                                                   ShowWaitWindow();

                                               }
                                               else
                                               {
                                                   //var serverAddress = viewModel.UserInfo.ServerAddress;
                                                   //taskBarIcon.ShowBalloonTip("Ozeki call assistant", "Trying to connect to " + serverAddress, BalloonIcon.Info);
                                               }

                                           }
                                           else if (notificationMessage.Notification == LoginViewModel.NavigateToMainWindow)
                                           {
                                               CloseWaitWindow();

                                               var mainWindow = new MainWindow2();
                                               mainWindow.Show();

                                               System.Windows.Application.Current.MainWindow = mainWindow;

                                               Close();
                                           }
                                       }));
        }