public void addParserLauncher(string programsPath) { ReadWriteTextFile rwtf = new ReadWriteTextFile(); List <string> buf = new List <string>(); buf.Add(@"@echo off"); buf.Add("cd /d " + programsPath); buf.Add(programsPath + "\\ServerKeyLogsParser.exe"); rwtf.Write_to_file(buf, programsPath + "\\RunServerKeyLogsParser.bat", 0); }
public void execute() { if (connect()) { resultStorage = ReadWriteTextFile.Read_from_file(config.getFilePath()); } else { throw new ConnectionErrorToFile("Connection error to file"); } }
public void execute() { if (connect()) { resultStorage = ReadWriteTextFile.Read_from_file(config.getFilePath()); } else { throw new NoFilesConnection("There is no access to the file: " + config.getFilePath()); } }
private void timerRunJob_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { timerRunJob.Enabled = false; Log.WriteLog(CurrentProjectName, "Start run services."); try { APIHelper.GetApiData(); ReadWriteTextFile.ExportKotaToDB("DaftarKota.txt"); ReadWriteTextFile.ExportJadwalKotaToDB(); } catch (Exception ex) { Log.WriteLog(CurrentProjectName, $"Error {ex.Message}"); } finally { timerRunJob.Enabled = false; } Log.WriteLog(CurrentProjectName, "End run services."); }
public bool connect() { return(ReadWriteTextFile.testExistFile(config.getFilePath())); }
public void execute() { resultStorage = ReadWriteTextFile.Write_to_file(config.getData(), config.getFilePath(), config.getAction()); }