Esempio n. 1
0
 public MainWindow()
 {
     InitializeComponent();
     fsm.TransitionCompleted += (x, y) => Dispatcher.Invoke(new Action(fsm_TransitionCompleted));
     fsm.set_am               += () => Dispatcher.Invoke(new Action(fsm_set_am));
     fsm.set_pm               += () => Dispatcher.Invoke(new Action(fsm_set_pm));
     fsm.Show                 += x => Dispatcher.Invoke(new Action <string>(fsm_Show), x);
     fsm.al_icon_off          += () => Dispatcher.Invoke(new Action(fsm_al_icon_off));
     fsm.al_icon_on           += () => Dispatcher.Invoke(new Action(fsm_al_icon_on));
     fsm.light_off            += () => Dispatcher.Invoke(new Action(fsm_light_off));
     fsm.light_on             += () => Dispatcher.Invoke(new Action(fsm_light_on));
     fsm.alarm_icon_off       += () => Dispatcher.Invoke(new Action(fsm_alarm_icon_off));
     fsm.alarm_icon_on        += () => Dispatcher.Invoke(new Action(fsm_alarm_icon_on));
     key_stroke_hour.holded   += new Action(key_stroke_hour_holded);
     key_stroke_hour.released += new Action(key_stroke_hour_released);
     key_stroke_min.holded    += new Action(key_stroke_min_holded);
     key_stroke_min.released  += new Action(key_stroke_min_released);
     key_stroke_hour.Initiate();
     key_stroke_min.Initiate();
     fsm.Initiate();
 }