Пример #1
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="opaque"></param>
 /// <param name="error"></param>
 private void stopRHandler(IntPtr opaque, ref CDOError error)
 {
     stoppedEvent.Set();
 }
Пример #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="opaque"></param>
 /// <param name="error"></param>
 /// <param name="i"></param>
 private void renderResponder(IntPtr opaque, ref CDOError error, int i)
 {
     try
     {
         Console.Error.WriteLine("Got rendering result");
         int callId = (int)opaque;
         PendingCall call = _pendingCalls[callId];
         _pendingCalls.Remove(callId);
         if (error.err_code == 0)
         {
             call.manualRenderer.rendererId = i;
             _activeRenderers[i] = new WeakReference(call.manualRenderer);
             if (call.manual)
             {
                 call.manualRendererResponder.resultHandler(call.manualRenderer);
             }
             else
             {
                 call.rendererResponder.resultHandler(
                     new RenderingWidget(call.manualRenderer));
             }
         }
         else
         {
             if (call.manual)
                 call.manualRendererResponder.errHandler(error.err_code,
                 StringHelper.fromNative(error.err_message));
             else
                 call.rendererResponder.errHandler(error.err_code,
                 StringHelper.fromNative(error.err_message));
         }
     }
     catch (Exception) { }
 }
 public static extern bool cdo_no_error(ref CDOError error);