コード例 #1
0
        protected void OnUpdateBody(UpdateBodyEventArgs aBodies)
        {
            EventHandler <UpdateBodyEventArgs> handler = UpdateBody;

            if (handler != null)
            {
                handler(this, aBodies);
            }
        }
コード例 #2
0
        public override void callListeners(Listener listener, EventArgs aEvAr)
        {
            UpdateBodyEventArgs     uArgs     = (UpdateBodyEventArgs)aEvAr;
            UpdateBodyEventListener uListener = (UpdateBodyEventListener)listener;

            //Convert a array of bodies to a array of KDOCBodies
            PseudoBody[] KDOCBodies = new PseudoBody[uArgs.Bodies.Count()];
            for (int i = 0; i < uArgs.Bodies.Count(); i++)
            {
                KDOCBodies[i] = new PseudoBody(uArgs.Bodies[i]);
            }
            //call the common method defined in the interface:
            uListener.UpdateBody(KDOCBodies);
        }