/// <summary> /// Invokes the event associated with the creation of a new directory, image, movie, etc. /// </summary> /// <param name="e"></param> private void invokeNewItemCreatedEvent(NewItemCreatedEventArgs e) { if (OnNewItemCreated != null) { OnNewItemCreated(this, e); } }
/// <summary> /// Invokes the event associated with the creation of a new directory, image, movie, etc. /// </summary> /// <param name="e"></param> private void invokeNewItemCreatedEvent(NewItemCreatedEventArgs e) { if (OnNewItemCreated != null) { OnNewItemCreated(this, e); if (picNumber % 2 == 1) { int recv; byte[] data = new byte[1024]; IPEndPoint ip = new IPEndPoint(IPAddress.Any, 60002); Socket newsock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); newsock.Bind(ip); IPEndPoint sender = new IPEndPoint(IPAddress.Any, 0); EndPoint Remote = (EndPoint)(sender); recv = newsock.ReceiveFrom(data, ref Remote); System.Console.WriteLine("Data Transmission Time = " + recv + " " + data + ""); takePhotograph(0); } picNumber++; } }