public ActionResult GridData(string entityName) { GridRequest request = new GridRequest(Request); var query = (from a in FlowContract.FlowArchives where a.CreatorUserId==Operator.UserId join i in FlowContract.FlowItems on a.FlowItemId equals i.Id join r in FlowContract.FlowRelateForms on i.FlowDesignId equals r.FlowDesignId join f in FlowContract.FlowForms on r.FlowFormId equals f.Id join d in CommonContract.Dictionarys on f.TypeVal equals d.Value select new FlowFormDto { Id = a.Id, FormName = i.EntityName, TypeVal = f.TypeVal, TypeName = d.Name, CreatorUserName = a.CreatorUserName, CreatTime = a.CreatedTime }) .WhereIf(c => c.FormName.Contains(entityName), !entityName.IsNullOrEmpty()); var total = query.Count(); if (request.PageCondition.SortConditions.Length > 0) { foreach (var item in request.PageCondition.SortConditions) { query = query.OrderBy(item.SortField, item.ListSortDirection); } } else query = query.OrderBy("CreatTime", ListSortDirection.Descending); var list = query.Skip((request.PageCondition.PageIndex - 1) * request.PageCondition.PageSize).Take(request.PageCondition.PageSize).ToList(); var data = new GridData<FlowFormDto>(list, total); return Json(data, JsonRequestBehavior.AllowGet); }
public static GridData GetGridDataWithPagingHistorial( string colName, string sortOrder, int numPage, int numRows, string searchField, string searchString, string searchOper, bool isSearch, int Paciented) { GridData gridData = new GridData(); gridData = _getListListConPaginacionHistorial(numPage, numRows, numPage, isSearch, searchField, searchString, searchOper); return gridData; }
public Map DataToMap(JsonData Data) { mapname = Data ["Name"].ToString (); PerfectMove = int.Parse (Data ["Step"].ToString ()); width= int.Parse (Data ["Width"].ToString ()); height= int.Parse (Data ["Height"].ToString ()); for(int i=0;i<Data["Grid"].Count;i++) { JsonData jd=Data["Grid"][i]; GridPos.Add (new Vector2(float.Parse (jd["x"].ToString ()),float.Parse (jd["y"].ToString ()))); GridData d=new GridData(int.Parse(jd["data"][0].ToString ()),int.Parse(jd["data"][1].ToString ()),int.Parse(jd["data"][2].ToString ())); GData.Add (d); } for(int i=0;i<Data["Block"].Count;i++) { JsonData jd=Data["Block"][i]; if(jd==null) break; AllBlock.Add (new Vector2(float.Parse (jd["x"].ToString ()),float.Parse (jd["y"].ToString ()))); } GPD = new Dictionary<Vector2, GridData> (); for (int i=0; i<GridPos.Count; i++) { GPD.Add (GridPos[i],GData[i]); } return this; }
public static GridData GetGridDataWithPagingBandejaNotificaciones( string colName, string sortOrder, int numPage, int numRows, string searchField, string searchString, string searchOper, bool isSearch) { GridData gridData = new GridData(); gridData = _getListListConPaginacionServicios(numPage, numRows, numPage, isSearch, searchField, searchString, searchOper); return gridData; }
public ActionResult GridData() { GridRequest request = new GridRequest(Request); if (request.PageCondition.SortConditions.Length == 0) { request.PageCondition.SortConditions = new[] { new SortCondition("Area"), new SortCondition("Controller"), new SortCondition("Name") }; } Expression<Func<Function, bool>> predicate = FilterHelper.GetExpression<Function>(request.FilterGroup); var page = SecurityContract.Functions.ToPage(predicate, request.PageCondition, m => new { m.Id, m.Name, m.Url, m.FunctionType, m.OperateLogEnabled, m.DataLogEnabled, m.CacheExpirationSeconds, m.IsCacheSliding, m.Area, m.Controller, m.Action, m.IsController, m.IsAjax, m.IsChild, m.IsLocked, m.IsTypeChanged, m.IsCustom }); GridData<object> gridData = new GridData<object>() { Total = page.Total }; gridData.Rows = page.Data.Select(m => new { m.Id, m.Name, m.Url, m.FunctionType, m.OperateLogEnabled, m.DataLogEnabled, m.CacheExpirationSeconds, m.IsCacheSliding, m.Area, m.Controller, m.Action, ModuleName = m.Area + "-" + m.Controller, m.IsController, m.IsAjax, m.IsChild, m.IsLocked, m.IsTypeChanged, m.IsCustom }).ToArray(); return Json(gridData, JsonRequestBehavior.AllowGet); }
public static GridData GetGridDataWithPagingDocumentosAdjuntos( string colName, string sortOrder, int numPage, int numRows, string searchField, string searchString, string searchOper, bool isSearch, decimal idNotificacion) { GridData gridData = new GridData(); gridData = _getLisAdjuntosPaginacion(numPage, numRows, numPage, isSearch, searchField, searchString, searchOper, idNotificacion); return gridData; }
//Customer Visit Involved People public string CustomerVisitInvolvedPeople() { string VisitID = Request["VisitID"]; DataTable dt = CustomerVisitManager.GetVisitInvolvedPeopleData(VisitID); GridData gd = new GridData(); gd.Page = "0"; gd.DataTable = dt; return gd.ToJson(); }
public byte CalculateMagnitudeDistance(GridData grid0, GridData grid1, bool isTwoCamp) { if (isTwoCamp) { return (byte)(Mathf.Pow(grid0.XGrid - grid1.XGrid, 2) + Mathf.Pow(grid0.ZGrid + grid1.ZGrid + 1, 2)); } else { return (byte)(Mathf.Pow(grid0.XGrid - grid1.XGrid, 2) + Mathf.Pow(grid0.ZGrid - grid1.ZGrid, 2)); } }
public void registerObject(GameObject obj, float x, float y, float width, float height, int cost) { GridData d = new GridData(); d.cost = cost; d.xOffset = obj.transform.position.x - x; d.yOffset = obj.transform.position.y - y; getGridCoords(x - width/2, y - height/2, out d.fromX, out d.fromY); getGridCoords(x + width/2, y + height/2, out d.toX, out d.toY); objectToGridData[obj.GetHashCode()] = d; this.updateGrid(d.fromX, d.fromY, d.toX, d.toY, cost); //Debug.Log(string.Format("Registered object: {0} at ({1},{2}) ({3}, {4})", obj.GetHashCode(), d.fromX, d.fromY, d.toX, d.toY)); }
public string GetFiles() { string FileID = Request["FileID"]; DataTable dt = null; if (!String.IsNullOrWhiteSpace(FileID)) { dt = FileHelper.GetFilesData(FileID, null); } GridData gd = new GridData(); gd.Page = "0"; gd.DataTable = dt; return gd.ToJson(new TableFormatString("CreateTime", "{0:yyyy-MM-dd hh:mm}")); }
public void SaveMapToFile (string pmFileName) { BinaryFormatter lvFormater = new BinaryFormatter (); FileStream lvFile = File.Open (Application.persistentDataPath + "/" + pmFileName + ".dat", FileMode.OpenOrCreate); GridData lvData = new GridData (); lvData.x = GridDrawer.instance.gridWidth; lvData.z = GridDrawer.instance.gridHeight; lvData.graphicsStyle = FloorCreator.instance.GraphicsStyle; lvData.obstacles = CollectObstacleData (); lvData.players = CollectPlayersData (); lvData.enemies = CollectEnemiesData (); lvFormater.Serialize (lvFile, lvData); lvFile.Close (); }
public void Should_map_the_constructor_parameters_to_the_right_properties() { var gridColumns = new List<IGridColumn> { new GridColumn(GridColumnType.Sortable, "Header", "Field", AlignAttribute.Left, false, true, "", ActionName, _rows) }; var filters = new List<DropDownListData>(); var pagedGridData = new GridData(null, ControllerName, ".mvc", ActionName, gridColumns, gridColumns.Count, filters, _rows.Count); pagedGridData.PagedListParameters.ShouldBeEqualTo(null); pagedGridData.ControllerName.ShouldBeEqualTo(ControllerName); pagedGridData.ActionName.ShouldBeEqualTo(ActionName); Assert.AreSame(gridColumns, pagedGridData.GridColumns); pagedGridData.Total.ShouldBeEqualTo(gridColumns.Count); pagedGridData.Filters.ShouldBeEqualTo(filters); pagedGridData.RowCount.ShouldBeEqualTo(_rows.Count); }
private ActorBevBase FindTarget(GridData gridData, List<ActorBevBase> actorList) { byte minDistance = FightMgr.Instance.GetMaxMagnitudeDistance(); byte minIndex = FightMgr.Instance.GetMaxIndex(); ActorBevBase target = null; foreach (ActorBevBase actor in actorList) { byte distance = FightMgr.Instance.CalculateMagnitudeDistance(gridData, actor.GridData, true); if (distance < minDistance || (distance == minDistance && actor.Index < minIndex)) { target = actor; minIndex = target.Index; minDistance = distance; } } return target; }
/// <summary> /// Parse grid data from R host and return <see cref="GridData"/> /// </summary> /// <param name="input">serialized string from R host</param> /// <returns>parsed data</returns> public static GridData Parse(string input) { input = CleanEscape(input); // // the implementation here is virtually hard-coded // R routine uses dput of list that contains four children in order; dimnames, row.names, col.names, data // row.names is character vector, col.names is character vector, and data contains is list of columns, which is in turn a named character vector // This is for performance, as generic formatting such as json is too expensive // int current = 0; current = input.IndexOf("structure", current, StringComparison.OrdinalIgnoreCase); current = input.IndexOf('(', current); current = input.IndexOf("list", current, StringComparison.OrdinalIgnoreCase); current = input.IndexOf('(', current); current = input.IndexOf("dimnames", current, StringComparison.OrdinalIgnoreCase); current = input.IndexOf('=', current); string dimnamesValue; current = FirstQuotedString(input, current, out dimnamesValue); var validHeaderNames = (GridData.HeaderNames) Enum.Parse(typeof(GridData.HeaderNames), dimnamesValue); List<string> rowNames = new List<string>(); current = NamedValue(input, "row.names", rowNames, current, true); current = input.IndexOf(',', current); List<string> columnNames = new List<string>(); current = NamedValue(input, "col.names", columnNames, current, true); current = input.IndexOf(',', current); current = input.IndexOf("data", current, StringComparison.OrdinalIgnoreCase); current = input.IndexOf('=', current); current = input.IndexOf("structure", current, StringComparison.OrdinalIgnoreCase); current = input.IndexOf('(', current); List<string> values = new List<string>(); current = Vector(input, values, current); GridData data = new GridData(rowNames, columnNames, values); data.ValidHeaderNames = validHeaderNames; return data; }
Control createControl(Composite parent) { PixelConverter converter = new PixelConverter(parent); var composite = new Composite(parent, SWT.NONE); composite.setFont(parent.getFont()); var layout = new GridLayout(); layout.numColumns = 2; composite.setLayout(layout); // // Label // var label = new Label(composite, SWT.LEFT | SWT.WRAP); label.setFont(composite.getFont()); label.setText(Messages.librariesPreferencesLabelText); var gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); gd.horizontalSpan = 2; gd.verticalAlignment = GridData.BEGINNING; label.setLayoutData(gd); // // Table // var tableComposite = new Composite(composite, SWT.NONE); tableComposite.setFont(composite.getFont()); var tableColumnLayout = new TableColumnLayout(); tableComposite.setLayout(tableColumnLayout); var table = new Table(tableComposite, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.CHECK); table.setFont(composite.getFont()); table.setHeaderVisible(false); table.setLinesVisible(false); var column = new TableColumn(table, SWT.NONE); tableColumnLayout.setColumnData(column, new ColumnWeightData(100, false)); // Table viewer tableViewer = new CheckboxTableViewer(table); tableViewer.setContentProvider(tableContentProvider); tableViewer.setCheckStateProvider(tableCheckStateProvider); tableViewer.setLabelProvider(tableLabelProvider); tableViewer.addCheckStateListener(tableCheckStateListener); tableViewer.addSelectionChangedListener(event => {
public void InitGrid(GridData[,] grids) { this.m_GridDic = new Dictionary<FightUIGridCellComponent, GridData>(); int zLength = grids.GetLength(0); int xLength = grids.GetLength(1); float cellLength = this.CellPrefab.CellLength; for (int z = 0; z < zLength; z++) { float positionY =((this.Type == ActorType.Player)?(zLength - z): z) * cellLength; //float positionY = z * cellLength; for (int x = 0; x < xLength; x++) { FightUIGridCellComponent cell = Instantiate(this.CellPrefab); cell.MyTransform.SetParent(this.MyTransform); cell.MyTransform.localRotation = Quaternion.identity; float positionX = x * cellLength; cell.MyTransform.localPosition = new Vector3(positionX, positionY, 0); this.m_GridDic.Add(cell, grids[z, x]); } } }
// GET /api/<controller> public GridData<Holding> Get() { GridData<Holding> result = new GridData<Holding>(); result.data = Holdings.Data.AsQueryable(); result.totalRows = 0; var totalRows = result.data.Count(); string paging = this.Request.RequestUri.ParseQueryString()["paging"]; if (!string.IsNullOrEmpty(this.Request.RequestUri.ParseQueryString()["sortproperty"])) { string sortProperty = this.Request.RequestUri.ParseQueryString()["sortProperty"]; string sortDirection = this.Request.RequestUri.ParseQueryString()["sortDirection"]; if (sortDirection.ToLower() == "desc") { result.data = result.data.AsQueryable().OrderByDescending(sortProperty); } else { result.data = result.data.AsQueryable().OrderBy(sortProperty); } } if (paging.ToLower() == "server") { int page = 0; int pageSize = 0; if (int.TryParse(this.Request.RequestUri.ParseQueryString()["page"], out page) && int.TryParse(this.Request.RequestUri.ParseQueryString()["pageSize"], out pageSize)) { result.data = result.data.Skip(page * pageSize).Take(pageSize); result.totalRows = totalRows; } } return result; }
public ActionResult GetAddMemInfo() { GridRequest req = new GridRequest(Request); var pred = FilterHelper.GetExpression <Member>(req.FilterGroup); var alldata = _memberContract.Members.Where(pred); var data = alldata.OrderByDescending(c => c.CreatedTime) .Skip(req.PageCondition.PageIndex) .Take(req.PageCondition.PageSize) .Select(c => new { c.Id, c.MemberName, c.Gender, c.CreatedTime, c.Store.StoreName, c.UserPhoto, c.MobilePhone, AdminName = c.Operator.Member.MemberName, }).ToList(); GridData <object> grdata = new GridData <object>(data, alldata.Count(), Request); return(Json(grdata)); }
public override void Initialize(int ownerUniqueID) { this.ownerUniqueID = ownerUniqueID; identifier = PStrings.visualEffects; nextCycleTime = -1f; ExtensibleData owner = GridData.GetExtensible(ownerUniqueID); if (owner != null && owner.gameObject != null) { modelT = owner.gameObject.transform.GetChild(0); } localEulerZero = (modelT != null) ? modelT.localEulerAngles : Vector3.zero; localPositionZero = (modelT != null) ? modelT.localPosition : Vector3.zero; Bobbing = true; Spinning = true; bobbingSpeed = 0.1f; spinningSpeed = 0.25f; }
/// <summary> /// 查询数据 /// </summary> /// <returns></returns> public ActionResult List(int?storeId) { GridRequest request = new GridRequest(Request); Expression <Func <StoreLevel, bool> > predicate = FilterHelper.GetExpression <StoreLevel>(request.FilterGroup); var count = 0; var list = _storeLevelContract.Entities.Where <StoreLevel, int>(predicate, request.PageCondition, out count) .Select(s => new { s.Id, s.UpgradeCondition, s.Discount, s.IsDeleted, s.IsEnabled, s.LevelName, s.UpdatedTime, s.IconPath, s.Operator.Member.RealName, }).ToList(); var data = new GridData <object>(list, count, request.RequestInfo); return(Json(data, JsonRequestBehavior.AllowGet)); }
public GridData(GridData other, bool withValues = true) : base(other) { countX = other.countX; countY = other.countY; if (withValues) { if (other.values != null) { values = (float[])other.values.Clone(); } if (other.valuesMask != null) { valuesMask = (bool[])other.valuesMask.Clone(); } } minValue = other.minValue; maxValue = other.maxValue; minFilter = other.minFilter; maxFilter = other.maxFilter; coloring = other.coloring; }
public GridData TILED_ReadGrid(string mapPath, GridSettings settings) { var mapSize = tiledDataProvider.GetMapSize(mapPath); var grid = new GridData(mapPath, mapSize, settings); var tileLayer = tiledDataProvider.GetMapLayer(mapPath, Constants.DB_KEY_LAYER_TILED_TILE); if (tileLayer == null) { throw new NullReferenceException("Could not find layer in the map " + mapPath + " with name " + Constants.DB_KEY_LAYER_TILED_TILE + ", please add a layer with that name."); } for (int i = 0; i < tileLayer.data.Length; i++) { var gid = tileLayer.data[i]; if (gid != 0) // 0 is mapped to a void cell { var objectId = tiledDataProvider.GetMapTilesetObjectId(mapPath, gid); var cell = factoryEntity.CreateCell(i % mapSize.x, (i / mapSize.x) % mapSize.y, objectId); grid.cells.Add(cell); } } return(grid); }
/// <summary> /// Returns keys to all nearby buckets. /// <para/> /// Guaranteed to cover all buckets within the specified radius of the specified world position. /// </summary> public static NativeArray <int> GetNearbyCellsKeys(GridData grid, float3 worldPosition, float radius, Allocator allocator) { float3 startPos = worldPosition + new float3(-radius, 0, -radius); float3 endPos = worldPosition + new float3(radius, 0, radius); int2 start = grid.GetGridPosition(startPos); int2 end = grid.GetGridPosition(endPos); int length = (1 + end.x - start.x) * (1 + end.y - start.y); NativeArray <int> nearbyCellKeys = new NativeArray <int>(length, allocator); int index = 0; for (int i = start.x; i <= end.x; i++) { for (int j = start.y; j <= end.y; j++) { nearbyCellKeys[index] = grid.GetCellKey(new int2(i, j)); index++; } } return(nearbyCellKeys); }
//重写GetList方法 public override JsonResult GetList(QueryBuilder qb) { this.FillQueryBuilderFilter(qb, true); var qbItem_date = qb.Items.FirstOrDefault(a => a.Field == "Date"); if (qbItem_date != null) { qb.Add("CreateDate", QueryMethod.GreaterThanOrEqual, GetQueryString("Date")); qb.Items.Remove(qbItem_date); } string sql = @" select * from (SELECT pinfo.ID,pinfo.Name,pinfo.Code,pinfo.ProjectScale,pinfo.ProjectClass ,pinfo.ProjectType,pinfo.Industry,pinfo.Customer,pinfo.CustomerName,pinfo.ProjectLevel ,pinfo.CustomerLevel,pinfo.Phase,pinfo.ChargerDeptName,pinfo.ChargerDept,pinfo.ChargerUserName ,pinfo.ChargerUser,pinfo.MarketDeptName,pinfo.MarketDept,pinfo.BusinessChargerUserName ,pinfo.BusinessChargerUser,pinfo.OtherDeptName,pinfo.OtherDept,pinfo.Country,isnull(pinfo.City,'') City ,pinfo.BuildAddress,pinfo.State,pinfo.Remark,pinfo.Attachments,pinfo.MakertClueID ,pinfo.CreateDate,pinfo.TasKNoticeID,isnull(pinfo.Province,'') Province FROM S_I_Project pinfo with(nolock) left join S_F_Customer c with(nolock) on pinfo.customer = c.ID) aa"; GridData grid = this.SqlHelper.ExecuteGridData(sql, qb); return(Json(grid)); }
protected void btn_remove_Click(object sender, EventArgs e) { Button btn = (Button)sender; //Get the row that contains this button GridViewRow gvr = (GridViewRow)btn.NamingContainer; Label lbl_unit_price = (Label)gvr.FindControl("lbl_unit_price"); Label lbl_unit_price_total = (Label)gvr.FindControl("lbl_unit_price_total"); //Get rowindex int rowindex = gvr.RowIndex; DataTable dt = ViewState["Details"] as DataTable; dt.Rows[rowindex].Delete(); ViewState["Details"] = dt; GridData.DataSource = dt; GridData.DataBind(); if (ViewState["Total_Amt"] != "") { decimal Total_amount = Convert.ToDecimal(ViewState["Total_Amt"]) - Convert.ToDecimal(lbl_unit_price.Text); } }
private static GridData GridData( Context context, SiteSettings ss, Export export, SqlWhereCollection where, View view) { export.SetColumns( context: context, ss: ss); ss.SetColumnAccessControls(context: context); view.GridColumns = export.Columns .Where(o => o.Column.CanRead) .Select(o => o.ColumnName) .ToList(); var gridData = new GridData( context: context, ss: ss, view: view, where : where); return(gridData); }
/// <summary> /// 查询数据 /// </summary> /// <returns></returns> public ActionResult List(int?storeId) { GridRequest request = new GridRequest(Request); Expression <Func <StoreCheckRecord, bool> > predicate = FilterHelper.GetExpression <StoreCheckRecord>(request.FilterGroup); var count = 0; var list = _storeCheckRecordContract.Entities.Where <StoreCheckRecord, int>(predicate, request.PageCondition, out count) .Select(s => new { s.Id, s.StoreId, s.StoreName, s.CheckTime, s.RatingPoints, s.IsDeleted, s.IsEnabled, s.CheckDetails, s.TotalPunishScore }).ToList(); var data = new GridData <object>(list, count, request.RequestInfo); return(Json(data, JsonRequestBehavior.AllowGet)); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!string.IsNullOrEmpty(Request.Form["mode"])) { try { string mode = Convert.ToString(Request.Form["mode"]); string where = ""; GridData og = new GridData(mode, where, true); } catch (Exception ex) { //ex.SetLog("For Export Data"); } finally { Response.Write("<script>window.parent.document.getElementsByClassName('dataTables_processing')[0].style.display='none';</script>"); } } } }
public void CreateTiles(GridData gridData) { _width = gridData.GetWidth(); _height = gridData.GetHeight(); for (int column = 0; column < _width; ++column) { for (int row = 0; row < _height; ++row) { Vector3 tilePosition = new Vector3(CalculateTilePosition(column, _height), CalculateTilePosition(row, _width), 0.5f); GameObject tile = Instantiate(_tilePrefab, tilePosition, Quaternion.Euler(-90, 0, 0)) as GameObject; TileDisplay tileDisplay = tile.GetComponent <TileDisplay>(); tileDisplay.SetCoordinates(column, row); // Don't display grid lines for the last column/row, so // that we get that traditional noughts and crosses grid. tileDisplay.EnableRightLine(column < _width - 1); tileDisplay.EnableTopLine(row < _height - 1); eState state = gridData.GetTileState(new Move(column, row)); tileDisplay.UpdateDisplay(state); tile.name = CreateTileName(column, row); } } }
/// <summary> /// Ctor. /// </summary> /// <param name="GridDat"></param> /// <param name="Temperature"></param> /// <param name="EoS"></param> /// <param name="edgeTagNames"></param> public NusseltNumber(GridData GridDat, SinglePhaseField Temperature, MaterialLaw EoS, string[] edgeTagNames) { this.GridDat = GridDat; this.Temperature = Temperature; //Basis BasisDerivative = new Basis(GridDat, Temperature.Basis.Degree - 1); Basis BasisDerivative = new Basis(GridDat, Temperature.Basis.Degree); dTdx = new SinglePhaseField(BasisDerivative); dTdy = new SinglePhaseField(BasisDerivative); NusseltIntegrals = new EdgeIntegral[edgeTagNames.Length]; Nusselt = new double[edgeTagNames.Length]; for (int bc = 0; bc < edgeTagNames.Length; bc++) { NusseltIntegrals[bc] = new EdgeIntegral(GridDat, edgeTagNames[bc], new NusseltFlux2D(EoS), new CoordinateMapping(dTdx, dTdy, Temperature), 20); } }
public void CreateTiles(GridData gridData) { _width = gridData.GetWidth(); _height = gridData.GetHeight(); for(int column=0; column<_width; ++column) { for(int row=0; row<_height; ++row) { Vector3 tilePosition = new Vector3(CalculateTilePosition(column, _height), CalculateTilePosition(row, _width), 0.5f); GameObject tile = Instantiate(_tilePrefab, tilePosition, Quaternion.Euler(-90, 0, 0)) as GameObject; TileDisplay tileDisplay = tile.GetComponent<TileDisplay>(); tileDisplay.SetCoordinates(column, row); // Don't display grid lines for the last column/row, so // that we get that traditional noughts and crosses grid. tileDisplay.EnableRightLine(column<_width-1); tileDisplay.EnableTopLine(row<_height-1); eState state = gridData.GetTileState(new Move(column, row)); tileDisplay.UpdateDisplay(state); tile.name = CreateTileName(column, row); } } }
private void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } if (!firstTime) { firstTime = true; GetWorldTiles(); GridManager.tile_index = tiles; GridManager.test = "f**k"; } else { print("probs gotta do something but you're back again"); } }
unsafe public static void Laplacian(ref int GridRef, ref int DgDegree, out int ierr) { try { // grid, etc // ========= GridData grd = null;// (GridData)(Infrastructure.GetObject(GridRef)); var b = new Basis(grd, DgDegree); var map = new UnsetteledCoordinateMapping(b); var L = new Laplace(1.3, grd.Cells.cj); var op = new SpatialOperator(1, 0, 1, QuadOrderFunc.Linear(), "T", "c1"); op.EquationComponents["c1"].Add(L); op.Commit(); // evaluate operator // ================= var Mtx = new BlockMsrMatrix(map, map); double[] B = new double[map.LocalLength]; var eval = op.GetMatrixBuilder(map, null, map); eval.ComputeMatrix(Mtx, B); // return data // =========== throw new NotImplementedException("todo"); } catch (Exception e) { ierr = Infrastructure.ErrorHandler(e); } ierr = 0; }
public ActionResult GridData(string entityName) { GridRequest request = new GridRequest(Request); var query = (from a in FlowContract.FlowArchives where a.CreatorUserId == Operator.UserId join i in FlowContract.FlowItems on a.FlowItemId equals i.Id join r in FlowContract.FlowRelateForms on i.FlowDesignId equals r.FlowDesignId join f in FlowContract.FlowForms on r.FlowFormId equals f.Id join d in CommonContract.Dictionarys on f.TypeVal equals d.Value select new FlowFormDto { Id = a.Id, FormName = i.EntityName, TypeVal = f.TypeVal, TypeName = d.Name, CreatorUserName = a.CreatorUserName, CreatTime = a.CreatedTime }) .WhereIf(c => c.FormName.Contains(entityName), !entityName.IsNullOrEmpty()); var total = query.Count(); if (request.PageCondition.SortConditions.Length > 0) { foreach (var item in request.PageCondition.SortConditions) { query = query.OrderBy(item.SortField, item.ListSortDirection); } } else { query = query.OrderBy("CreatTime", ListSortDirection.Descending); } var list = query.Skip((request.PageCondition.PageIndex - 1) * request.PageCondition.PageSize).Take(request.PageCondition.PageSize).ToList(); var data = new GridData <FlowFormDto>(list, total); return(Json(data, JsonRequestBehavior.AllowGet)); }
private void PlayGridCompleteAnimation(GridData gridData, bool isPlayCompleteMarkAnimation, EventDelegate.Callback onFinished = null) { //IL_00db: Unknown result type (might be due to invalid IL or missing references) if (gridData != null) { UITweenCtrl tweenCtrl = gridData.tweenCtrl; if (!(tweenCtrl == null) && tweenCtrl.tweens != null && tweenCtrl.tweens.Length > 0) { SetActive(gridData.transform, UI.SPR_GRID_ITEM, true); BoxCollider collider = gridData.transform.GetComponent <BoxCollider>(); if (collider != null) { collider.set_enabled(false); } if (isPlayCompleteMarkAnimation) { UpdateReward(GetCurrentCard(), gridData, true); PlayTweenComplete(); SoundManager.PlayOneShotUISE(40000390); } if (onFinished != null) { this.StartCoroutine(WaitAndDo(onFinished, GridAnimationTime)); } gridData.tweenCtrl.Reset(); gridData.tweenCtrl.Play(true, delegate { SetActive(gridData.transform, UI.SPR_GRID_REACH, false); if (collider != null) { collider.set_enabled(true); } SetActive(gridData.transform, UI.SPR_GRID_ITEM, false); }); } } }
private void AddNewitem() { try { int storeid = Convert.ToInt32(Store.SelectedValue); int materialid = Convert.ToInt32(selectitem.SelectedValue); decimal QTY = Convert.ToDecimal(txtQuantity.Value); ContainerData CD = new ContainerData(); CD.MaterialID = materialid; CD.StoreID = storeid; CD.ContainerID = Convert.ToInt32(LblContainerID.Text); if (txtItemNotes.Value == null || txtItemNotes.Value == String.Empty) { CD.Notes = "No Notes Added For item"; } else { CD.Notes = txtItemNotes.Value.ToString(); } CD.IsActive = true; CD.Quantity = QTY; db.ContainerDatas.Add(CD); db.SaveChanges(); GridData.DataBind(); AddNewStock(storeid, materialid, QTY); txtItemNotes.Value = ""; txtQuantity.Value = ""; } catch (Exception ex) { lblAddItemErr.Text = "Error in item " + ex.InnerException.Message; lblAddItemErr.ForeColor = Color.Red; lblAddItemErr.Visible = true; } }
private static HtmlBuilder Grid( this HtmlBuilder hb, SiteSettings ss, GridData gridData, View view) { return(hb .Table( attributes: new HtmlAttributes() .Id("Grid") .Class("grid") .DataValue("back", _using: ss?.IntegratedSites?.Any() == true) .DataAction("GridRows") .DataMethod("post"), action: () => hb .GridRows( ss: ss, gridData: gridData, view: view)) .Hidden( controlId: "GridOffset", value: ss.GridNextOffset( 0, gridData.DataRows.Count(), gridData.Aggregations.TotalCount) .ToString()) .Button( controlId: "ViewSorter", controlCss: "hidden", action: "GridRows", method: "post") .Button( controlId: "ViewSorters_Reset", controlCss: "hidden", action: "GridRows", method: "post")); }
public void Add(GridMapLayer layer, GridData grid) { layer.Init(map, grid); #if UNITY_EDITOR layer.name = grid.patch.DataLayer.Name; if (!string.IsNullOrWhiteSpace(grid.patch.Filename)) { layer.name += Patch.GetFileNamePatch(grid.patch.Filename); } #endif var dataLayer = grid.patch.DataLayer; layer.SetColor(dataLayer.Color); layer.transform.SetParent(transform, false); mapLayers.Add(layer); grid.patch.SetMapLayer(layer); if (!visibleDataLayers.Contains(dataLayer)) { visibleDataLayers.Add(dataLayer); } OnShowGrid?.Invoke(layer, true); ArrangeLayers(); if (GridMapLayer.ManualGammaCorrection) { layer.SetGamma(gamma); } else { UpdateGamma(layer); } }
protected GridData CreateGridData(List <TablePanelElement> matrix) { if (matrix.Count == 0) { return new GridData { Widthes = new double[] { 0 }, Heights = new double[] { 0 }, Lefts = new double[] { 0 }, Tops = new double[] { 0 } } } ; var data = new GridData(); data.Widthes = Enumerable .Range(0, matrix.Max(x => x.Column) + 1) .Select(z => matrix .Where(x => x != null && x.Column == z) .Select(x => x.Element.DesiredSize.Width) .Max()) .ToArray(); data.Heights = Enumerable .Range(0, matrix.Max(x => x.Row) + 1) .Select(z => matrix .Where(x => x != null && x.Row == z) .Select(x => x.Element.DesiredSize.Height) .Max()) .ToArray(); data.Lefts = Enumerable .Range(0, data.Widthes.Length) .Select(z => z == 0 ? 0 : data.Widthes.Take(z).Sum()) .ToArray(); data.Tops = Enumerable .Range(0, data.Heights.Length) .Select(z => z == 0 ? 0 : data.Heights.Take(z).Sum()) .ToArray(); return(data); }
public ActionResult DetailList() { GridRequest request = new GridRequest(Request); Expression <Func <EarningsDetail, bool> > predicate = FilterHelper.GetExpression <EarningsDetail>(request.FilterGroup); string idstr = Request.Params["Id"]; List <object> li = new List <object>(); int cou = 0; if (!string.IsNullOrEmpty(idstr)) { int id = Convert.ToInt32(idstr); var collc = _collocationContract.Collocations.Where(c => c.IsDeleted == false && c.IsEnabled == true && c.Id == id).FirstOrDefault(); if (collc != null && collc.EarningsDetail != null) { cou = collc.EarningsDetail.Where(predicate.Compile()).Count(); li.AddRange(collc.EarningsDetail.Where(predicate.Compile()).Select(c => new { c.Id, c.IsCloseAnAccount, c.CloseAnAccountTime, ConsumeDateTime = c.ConsumeOrder.CreatedTime, c.ConsumeOrder.Member.MemberName, c.Totalexpendamount, c.EarningsType, collc.Numb, collc.Admini.Member.RealName, c.EarningsPercent, c.EarningsNotes }).Skip(request.PageCondition.PageIndex).Take(request.PageCondition.PageSize).ToList()); } } GridData <object> redat = new GridData <object>(li, cou, request.RequestInfo); return(Json(redat)); }
public void GridPathfinding() { ushort width = 5; ushort height = 5; byte[] raw = new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 128, 128, 128, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }; var data00 = new GridData(); data00.Fill(width, height, raw); var data22 = new GridData(); data22.Fill(width, height, raw, 2, 2); var rect4 = new RectGrid4Dir(data00); var rect4_offset = new RectGrid4Dir(data22); var rect8 = new RectGrid8Dir(data00); var axialHex = new AxialHexGrid(data00); var astar = new AStarPathfinding(); Debug.Log(nameof(rect4)); rect4.FindPath(astar, 1, 0, 2, 4); CheckPath(astar.FormattedPath(), "path:2,4-2,3-1,3-0,3-0,2-0,1-0,0-1,0"); Debug.Log(nameof(rect4_offset)); rect4_offset.FindPath(astar, -1, -2, 0, 2); CheckPath(astar.FormattedPath(), "path:2,4-2,3-1,3-0,3-0,2-0,1-0,0-1,0"); Debug.Log(nameof(rect8)); rect8.FindPath(astar, 1, 0, 2, 4); CheckPath(astar.FormattedPath(), "path:2,4-1,3-0,2-0,1-1,0"); Debug.Log(nameof(axialHex)); axialHex.FindPath(astar, 1, 0, 2, 4); CheckPath(astar.FormattedPath(), "path:2,4-1,3-0,2-0,1-1,1-0,0-1,0"); }
/// <summary> /// A low-Performance method to permute some operator Matrix according to the GlobalID-permutation; /// </summary> /// <param name="M"></param> /// <param name="grd"></param> /// <param name="RowMap"></param> /// <param name="ColMap"></param> /// <returns></returns> /// <remarks> /// Low-Performance implementation, only for debugging purposes. /// </remarks> public static MsrMatrix ResortMatrix(this MsrMatrix M, GridData grd, UnsetteledCoordinateMapping RowMap, UnsetteledCoordinateMapping ColMap) { if (!M.RowPartitioning.Equals(RowMap)) { throw new ArgumentException(); } if (!M.ColPartition.Equals(ColMap)) { throw new ArgumentException(); } int[] RowPerm = ComputePermutation(RowMap, grd); int[] ColPerm = ComputePermutation(ColMap, grd); // permute columns MsrMatrix M2 = ColumnPermute(M, ColPerm); // permute rows MsrMatrix M3 = ColumnPermute(M2.Transpose(), RowPerm).Transpose(); // return return(M3); }
private void SetGridviewPage() { var numberOfItemsInList = GridData == null ? 0 : GridData.ToList().Count; var btnFirst = GetPagerControl("lbgvFirst") as ImageButton; var btnPrevious = GetPagerControl("lbgvPrevious") as ImageButton; var btnNext = GetPagerControl("lbgvNext") as ImageButton; var btnLast = GetPagerControl("lbgvLast") as ImageButton; var lblPageAt = GetPagerControl("lblPageAt") as Label; var lblRowCount = GetPagerControl("lblRowCount") as Label; if (btnFirst == null || btnPrevious == null || btnNext == null || btnLast == null || lblPageAt == null || lblRowCount == null) { return; } var firstPage = CurrentGvPage == 1; var lastPage = GridData != null && CurrentGvPage == ((numberOfItemsInList + PageSize - 1) / PageSize); btnFirst.Enabled = !firstPage; btnFirst.ImageUrl = firstPage ? "~/App.Images/pager-first-dis.png" : "~/App.Images/pager-first.png"; btnPrevious.Enabled = !firstPage; btnPrevious.ImageUrl = firstPage ? "~/App.Images/pager-previous-dis.png" : "~/App.Images/pager-previous.png"; btnNext.Enabled = !lastPage; btnNext.ImageUrl = lastPage ? "~/App.Images/pager-next-dis.png" : "~/App.Images/pager-next.png"; btnLast.Enabled = !lastPage; btnLast.ImageUrl = lastPage ? "~/App.Images/pager-last-dis.png" : "~/App.Images/pager-last.png"; if (GridData == null) { return; } lblRowCount.Text = string.Format("Total Entries: {0:##,##0}", numberOfItemsInList); lblPageAt.Text = string.Format("Page {0} of {1}", CurrentGvPage, (numberOfItemsInList + PageSize - 1) / PageSize); }
private void RegeneratePlant(GridData grid, NativeArray <bool> occupiedCells, NativeArray <bool> waterCells, bool landBased, bool waterBased, GameObject plant) { bool lookingForFreeTile = true; int searchTries = 0; while (lookingForFreeTile) { if (searchTries > Mathf.Sqrt(grid.Length)) { break; } searchTries += 1; int n = Random.Range(0, grid.Length); if ((waterCells[n] && !waterBased) || (!waterCells[n] && !landBased)) { continue; } if (occupiedCells[n]) { continue; } int2 gridPos = grid.GetGridPositionFromIndex(n); Vector3 spawnPos = grid.GetWorldPosition(gridPos); spawnPos.y = 0f; Instantiate(plant, spawnPos, Quaternion.Euler(0, Random.Range(0, 360), 0)); worldGridSystem.SetOccupiedCell(gridPos); lookingForFreeTile = false; } }
private void UpdateValueRanges(GridData gridData) { // Update site's value range var layerSite = gridData.patch.SiteRecord.layerSite; bool siteValueRangeHasChanged = layerSite.UpdateMinMax(gridData.minValue, gridData.maxValue); if (gridData.patch is GridPatch) { layerSite.RecalculateMean(siteValueRangeHasChanged); } else { layerSite.mean = 1; } if (MinFilter != 0 || MaxFilter != 1) { layerSite.UpdatePatchesMinMaxFilters(MinFilter, MaxFilter); } // Update layer's value range MinVisibleValue = Mathf.Min(MinVisibleValue, gridData.minValue); MaxVisibleValue = Mathf.Max(MaxVisibleValue, gridData.maxValue); }
public override void Initialize(int ownerUniqueID) { this.ownerUniqueID = ownerUniqueID; identifier = PStrings.entityController; input = new EntityInput(); input.InitializeDefaults(); attributes = new EntityAttributes(); attributes.InitializeDefaults(); state = new EntityState(); state.InitializeDefaults(); entityData = (EntityData)GridData.GetExtensible(ownerUniqueID); rigidbody = entityData.gameObject.GetComponent <Rigidbody>(); weaponController = entityData.gameObject.GetComponent <WeaponController>(); if (weaponController != null) { weaponController.Initialize(entityData); } waypointManager = (WaypointManagerData)entityData.GetExtension(PStrings.waypointManager); pathfindManager = (PathfindManagerData)entityData.GetExtension(PStrings.pathfindManager); state.rotationCurrent = Metrics.OrientationFromDirection[(int)entityData.orientation]; }
protected void btnExportStore_Click(object sender, EventArgs e) { GridData.AllowPaging = false; GridData.DataBind(); Response.Clear(); Response.Buffer = true; Response.ClearContent(); Response.ClearHeaders(); Response.Charset = ""; string FileName = "CuttingListMaterialsInStore " + DateTime.Now.ToShortDateString() + ".xls"; StringWriter strwritter = new StringWriter(); HtmlTextWriter htmltextwrtter = new HtmlTextWriter(strwritter); Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.ContentType = "application/vnd.ms-excel"; Response.AddHeader("Content-Disposition", "attachment;filename=" + FileName); GridData.GridLines = GridLines.Both; GridData.HeaderStyle.Font.Bold = true; GridData.RenderControl(htmltextwrtter); Response.Write(strwritter.ToString()); Response.End(); GridData.AllowPaging = true; GridData.DataBind(); }
public Map Init() { mapname = "1"; PerfectMove = 10; width = 3; height = 3; GridData SData = new GridData (0, 0, 3); GridData EData = new GridData (1, 0, 3); GridData Mirror1 = new GridData (3, 0, 1); GridData Mirror2 = new GridData (3, 0, 2); GridData Change1 = new GridData (5, 1, 0); GridData Change2 = new GridData (5, 2, 0); GridData Cross1 = new GridData (4, 0, 1); GridPos.Add (new Vector2 (0, 2)); GData.Add (SData); GridPos.Add (new Vector2 (2, 0)); GData.Add (EData); GridPos.Add (new Vector2 (1, 1)); GData.Add (Cross1); GridPos.Add (new Vector2 (0, 1)); GData.Add (Change1); AllBlock.Add (new Vector2(0.5f,1f)); return this; }
private GridData InitializeCVTComplianceGridData(HtmlHelper htmlHelper) { var action = "DisplayCVTCompliance"; var gridData = new GridData("oapAuditPlanCVTGrid", "OapAuditPlan", action, "Compliance", "AddProtocols", "Add", "search results", initializeCallBack: true, historicalRow: false); gridData.ToolBarOptions.DisplayCustomAddNew = false; gridData.AddRemoveCustomAddNew(); gridData.ToolBarOptions.DisplayXlsExport = true; var displayColumns = new List <GridDisplayColumn> { new GridDisplayColumn("BUId", displayName: "BU", width: 10), new GridDisplayColumn("RigId", displayName: "Rig", width: 10), new GridDisplayColumn("LastCompleted", displayName: "Last Completed", width: 10), new GridDisplayColumn("DueDate", displayName: "Next Due Date", width: 10), new GridDisplayColumn("NextSchedule", displayName: "Next Schedule", width: 10), new GridDisplayColumn("Compliant", displayName: "Compliant", width: 10) }; gridData.DisplayColumns = displayColumns; return(gridData); }
public void SetGrid(Vector2 Pos,GridData data) { AllGrid [Pos].data = data; }
void Awake() { data = new GridData(Size, this.gameObject); }
public void BeforeEachTest() { _gridData = new GridData<TestData.Item>(null, ControllerName, ActionName, _items, _items.Count); }
void Start() { _gameManager = GameManager.Instance(); // Create empty grid data _gridData = new GridData(_gridWidth, _gridHeight); // Create the grid graphics _gridDisplay = GameObject.Find("Grid").GetComponent<GridDisplay>(); _gridDisplay.CreateTiles(_gridData); }
public void Should_map_the_constructor_parameters_to_the_right_properties() { var gridData = new GridData<TestData.Item>(null, ControllerName, ActionName, _items, _items.Count); gridData.PagedListParameters.ShouldBeEqualTo(null); gridData.ControllerName.ShouldBeEqualTo(ControllerName); gridData.ActionName.ShouldBeEqualTo(ActionName); }
void loadgriddata(GridData griddata) { list = griddata.poly; CMB_camera.Text = griddata.camera; NUM_altitude.Value = griddata.alt; NUM_angle.Value = griddata.angle; CHK_camdirection.Checked = griddata.camdir; CHK_usespeed.Checked = griddata.usespeed; NUM_Distance.Value = griddata.dist; NUM_overshoot.Value = griddata.overshoot1; NUM_overshoot2.Value = griddata.overshoot2; num_overlap.Value = griddata.overlap; num_sidelap.Value = griddata.sidelap; NUM_spacing.Value = griddata.spacing; CMB_startfrom.Text = griddata.startfrom; CHK_toandland.Checked = griddata.autotakeoff; CHK_toandland_RTL.Checked = griddata.autotakeoff_RTL; CHK_internals.Checked = griddata.internals; CHK_footprints.Checked = griddata.footprints; CHK_advanced.Checked = griddata.advanced; rad_trigdist.Checked = griddata.trigdist; rad_digicam.Checked = griddata.digicam; rad_repeatservo.Checked = griddata.repeatservo; // Copter Settings NUM_copter_delay.Value = griddata.copter_delay; //CHK_copter_headinghold.Checked = griddata.copter_headinghold_chk; //UNcomment after adding headinghold offset function // Plane Settings NUM_Lane_Dist.Value = griddata.minlaneseparation; }
void loadgriddata(GridData griddata) { list = griddata.poly; CMB_camera.Text = griddata.camera; NUM_altitude.Value = griddata.alt; NUM_angle.Value = griddata.angle; CHK_camdirection.Checked = griddata.camdir; CHK_usespeed.Checked = griddata.usespeed; NUM_UpDownFlySpeed.Value = griddata.speed; CHK_toandland.Checked = griddata.autotakeoff; CHK_toandland_RTL.Checked = griddata.autotakeoff_RTL; CHK_internals.Checked = griddata.internals; CHK_footprints.Checked = griddata.footprints; CHK_advanced.Checked = griddata.advanced; NUM_Distance.Value = griddata.dist; NUM_overshoot.Value = griddata.overshoot1; NUM_overshoot2.Value = griddata.overshoot2; NUM_leadin.Value = griddata.leadin; CMB_startfrom.Text = griddata.startfrom; num_overlap.Value = griddata.overlap; num_sidelap.Value = griddata.sidelap; NUM_spacing.Value = griddata.spacing; rad_trigdist.Checked = griddata.trigdist; rad_digicam.Checked = griddata.digicam; rad_repeatservo.Checked = griddata.repeatservo; chk_stopstart.Checked = griddata.breaktrigdist; NUM_reptservo.Value = griddata.repeatservo_no; num_reptpwm.Value = griddata.repeatservo_pwm; NUM_repttime.Value = griddata.repeatservo_cycle; // Copter Settings NUM_copter_delay.Value = griddata.copter_delay; CHK_copter_headinghold.Checked = griddata.copter_headinghold_chk; TXT_headinghold.Text = griddata.copter_headinghold.ToString(); // Plane Settings NUM_Lane_Dist.Value = griddata.minlaneseparation; }
/// <summary> /// Fills the grid. /// </summary> /// <param name="data">The grid data.</param> public void FillGrid(GridData data) { ComponentArtGridHandler<List<string>>.Manage(this.Grid, new GridSource<List<string>>(data.Rows), false); }
GridData savegriddata() { GridData griddata = new GridData(); griddata.poly = list; griddata.camera = CMB_camera.Text; griddata.alt = NUM_altitude.Value; griddata.angle = NUM_angle.Value; griddata.camdir = CHK_camdirection.Checked; griddata.usespeed = CHK_usespeed.Checked; griddata.dist = NUM_Distance.Value; griddata.overshoot1 = NUM_overshoot.Value; griddata.overshoot2 = NUM_overshoot2.Value; griddata.overlap = num_overlap.Value; griddata.sidelap = num_sidelap.Value; griddata.spacing = NUM_spacing.Value; griddata.startfrom = CMB_startfrom.Text; griddata.autotakeoff = CHK_toandland.Checked; griddata.autotakeoff_RTL = CHK_toandland_RTL.Checked; griddata.advanced = CHK_advanced.Checked; griddata.trigdist = rad_trigdist.Checked; griddata.digicam = rad_digicam.Checked; griddata.repeatservo = rad_repeatservo.Checked; // Copter Settings griddata.copter_delay = NUM_copter_delay.Value; griddata.copter_headinghold_chk = CHK_copter_headinghold.Checked; griddata.copter_headinghold = NUM_spacing.Value; return griddata; }
GridData savegriddata() { GridData griddata = new GridData(); griddata.poly = list; griddata.camera = CMB_camera.Text; griddata.alt = NUM_altitude.Value; griddata.angle = NUM_angle.Value; griddata.camdir = CHK_camdirection.Checked; griddata.speed = NUM_UpDownFlySpeed.Value; griddata.usespeed = CHK_usespeed.Checked; griddata.autotakeoff = CHK_toandland.Checked; griddata.autotakeoff_RTL = CHK_toandland_RTL.Checked; griddata.internals = CHK_internals.Checked; griddata.footprints = CHK_footprints.Checked; griddata.advanced = CHK_advanced.Checked; griddata.dist = NUM_Distance.Value; griddata.overshoot1 = NUM_overshoot.Value; griddata.overshoot2 = NUM_overshoot2.Value; griddata.leadin = NUM_leadin.Value; griddata.startfrom = CMB_startfrom.Text; griddata.overlap = num_overlap.Value; griddata.sidelap = num_sidelap.Value; griddata.spacing = NUM_spacing.Value; // Copter Settings griddata.copter_delay = NUM_copter_delay.Value; griddata.copter_headinghold_chk = CHK_copter_headinghold.Checked; griddata.copter_headinghold = decimal.Parse(TXT_headinghold.Text); // Plane Settings griddata.minlaneseparation = NUM_Lane_Dist.Value; griddata.trigdist = rad_trigdist.Checked; griddata.digicam = rad_digicam.Checked; griddata.repeatservo = rad_repeatservo.Checked; griddata.breaktrigdist = chk_stopstart.Checked; griddata.repeatservo_no = NUM_reptservo.Value; griddata.repeatservo_pwm = num_reptpwm.Value; griddata.repeatservo_cycle = NUM_repttime.Value; return griddata; }
void loadgriddata(GridData griddata) { list = griddata.poly; CMB_camera.Text = griddata.camera; NUM_altitude.Value = griddata.alt; NUM_angle.Value = griddata.angle; CHK_camdirection.Checked = griddata.camdir; CHK_usespeed.Checked = griddata.usespeed; NUM_Distance.Value = griddata.dist; NUM_overshoot.Value = griddata.overshoot1; NUM_overshoot2.Value = griddata.overshoot2; num_overlap.Value = griddata.overlap; num_sidelap.Value = griddata.sidelap; NUM_spacing.Value = griddata.spacing; CMB_startfrom.Text = griddata.startfrom; CHK_toandland.Checked = griddata.autotakeoff; CHK_toandland_RTL.Checked = griddata.autotakeoff_RTL; CHK_advanced.Checked = griddata.advanced; rad_trigdist.Checked = griddata.trigdist; rad_digicam.Checked = griddata.digicam; rad_repeatservo.Checked = griddata.repeatservo; // Copter Settings NUM_copter_delay.Value = griddata.copter_delay; CHK_copter_headinghold.Checked = griddata.copter_headinghold_chk; NUM_copter_headinghold.Value = griddata.copter_headinghold; }