void CheckAndUpdateTemplate(Dictionary <string, object> _dic) { var watch = System.Diagnostics.Stopwatch.StartNew(); var _service = new TemplateService(); int result = _service.CheckAndUpdateTemplate(_dic); fUpdate_Region = true; if (result > 0) { LoadDynamicRectangle(); string fileName = Path.GetFileNameWithoutExtension(lstLoadedImages.SelectedItem.ToString()); _dictionary.Add(fileName, result); watch.Stop(); LOGGER.InfoFormat("CheckAndUpdateTemplate --> {0} seconds", (long)watch.Elapsed.TotalSeconds); } else if (result == -2) { MessageBox.Show("Template Incorrect"); fUpdate_Region = false; } }