- Main Page
- Packages
- Classes
- Files

- File List
- File Members

# C:/Documents and Settings/student/My Documents/Visual Studio 2008/projects/UtmConvert/UtmConvert/Printer.cs

Go to the documentation of this file.

    00001 ﻿using System;
    00002 using System.Collections.Generic;
    00003 using System.Linq;
    00004 using System.Text;
    00005 using System.IO;
    00006 using System.Windows.Forms;
    00007
    00008 namespace UtmConvert {
    00009     class Printer {
    00010
    00011         public string writeLogFile(string logConsole, string fileName) {
    00012             string date = DateTime.Now.ToString().Replace("/", "-");
    00013             date = date.Replace(" ", "_");
    00014             date = date.Replace(":", "-");
    00015             fileName = fileName.Substring(0, fileName.LastIndexOf("."))
    00016                 + "_" + date + ".log";
    00017             StreamWriter sWrite = new StreamWriter(fileName);
    00018             sWrite.Write(logConsole);
    00019             sWrite.Close();
    00020             return fileName;
    00021         }
    00022     }
    00023
    00024
    00025 }