Ejemplo n.º 1
0
        public override void AddCapability(ICapability capability)
        {
            base.AddCapability(capability);

            if (rtChat == null)
            {
                rtChat = (RichTextChatCapability)capability;

                // Hook the ObjectReceived event so we can receive incoming data
                rtChat.ObjectReceived += new CapabilityObjectReceivedEventHandler(OnObjectReceived);
            }
        }
Ejemplo n.º 2
0
        public override void AddCapability(ICapability capability)
        {
            base.AddCapability (capability);

            if(rtChat == null)
            {
                rtChat = (RichTextChatCapability)capability;

                // Hook the ObjectReceived event so we can receive incoming data
                rtChat.ObjectReceived += new CapabilityObjectReceivedEventHandler(OnObjectReceived);
            }
        }
Ejemplo n.º 3
0
        public override bool RemoveCapability(ICapability capability)
        {
            bool ret = base.RemoveCapability(capability);

            if (ret)
            {
                // Remove the ObjectReceived event handler.
                // This form is going away, but the Capability may be replayed in which case we'd receive this event into a disposed form!
                rtChat.ObjectReceived -= new CapabilityObjectReceivedEventHandler(OnObjectReceived);
                rtChat = null;
            }

            return(ret);
        }
Ejemplo n.º 4
0
        public override bool RemoveCapability(ICapability capability)
        {
            bool ret = base.RemoveCapability (capability);

            if(ret)
            {
                // Remove the ObjectReceived event handler.
                // This form is going away, but the Capability may be replayed in which case we'd receive this event into a disposed form!
                rtChat.ObjectReceived -= new CapabilityObjectReceivedEventHandler(OnObjectReceived);
                rtChat = null;
            }

            return ret;
        }