/// <summary> /// Assigns the platform dependent controllers at runtime /// </summary> private void AssignPlatformControllers() { AbstractAudioController.SetController(new AudioController()); AbstractGuiController.SetController(new GuiController()); AbstractDataDriver.addType(typeof(List <Alarm>)); AbstractDataDriver.addType(typeof(Alarm)); AbstractDataDriver.addType(typeof(Audio.Audio)); AbstractDataDriver.Instance = new DataDriver(); }
/// <summary> /// Builds controller objects and starts th e app /// </summary> public App() { AbstractGuiController.SetController(new GuiController()); TimePulseGenerator.Instance = new TimePulseGenerator(new SengDispatcherTimer()); AbstractAudioController.SetController(new AudioController()); this.Startup += this.Application_Startup; this.Exit += this.Application_Exit; this.UnhandledException += this.Application_UnhandledException; InitializeComponent(); TimeController tc = new TimeController(); GuiEventCaller.GetCaller().AddListener(tc); TimePulseGenerator.Instance.registerListener(tc); AlarmController ac = new AlarmController(); GuiEventCaller.GetCaller().AddListener(ac); TimePulseGenerator.Instance.registerListener(ac); }