Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
0
        public static void Main(string[] args)
        {
            if (args.Length==0)
            {
                MessageBox.Show("This program should be called with an argument: the working directory or the arbitrary file in this directory");
                return;
            }

            string currentDirectoryName = "";

            if (File.Exists(args[0]))
                currentDirectoryName = new FileInfo(args[0]).Directory.FullName;
            else
                currentDirectoryName = EditorModelIO.SubstituteDebugDirectories(args[0]);

            currentDirectory = new DirectoryInfo(currentDirectoryName);
            Application = new System.Windows.Application();
            var model = new MainViewModel(currentDirectory, ()=>SourcesFactory());
            var window = new MainWindow();
            window.DataContext = model;
            Application.Run(window);
        }