Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        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);
        }