Пример #1
0
        void downloadWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            if (fgSVM != null)
            {
                fgSVM.Close();
            }

            if (e.Error != null)
            {
                MessageBox.Show(fgSVM, "Error while downloading file", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                var name = "ReviewML" + reviewResultsCurrentProcess;

                int viewIndex = viewsManager.GetViewIndex(name);
                if (viewIndex < 0)
                {
                    //Open the new VIEW if it doesnt exist
                    viewsManager.AddViewType(name, typeof(ViewReviewMLOld), false, false, false);
                    viewsManager.CreateView(name, true, true);
                }
                else
                {
                    viewsManager.ActivateView(viewIndex);
                }
            }
        }
Пример #2
0
        public virtual void NavigateModalTo(Type vmType, Dictionary <string, object> args, System.Threading.Tasks.TaskCompletionSource <Dictionary <string, object> > tsc)
        {
            var page = ViewsManager.CreateView(vmType) as ContentPageBase;

            page.ViewModel.ModalCompletionTask    = tsc;
            page.ViewModel.InputArgs              = (args == null ? new Dictionary() : args);
            page.ViewModel.ShouldCloseModalOnBack = true;
            page.ViewModel.InvokeLoaded();
            page.OnViewModelLoaded();
            Navigation.PushModalAsync(new NavigationPage(page), true);
        }
Пример #3
0
 public void OpenView(string viewName, bool activate, object argument)
 {
     try
     {
         _context.Send(state =>
         {
             try
             {
                 _views.CreateView(viewName, activate, true, argument);
             }
             catch (Exception ex)
             {
                 OnException(ex.Message);
             }
         }, null);
     }
     catch (Exception ex)
     {
         OnException(ex.Message);
     }
 }