internal ProcessorController(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
{
processorCallback = new ProcessorEventHandler(Process);
- processorPostCallback = new ProcessorEventHandler(PostProcess);
Interop.ProcessorController.SetCallback(SwigCPtr, processorCallback);
- Interop.ProcessorController.SetPostCallback(SwigCPtr, processorPostCallback);
}
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void ProcessorEventHandler();
private ProcessorEventHandler processorCallback = null;
- private ProcessorEventHandler processorPostCallback = null;
public event EventHandler ProcessorOnceEvent;
public event EventHandler ProcessorEvent;
ProcessorOnceEvent = null;
ProcessorEvent?.Invoke(this, null);
LayoutProcessorEvent?.Invoke(this, null);
- }
- public void PostProcess()
- {
+ // To avoid ImageView's properties mismatched problem,
+ // We need to invoke events now which attached during LayoutProcessor.
ProcessorOnceEvent?.Invoke(this, null);
ProcessorOnceEvent = null;
}
protected override void Dispose(DisposeTypes type)
{
Interop.ProcessorController.RemoveCallback(SwigCPtr, processorCallback);
- Interop.ProcessorController.RemovePostCallback(SwigCPtr, processorPostCallback);
ProcessorOnceEvent = null;
ProcessorEvent = null;
LayoutProcessorEvent = null;