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(); }
public static void Main(string[] args) { var currentDirectoryName = EditorModelIO.SubstituteDebugDirectories(args[0]); currentDirectory = new DirectoryInfo(currentDirectoryName); var oldFormatFile = new FileInfo(Path.Combine(currentDirectory.FullName, "project.tuto")); var newFormatFile = new FileInfo(Path.Combine(currentDirectory.FullName, GlobalData.VideoListName)); if (oldFormatFile.Exists && !newFormatFile.Exists) { var globalData = EditorModelIO.ReadGlobalData(currentDirectory); var structure = Convert(globalData); structure.Save(); } Application = new System.Windows.Application(); var model = new MainViewModel(currentDirectory, () => SourcesFactory()); var window = new MainWindow(); window.DataContext = model; Application.Run(window); }