当前位置: 首页>>代码示例>>C#>>正文


C# GridData类代码示例

本文整理汇总了C#中GridData的典型用法代码示例。如果您正苦于以下问题:C# GridData类的具体用法?C# GridData怎么用?C# GridData使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GridData类属于命名空间,在下文中一共展示了GridData类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GridData

        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);
        }
开发者ID:liumeifu,项目名称:OSky,代码行数:34,代码来源:ArchivesController.cs

示例2: GetGridDataWithPagingBandejaNotificaciones

 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;
 }
开发者ID:di3goandres,项目名称:Proyecto3,代码行数:7,代码来源:Default.aspx.cs

示例3: DataToMap

 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;
 }
开发者ID:o2yCN,项目名称:Puzzle-Of-Light,代码行数:25,代码来源:Map.cs

示例4: GetGridDataWithPagingHistorial

 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;
 }
开发者ID:di3goandres,项目名称:Proyecto3,代码行数:7,代码来源:HistorialEpisodios.aspx.cs

示例5: 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);
 }
开发者ID:donnieyoung,项目名称:osharp,代码行数:59,代码来源:FunctionsController.cs

示例6: GetGridDataWithPagingDocumentosAdjuntos

 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;
 }
开发者ID:di3goandres,项目名称:Proyecto3,代码行数:8,代码来源:Default.aspx.cs

示例7: CustomerVisitInvolvedPeople

        //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();
        }
开发者ID:rivernli,项目名称:SGP,代码行数:12,代码来源:CustomerVisitController.cs

示例8: CalculateMagnitudeDistance

 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));
     }
 }
开发者ID:moto2002,项目名称:It-is-three-kingdoms-or-Phoenix-sigh,代码行数:11,代码来源:FightGridComponent.cs

示例9: registerObject

 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));
 }
开发者ID:Ralusama19,项目名称:StudentsVsZombies,代码行数:12,代码来源:SceneGridManager.cs

示例10: GetFiles

        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}"));
        }
开发者ID:rivernli,项目名称:SGP,代码行数:14,代码来源:CustomerNewsController.cs

示例11: Should_map_the_constructor_parameters_to_the_right_properties

 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);
 }
开发者ID:mvbalaw,项目名称:FluentWebControls,代码行数:16,代码来源:GridDataTest.cs

示例12: SaveMapToFile

	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 ();
	}
开发者ID:sakurazuka90,项目名称:DnD5BattleEngine,代码行数:16,代码来源:BattleFieldSaver.cs

示例13: FindTarget

 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;
 }
开发者ID:moto2002,项目名称:NewPhoenix,代码行数:18,代码来源:NormalAttack.cs

示例14: createControl

		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 => {
开发者ID:nagyistoce,项目名称:cnatural-language,代码行数:44,代码来源:LibrariesPreferences.stab.cs

示例15: Parse

        /// <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;
        }
开发者ID:AlexanderSher,项目名称:RTVS-Old,代码行数:49,代码来源:GridParser.cs


注:本文中的GridData类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。