コード例 #1
0
 public static PresetFolderViewModel FromPresetFolder(PresetFolder folder, PresetsService passedPresetsService)
 {
     return(new PresetFolderViewModel(passedPresetsService, folder.IsExpanded, isBuiltIn: false, id: folder.Id)
     {
         Name = folder.Name,
         ParentId = folder.ParentId
     });
 }
コード例 #2
0
        public void CreateSubFolder(PresetFolderViewModel folderViewModel)
        {
            var dialogVM = new ChooseNameViewModel(EncodingRes.ChooseNameSubfolder, new List <string>());

            dialogVM.Name = EncodingRes.DefaultPresetFolderName;
            var windowManager = Ioc.Get <IWindowManager>();

            windowManager.OpenDialog(dialogVM, windowManager.Find <EncodingWindowViewModel>());

            if (dialogVM.DialogResult)
            {
                string subfolderName = dialogVM.Name;

                PresetFolder newFolder = PresetFolderStorage.AddFolder(subfolderName, folderViewModel.Id);
                folderViewModel.AddSubfolder(PresetFolderViewModel.FromPresetFolder(newFolder, this));
            }
        }