public ApplicationManager() { _data = new DataStore <int>(); background = new ProgramBackground(); background.startBackgroud(); numberViewer = new NumberViewer(_data); linkForm(numberViewer); linkBackgroundToForm(); }
//This is a thread safe data structure //private DataStore<int> _data; public ApplicationManager() { //_data = new DataStore<int>(); background = new ProgramBackground(); backroundThread = new Thread(() => background.startBackgroud(1)); backroundThread.Start(); //Code to set up all the forms numberViewer = new NumberViewer(); sailing = new SailingInterface(background.serial.SendData); linkForm(numberViewer, sailing); //First update to get the right data updateForms(); //Calls the update tick setUpLinker(); }