public TradeBase(DateTime now) { System.IO.Directory.CreateDirectory("R:\\TradeBase"); kit = new SQLiteKit(String.Format("R:\\TradeBase\\Trade{0:0000}{1:00}{2:00}-{3:0000}.sqlite", now.Year, now.Month, now.Day, now.Millisecond)); String cmd = String.Format("CREATE TABLE IF NOT EXISTS Trade (SN INTEGER PRIMARY KEY AUTOINCREMENT, type integer, no integerg, price integer, end integer, remain integer, performance integer, seq integer);"); kit.CmdNonQuery(cmd); tqueue = new Queue<Trade>(); remain = 0; buynum = 0; sellnum = 0; performance = 0; }
public GraphBase(DateTime now, int max) { System.IO.Directory.CreateDirectory("R:\\GraphBase"); kit = new SQLiteKit(String.Format("R:\\GraphBase\\Graph{0:0000}{1:00}{2:00}-{3:0000}.sqlite", now.Year, now.Month, now.Day, now.Millisecond)); memory = new Dictionary<String, Queue<TickGraph>>(); seq = new Dictionary<String, int>(); this.max = max; mTranscation = 0; mTimer = new System.Threading.Timer(new TimerCallback(Trans_Process), null, 0, 5000); mWidth = -1; mHeight = -1; }
public TickBase(String path) { mFiles = new List<SQLiteKit>(); System.IO.DirectoryInfo mDir = new System.IO.DirectoryInfo(path); System.IO.FileInfo[] info = mDir.GetFiles("Data*.sqlite "); IEnumerable<string> sortedInfo = from file in info orderby file.FullName //"ascending" is default select file.FullName; foreach (string sFile in sortedInfo) { SQLiteKit kit = new SQLiteKit(sFile); mFiles.Add(kit); } }
public GraphBase(String path) { kit = new SQLiteKit(path); memory = new Dictionary<String, Queue<TickGraph>>(); seq = new Dictionary<String, int>(); this.max = -1; mWidth = -1; mHeight = -1; }