public static void DoEditorJob(string[] args) { if (args.Length == 0) { MessageBox.Show("Pass the argument to the program: the directory with movies"); return; } var model = EditorModelIO.Load(EditorModelIO.SubstituteDebugDirectories(args[0])); if (model.Montage.SoundIntervals == null || model.Montage.SoundIntervals.Count == 0) { try { new Tuto.TutoServices.PraatService().DoWork(model); } catch (Exception e) { MessageBox.Show("Praat failed. Separation by sound will not be available\n\n" + e.Message, "Tuto.Editor", MessageBoxButton.OK, MessageBoxImage.Exclamation); } } var window = new MainWindow(); window.DataContext = model; new Application().Run(window); }
static void Main(string[] args) { var path = EditorModelIO.SubstituteDebugDirectories("debug\\10"); Directory.CreateDirectory(path); File.Delete(path + "\\local.tuto"); var model = EditorModelIO.Load(path); model.Save(); }