private void OnEnable() { if (!init) { return; } DBMap mapWithPois = NetworkDatabase.NDB.GetMapPOI(myMapId); if (mapWithPois != null) { allPois = new List <GameObject>(mapWithPois.dBMapPOIs.Count); foreach (DBMapPOI pOI in mapWithPois.dBMapPOIs) { float xPos = (pOI.X / 1000f), yPos = (pOI.Y / 1000f); if (width > height) { xPos /= width / height; } else { yPos /= height / width; } GameObject poiGO = Instantiate(poiPrefab, theMap) as GameObject; RectTransform poiRt = poiGO.GetComponent <RectTransform>(); poiRt.anchoredPosition = new Vector2(theMap.rect.width * xPos, theMap.rect.height * yPos); PoiPrefabReferences refs = poiGO.GetComponent <PoiPrefabReferences>(); refs.nameText.text = pOI.MapPoiName; refs.descText.text = pOI.MapPoiDescription; allPois.Add(poiGO); } } }
private void AddFilterToGrid(object sender, EventArgs e) { DBMap column = (DBMap)cmbColumns.SelectedItem; SqlOperators operation = (SqlOperators)Enum.Parse(typeof(SqlOperators), cmbChoices.SelectedItem.ToString()); string value = txtSearch1.Text; if (dgvFilters.Rows.Count >= 1) { dgvFilters.Rows.Add(column, operation.ToString(), value, BooleanOps.AND); } else { dgvFilters.Rows.Add(column, operation.ToString(), value); } }
public void InsertData(string iTableName, Scripting.Dictionary iParameters) { DBMap dbmap = new DBMap(); dbmap.initMap("dbmap.txt"); Scripting.Dictionary dic2 = new Scripting.Dictionary(); dic2 = replaceKey(dbmap.dbHasTable, iParameters); object[] lKeys = (object[])dic2.Keys(); List<string> list_Columns = new List<string>(); string tmp; for (int i = 0; i < dic2.Count; i++) { tmp = ((string)lKeys[i]).Split('@')[1]; list_Columns.Add(tmp); tmp = null; } Insert(iTableName, list_Columns, dic2); }