/// <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 }); } } }