예제 #1
0
        private void ShowErrorMessage(string errorMsg)
        {
            ErrorView ev = new ErrorView();

            ev.ErrorMessage = errorMsg;
            ev.Show();
        }
예제 #2
0
 /// <summary>
 /// Shows a window which contains detailed error information (such as stack trace).
 /// </summary>
 /// <param name="sender">Sender object. Must be an <see cref="ApsimNG.Classes.CustomButton"/></param>
 /// <param name="e">Event Arguments.</param>
 private void ShowDetailedErrorMessage(object sender, EventArgs e)
 {
     if (sender is ApsimNG.Classes.CustomButton)
     {
         ErrorView err = new ErrorView(LastError[(sender as ApsimNG.Classes.CustomButton).ID], view as ViewBase);
         err.Show();
     }
 }
        private async Task Init()
        {
            try
            {
                User = await authentication.GetCurrentSession().GetUserAsync();

                OnPropertyChanged(nameof(User));
            }
            catch (Exception e)
            {
                await ErrorView.Show(e);
            }
        }
        private async Task Refresh()
        {
            Refreshing = true;
            List <FileModel> files;

            try
            {
                files = await api.GetUserFiles();
            }
            catch (Exception e)
            {
                await ErrorView.Show(e);

                return;
            }


            Files.Clear();
            foreach (var vm in files.Select(f => new AttachmentViewModel(api, f)))
            {
                Files.Add(vm);
            }
            Refreshing = false;
        }
        public void showErrorView()
        {
            ErrorView ev = new ErrorView(errors);

            ev.Show();
        }