public void Init(MLot mlot, VLot vlot) { _MLot = mlot; _VLot = vlot; #region 数据检测 if (mlot.Cfg.Count < 1) { mlot.Cfg.Count = 1; } if (mlot.Cfg.ColCount < 1 || mlot.Cfg.ColCount > 9) { mlot.Cfg.ColCount = 1; } if (mlot.Cfg.RowCount < 1 || mlot.Cfg.RowCount > 9) { mlot.Cfg.RowCount = 1; } if (mlot.Cfg.Speed < 1 || mlot.Cfg.Speed > 100) { mlot.Cfg.Speed = 10; } #endregion _Items = mlot.Nodes[0].Items; _Rounds = mlot.Nodes[0].Rounds; _Result = new Item[mlot.Cfg.ColCount * mlot.Cfg.RowCount]; _Random = new Random(); _Time = new DispatcherTimer(); _Time.Interval = new TimeSpan(0, 0, 0, 0, 1000 / mlot.Cfg.Speed); _Time.Tick += new EventHandler(Time_Tick); }
private VLot GenV(string key) { _VLot = new V.V01.Vc01(); //_VLot.Init(_MLot.Cfg); return _VLot; }