コード例 #1
0
    public override void ParseStringData(string dataString)
    {
        string[] lines = dataString.Split('\n');
        foreach (string line in lines)
        {
            Hashtable dataEntry = new Hashtable();
            if (!LogOziExplorer.IsLogEntry(line, ref dataEntry))
            {
                continue;
            }

            this.dataArray.Add(dataEntry);

            if (dataArray.Count == 1)
            {
                this.start = (DateTime)dataEntry["GenDateTime"];
                this.end   = (DateTime)dataEntry["GenDateTime"];
            }
            this.UpdateLogStartEnd((DateTime)dataEntry["GenDateTime"]);
        }
    }
コード例 #2
0
    public static LogFormat DetectLogFormatFromString(ref string dataString)
    {
        Hashtable dummyEntry = new Hashtable();
        LogFormat format     = LogFormat.Unknown;

        string[] lines = dataString.Split('\n');

        foreach (string line in lines)
        {
            if (LogGPRMC.IsLogEntry(line, ref dummyEntry))
            {
                format = LogFormat.GPRMC;
                break;
            }

            if (LogOziExplorer.IsLogEntry(line, ref dummyEntry))
            {
                format = LogFormat.OziExplorer;
                break;
            }
        }

        return(format);
    }