Beispiel #1
0
 private IEnumerator<IResult> GetDosagesWithAny()
 {
     if (UILib.IsDesignMode())
         yield break;
     GetDosagesRequest getDosagesRequest = new GetDosagesRequest(true, true);
     yield return getDosagesRequest;
     if (getDosagesRequest.Error != null) {
         yield return new HandleExceptionResult(getDosagesRequest.Error);
         yield break;
     }
     Instance.DosagesWithAny = getDosagesRequest.Result.Clone();
 }
        public IEnumerable<IResult> LoadViewDosages()
        {
            if (this.HasLoadedDosages)
                yield break;

            GetDosagesRequest getDosagesRequest = new GetDosagesRequest(true, true);
            yield return getDosagesRequest;
            if (getDosagesRequest.Error != null) {
                yield return new HandleExceptionResult(getDosagesRequest.Error);
            }
            this.Dosages = getDosagesRequest.Result;
            DosagesView.DosageGrid.Enable(defaultFocusDelegate);
            DosagesView.DosageData.Disable();
            NotifyOfPropertyChange(() => AssistantDosageMode);
            this.HasLoadedDosages = true;
        }