Exemple #1
0
        /// <summary>
        /// Initializes a new instance of the SkypeConnection class, given a 
        /// Skype protocol, the name of a skype friend and the incoming channel
        /// to be used.
        /// </summary>
        /// <param name="protocol"></param>
        /// <param name="remote"></param>
        /// <param name="incomingChannel"></param>
        public SkypeConnection(SkypeProtocol protocol, string remote, int incomingChannel)
        {
            this.IncomingChannel = incomingChannel;
            this.protocol = protocol;
            this.remote = remote;
            OutgoingChannel = -1;

            // Start a dispatch thread (TODO: close again after connection not used anymore)
            ThreadStart threadStart = new ThreadStart(RunDispatcherThread);
            Thread thread = new Thread(threadStart);
            thread.Start();
        }
Exemple #2
0
        private static void Main(string[] args)
        {
            SkypeProtocol protocol = new SkypeProtocol();

            Console.Write("Destination: ");
            string user = Console.ReadLine();
            if(user != "")
            {
                protocol.Connect(user);
            }

            System.Windows.Forms.Application.Run();
        }
Exemple #3
0
        /// <summary>
        /// Initializes a new object of the SkypeShareForm class, which will
        /// utilize the provided SkypeProtocol to access the Skype API.
        /// </summary>
        /// <param name="protocol">The SkypeProtocol this form will utilize.</param>
        public SkypeShareForm(SkypeProtocol protocol)
        {
            InitializeComponent();

            this.protocol = protocol;

            ResourceManager rm = new ResourceManager(this.GetType().FullName, System.Reflection.Assembly.GetExecutingAssembly());
            Image image = (Image)rm.GetObject("SkypeUserImage");

            foreach (string username in protocol.FriendNames)
            {
                if (protocol.IsUserOnline(username))
                {
                    dataGridView.Rows.Add(new object[]{ image, username });
                }
            }
        }