private static void AddPartsProducedValue(string prefix, DataTable table, DataItem dataItem)
        {
            // Add Value
            string valuePrefix = prefix + "/Value||00";
            DeviceConfiguration.EditTable(table, valuePrefix, null, "id||00;");

            // Add Triggers
            string triggerPrefix = valuePrefix + "/Triggers";

            DeviceConfiguration.EditTable(table, triggerPrefix + "/Trigger||00", null, "id||00;link||" + dataItem.Id + ";link_type||ID;value||UNAVAILABLE;modifier||not;");

            // Add Result
            DeviceConfiguration.EditTable(table, valuePrefix + "/Result", "Parts Produced", "numval||1;");
        }
示例#2
0
 /// <summary>
 /// Add a data item to the adapter.
 /// </summary>
 /// <param name="aDI">The data item.</param>
 public void AddDataItem(DataItem aDI)
 {
     mDataItems.Add(aDI);
 }
示例#3
0
 /// <summary>
 /// Remove a data item from the adapter.
 /// </summary>
 /// <param name="aItem"></param>
 public void RemoveDataItem(DataItem aItem)
 {
     int ind = mDataItems.IndexOf(aItem);
     if (ind >= 0)
         mDataItems.RemoveAt(ind);
 }
        private static void AddCaptureItems(string prefix, DataTable table, DataItem dataItem)
        {
            string capturePrefix = prefix + "/Capture";

            DeviceConfiguration.EditTable(table, capturePrefix + "/Item||00", null, "id||00;name||part_count;link||" + dataItem.Id + ";");
        }
 /// <summary>
 /// Add a data item to the adapter.
 /// </summary>
 /// <param name="aDI">The data item.</param>
 public void AddDataItem(DataItem aDI)
 {
     mDataItems.Add(aDI);
 }