Ejemplo n.º 1
0
        private async void OnSaveClicked(object sender, RoutedEventArgs e)
        {
            IFileService fileService = Module.Services.Get <IFileService>();

            PoseFile file = new PoseFile();

            file.Read(this.ViewModel.Bones);

            await fileService.SaveAs(file);
        }
Ejemplo n.º 2
0
        private async void OnSaveClicked(object sender, RoutedEventArgs e)
        {
            SkeletonViewModel vm = this.DataContext as SkeletonViewModel;

            IViewService viewService = Services.Get <IViewService>();

            PoseFile.Groups groups = await viewService.ShowDialog <BoneGroupsSelectorDialog, PoseFile.Groups>("Save Pose...");

            if (groups == PoseFile.Groups.None)
            {
                return;
            }

            IFileService fileService = Services.Get <IFileService>();
            PoseFile     file        = new PoseFile();

            file.Read(vm.Bones, groups);

            await fileService.SaveAs(file);
        }