示例#1
0
 internal void Navigate(ViewType viewType)
 {
     _navigationModel.Navigate(viewType);
     if (viewType != ViewType.TaskManager)
     {
         NavigationPerformed?.Invoke(this, null);
     }
 }
示例#2
0
 internal void Navigate(ViewType viewType)
 {
     if (_navigationModel == null)
     {
         MessageBox.Show(" " + _navigationModel);
     }
     _navigationModel.Navigate(viewType);
 }
示例#3
0
        internal async void Navigate(ViewType viewType)
        {
            if (viewType == ViewType.SignIn && !string.IsNullOrEmpty(StationManager.CurrentLocalUser.Login))
            {
                LoaderManager.Instance.ShowLoader();
                var result = await Task.Run(() =>
                {
                    Thread.Sleep(1000);
                    User currentUser;
                    try
                    {
                        currentUser = StationManager.Client.GetUser(StationManager.CurrentLocalUser.Login);
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show($"Sign In failed for user {StationManager.CurrentLocalUser.Login}. Reason:{Environment.NewLine}{ex.Message}");
                        return(false);
                    }
                    if (currentUser == null)
                    {
                        MessageBox.Show(
                            $"Sign In failed for user {StationManager.CurrentLocalUser.Login}. Reason:{Environment.NewLine}User does not exist.");
                        return(false);
                    }
                    if (currentUser.Password != StationManager.CurrentLocalUser.Password)
                    {
                        MessageBox.Show($"Sign In failed for user {StationManager.CurrentLocalUser.Login}. Reason:{Environment.NewLine}Wrong Password.");
                        return(false);
                    }
                    StationManager.CurrentUser = currentUser;
                    MessageBox.Show($"Sign In successful for user {StationManager.CurrentLocalUser.Login}.");
                    return(true);
                });

                LoaderManager.Instance.HideLoader();
                if (result)
                {
                    _navigationModel.Navigate(ViewType.Main);
                }
            }
            else
            {
                _navigationModel.Navigate(viewType);
            }
        }
示例#4
0
 internal void Navigate(ViewType viewType, ProcessModel processModel)
 {
     if (processModel != null || viewType != ViewType.ProcessInfo)
     {
         _navigationModel.Navigate(viewType, processModel);
     }
     else
     {
         MessageBox.Show("Please, choose a process");
     }
 }
示例#5
0
 internal void Navigate(ViewType viewType)
 {
     _navigationModel.Navigate(viewType);
 }
示例#6
0
 internal object Navigate(ViewType viewType)
 {
     return(_navigationModel.Navigate(viewType));
 }
示例#7
0
 internal void Navigate(ViewType viewType, ProcessModel pm)
 {
     _navigationModel.Navigate(viewType, pm);
     return;
 }
示例#8
0
 internal void Navigate(ViewType viewType)
 {
     _navigationModel.Navigate(viewType);
     NavigationPerformed?.Invoke(this, null);
 }
示例#9
0
 internal void Navigate(ViewType viewType, ProcessClass selectedProcess)
 {
     _navigationModel.Navigate(viewType, selectedProcess);
 }
示例#10
0
 /// <summary>
 /// Navigate to a specific view.
 /// </summary>
 /// <param name="view">A view to navigate to.</param>
 internal void Navigate(INavigatable view)
 {
     _navigationModel.Navigate(view);
 }
示例#11
0
 internal void Navigate(ViewType viewType, MyProcess process = null)
 {
     _navigationModel.Navigate(viewType, process);
 }