예제 #1
0
파일: IO_Writer.CS 프로젝트: HumMod/editor
  { public static void Write(String Filename, String Content)
    {
        try
        { StatusBarManager.ShowText("Writing " + Filename + " ... ");

          StreamWriter SW = new StreamWriter(Filename);
          SW.Write(Content);
          SW.Close();

          StatusBarManager.AddText("Done"); }

        catch
        { StatusBarManager.AddText("Failed"); }
    }
예제 #2
0
  { public static String Read(String Filename)
    {
        try
        { StatusBarManager.ShowText("Reading " + Filename + " ... ");

          StreamReader SR      = new StreamReader(Filename);
          String       Content = SR.ReadToEnd();
          SR.Close();

          StatusBarManager.AddText("Done");
          return(Content); }

        catch
        { StatusBarManager.AddText("Failed");
          return(null); }
    }