//*******************************************************************************
    //This function has ability print your text file using windows command prompt.
    //Make changes into path directory to relocate your defined path.

    //You can call this function wherever you want. By using  --PrinterFuntion();--
    // This prints notepad data only.
    void PrinterFuntionNotepad()
    {
        try
        {
            Process myProcess = new Process();
            myProcess.StartInfo.WindowStyle     = ProcessWindowStyle.Minimized;
            myProcess.StartInfo.CreateNoWindow  = true;
            myProcess.StartInfo.UseShellExecute = false;
            myProcess.StartInfo.FileName        = "C:\\Windows\\system32\\cmd.exe";     //here you define your custom path
            string path = "NOTEPAD /P " + FilePathSet.SaveFolderPath();
            myProcess.StartInfo.Arguments = "/c" + path;
            myProcess.EnableRaisingEvents = true;
            myProcess.Start();
            //myProcess.WaitForExit();
            int ExitCode = myProcess.ExitCode;
            print(ExitCode);
        }
        catch (Exception e)
        {
        }
    }
    //===========================

    private void Start()
    {
        File.WriteAllText(FilePathSet.SaveFolderPath(), storeTextData);     //Storing text file into path folder. Also you can write your custom text into text document.
    }
예제 #3
0
 public FileManager(string inputFilePath, string regexFilePath, string outputFilePath)
 {
     fileSets = new FilePathSet(inputFilePath, regexFilePath, outputFilePath);
 }