Ejemplo n.º 1
0
        private void OnSelection(FileSaveData fileSaveData)
        {
            // Hide dialog
            _mainViewModel.DialogContent = null;

            _mainViewModel.MenuFileSave2(fileSaveData);
        }
Ejemplo n.º 2
0
        internal void MenuFileSave2(FileSaveData fileSaveData)
        {
            IFileViewModel fileViewModel  = fileSaveData.FileViewModel;
            var            moduleFileSave = fileSaveData.ModuleFileSave;

            if (fileViewModel.Filename == null || !System.IO.Path.IsPathRooted(fileViewModel.Filename))
            {
                MenuFileSaveAs();
            }
            else
            {
                moduleFileSave.FileSave(fileViewModel);
            }
        }
Ejemplo n.º 3
0
        public FileSaveDialogViewModel(MainViewModel mainViewModel) : base("Save")
        {
            _mainViewModel = mainViewModel;

            IconSource = CreateImageSource(@"/ProtonType.Editor;component/icons/SaveDocument.png");
            IconSource.Freeze();

            // create list of file extensions
            var fileDocumentsMgr = mainViewModel.Model.FileDocumentsMgr;

            foreach (var fileSaveModule in fileDocumentsMgr.FileSaveModules)
            {
                foreach (var fileViewModel in fileSaveModule.FileViewModels)
                {
                    var fileSaveList = new FileSaveData(fileSaveModule, fileViewModel);
                    _fileSaveList.Add(fileSaveList);
                }
            }
        }