Exemple #1
0
 /// <summary>
 /// Diese Methode informiert alle registrierten Eventhandler über den Zustandswechsel 
 /// (ein-/ausgeschaltet) des Schalters.
 /// </summary>
 public void OnSwitchStateChanged(SwitchEventArgs e)
 {
     if (SwitchStateChanged != null)
     {
         SwitchStateChanged(this, e);
     }
 }
Exemple #2
0
 /// <summary>
 /// Diese Methode informiert alle registrierten Eventhandler über den Zustandswechsel
 /// (ein-/ausgeschaltet) des Schalters.
 /// </summary>
 public void OnSwitchStateChanged(SwitchEventArgs e)
 {
     if (SwitchStateChanged != null)
     {
         SwitchStateChanged(this, e);
     }
 }
Exemple #3
0
 void r_SwitchStateChanged(object sender, SwitchEventArgs e)
 {
     if (e.Swi == Switches.Switch2 && e.SwitchEnabled)
     {
          String htdocs = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase),"htdocs");
         view.SaveImage(Path.Combine(htdocs,"image.bmp"));
         view.SaveImage(@"\CompactFlash\Ftp\image.bmp");
     }
 }
Exemple #4
0
 private void SwitchStateChanged(object sender, SwitchEventArgs e)
 {
     if (this.InvokeRequired)
     {
         this.Invoke(new EventHandler<SwitchEventArgs>(SwitchStateChanged), new object[]{sender,e});
     }
     else
     {
         State = e.SwitchEnabled;
     }
 }
Exemple #5
0
        void s_SwitchStateChanged(object sender, SwitchEventArgs e)
        {
            if (e.SwitchEnabled)
            {

                drv.RunLine(2.0f, 0.5f, 0.5f);
            }
            else
            {
                drv.Power = false;
                drv.Power = true;
            }
        }
Exemple #6
0
        void s3_SwitchStateChanged(object sender, SwitchEventArgs e)
        {
            if (e.SwitchEnabled)
            {

                drv.RunArcLeft(1.0f, 360.0f, 0.5f, 0.5f);
            }
            else
            {
                drv.Power = false;
                drv.Power = true;
            }
        }
Exemple #7
0
 /// <summary>
 /// Diese Methode wir aufgerufen, wenn sich im Model der Zustand des Schalters verändert. Somit
 /// kann die View den aktuellen Zustand darstellen.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void SwitchStateChanged(object sender, SwitchEventArgs e)
 {
     State = e.SwitchEnabled;
 }
Exemple #8
0
 public void RobotConsole_SwitchStateChanged(object sender, SwitchEventArgs e)
 {
     //this[(Leds)(int)e.Swi].LedEnabled = e.SwitchEnabled;
     if (SwitchChanged != null)
     {
         SwitchChanged(sender, e);
     }
 }
Exemple #9
0
 /// <summary>
 /// Diese Methode informiert alle registrierten Eventhandler über den Zustandswechsel
 /// (ein-/ausgeschaltet) des Schalters.
 /// </summary>
 public void OnSwitchStateChanged(SwitchEventArgs e) => SwitchStateChanged?.Invoke(this, e);
Exemple #10
0
 void SwitchStateChanged(object sender, SwitchEventArgs e)
 {
     rc[(Leds)(int)e.Swi].LedEnabled = e.SwitchEnabled;
 }
Exemple #11
0
 void switchStateChanged(object sender, SwitchEventArgs e)
 {
     State = swi.SwitchEnabled;
 }
Exemple #12
0
 private void SwitchStateChangedRunAroundObstacles(object sender, SwitchEventArgs e)
 {
     if (e.SwitchEnabled)
     {
         if (ActualDriveTask != null)
         {
             this.ActualDriveTask.Stop();
         }
         RunAroundObstacles drvTask = new RunAroundObstacles();
         drvTask.DoorFoundEvent += new RunAroundObstacles.DoorFoundEventHandler(drvTask_DoorFoundEvent);
         drvTask.FinishedEvent += new RunAroundObstacles.FinishedEventHandler(drvTask_FinishedEvent);
         drvTask.StartedEvent += new RunAroundObstacles.StartedEventHandler(drvTask_StartedEvent);
         this.ActualDriveTask = drvTask;
         this.ActualDriveTask.Go();
     }
     else
     {
         if (this.ActualDriveTask != null)
         {
             this.ActualDriveTask.Stop();
         }
     }
 }
Exemple #13
0
 private void SwitchStateChangedRedirect(object sender, SwitchEventArgs e)
 {
     this.SwitchStateChanged(sender, e);
 }