コード例 #1
0
 public ProgramHelper RaiseEvent(ModuleHelper module, string parameter, string value, string description)
 {
     MIG.InterfacePropertyChangedAction mact = new MIG.InterfacePropertyChangedAction();
     mact.Domain     = module.Instance.Domain;
     mact.Path       = parameter;
     mact.Value      = value;
     mact.SourceId   = module.Instance.Address;
     mact.SourceType = "Virtual Module";
     try
     {
         _homegenie.SignalModulePropertyChange(this, module.Instance, mact);
     }
     catch (Exception ex)
     {
         HomeGenieService.LogEvent(_programmodule.Domain, _programmodule.Address, ex.Message, "Exception.StackTrace", ex.StackTrace);
     }
     return(this);
 }
コード例 #2
0
ファイル: ProgramHelper.cs プロジェクト: matt2005/HomeGenie
 /// <summary>
 /// Raise a parameter event and set the parameter with the specified value.
 /// </summary>
 /// <returns>ProgramHelper.</returns>
 /// <param name="parameter">Parameter name.</param>
 /// <param name="value">The new parameter value to set.</param>
 /// <param name="description">Event description.</param>
 public ProgramHelper RaiseEvent(string parameter, string value, string description)
 {
     try
     {
         var actionEvent = new MIG.InterfacePropertyChangedAction();
         actionEvent.Domain     = programModule.Domain;
         actionEvent.Path       = parameter;
         actionEvent.Value      = value;
         actionEvent.SourceId   = programModule.Address;
         actionEvent.SourceType = "Automation Program";
         homegenie.SignalModulePropertyChange(this, programModule, actionEvent);
     }
     catch (Exception ex)
     {
         HomeGenieService.LogEvent(
             programModule.Domain,
             programModule.Address,
             ex.Message,
             "Exception.StackTrace",
             ex.StackTrace
             );
     }
     return(this);
 }
コード例 #3
0
ファイル: ProgramHelper.cs プロジェクト: rwxr-xr-x/HomeGenie
 public ProgramHelper RaiseEvent(ModuleHelper module, string parameter, string value, string description)
 {
     try
     {
         var actionEvent = new MIG.InterfacePropertyChangedAction();
         actionEvent.Domain = module.Instance.Domain;
         actionEvent.Path = parameter;
         actionEvent.Value = value;
         actionEvent.SourceId = module.Instance.Address;
         actionEvent.SourceType = "Virtual Module";
         homegenie.SignalModulePropertyChange(this, module.Instance, actionEvent);
     }
     catch (Exception ex)
     {
         HomeGenieService.LogEvent(programModule.Domain, programModule.Address, ex.Message, "Exception.StackTrace", ex.StackTrace);
     }
     return this;
 }