public DataModel(string path) { _counterPath = path; _counter = new QCounter(QCounter.getCounter(path)); _ql = new QueryLogger(path); _qs = _ql.LoadQueryLogXml(); }
public QCounter(QCounter qc) { if (qc != null) { _wc = qc._wc; _tc = qc._tc; } }
public static QCounter getCounter(string path) { string pn = path + "/counter.xml"; if (System.IO.File.Exists(pn)) { Console.WriteLine("A"); System.Xml.Serialization.XmlSerializer reader = new System.Xml.Serialization.XmlSerializer(typeof(QCounter)); System.IO.StreamReader file = new System.IO.StreamReader(pn); QCounter qc = (QCounter)reader.Deserialize(file); file.Close(); return(qc); } Console.WriteLine("B"); return(null); }