void g__EventOnDetected(surfCLR.SURF surf) { MySimulationServiceState s = new MySimulationServiceState(); s._CX = surf.GetCX(); s._CY = surf.GetCY(); //s._CS = surf.GetCS(); //_mainPort.Post(new OnDetected(s)); }