예제 #1
0
        public override string GetItemStatusDetails(Item item, String language)
        {
            SensorItem sensor = item as SensorItem;

            if (sensor != null)
            {
                return(SensorDetails(sensor.GetParent()));
            }
            return(SensorDetails(item.GetParent()));
        }
예제 #2
0
 /// <summary>
 /// Create a new Item
 /// </summary>
 /// <param name="parentItem">The parent for the new Item</param>
 /// <param name="suggestedFQID">A suggested FQID for the new Item</param>
 public override Item CreateItem(Item parentItem, FQID suggestedFQID)
 {
     CurrentItem = new SensorItem(suggestedFQID, "Enter a name", parentItem);
     if (_userControl != null)
     {
         _userControl.FillContent(CurrentItem);
     }
     Configuration.Instance.SaveItemConfiguration(SensorMonitorDefinition.SensorMonitorPluginId, CurrentItem);
     SecurityAccess.RegisterItem(CurrentItem);
     return(CurrentItem);
 }