public void ChangeExcelPath(string newPath) { if (_excelDirectoryListener != null) { _excelDirectoryListener.Stop(); } // save Config.ExcelPath = newPath; JsonHelp.SaveFile(GlobalConfigPath, _globalConfig); _excelDirectoryListener = FileListener.FetchFileListener(Config.ExcelPath, OnExcelPathChange); ReloadExcelPath(); }