Esempio n. 1
0
 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);
 }
Esempio n. 3
0
        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;
 }
Esempio n. 5
0
 public SourceFileTabPage(SourceFile sourceFile)
 {
     InitializeComponent();
     SourceFile = sourceFile;
 }
Esempio n. 6
0
 public void AddSourceFile(SourceFile sourceFile)
 {
     _ScriptSequenceData.SourceFiles.Add(sourceFile);
 }
Esempio n. 7
0
 private SourceFile _CreateBlankFile(string fileName)
 {
     SourceFile sourceFile = new SourceFile(Path.GetFileName(fileName));
     AddSourceFile(sourceFile);
     return sourceFile;
 }
Esempio n. 8
0
 public bool RemoveSourceFile(SourceFile sourceFile)
 {
     return _ScriptSequenceData.SourceFiles.Remove(sourceFile);
 }