private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (!viewh.clearWorkspace()) { e.Cancel = true; } }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (MainHandler.ENABLE_PYTHON) { MainHandler.killExplanationBackend(); } if (!viewh.clearWorkspace()) { e.Cancel = true; } try { var dir = new DirectoryInfo(Path.GetDirectoryName(Properties.Settings.Default.CMLTempTrainerPath)); foreach (var file in dir.EnumerateFiles(Path.GetFileName(Properties.Settings.Default.CMLTempTrainerPath) + "latestcmlmodel*")) { file.Delete(); } foreach (var file in dir.EnumerateFiles(Path.GetFileName(Properties.Settings.Default.CMLTempTrainerPath) + Properties.Settings.Default.CMLTempTrainerName + "*")) { file.Delete(); } } catch { } }