Пример #1
0
        public KHueNodeBinary(INodeContext context) : base(context)
        {
            context.ThrowIfNull("context");

            _typeService = context.GetService <ITypeService>();

            Input        = _typeService.CreateBool(PortTypes.Binary, "Input");
            LightId      = _typeService.CreateInt(PortTypes.Integer, "Light ID");
            Username     = _typeService.CreateString(PortTypes.String, "Hue user name");
            IpAddress    = _typeService.CreateString(PortTypes.String, "Hue bridge IP address");
            ErrorMessage = _typeService.CreateString(PortTypes.String, "Error message");
        }
Пример #2
0
        public SendMail(INodeContext context) : base(context)
        {
            context.ThrowIfNull("context");
            ITypeService typeService = context.GetService <ITypeService>();

            this.SendTrigger  = typeService.CreateBool(PortTypes.Bool, "Trigger");
            this.To           = typeService.CreateString(PortTypes.String, "Empfängeradresse");
            this.From         = typeService.CreateString(PortTypes.String, "Senderadresse");
            this.SmtpHost     = typeService.CreateString(PortTypes.String, "SMTP Server");
            this.SmtpPort     = typeService.CreateInt(PortTypes.Integer, "SMTP Port");
            this.ErrorMessage = typeService.CreateString(PortTypes.String, "Fehlertext");
            this.Encryption   = typeService.CreateEnum("SmtpEncryption", "Verschlüsselung", EncryptionTypes.VALUES);
            this.SmtpUser     = typeService.CreateString(PortTypes.String, "SMTP Benutzer");
            this.SmtpPassword = typeService.CreateString(PortTypes.String, "SMTP Kennwort");
        }
Пример #3
0
 /// <summary>
 /// Called when the SecondaryFunction receives a new value, in order to update which
 /// of the outputs exist, and which labels they have.
 /// </summary>
 private void updateIdleValueType(object sender = null,
                                  ValueChangedEventArgs evArgs = null)
 {
     if (mIdleValueType.HasValue)
     {
         if (PortTypes.Bool == mIdleValueType.Value)
         {
             mIdleValue = mTypeService.CreateBool(PortTypes.Bool, "IdleValue");
         }
         else if (PortTypes.Integer == mIdleValueType.Value)
         {
             mIdleValue = mTypeService.CreateInt(PortTypes.Integer, "IdleValue");
         }
         else if (PortTypes.Number == mIdleValueType.Value)
         {
             mIdleValue = mTypeService.CreateDouble(PortTypes.Number, "IdleValue");
         }
         else if (PortTypes.TimeSpan == mIdleValueType.Value)
         {
             mIdleValue = mTypeService.CreateTimeSpan(PortTypes.TimeSpan, "IdleValue");
         }
         else if (PortTypes.Time == mIdleValueType.Value)
         {
             mIdleValue = mTypeService.CreateTimeSpan(PortTypes.Time, "IdleValue");
         }
         else if (PortTypes.Date == mIdleValueType.Value)
         {
             mIdleValue = mTypeService.CreateDateTime(PortTypes.Date, "IdleValue");
         }
         else if (PortTypes.DateTime == mIdleValueType.Value)
         {
             mIdleValue = mTypeService.CreateDateTime(PortTypes.DateTime, "IdleValue");
         }
         else if (PortTypes.String == mIdleValueType.Value)
         {
             mIdleValue = mTypeService.CreateString(PortTypes.String, "IdleValue");
         }
         else
         {
             mIdleValue = null;
         }
     }
     else
     {
         mIdleValue = null;
     }
 }