/// <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); } }
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"); } }
private void SwitchStateChanged(object sender, SwitchEventArgs e) { if (this.InvokeRequired) { this.Invoke(new EventHandler<SwitchEventArgs>(SwitchStateChanged), new object[]{sender,e}); } else { State = e.SwitchEnabled; } }
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; } }
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; } }
/// <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; }
public void RobotConsole_SwitchStateChanged(object sender, SwitchEventArgs e) { //this[(Leds)(int)e.Swi].LedEnabled = e.SwitchEnabled; if (SwitchChanged != null) { SwitchChanged(sender, e); } }
/// <summary> /// Diese Methode informiert alle registrierten Eventhandler über den Zustandswechsel /// (ein-/ausgeschaltet) des Schalters. /// </summary> public void OnSwitchStateChanged(SwitchEventArgs e) => SwitchStateChanged?.Invoke(this, e);
void SwitchStateChanged(object sender, SwitchEventArgs e) { rc[(Leds)(int)e.Swi].LedEnabled = e.SwitchEnabled; }
void switchStateChanged(object sender, SwitchEventArgs e) { State = swi.SwitchEnabled; }
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(); } } }
private void SwitchStateChangedRedirect(object sender, SwitchEventArgs e) { this.SwitchStateChanged(sender, e); }