public Procfile(string strFilename) { m_strFilename = strFilename; m_arrProcfileEntries = new List <ProcfileEntry>(); string strContents = System.IO.File.ReadAllText(strFilename); int intCurrent = 1; foreach (string strLine in strContents.Split('\n')) { string[] arrLine = strLine.Split(':'); if (arrLine.Length == 2) { ProcfileEntry objProcfileEntry = new ProcfileEntry(this, intCurrent, arrLine[0].Trim(), arrLine[1].Trim()); objProcfileEntry.TextReceived += delegate(ProcfileEntry objEntry, string strData) { TextReceived(objEntry, strData); }; m_arrProcfileEntries.Add(objProcfileEntry); intCurrent += 1; } } }
public Procfile(string strFilename) { m_strFilename = strFilename; m_arrProcfileEntries = new List<ProcfileEntry>(); string strContents = System.IO.File.ReadAllText(strFilename); int intCurrent = 1; foreach (string strLine in strContents.Split('\n')) { string[] arrLine = strLine.Split(':'); if (arrLine.Length == 2) { ProcfileEntry objProcfileEntry = new ProcfileEntry(this, intCurrent, arrLine[0].Trim(), arrLine[1].Trim()); objProcfileEntry.TextReceived += delegate(ProcfileEntry objEntry, string strData) { TextReceived(objEntry, strData); }; m_arrProcfileEntries.Add(objProcfileEntry); intCurrent += 1; } } }
public void Info(ProcfileEntry objEntry, string strText) { TextReceived(objEntry, strText); }