public static SourceFile Load(string filePath) { if (File.Exists(filePath)) { SourceFile sourceFile = new SourceFile(Path.GetFileName(filePath)); sourceFile.Contents = File.ReadAllText(filePath); return sourceFile; } throw new ArgumentException("File does not exist."); }
private string _GetSourceFilePath(SourceFile sourceFile) { return Path.Combine(SourceFileDirectory, sourceFile.Name); }
private void _AddFileTab(SourceFile sourceFile) { if (sourceFile == null) return; TabPage tabPage = new TabPage(sourceFile.Name); SourceFileTabPage sourceControl = new SourceFileTabPage(sourceFile); sourceControl.SelectionChanged += SourceSelectionChanged; _sources.Add(sourceControl); tabPage.Controls.Add(sourceControl); sourceControl.Dock = DockStyle.Fill; tabControl.TabPages.Add(tabPage); }
public SourceFileSurrogate(SourceFile sourceFile) { Name = sourceFile.Name; }
public SourceFileTabPage(SourceFile sourceFile) { InitializeComponent(); SourceFile = sourceFile; }
public void AddSourceFile(SourceFile sourceFile) { _ScriptSequenceData.SourceFiles.Add(sourceFile); }
private SourceFile _CreateBlankFile(string fileName) { SourceFile sourceFile = new SourceFile(Path.GetFileName(fileName)); AddSourceFile(sourceFile); return sourceFile; }
public bool RemoveSourceFile(SourceFile sourceFile) { return _ScriptSequenceData.SourceFiles.Remove(sourceFile); }