Example #1
0
 public void SetEnabled(bool enabled)
 {
     if (enabled)
     {
         if (this.inputStatus == eTodoOscStatus.Idle || this.inputStatus == eTodoOscStatus.Error && enabled)
         {
             try
             {
                 this.receiver = new OSCReceiver(this.localport);
                 this.Start();
                 this.inputStatus = eTodoOscStatus.Started;
                 this.ChangeInputStatus(this.inputStatus);
             }
             catch
             {
                 this.inputStatus = eTodoOscStatus.Error;
                 this.ChangeInputStatus(this.inputStatus);
             }
         }
     }
     else
     {
         if (this.inputStatus == eTodoOscStatus.Started)
         {
             this.Stop();
             this.inputStatus = eTodoOscStatus.Idle;
             this.ChangeInputStatus(this.inputStatus);
         }
     }
 }
Example #2
0
 private void ChangeInputStatus(eTodoOscStatus status)
 {
     if (this.OscInputStatusChanged != null)
     {
         this.OscInputStatusChanged(status);
     }
 }
Example #3
0
 void Osc_OscInputStatusChanged(eTodoOscStatus status)
 {
     this.Reset();
 }