/// <summary> /// Gets the line tag. /// </summary> /// <param name="Line">The line.</param> /// <returns></returns> private LogBlock GetLineBlock(String LineText) { foreach (LogBlock Blk in m_Template.Tags) { Match Pattern = Regex.Match(LineText, Blk.Pattern); if (Pattern.Success) { Match Extract = Regex.Match(LineText, Blk.Extract); Match Plot = Regex.Match(LineText, Blk.Plot); LogBlock ReturnValue = new LogBlock(Blk); if (Blk.Plot != String.Empty && Plot.Success) { if (Plot.Groups["VALUE"] != null) { String aValue = Plot.Groups["VALUE"].ToString(); ReturnValue.PlotValue = Tools.GetDouble(aValue); } } ReturnValue.Time = FileTemplateLoader.GetTimeFromMatch(Extract); ReturnValue.Text = Blk.Name + " " + Extract.Value; return(ReturnValue); } } return(null); }
/// <summary> /// Loads the file template. /// </summary> /// <param name="FileName">Name of the file.</param> private void LoadFileTemplate() { m_Template = FileTemplateLoader.Load(m_FileName, "Templates.xml"); }