public CalculateForm(string[] colNames, IndexSystem indexSystem, DataTable dataTable) { InitializeComponent(); this.indexService = new IndexServiceImpl(); this.colNames = colNames; this.indexSystem = indexSystem; this.stdTable = dataTable; hashTable = FillHashTable(); FillIndexInstanceList(); CreateColumns(tlMatch); }
public List <IndexSystem> FindAllIndexSystem() { OleDbConnection conn = DBHelper.getConn(); //得到连接对象 String strCommand = "SELECT * FROM TB_INDEX_SYSTEM"; OleDbCommand myCommand = new OleDbCommand(strCommand, conn); conn.Open(); OleDbDataReader reader; reader = myCommand.ExecuteReader(); //执行command并得到相应的DataReader List <IndexSystem> list = new List <IndexSystem>(); while (reader.Read()) { IndexSystem indexSystem = new IndexSystem(); indexSystem.Systemid = int.Parse(reader["systemid"].ToString()); indexSystem.Systemname = reader["systemname"].ToString(); list.Add(indexSystem); } reader.Close(); conn.Close(); return(list); }
public GameController(Context ctx) : base(ctx) { _systems = new Entitas.Systems(); _indexsystem = new IndexSystem(Contexts.sharedInstance.game); _mapsystem = new MapSystem(Contexts.sharedInstance.game); _joinsystem = new JoinSystem(Contexts.sharedInstance.game); _myplayersystem = new MyPlayerSystem(Contexts.sharedInstance.game); _systems.Add(_indexsystem) .Add(_mapsystem) .Add(_joinsystem) .Add(_myplayersystem); // 4, protocol _syncmsg1 = new byte[4]; NetPack.Packli(_syncmsg1, 0, 1); EventListenerCmd listener2 = new EventListenerCmd(MyEventCmd.EVENT_SETUP_MAP, SetupMap); _ctx.EventDispatcher.AddCmdEventListener(listener2); //EventListenerCmd listener3 = new EventListenerCmd(MyEventCmd.EVENT_SETUP_VIEW, SetupCamera); //_ctx.EventDispatcher.AddCmdEventListener(listener3); }