// after surface's onSizeChanged called protected override void onSizeChanged(InvocationInfo info) { TouchView touchview = new TouchView(); // create #region AOP Tricks Tracking_TouchPad interceptor = new Tracking_TouchPad(touchview); ProxyFactory factory = new ProxyFactory(); TouchView touchView = factory.CreateProxy <TouchView>(interceptor); touchview["self"] = touchView; #endregion touchView.setView(_surface); // hook up with surface }
// after surface's onSizeChanged called protected override void onSizeChanged(InvocationInfo info) { dynamic simulatedpad = new SimulatedPad(200, 200); // create #region AOP Tricks Tracking_TouchPad interceptor = new Tracking_TouchPad(simulatedpad); ProxyFactory factory = new ProxyFactory(); SimulatedPad simulatedPad = factory.CreateProxy <SimulatedPad>(interceptor); ((Expando)simulatedpad)["self"] = simulatedPad; #endregion simulatedPad.setView(_surface); }