Example #1
0
 /// <summary>
 /// Export PI Data. Gets items from the AFViewControl of PIPoints.
 /// </summary>
 private void exportPIData()
 {
     if (avcPIPoints.ListHasSelectedItems)
     {
         object piPointList = avcPIPoints.AFSelection;
         try
         {
             List <PIPoint> list = (List <PIPoint>)piPointList;
             foreach (PIPoint point in list)
             {
                 string strItem = point.ToString();
                 string server  = afServerPicker.Text;
                 passPIDataRequest(server, strItem);
             }
         }
         catch
         {
             PIPoint point   = (PIPoint)piPointList;
             string  strItem = point.ToString();
             string  server  = afServerPicker.Text;
             passPIDataRequest(server, strItem);
         }
     }
 }