public Form1() { InitializeComponent(); _DataSharing = new DataSharing(); controler = new Controller(_DataSharing); AddObject(); timer.Tick += new EventHandler(ChangeScreen); // Everytime timer ticks, timer_Tick will be called timer.Interval = 100; // Timer will tick evert second timer.Enabled = true; // Enable the timer timer.Start(); }
//Constructor public Controller(DataSharing _dataSharing) { DtSharing = _dataSharing; }