static void howell5198client_FileDataReceived(object sender, FileDataReceivedEventArgs e)
 {
     if (e.FileData.Type == 0)
     {
         if (e.FileData.Datalen != 100)
         {
             Console.WriteLine("data error.");
         }
         TimeLabel timelabel = new TimeLabel();
         timelabel.FromBytes(e.FileData.Buffer, 0, 100);
         Console.WriteLine("FileLen:{0}", timelabel.FileLen);
     }
     Console.WriteLine("FileDataReceived: ChannelNo:{0} DataLen:{1}", ((Howell5198FileStream)sender).ChannelNo, e.FileData.Datalen);
 }
Beispiel #2
0
 /// <summary>
 /// Callback in the event of a file data received status update received from a MeterBoard32
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Client_OnFileDataReceived(object sender, FileDataReceivedEventArgs e)
 {
     Invoke((MethodInvoker) delegate {
         ShowInfo(string.Format("Receiving file data - '{0}', ({1} bytes so far) ..", e.Filename, e.CurrentCount));
     });
 }