/// <summary> /// Imports the database /// </summary> public override void ExecuteWork() { if (ImportMode == Mode.File) { Frame frame = GetFrame(FileName); if (frame != null) { TestImporter importer = new TestImporter(FileName, DbPassword); importer.Import(frame, KeepManualTranslations); } } else { foreach (string fName in Directory.GetFiles(FileName, "*.mdb")) { Frame frame = GetFrame(fName); if (frame != null) { TestImporter importer = new TestImporter(fName, DbPassword); importer.Import(frame, KeepManualTranslations); } } } RefreshModel.Execute(); }
/// <summary> /// Handles the change of a dictionary on the file system /// </summary> /// <param name="dictionary"></param> private static void HandleInstanceDictionaryChangesOnFileSystem(Dictionary dictionary) { OpenFileOperation openFile = new OpenFileOperation(dictionary.FilePath, EFSSystem.INSTANCE, false, true); openFile.ExecuteUsingProgressDialog("Refreshing dictionary " + Path.GetFileNameWithoutExtension(dictionary.FilePath)); RefreshModel refreshModel = new RefreshModel(); refreshModel.ExecuteUsingProgressDialog("Refreshing model", false); }
/// <summary> /// Executes a refresh model /// </summary> public static void Execute() { RefreshModel refreshModel = new RefreshModel(); refreshModel.ExecuteUsingProgressDialog("Refreshing model", false); }
/// <summary> /// Executes a refresh model /// </summary> public static void Execute() { RefreshModel refreshModel = new RefreshModel(); refreshModel.ExecuteUsingProgressDialog(GuiUtils.MdiWindow, "Refreshing model", false); }