Ejemplo n.º 1
0
        public MainViewModel()
        {
            Timeline = new TimelineViewModel();
            if (Application.Current.Properties.Contains("ArbitraryArgName"))
            {
                Timeline.LoadFile(((Uri)Application.Current.Properties["ArbitraryArgName"]).AbsolutePath);
            }

            MediaPlayer = new MediaPlayerViewModel(Timeline);
            ExitCommand = new DelegateCommand(o => Application.Current.Shutdown());
            ImportCommand = new DelegateCommand(o =>
            {
                IModalService service = GetService<IModalService>();
                TimelineModel model = service.OpenImporter();
                if (model != null)
                {
                    Timeline.Import(model);
                }
            });
        }