示例#1
0
 private IEnumerator<IResult> GetMethodsWithAny()
 {
     if (UILib.IsDesignMode())
         yield break;
     GetMethodsRequest getMethodsRequest = new GetMethodsRequest(true, false);
     yield return getMethodsRequest;
     if (getMethodsRequest.Error != null) {
         yield return new HandleExceptionResult(getMethodsRequest.Error);
     }
     Instance.methodsWithAny = getMethodsRequest.Result.Clone();
     NotifyOfPropertyChange(() => MethodsWithAny);
 }
        public IEnumerable<IResult> LoadViewMethods()
        {
            if (this.HasLoadedMethods)
                yield break;

            GetMethodsRequest getMethodsRequest = new GetMethodsRequest(false,true);
            yield return getMethodsRequest;
            if (getMethodsRequest.Error != null) {
                yield return new HandleExceptionResult(getMethodsRequest.Error);
            }
            this.Methods = getMethodsRequest.Result;
            MethodsView.MethodGrid.Enable(defaultFocusDelegate);
            MethodsView.MethodData.Disable();
            NotifyOfPropertyChange(() => AssistantMethodMode);
            this.HasLoadedMethods = true;
        }