void Timer_Elapsed(object sender, EventArgs e) { timer.Stop(); processingCount = 1; // only check for additional changes AFTER this point to restart the timer var code = getCode(); if (!string.IsNullOrEmpty(code)) { designPanel?.Update(code); } }
//Stopwatch sw = new Stopwatch(); void Timer_Elapsed(object sender, EventArgs e) { timer.Stop(); //sw.Start(); var code = getCode(); if (!string.IsNullOrEmpty(code)) { designPanel?.Update(code); } }
public void Update(string code) { designPanel.Update(code); }