public Form1()
        {
            InitializeComponent();

            // Note: These use the Skype using reference
            skype.UserStatus    += new _ISkypeEvents_UserStatusEventHandler(Skype_UserStatus);
            skype.CallStatus    += new _ISkypeEvents_CallStatusEventHandler(Skype_CallStatus);
            skype.MessageStatus += new _ISkypeEvents_MessageStatusEventHandler(Skype_MessageStatus);

            // Note: These use the Skype class reference due to ambiguous reference issues
            cSkype = new SkypeClass();
            cSkype._ISkypeEvents_Event_AttachmentStatus += new _ISkypeEvents_AttachmentStatusEventHandler(OurAttachmentStatus);
            cSkype._ISkypeEvents_Event_ConnectionStatus += new _ISkypeEvents_ConnectionStatusEventHandler(OurConnectionStatus);

            // Used to catch our form closing so we can save checkbox information
            FormClosing       += ByeBye;
            pi                 = new PreLudeInterface();
            pi.loadedMind      = loadedMind;
            pi.isContributable = false;
            pi.isSpeaking      = false;
            pi.proactiveMode   = true;
            pi.initializeEngine();
        }
Exemple #2
0
        /// <summary>
        /// Initializes a new instance of the SkypeProtocol class.
        /// </summary>
        public SkypeProtocol()
        {
            Enabled = true;

            try
            {
                API = new SKYPE4COMLib.SkypeClass();
                API.Attach(8, false);

                API._ISkypeEvents_Event_AttachmentStatus += delegate(TAttachmentStatus status)
                {
                    if (status == TAttachmentStatus.apiAttachSuccess)
                    {
                        Initialize();
                    }
                };
            }
            catch(Exception e)
            {
                Enabled = false;
                Logger.WarnFormat("Could not initialize {0}:\n{1}", GetType().Name, e.ToString());
            }
        }
        public Form1()
        {
            InitializeComponent();

            // Note: These use the Skype using reference
            skype.UserStatus += new _ISkypeEvents_UserStatusEventHandler(Skype_UserStatus);
            skype.CallStatus += new _ISkypeEvents_CallStatusEventHandler(Skype_CallStatus);
            skype.MessageStatus += new _ISkypeEvents_MessageStatusEventHandler(Skype_MessageStatus);

            // Note: These use the Skype class reference due to ambiguous reference issues
            cSkype = new SkypeClass();
            cSkype._ISkypeEvents_Event_AttachmentStatus += new _ISkypeEvents_AttachmentStatusEventHandler(OurAttachmentStatus);
            cSkype._ISkypeEvents_Event_ConnectionStatus += new _ISkypeEvents_ConnectionStatusEventHandler(OurConnectionStatus);

            // Used to catch our form closing so we can save checkbox information
            FormClosing += ByeBye;
            pi = new PreLudeInterface();
            pi.loadedMind = loadedMind;
            pi.isContributable = false;
            pi.isSpeaking = false;
            pi.proactiveMode = true;
            pi.initializeEngine();
        }