// Start is called before the first frame update void Start() { rows = this.transform.childCount; columns = this.transform.GetChild(0).transform.childCount; #region gridVerification for (int i = 0; i < this.transform.childCount; i++) { if (this.transform.GetChild(i).transform.childCount != columns) { throw new ArgumentException("Row number " + i.ToString() + " doesn't have incorrect amount of children. Expected amount: " + columns.ToString() + ". Existing amount: " + this.transform.GetChild(i).transform.childCount); } else { Debug.Log("Row " + i.ToString() + " verified correctly."); } } #endregion #region field lists population for (int i = 0; i < rows; i++) { GameObject row = this.transform.GetChild(i).gameObject; for (int j = 0; j < columns; j++) { GridField field = row.transform.GetChild(j).gameObject.GetComponent <GridField>(); fields.Add(field); if (!field.isWalkable) { unwalkableFields.Add(field); } } } #endregion }
// Update is called once per frame void Update() { if (startUpdate) { if (!isMoving && !character.isTargetInRange()) { isMoving = true; Debug.Log(target); MoveToField(target.GetComponent <GridField>()); } else if (isMoving && (this.transform.position.x == nextField.transform.position.x) && (this.transform.position.z == nextField.transform.position.z)) { nextField = null; if (!character.isTargetInRange()) { MoveToField(target.GetComponent <GridField>()); } else if (character.isTargetInRange()) { isMoving = false; target = null; character.target = null; nextField = null; character.state = CharacterStates.CharacterState.Idle; startUpdate = false; } } } }
IEnumerable <float> gameLogic(GridField field) { int [] checkLines; IEnumerator <float> e = genRock().GetEnumerator(); while (true) { if (!e.MoveNext()) { e = genRock().GetEnumerator(); Debug.Assert(e.MoveNext()); } while (stepFallRock()) { yield return(0.0f); } if (isTopLineGotten()) { break; } stickRock(); if (checkFullLines(out checkLines)) { foreach (int step in stepEreaseLines(checkLines)) { yield return(0.0f); } } } foreach (var icon in curRock.icons) { icon.GetComponent <SpriteRenderer>().color = Color.red; } }
/// <summary> /// Rate - set Multiply Rate from Divide Rate and vice versa /// </summary> /// <param name="ctx">context</param> /// <param name="windowNo">window no</param> /// <param name="tab">tab</param> /// <param name="field">field</param> /// <param name="value">value</param> /// <returns>null or error message</returns> public String Rate(Ctx ctx, int windowNo, GridTab tab, GridField field, Object value) { if (IsCalloutActive() || value == null) // assuming it is Conversion_Rate { return(""); } SetCalloutActive(true); Decimal rate1 = (Decimal)value; Decimal rate2 = Utility.Env.ZERO; Decimal one = new Decimal(1.0); if (System.Convert.ToDouble(rate1) != 0.0) // no divide by zero { rate2 = Decimal.Round(Decimal.Divide(one, rate1), 12, MidpointRounding.AwayFromZero); } // if (field.GetColumnName().Equals("MultiplyRate")) { tab.SetValue("DivideRate", rate2); } else { tab.SetValue("MultiplyRate", rate2); } log.Info(field.GetColumnName() + "=" + rate1 + " => " + rate2); SetCalloutActive(false); return(""); }
/// <summary> /// Constructor of the Grid Field Definition /// </summary> /// <param name="frm">The main form</param> /// <param name="field">A grid field</param> public GridFieldDefinition(MainForm frm, GridField field) : base(frm) { InitializeComponent(); this.mode = FormMode.Edit; this.field = field; this.page = field.Page; Configuration config = Configuration.GetNewInstance(); FontStyle style = FontStyle.Regular; if (config.Settings.EditorFontBold) { style |= FontStyle.Bold; } if (config.Settings.EditorFontItalics) { style |= FontStyle.Italic; } if ((field.PromptFont == null) || ((field.PromptFont.Name == "Microsoft Sans Serif") && (field.PromptFont.Size == 8.5))) { field.PromptFont = new Font(config.Settings.EditorFontName, (float)config.Settings.EditorFontSize, style); } style = FontStyle.Regular; if (config.Settings.ControlFontBold) { style |= FontStyle.Bold; } if (config.Settings.ControlFontItalics) { style |= FontStyle.Italic; } field.ControlFont = new Font(config.Settings.ControlFontName, (float)config.Settings.ControlFontSize, style); txtPrompt.Font = field.PromptFont; promptFont = field.PromptFont; controlFont = field.PromptFont; field.ControlFont = field.PromptFont; dgColumns.Font = field.PromptFont; dgColumns.HeaderFont = field.PromptFont; if (Util.IsEmpty(gridColumns)) { if (field.Columns != null) { gridColumns = new List <GridColumnBase>(field.Columns); } } int pageNameLength = page.TableName.Length; txtFieldName.MaxLength = 64 - pageNameLength; if (!this.field.Id.Equals(0)) { LoadFormData(); } }
private void UpdateRecStatus(GridField gridField, bool isDelete, string globalRecordId) { Epi.Data.Services.CollectedDataProvider collectedData = this.EnterCheckCodeEngine.Project.CollectedData; Epi.Data.Query updateQuery = collectedData.CreateQuery("update " + gridField.TableName + " set [RecStatus] = @RecStatus where [FKEY] = @FKEY"); updateQuery.Parameters.Add(new Epi.Data.QueryParameter("@RecStatus", DbType.Int32, isDelete ? 0 : 1)); updateQuery.Parameters.Add(new Epi.Data.QueryParameter("@FKEY", DbType.String, globalRecordId)); collectedData.ExecuteNonQuery(updateQuery); }
/// <summary> /// Trys to solve a path. /// </summary> /// <param name="startField">The Startfield.</param> /// <param name="targetField">The Targetfield.</param> /// <param name="path">Out of Positions.</param> /// <param name="grid">The Grid.</param> /// <returns>True on success</returns> public bool TrySolve(Grid grid, GridField startField, GridField targetField, out Stack<GridField> path) { path = null; startField.Predecessor = null; startField.G = 0; if (!startField.IsWalkable) return false; var openList = new List<GridField> {startField}; var closedList = new List<GridField>(); do { GridField currentNode = openList[0]; openList.RemoveAt(0); if (currentNode == targetField) { path = new Stack<GridField>(); GridField node = currentNode; while (node != null) { path.Push(node); node = node.Predecessor; } return true; } closedList.Add(currentNode); foreach (Neighbor t in currentNode.Neighbors) { GridField neighbor = grid.GetGridField(t.X, t.Y); if (!neighbor.IsWalkable || closedList.Contains(neighbor)) continue; float g = currentNode.G + currentNode.DistanceToNeighbor(neighbor); bool isInOpenList = openList.Contains(neighbor); if (isInOpenList && g >= neighbor.G) continue; neighbor.Predecessor = currentNode; neighbor.G = g; neighbor.F = g + grid.GetDistance(neighbor, targetField); if (!isInOpenList) openList.Add(neighbor); } openList.Sort(); } while (openList.Count > 0); return false; }
/** * Invoice Line - Charge. * - updates PriceActual from Charge * - sets PriceLimit, PriceList to zero * Calles tax * @param ctx context * @param WindowNo window no * @param mTab tab * @param mField field * @param value value * @return null or error message */ public String Invalidate(Ctx ctx, int WindowNo, GridTab mTab, GridField mField, Object value) { // Summary ? if (mTab.GetValue("IsSummary") != null) { mTab.SetValue("IsValid", false); return(""); } return(""); } // charge
//This method returns a list of neighbours of provided node, based on the grid size. public static List <string> GetSurroundingNodes(GridField field, GridScript grid) { #region properties string[] splitCoord = field.stringRepresentation.Split(','); int x = int.Parse(splitCoord[0]); int y = int.Parse(splitCoord[1]); bool isBottom = false; bool isTop = false; bool isLeft = false; bool isRight = false; //Border bools, intially false. List <string> surroundingNodes = new List <string>(); //List to be returned. #endregion //Check if either x or y coordinate is edge of the grid and mark proper bool to true. #region borderChecks if (x == 0) //If x is 0, then field must be on left edge. { isLeft = true; } else if (x == (grid.rows - 1)) //if x is (grid.rows-1), then field must be on right edge. { isRight = true; } if (y == 0) //If y is 0, then field must be on bottom edge. { isBottom = true; } else if (y == (grid.columns - 1)) //if y is (grid.columns-1), then field must be on top edge. { isTop = true; } #endregion //Depending of border cases add either two or one neighbours for each axis #region fill in the list if (!isBottom) { surroundingNodes.Add(x.ToString() + "," + (y - 1).ToString()); } if (!isLeft) { surroundingNodes.Add((x - 1).ToString() + "," + y.ToString()); } if (!isTop) { surroundingNodes.Add(x.ToString() + "," + (y + 1).ToString()); } if (!isRight) { surroundingNodes.Add((x + 1).ToString() + "," + y.ToString()); } #endregion return(surroundingNodes); }
/// <summary> /// Update the column width of the field after the width has changed on the grid column /// </summary> /// <param name="sender">Object that fired the event</param> /// <param name="e">.NET supplied event parameters</param> private void textColumn_WidthChanged(object sender, EventArgs e) { GridField field = (GridField)GetAssociatedField(((DataGridTextBoxColumn)sender).DataGridTableStyle.DataGrid); for (int i = 0; i < field.Columns.Count; i++) { if (((DataGridTextBoxColumn)sender).MappingName == field.Columns[i].Name) { field.Columns[i].Width = ((DataGridTextBoxColumn)sender).Width; field.SaveToDb(); break; } } }
// Adds the heightma value of vegetationTypeMap public void AddVegetationTypeMap() { int i = 0; int j = 0; int id = 0; for(i = 0; i < 512; i++) { for(j = 0; j < 512; j++) { gridFieldList[i, j] = new GridField(id, i, j, (int)Mathf.Round (GameController.instance.vegetationTypeMap.GetPixel(i, j).grayscale * 256)); id++; } } }
public bool isFieldWalkable(string s) { string[] splits = s.Split(','); int x = int.Parse(splits[0]); int y = int.Parse(splits[1]); GridField checkedField = GameObject.Find("Field_" + x + "_" + y).GetComponent <GridField>(); if (unwalkableFields.Contains(checkedField)) { return(false); } else { return(true); } }
/// <summary> /// Initializes a new Grid class. /// </summary> /// <param name="width">The Width.</param> /// <param name="height">The Height.</param> public Grid(int width, int height) { _fields = new GridField[width, height]; GridWidth = width; GridHeight = height; for (int x = 0; x <= width - 1; x++) { for (int y = 0; y <= height - 1; y++) { //detect neighbors var gridField = new GridField {Neighbors = GetNeighbors(x, y), Position = new Vector2(x, y)}; _fields[x, y] = gridField; } } }
/// <summary> /// Set Account Date to the date of the calling column. /// </summary> /// <param name="ctx">context</param> /// <param name="windowNo">window no</param> /// <param name="tab">tab</param> /// <param name="field">field</param> /// <param name="value">value</param> /// <returns>null or error message</returns> public String DateAcct(Ctx ctx, int windowNo, GridTab tab, GridField field, Object value) { if (IsCalloutActive()) // assuming it is resetting value { return(""); } // setCalloutActive(true); if (value == null || !(value.GetType() == typeof(DateTime))) { return(""); } tab.SetValue("DateAcct", value); // setCalloutActive(false); return(""); }
public override void OnStart(params object[] data) { base.OnStart(); _field = new GridField(); var battlecontroller = ModuleManager.getInstance.GetModule <BattleControllerModule>(); battlecontroller.Field = _field; var areastr = string.Format("Area_{0}", 0); var levelstr = string.Format("Level_{0}", 0); _field.Load(areastr, levelstr); _field.OnElimination += OnElimination; }
private void FillFields() { if (cmbGridSelector.SelectedIndex >= 0) { ClearFields(); Project selectedProject = sourceProject; string[] gridFieldInfo = cmbGridSelector.SelectedItem.ToString().Split(':'); View selectedView = selectedProject.Views[gridFieldInfo[0]]; GridField gridField = selectedView.Fields.GridFields[gridFieldInfo[1]]; foreach (GridColumnBase gc in gridField.Columns) { if (!(gc.Name.ToLower().Equals("recstatus") || gc.Name.ToLower().Equals("fkey") || gc.Name.ToLower().Equals("uniquekey") || gc.Name.ToLower().Equals("globalrecordid") )) { lbxGridColumns.Items.Add(gc.Name); } } List <string> selectedFields = new List <string>(); if (lbxGridColumns.Items.Count > 0 && cmbGridSelector.SelectedIndex > -1) { foreach (KeyValuePair <string, List <string> > kvp in fieldsToNull) { if (kvp.Key.Equals(cmbGridSelector.SelectedItem.ToString())) { foreach (string s in kvp.Value) { selectedFields.Add(s); } } } } foreach (string s in selectedFields) { lbxGridColumns.SelectedItems.Add(s); } } }
void initGame() { field = new GridField(field_row, field_column, field_size, this.transform); field.clear((int)FieldType.Empty); if (null != snake.icons) { foreach (var icon in snake.icons) { if (icon) { Destroy(icon); } } } snake.head = snake.tail = 0; int oriX = field_column / 2; int oriY = field_row / 2; int maxlen = field_column * field_row; snake.icons = new GameObject[maxlen]; snake.icons[snake.head] = Instantiate(block_prefab, field.calcPos(oriX, oriY), Quaternion.identity, this.transform); snake.icons[snake.head].GetComponent <SpriteRenderer>().color = head_color; snake.posX = new int[maxlen]; snake.posY = new int[maxlen]; snake.posX[snake.head] = oriX; snake.posY[snake.head] = oriY; snake.ori = SnakeStruct.Orientaion.Down; field[oriX, oriY] = (int)FieldType.Snake; food.x = 2; food.y = 2; if (null == food.icon) { food.icon = Instantiate(block_prefab, field.calcPos(food.x, food.y), Quaternion.identity, this.transform); food.icon.GetComponent <SpriteRenderer>().color = Color.red; } else { food.icon.transform.position = field.calcPos(food.x, food.y); } field[food.x, food.y] = (int)FieldType.Food; Random.InitState((int)(Time.time * 1000.0f)); }
void initGame() { field = new GridField(field_row, field_column, field_size, this.transform); if (null != blocks) { foreach (var b in blocks) { if (b) { Destroy(b); } } } blocks = new GameObject[field_column, field_row]; if (null != curRock && null != curRock.icons) { foreach (var o in curRock.icons) { if (o) { Destroy(o); } } } if (null != nextRock && null != nextRock.icons) { foreach (var o in nextRock.icons) { if (o) { Destroy(o); } } } nextRock = newRock(shapes[Random.Range(0, shapes.GetLength(0))]); genRock(); logic = gameLogic(field).GetEnumerator(); timeLine = 0.0f; Random.InitState((int)(Time.time * 1000)); }
private void lbxFields_SelectedIndexChanged(object sender, EventArgs e) { if (cmbGridSelector.SelectedItem != null) { string[] gridFieldInfo = cmbGridSelector.SelectedItem.ToString().Split(':'); View view = sourceProject.Views[gridFieldInfo[0]]; GridField gridField = view.Fields.GridFields[gridFieldInfo[1]]; List <string> nullList = new List <string>(); foreach (string s in lbxGridColumns.SelectedItems) { nullList.Add(s); } fieldsToNull[view.Name + ":" + gridField.Name] = nullList; } else { ClearFields(); } }
public static List <List <Vector3> > gridFieldToVector3List(GridField field) { var ret = new List <List <Vector3> >(); var data = field.GridDataNotNullable; var xc = field.getXCoords(); var yc = field.getYCoords(); for (int i = 0; i < field.GridInfo.NumberColumns - 1; i++) { for (int j = 0; j < field.GridInfo.NumberRows - 1; j++) { ret.Add(new List <Vector3>(5) { new Vector3((float)xc[i], (float)yc[j], (float)data[i, j]), new Vector3((float)xc[i + 1], (float)yc[j], (float)data[i + 1, j]), new Vector3((float)xc[i + 1], (float)yc[j + 1], (float)data[i + 1, j + 1]), new Vector3((float)xc[i], (float)yc[j + 1], (float)data[i, j + 1]), new Vector3((float)xc[i], (float)yc[j], (float)data[i, j]), }); } } return(ret); }
/// <summary> /// Creates an XmlElement representing an Epi Info 7 grid field's metadata. /// </summary> /// <param name="xmlDataPackage">The data package xml document that the XmlElement should be added to</param> /// <param name="form">The form that contains the grid field</param> /// <param name="gridField">The grid field whose metadata will be serialized</param> /// <returns>XmlElement; represents the grid's metadata in Xml format, suitable for use in data packaging</returns> protected XmlElement CreateXmlGridMetadataElement(XmlDocument xmlDataPackage, View form, GridField gridField) { #region Input Validation if (xmlDataPackage == null) { throw new ArgumentNullException("xmlDataPackage"); } if (form == null) { throw new ArgumentNullException("form"); } if (gridField == null) { throw new ArgumentNullException("gridField"); } #endregion // Input Validation if (StatusChanged != null) { StatusChanged(string.Format(PackagerStrings.ADDING_GRID_METADATA, gridField.Name, form.Name)); } XmlElement gridFields = xmlDataPackage.CreateElement("GridMetadata"); foreach (GridColumnBase column in gridField.Columns) { if (!(column.Name.Equals("UniqueRowId") || column.Name.Equals("GlobalRecordId") || column.Name.Equals("FKEY") || column.Name.Equals("RECSTATUS"))) { XmlElement gridFieldInfo = xmlDataPackage.CreateElement("GridFieldInfo"); XmlAttribute name = xmlDataPackage.CreateAttribute("Name"); XmlAttribute type = xmlDataPackage.CreateAttribute("FieldType"); name.Value = column.Name; type.Value = column.GridColumnType.ToString(); gridFieldInfo.Attributes.Append(name); gridFieldInfo.Attributes.Append(type); gridFields.AppendChild(gridFieldInfo); } } return(gridFields); }
/// <summary> /// Creates an XmlElement representing an Epi Info 7 grid field. /// </summary> /// <param name="xmlDataPackage">The data package xml document that the XmlElement should be added to</param> /// <param name="form">The form that contains the grid field</param> /// <param name="gridField">The grid field to be serialized</param> /// <returns>XmlElement; represents the Grid field in Xml format, suitable for use in data packaging</returns> protected XmlElement CreateXmlGridElement(XmlDocument xmlDataPackage, View form, GridField gridField) { #region Input Validation if (xmlDataPackage == null) { throw new ArgumentNullException("xmlDataPackage"); } if (form == null) { throw new ArgumentNullException("form"); } if (gridField == null) { throw new ArgumentNullException("gridField"); } #endregion // Input Validation XmlElement gridElement = xmlDataPackage.CreateElement("Grid"); XmlAttribute name = xmlDataPackage.CreateAttribute("Name"); XmlAttribute columns = xmlDataPackage.CreateAttribute("Columns"); // The column count is here so we can check to see if the # of columns match between the Xml document and the destination project during import XmlAttribute parent = xmlDataPackage.CreateAttribute("ParentForm"); name.Value = gridField.Name; columns.Value = gridField.Columns.Count.ToString(); parent.Value = form.Name; gridElement.Attributes.Append(name); gridElement.Attributes.Append(columns); gridElement.Attributes.Append(parent); gridElement.AppendChild(CreateXmlGridMetadataElement(xmlDataPackage, form, gridField)); gridElement.AppendChild(CreateXmlGridDataElement(xmlDataPackage, form, gridField)); return(gridElement); }
/// <summary> /// Trys to solve a path. /// </summary> /// <param name="startField">The Startfield.</param> /// <param name="targetField">The Targetfield.</param> /// <param name="path">Out of Positions.</param> /// <param name="grid">The Grid.</param> /// <returns>True on success</returns> public bool TrySolve(Grid grid, GridField startField, GridField targetField, out Stack <GridField> path) { path = null; startField.Predecessor = null; startField.G = 0; if (!startField.IsWalkable) { return(false); } var openList = new List <GridField> { startField }; var closedList = new List <GridField>(); do { GridField currentNode = openList[0]; openList.RemoveAt(0); if (currentNode == targetField) { path = new Stack <GridField>(); GridField node = currentNode; while (node != null) { path.Push(node); node = node.Predecessor; } return(true); } closedList.Add(currentNode); foreach (Neighbor t in currentNode.Neighbors) { GridField neighbor = grid.GetGridField(t.X, t.Y); if (!neighbor.IsWalkable || closedList.Contains(neighbor)) { continue; } float g = currentNode.G + currentNode.DistanceToNeighbor(neighbor); bool isInOpenList = openList.Contains(neighbor); if (isInOpenList && g >= neighbor.G) { continue; } neighbor.Predecessor = currentNode; neighbor.G = g; neighbor.F = g + grid.GetDistance(neighbor, targetField); if (!isInOpenList) { openList.Add(neighbor); } } openList.Sort(); } while (openList.Count > 0); return(false); }
public override void OnStop() { base.OnStop(); Field = null; }
/// <summary> /// Trys to solve a path. /// </summary> /// <param name="startField">The Startfield.</param> /// <param name="targetField">The Targetfield.</param> /// <param name="path">Out of Positions.</param> /// <param name="grid">The Grid.</param> /// <param name="algorithm">The Search-Algorithm.</param> /// <returns>True on success</returns> public static bool TrySolve(Grid grid, GridField startField, GridField targetField, IAlgorithm algorithm, out Stack<GridField> path) { return algorithm.TrySolve(grid, startField, targetField, out path); }
private float currentDistanceKey(GridField gField){ if (useDijkstra) return gField.accumulatedDistance; else return gField.guessedTargetDistance; }
// Update is called once per frame void Update () { if (Input.GetMouseButton (0) && (!UICamera.hoveredObject)) { Ray ray = SelectCam.ScreenPointToRay(Input.mousePosition); RaycastHit hitInfo; if(Physics.Raycast(ray,out hitInfo)){ GridField selectedField = hitInfo.collider.GetComponent<GridField>(); if(selectedField){ Clear(); CurrentFieldMarker.gameObject.SetActive(false); ResearchFieldMarker.gameObject.SetActive(false); disVis.gameObject.SetActive (false); complet = true; switch(editState){ case EditMode.Default: selectedField.setState(GridField.FieldState.Unknown,Default_Color.Evaluate(selectedField.evaValue)); if(selectedField == end){ end = null; } if( selectedField == start){ start = null; } break; case EditMode.Start: StartMarker.gameObject.SetActive(true); if(start){ start.setState(GridField.FieldState.Unknown,Default_Color.Evaluate(selectedField.evaValue)); } selectedField.setState(GridField.FieldState.Unknown,Start_Color.Evaluate(selectedField.evaValue)); start = selectedField; StartMarker.SetPos (start.transform.position); break; case EditMode.End: EndMarker.gameObject.SetActive(true); if(end){ end.setState(GridField.FieldState.Unknown,Default_Color.Evaluate(selectedField.evaValue)); } selectedField.setState(GridField.FieldState.Unknown,End_Color.Evaluate(selectedField.evaValue)); end = selectedField; EndMarker.SetPos (end.transform.position); break; case EditMode.Obstical: selectedField.setState(GridField.FieldState.Obstical,Obstical_Color.Evaluate(selectedField.evaValue)); if(selectedField == end){ end = null; EndMarker.gameObject.SetActive(false); } if( selectedField == start){ start = null; StartMarker.gameObject.SetActive(false); } break; } //Debug.Log("X: "+selectedField.X+" Y:"+selectedField.Y); } } } if(searching && Time.time > timeStamp){ //search = false; //Clear(); ASternStep(); timeStamp = Time.time+WaitTime; } }
private void Config() { GridField[] fields = new GridField[24]; fields[0] = new GridField("QueueName1", QueueName1); fields[1] = new GridField("QueueName2", QueueName2); fields[2] = new GridField("QueueName3", QueueName3); fields[3] = new GridField("QueueName4", QueueName4); fields[4] = new GridField("ChannelName1", ChannelName1); fields[5] = new GridField("ChannelName2", ChannelName2); fields[6] = new GridField("ChannelName3", ChannelName3); fields[7] = new GridField("ChannelName4", ChannelName4); fields[8] = new GridField("UseChannels", useChannels); fields[9] = new GridField("MaxUsage", maxUsage); fields[10] = new GridField("ConnectionString", cnn); fields[11] = new GridField("Interval", interval); fields[12] = new GridField("MeterScaleInterval", meterScaleInterval); fields[13] = new GridField("MeterScaleMax", meterScaleMax); fields[14] = new GridField("LedScaleCount", ledScaleCount); fields[15] = new GridField("LedScaleMax", ledScaleMax); fields[16] = new GridField("AutoScale", autoScale); fields[17] = new GridField("ItemsSource", sqlItems); fields[18] = new GridField("ItemsBySenderSource", sqlBySender); fields[19] = new GridField("ItemsSummarizeSource", sqlValues); fields[20] = new GridField("ChannelsSource", sqlChannels); fields[21] = new GridField("TickInterval", tickInterval); fields[22] = new GridField("UseDataReader", useDataReader); fields[23] = new GridField("FastFirstRows", fastFirstRows); fields[0].Description = "Queue Name #1"; fields[1].Description = "Queue Name #2"; fields[2].Description = "Queue Name #3"; fields[3].Description = "Queue Name #4"; fields[4].Description = "Channel Name #1"; fields[5].Description = "Channel Name #2"; fields[6].Description = "Channel Name #3"; fields[7].Description = "Channel Name #4"; fields[8].Description = "Use Channels"; fields[9].Description = "Max Usage value for each Queue"; fields[10].Description = "Connection String to database"; fields[11].Description = "Interval in millisecondes for Refresh"; fields[12].Description = "Meter Scale Interval "; fields[13].Description = "Meter Scale Max Value"; fields[14].Description = "Led Scale items Count"; fields[15].Description = "Led Scale Max value"; fields[16].Description = "Auto Scale properies"; fields[17].Description = "Items Source"; fields[18].Description = "Items By Sender Source"; fields[19].Description = "Items Summarize Source"; fields[20].Description = "Channels Source"; fields[21].Description = "Tick Interval Refreshing"; fields[22].Description = "Use DataReader to fetch Queue items"; fields[23].Description = "Number of First row to fetch when use data reader"; VGridDlg dlg = new VGridDlg(); dlg.VGrid.SetDataBinding(fields, "Monitor"); dlg.Width = 400; DialogResult dr = dlg.ShowDialog(); QueueName1 = fields[0].Text; QueueName2 = fields[1].Text; QueueName3 = fields[2].Text; QueueName4 = fields[3].Text; ChannelName1 = fields[4].Text; ChannelName2 = fields[5].Text; ChannelName3 = fields[6].Text; ChannelName4 = fields[7].Text; useChannels = Types.ToBool(fields[8].Text, false); maxUsage = Types.ToInt(fields[9].Value, maxUsage); cnn = fields[10].Text; interval = Types.ToInt(fields[11].Value, interval); meterScaleInterval = Types.ToInt(fields[12].Value, meterScaleInterval); meterScaleMax = Types.ToInt(fields[13].Value, meterScaleMax); ledScaleCount = Types.ToInt(fields[14].Value, ledScaleCount); ledScaleMax = Types.ToInt(fields[15].Value, ledScaleMax); autoScale = Types.ToBool(fields[16].Text, true); sqlItems = fields[17].Text; sqlBySender = fields[18].Text; sqlValues = fields[19].Text; sqlChannels = fields[20].Text; tickInterval = Types.ToInt(fields[21].Value, meterScaleMax); useDataReader = Types.ToBool(fields[22].Text, true); fastFirstRows = Types.ToInt(fields[22].Value, fastFirstRows); }
void MoveToField(GridField field) { nextField = GridNavigation.GetNextStep(currentField, target.GetComponent <GridField>(), grid); currentField = nextField; navMeshAgent.SetDestination(nextField.transform.position); }
public void Set(int x, int y, GridField field) { grid[y * Width + x] = field; }
/// <summary> /// Creates an XmlElement representing an Epi Info 7 grid's data. /// </summary> /// <param name="xmlDataPackage">The data package xml document that the XmlElement should be added to</param> /// <param name="form">The form that contains the grid field</param> /// <param name="gridField">The grid field whose data will be serialized</param> /// <returns>XmlElement; represents the grid's data in Xml format, suitable for use in data packaging</returns> protected XmlElement CreateXmlGridDataElement(XmlDocument xmlDataPackage, View form, GridField gridField) { #region Input Validation if (xmlDataPackage == null) { throw new ArgumentNullException("xmlDataPackage"); } if (form == null) { throw new ArgumentNullException("form"); } if (gridField == null) { throw new ArgumentNullException("gridField"); } #endregion // Input Validation XmlElement data = xmlDataPackage.CreateElement("GridData"); if (StatusChanged != null) { StatusChanged(string.Format(PackagerStrings.ADDING_GRID_DATA, gridField.Name, form.Name)); } using (IDataReader reader = SourceProject.CollectedData.GetDatabase().GetTableDataReader(gridField.TableName)) { while (reader.Read()) { string guid = reader["GlobalRecordId"].ToString(); string fkey = reader["FKEY"].ToString(); string urid = reader["UniqueRowId"].ToString(); string recstatus = reader["RECSTATUS"].ToString(); if (recstatus.Equals("1")) { XmlElement element = xmlDataPackage.CreateElement("Record"); XmlAttribute id = xmlDataPackage.CreateAttribute("Id"); XmlAttribute foreignKey = xmlDataPackage.CreateAttribute("FKEY"); XmlAttribute uniqueRowId = xmlDataPackage.CreateAttribute("UniqueRowId"); id.Value = guid; foreignKey.Value = fkey; uniqueRowId.Value = urid; element.Attributes.Append(id); element.Attributes.Append(foreignKey); element.Attributes.Append(uniqueRowId); foreach (GridColumnBase column in gridField.Columns) { if (GridColumnsToNull == null || !(GridColumnsToNull.ContainsKey(gridField.Name) && GridColumnsToNull[gridField.Name].Contains(column.Name))) { if (!(column.Name.Equals("UniqueRowId") || column.Name.Equals("GlobalRecordId") || column.Name.Equals("FKEY") || column.Name.Equals("RECSTATUS"))) { XmlElement gridFieldData = xmlDataPackage.CreateElement("GridColumn"); XmlAttribute name = xmlDataPackage.CreateAttribute("Name"); name.Value = column.Name; gridFieldData.Attributes.Append(name); string value = reader[column.Name].ToString(); // To save space, don't include missing values in the Xml. Note that the requirement is for // missing data in the package to be ignored during an import, so this isn't harmful - missing // data, if it were included, wouldn't overwrite anything in the destination database anyway. if (!string.IsNullOrEmpty(value)) { if (column is DateTimeColumn || column is DateColumn || column is TimeColumn) { DateTime dt = Convert.ToDateTime(value); gridFieldData.InnerText = dt.Ticks.ToString(); } else { gridFieldData.InnerText = value; } } element.AppendChild(gridFieldData); data.AppendChild(element); } } } } } } return(data); }
public void ASternStep(){ if (!start || !end) return; if (complet) { Clear(); CurrentFieldMarker.gameObject.SetActive(true); ResearchFieldMarker.gameObject.SetActive(true); if(!useDijkstra && !disVis.gameObject.activeSelf) disVis.gameObject.SetActive(true); OpenList.Add (0, new List<GridField> ()); OpenList [0].Add (start); start.State = GridField.FieldState.Open; complet = false; } int stepCount = 0; if (neigbourCount >= neigbours.Count || currentField == null) { currentField = OpenList.Values [0] [0]; OpenList.Values [0].RemoveAt (0); if (OpenList.Values [0].Count == 0) { OpenList.RemoveAt (0); } currentFieldInfo.setInfo(currentField.X,currentField.Y,currentField.State,currentField.accumulatedDistance,(useDijkstra?currentField.accumulatedDistance:currentField.guessedTargetDistance)); CurrentFieldMarker.SetPos (currentField.transform.position); } researchNeigbours (OpenList, currentField); /*Debug.Log("Step "+(stepCount++)); foreach( KeyValuePair<float, List<GridField>> kvp in OpenList ) { Debug.Log("Key = "+kvp.Key+", Value = "+kvp.Value.Count); }*/ if(currentField!=start && currentField!=end) currentField.setState(GridField.FieldState.Closed,Closed_Color.Evaluate(currentField.evaValue)); else currentField.State = GridField.FieldState.Closed; ClosedList.Add(currentField); if (end.State != GridField.FieldState.Closed && OpenList.Count == 0 && neigbourCount >= neigbours.Count) { complet = true; searching = false; } if(end.State == GridField.FieldState.Closed){ complet = true; searching = false; FindWay (); } }
/// <summary> /// Shows the GridColumnsDialog /// </summary> /// <param name="sender">Object that fired the event</param> /// <param name="e">.NET supplied event parameters</param> private void btnAdd_Click(object sender, EventArgs e) { if (!txtFieldName.TextLength.Equals(0)) { SetFieldProperties(); List <GridColumnBase> tempColumns; if (Util.IsEmpty(gridColumns)) { tempColumns = new List <GridColumnBase>(field.Columns); } else { tempColumns = new List <GridColumnBase>(gridColumns); } DataView patternsDataView = field.GetMetadata().GetPatterns().DefaultView; GridColumnsDialog gridColumnsDialog = new GridColumnsDialog ( this.mainForm, page, field, patternsDataView, mode, tempColumns ); gridColumnsDialog.ShowDialog(); if (gridColumnsDialog.DialogResult == DialogResult.OK) { tableStyle = new DataGridTableStyle(); tableStyle.MappingName = "GridColumns"; tableStyle.RowHeadersVisible = false; tableStyle.ReadOnly = true; field = gridColumnsDialog.Grid; DataTable columnTable = new DataTable("GridColumns"); tempColumns.Sort(Util.SortByPosition); foreach (GridColumnBase gridColumn in tempColumns) { if (!(gridColumn is PredefinedColumn)) { DataColumn dc = new DataColumn(gridColumn.Name); columnTable.Columns.Add(dc); DataGridTextBoxColumn textBoxColumn = new DataGridTextBoxColumn(); textBoxColumn.MappingName = gridColumn.Name; textBoxColumn.HeaderText = gridColumn.Text; textBoxColumn.Width = gridColumn.Width; textBoxColumn.WidthChanged += new EventHandler(textColumn_WidthChanged); tableStyle.GridColumnStyles.Add(textBoxColumn); } } dgColumns.DataSource = columnTable; dgColumns.TableStyles.Clear(); dgColumns.TableStyles.Add(tableStyle); gridColumns = tempColumns; btnOk.Enabled = true; } else { if (Util.IsEmpty(gridColumns)) { tempColumns = null; btnOk.Enabled = false; } } } }
void researchNeigbours (SortedList<float, List<GridField>> OpenList, GridField currentField) { if (neigbourCount >= neigbours.Count) { int x = currentField.X, y = currentField.Y; neigbours.Clear (); if (y > 0) neigbours.Add (FieldArray [x, y - 1]); if (x < X_Size - 1) neigbours.Add (FieldArray [x + 1, y]); if (y < Y_Size - 1) neigbours.Add (FieldArray [x, y + 1]); if (x > 0) neigbours.Add (FieldArray [x - 1, y]); if (withDiagonals) { if (y > 0 && x > 0) neigbours.Add (FieldArray [x - 1, y - 1]); if (y < Y_Size - 1 && x < X_Size - 1) neigbours.Add (FieldArray [x + 1, y + 1]); if (y > 0 && x < X_Size - 1) neigbours.Add (FieldArray [x + 1, y - 1]); if (y < Y_Size - 1 && x > 0) neigbours.Add (FieldArray [x - 1, y + 1]); } neigbourCount = 0; } if (microSearch) { nextNeighbour (neigbours [neigbourCount], currentField); if(reseached > 1){ reseached = 0; neigbourCount++; } } else { for(;neigbourCount < neigbours.Count;neigbourCount++) nextNeighbour (neigbours [neigbourCount], currentField); } }
/// <summary> /// Gets the distance between two GridFields. /// </summary> /// <param name="first">The first GridField.</param> /// <param name="second">The second GridField.</param> /// <returns>Int32</returns> public int GetDistance(GridField first, GridField second) { int dX = (int) first.Position.X - (int) second.Position.X; int dY = (int) first.Position.Y - (int) second.Position.Y; return (int) MathHelper.Sqrt(dX*dX + dY*dY); }
void nextNeighbour (GridField gField, GridField currentField) { if (microSearch && reseached == 0) { reseached++; } else { reseached++; if (gField.State == GridField.FieldState.Unknown) { if (gField != start && gField != end) gField.setState (GridField.FieldState.Open, Open_Color.Evaluate (gField.evaValue)); else gField.State = GridField.FieldState.Open; gField.accumulatedDistance = currentField.accumulatedDistance + Vector3.Distance (currentField.transform.position, gField.transform.position); if (!useDijkstra) disVis.VisDistance (gField.transform.position + Vector3.up, end.transform.position + Vector3.up); gField.guessedTargetDistance = gField.accumulatedDistance + (useDijkstra ? 0 : Vector3.Distance (gField.transform.position, end.transform.position)); gField.PrevLink = currentField; if (!OpenList.ContainsKey (gField.guessedTargetDistance)) { OpenList.Add (gField.guessedTargetDistance, new List<GridField> ()); } OpenList [gField.guessedTargetDistance].Add (gField); } else if (gField.State == GridField.FieldState.Open) { float accDistance = currentField.accumulatedDistance + Vector3.Distance (currentField.transform.position, gField.transform.position);// + (useDijkstra ? 0 : Vector3.Distance (gField.transform.position, end.transform.position)); if (gField.accumulatedDistance > accDistance) { OpenList [gField.guessedTargetDistance].Remove (gField); if (OpenList [gField.guessedTargetDistance].Count == 0) { OpenList.Remove (gField.guessedTargetDistance); } gField.accumulatedDistance = accDistance; if (!useDijkstra) disVis.VisDistance (gField.transform.position + Vector3.up, end.transform.position + Vector3.up); gField.guessedTargetDistance = gField.accumulatedDistance + (useDijkstra ? 0 : Vector3.Distance (gField.transform.position, end.transform.position)); gField.PrevLink = currentField; if (!OpenList.ContainsKey (gField.guessedTargetDistance)) { OpenList.Add (gField.guessedTargetDistance, new List<GridField> ()); } OpenList [gField.guessedTargetDistance].Add (gField); } } } researchFieldInfo.setInfo (gField.X, gField.Y, gField.State, gField.accumulatedDistance, (useDijkstra ? gField.accumulatedDistance : gField.guessedTargetDistance)); ResearchFieldMarker.SetPos (gField.transform.position); openListOut.Length = 0; openListOut.AppendLine ("OpenList:"); foreach(KeyValuePair<float,List<GridField>> kp in OpenList){ openListOut.Append(kp.Key); openListOut.Append(" : "); foreach(GridField gf in kp.Value){ openListOut.Append("["); openListOut.Append(gf.X); openListOut.Append(","); openListOut.Append(gf.Y); openListOut.Append("]"); openListOut.Append(" "); } openListOut.AppendLine(); } OpenListOut.text = openListOut.ToString (); }
public void setInfo(int X,int Y,GridField.FieldState state, float accCost, float totalCost){ PositionLabel.text = "[" + X + "," + Y + "]"; StateLabel.text = state.ToString (); AccCostLabel.text = accCost.ToString(); TotalCostLabel.text = totalCost.ToString(); }
// Use this for initialization void Start () { if (!FieldTile.GetComponent<GridField> ()) return; StartMarker.gameObject.SetActive(false); EndMarker.gameObject.SetActive(false); CurrentFieldMarker.gameObject.SetActive(false); ResearchFieldMarker.gameObject.SetActive(false); openListOut = new StringBuilder (); CurrentWay = new List<GridField>(); Charcters = new List<Character> (); for (int charCount = 0; charCount < CharctersAmmount; charCount++) { GameObject go = (GameObject)GameObject.Instantiate(WalkChar.gameObject); go.SetActive(false); Charcters.Add(go.GetComponent<Character>()); } Field = new List<GridField> (); FieldArray = new GridField[X_Size,Y_Size]; tileWidth = FieldTile.renderer.bounds.size.x; tileHight = FieldTile.renderer.bounds.size.z; Vector3 origin = transform.position; for (int x = 0; x<X_Size; x++) { for (int y = 0; y<Y_Size; y++) { Vector3 offsetPosition = new Vector3(origin.x + x*tileWidth,origin.y ,origin.z + y*tileHight); GameObject go = (GameObject)GameObject.Instantiate(FieldTile); go.transform.position = offsetPosition; go.transform.parent = transform; GridField selectedField = go.GetComponent<GridField>(); selectedField.evaValue = Random.value; go.renderer.material.color = Default_Color.Evaluate(selectedField.evaValue); selectedField.X = x; selectedField.Y = y; Field.Add(selectedField); FieldArray[x,y] = selectedField; } } StartMarker.gameObject.SetActive(true); start = FieldArray [Mathf.RoundToInt(Random.Range(0,X_Size)), Mathf.RoundToInt(Random.Range(0,Y_Size))]; start.setState(GridField.FieldState.Unknown,Start_Color.Evaluate(start.evaValue)); StartMarker.SetPos (start.transform.position); EndMarker.gameObject.SetActive(true); do { end = FieldArray [Mathf.RoundToInt (Random.Range (0, X_Size)), Mathf.RoundToInt (Random.Range (0, Y_Size))]; } while(end == start); end.setState(GridField.FieldState.Unknown,End_Color.Evaluate(end.evaValue)); EndMarker.SetPos (end.transform.position); disVis.gameObject.SetActive (false); }
/// <summary> /// Start Callout. /// Callout's are used for cross field validation and setting values in other fields /// when returning a non empty (error message) string, an exception is raised /// When invoked, the Tab model has the new value! /// </summary> /// <param name="ctx">context</param> /// <param name="methodName">method name</param> /// <param name="windowNo">current window number</param> /// <param name="tab">model Tab</param> /// <param name="field">modal field</param> /// <param name="newValue">new value</param> /// <param name="oldValue">old value</param> /// <returns>Error message or ""</returns> public String Start(Ctx ctx, String methodName, int windowNo, GridTab tab, GridField field, Object newValue, Object oldValue) { if (methodName == null || methodName.Length == 0) { throw new ArgumentException("No Method Name"); } // String retValue = ""; StringBuilder msg = new StringBuilder(methodName).Append(" - ") .Append(field.GetColumnName()) .Append("=").Append(newValue) .Append(" (old=").Append(oldValue) .Append(") {active=").Append(IsCalloutActive()).Append("}"); if (!IsCalloutActive()) { log.Info(msg.ToString()); } // Find Method MethodInfo method = GetMethod(methodName); if (method == null) { throw new ArgumentException("Method not found: " + methodName); } int argLength = method.GetParameters().Length; if (!(argLength == 5 || argLength == 6)) { throw new ArgumentException("Method " + methodName + " has invalid no of arguments: " + argLength); } // Call Method try { Object[] args = null; if (argLength == 6) { args = new Object[] { ctx, windowNo, tab, field, newValue, oldValue } } ; else { args = new Object[] { ctx, windowNo, tab, field, newValue } }; retValue = (String)method.Invoke(this, args); } catch (Exception e) { SetCalloutActive(false); //Throwable ex = e.getCause(); // InvocationTargetException //if (ex == null) // ex = e; ////log.log(Level.SEVERE, "start: " + methodName, ex); //ex.printStackTrace(System.err); //retValue = ex.getLocalizedMessage(); retValue = e.Message; } return(retValue); }
/// <summary> /// Returns grid field control. /// </summary> /// <param name="field">The grid field to get.</param> /// <param name="canvasSize">The size of the view canvas.</param> /// <returns>A list of the grid's controls.</returns> private List <Control> GetControls(GridField field, Size canvasSize) { DragableGrid gridView = new DragableGrid(); gridView.AutoGenerateColumns = false; gridView.Width = 160; gridView.Height = 150; SetControlProperties(gridView, field, canvasSize); gridView.ReadOnly = true; gridView.TabStop = false; gridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; gridView.ColumnHeadersDefaultCellStyle.Font = field.PromptFont; DataTable columnTable = new DataTable("GridColumns"); List <GridColumnBase> cols = new List <GridColumnBase>(field.Columns); cols.Sort(Util.SortByPosition); foreach (GridColumnBase col in cols) { if (!(col is PredefinedColumn)) { DataGridViewColumn column; if (col is CheckboxColumn) { column = new DataGridViewCheckBoxColumn(); } else { column = new DataGridViewTextBoxColumn(); } try { column.MinimumWidth = 25; column.Name = col.Name; column.HeaderText = col.Text; column.ReadOnly = col.IsReadOnly; column.DataPropertyName = col.Name; column.DefaultCellStyle.Font = field.ControlFont; if (col is PredefinedColumn) { column.ReadOnly = true; } column.Width = col.Width; } catch (InvalidOperationException ioEx) { MsgBox.ShowException(ioEx); } gridView.Columns.Add(column); } } gridView.RowHeadersVisible = false; gridView.Refresh(); DragableLabel prompt = GetPrompt(gridView, field, canvasSize); List <Control> controls = new List <Control>(); controls.Add(prompt); controls.Add(gridView); return(controls); }
public static List <GridField> GetParametersList(Ctx ctx, int AD_Process_ID, int windowNo) { List <GridField> fields = new List <GridField>(); string strSql = ""; SqlParameter[] param; if (Utility.Env.IsBaseLanguage(ctx, ""))// GlobalVariable.IsBaseLanguage()) { param = new SqlParameter[1]; param[0] = new SqlParameter("@processid", AD_Process_ID); //strSql = "SELECT p.Name, p.Description, p.Help, " // + "p.AD_Reference_ID, p.AD_Process_Para_ID, " // + "p.FieldLength, p.IsMandatory IsMandatoryUI, p.IsRange, p.ColumnName, " // + "p.DefaultValue, p.DefaultValue2, p.VFormat, p.ValueMin, p.ValueMax, " // + "p.SeqNo, p.AD_Reference_Value_ID, vr.Code AS ValidationCode " // + "FROM AD_Process_Para p" // + " LEFT OUTER JOIN AD_Val_Rule vr ON (p.AD_Val_Rule_ID=vr.AD_Val_Rule_ID) " // + "WHERE p.AD_Process_ID=@processid" // 1 // + " AND p.IsActive='Y' " // + "ORDER BY SeqNo"; strSql = @"SELECT p.Name, p.Description, p.Help, p.AD_Reference_ID, p.AD_Process_Para_ID, p.FieldLength, p.IsMandatory IsMandatoryUI, p.IsRange, p.ColumnName, p.DefaultValue, p.DefaultValue2, p.VFormat, p.ValueMin, p.ValueMax, p.SeqNo, p.AD_Reference_Value_ID, vr.Code AS ValidationCode, p.AD_InfoWindow_ID FROM AD_Process_Para p LEFT OUTER JOIN AD_Val_Rule vr ON (p.AD_Val_Rule_ID =vr.AD_Val_Rule_ID) WHERE p.AD_Process_ID=@processid AND p.IsActive ='Y' ORDER BY SeqNo"; } else { param = new SqlParameter[1]; param[0] = new SqlParameter("@processid", AD_Process_ID); //strSql = "SELECT t.Name, t.Description, t.Help, " // + "p.AD_Reference_ID, p.AD_Process_Para_ID, " // + "p.FieldLength, p.IsMandatory IsMandatoryUI, p.IsRange, p.ColumnName, " // + "p.DefaultValue, p.DefaultValue2, p.VFormat, p.ValueMin, p.ValueMax, " // + "p.SeqNo, p.AD_Reference_Value_ID, vr.Code AS ValidationCode " // + "FROM AD_Process_Para p" // + " INNER JOIN AD_Process_Para_Trl t ON (p.AD_Process_Para_ID=t.AD_Process_Para_ID)" // + " LEFT OUTER JOIN AD_Val_Rule vr ON (p.AD_Val_Rule_ID=vr.AD_Val_Rule_ID) " // + "WHERE p.AD_Process_ID=@processid" // 1 // + " AND t.AD_Language='" + Utility.Env.GetAD_Language(ctx) + "'" // + " AND p.IsActive='Y' " // + "ORDER BY SeqNo"; strSql = @"SELECT t.Name, t.Description, t.Help, p.AD_Reference_ID, p.AD_Process_Para_ID, p.FieldLength, p.IsMandatory IsMandatoryUI, p.IsRange, p.ColumnName, p.DefaultValue, p.DefaultValue2, p.VFormat, p.ValueMin, p.ValueMax, p.SeqNo, p.AD_Reference_Value_ID, vr.Code AS ValidationCode, p.ad_infowindow_id FROM AD_Process_Para p INNER JOIN AD_Process_Para_Trl t ON (p.AD_Process_Para_ID=t.AD_Process_Para_ID) LEFT OUTER JOIN AD_Val_Rule vr ON (p.AD_Val_Rule_ID =vr.AD_Val_Rule_ID) WHERE p.AD_Process_ID=@processid AND t.AD_Language ='" + Utility.Env.GetAD_Language(ctx) + @"' AND p.IsActive ='Y' ORDER BY SeqNo"; } DataSet ds = null; try { ds = DB.ExecuteDataset(strSql, param, null); if (ds != null && ds.Tables[0].Rows.Count > 0) { int count = ds.Tables[0].Rows.Count; for (int i = 0; i < count; i++) { GridFieldVO fvo = GridFieldVO.CreateParameter(ctx, windowNo, ds.Tables[0].Rows[i]); GridField fo = new GridField(fvo); fields.Add(fo); } } } catch { //Log } return(fields); }
public void SetCurrentField(GridField field) { Debug.Log("Setting current field to " + field.stringRepresentation); currentField = field; Debug.Log("Current field after setting is " + currentField.stringRepresentation); }