Ejemplo n.º 1
0
        public override bool Execute(object parameter = null)
        {
            var newProject = new Project()
            {
                Name    = "Project Name",
                Weapons = new ObservableCollection <Weapon>
                {
                    new Weapon()
                    {
                        Name = "Pistol"
                    },
                    new Weapon()
                    {
                        Name = "Shotgun"
                    }
                }
            };

            if (FileSystemService.SaveProjectAs(newProject))
            {
                var session = ServiceLocator.Fetch <SessionService>();
                session.Project = newProject;
                return(true);
            }
            return(false);
        }
Ejemplo n.º 2
0
        public override bool Execute(object parameter = null)
        {
            var project = ServiceLocator.Fetch <SessionService>().Project;

            return(FileSystemService.SaveProjectAs(project));
        }