Print() public method

public Print ( string str ) : void
str string
return void
Exemplo n.º 1
0
 public void SaveContents()
 {
     if (volume.SaveFile(loadingPath, new FileContent(contents)) == null)
     {
         // For some reason the normal trap that prints exceptions on
         // the terminal doesn't work here in this part of the code,
         // thus the two messages:
         term.Print("[File Save failed. Check space on device?]");
         throw new Exception("File Save Failed from Text Editor.");
     }
     isDirty = false;
     term.Print("[Saved changes to " + loadingPath + "]");
 }
Exemplo n.º 2
0
        public void SaveContents()
        {
            var file = new ProgramFile(fileName);

            file.StringContent = contents;

            if (!volume.SaveFile(file))
            {
                // For some reason the normal trap that prints exceptions on
                // the terminal doesn't work here in this part of the code,
                // thus the two messages:
                term.Print("[File Save failed. Check space on device?]");
                throw new Exception("File Save Failed from Text Editor.");
            }
            isDirty = false;
            term.Print("[Saved changes to " + fileName + "]");
        }