Beispiel #1
0
        private async Task ReloadScheme()
        {
            ProgressDialogController dialogController = null;

            try
            {
                dialogController = await _dialogCoordinator.ShowProgressAsync(this, "Scheme Loading", "Loading...");

                dialogController.SetIndeterminate();
                _scheme = await _repository.LoadScheme();

                Scheme.Reload(_scheme);
                await dialogController.CloseAsync();
            }
            catch (Exception e)
            {
                if (dialogController != null)
                {
                    await dialogController.CloseAsync();
                }

                await _dialogCoordinator.ShowMessageAsync(this, "Error", e.Message);

                Close();
            }
        }
Beispiel #2
0
        private async Task ReloadScheme()
        {
            ProgressDialogController dialogController = null;

            try
            {
                dialogController = await _dialogCoordinator.ShowProgressAsync(this, "Scheme Loading", "Loading...");

                dialogController.SetIndeterminate();

                if (LoadAll)
                {
                    _scheme = await _repository.LoadScheme();
                }
                else
                {
                    CanReloadPart = true;
                    _scheme       = new BoxScheme
                    {
                        Boards = await _repository.LoadSchemeBoards()
                    };
                }

                Scheme.Update(_scheme);
                await dialogController.CloseAsync();
            }
            catch (Exception e)
            {
                if (dialogController != null)
                {
                    await dialogController.CloseAsync();
                }

                await _dialogCoordinator.ShowMessageAsync(this, "Error", e.Message);

                Close();
            }
        }