private ArchiveViewResult(ZipFile archive, ArchiveFile file, FileSystemModel model) { IsValid = true; Archive = archive; File = file; Model = model; }
public SaveFileDialog(FileSystemModel fileSystem, FileDialogView ui, MessageBoxUI confirmUI) : base(FileDialogType.SaveFileDialog, fileSystem, ui) { BMultiselect = false; Title = "Save File"; OverwritePrompt = true; ConfirmUI = confirmUI; }
int Run(Memory memory, IList <string> arguments) { ParseArguments(memory, arguments); var fileSystem = new FileSystemModel(memory.GetItem <Settings>().CodePageNumber); memory.GetItem <Context>().PageSource = fileSystem; memory.GetItem <Context>().SuitePath = new DirectoryPath(memory.GetItem <Settings>().InputFolder); SuiteRunner.Run( CreateStoryTestFolder(memory, fileSystem), selectedFile); return(SuiteRunner.TestCounts.FailCount); }
public void Initialize() { var folderModel = new FileSystemModel(); new SuiteConfiguration(memory).LoadXml(folderModel.GetPageContent(@"storytest.config.xml")); var inputPath = memory.GetItem <Settings>().InputFolder; var outputPath = memory.GetItem <Settings>().OutputFolder; var processor = new CellProcessorBase(memory, memory.GetItem <CellOperators>()); view.ShowTests(new TestFiles( new FileFolder(inputPath), new FileFolder(outputPath), new StoryTestSuite(memory.GetItem <FileExclusions>(), s => IsExecutable(processor, s)) ).Tree); }
/// <summary> /// Constructor. /// </summary> /// <param name="type">The dialog type.</param> /// <param name="fileSystem">File system model to represent.</param> /// <param name="dialogView">The dialog UI.</param> protected FileDialog(FileDialogType type, FileSystemModel fileSystem, FileDialogView dialogView) { DialogType = type; FileSystem = fileSystem; UI = dialogView; DialogPanel = dialogView.UI; UI.Controller = this; if (DialogType == FileDialogType.OpenFileDialog) { UI.ConfirmButtonText = "Open"; } else { UI.ConfirmButtonText = "Save"; } }
/// <summary> /// 当クラスが利用するModelを指定して、当クラスのインスタンスを初期化します。 /// </summary> /// <param name="model"></param> public FileSystemViewModel(FileSystemModel model) { _model = model; Childs = ViewModelHelper.CreateReadOnlyDispatcherCollection( _model.Childs, (child) => new FileSystemViewModel(child), DispatcherHelper.UIDispatcher); Childs.CollectionChanged += (sender, e) => { if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add) { foreach (FileSystemViewModel item in e.NewItems) { item.Parent = this; } } }; }
public FileSystemModelTests() { _fileSystemModel = new FileSystemModel("ROOT", _rootId, 10, 0.1); _fileSystemModel.NodeCreated += (id, parentId, name) => { _receivedEvents.Add(Invariant($"CREATED {id}, {parentId}, {name}")); }; _fileSystemModel.NodeChanged += (id, size, start, end) => { _receivedEvents.Add(Invariant($"CHANGED {id}, {size}, {start:0.###}, {end:0.###}")); }; _fileSystemModel.NodeDeleted += id => { _receivedEvents.Add(Invariant($"DELETED {id}")); }; _fileSystemModel.NodeRenamed += (name, id, newId) => { _receivedEvents.Add(Invariant($"RENAMED {name}, {id}, {newId}")); }; _fileSystemModel.Initialize(); }
public SaveFileDialog(FileSystemModel fileSystem, FileDialogView ui) : this(fileSystem, ui, null) { }
public OpenFileDialog(FileSystemModel fileSystem, FileDialogView ui) : base(FileDialogType.OpenFileDialog, fileSystem, ui) { Title = "Open File"; }
public Shell() { progressReporter = new ConsoleReporter(); folderModel = new FileSystemModel(); }
public ArchiveViewResult(FileSystemModel model) : this(null, null, model) { }