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


C# CellInfo类代码示例

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


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

示例1: GetData

		public void GetData(NodeInfo nodeInfo, CellInfo[] cellData)
		{
//			int commentCol = ShowLinks ? (int) FavoritesGridColumns.Comment
//				: (int) FavoritesGridColumns.Name;

			cellData[(int)FavoritesGridColumns.Name].Text = Name;
			cellData[(int)FavoritesGridColumns.Name].ImageIndex =
				Links.Count > 0
					? FavoritesDummyForm.Instance.FolderStartIndex
					: FavoritesDummyForm.Instance.EmptyFolderStartIndex;

			nodeInfo.Highlight = true;

//			if (ShowLinks)
//			{
//				cellData[(int) FavoritesGridColumns.ColSubj].Image = -1;
//				cellData[(int) FavoritesGridColumns.ColSubj].Text = string.Empty;
//				cellData[(int) FavoritesGridColumns.ColAuthor].Image = -1;
//				cellData[(int) FavoritesGridColumns.ColAuthor].Text = string.Empty;
//				cellData[(int) FavoritesGridColumns.ColDate].Image = -1;
//				cellData[(int) FavoritesGridColumns.ColDate].Text = string.Empty;
//				cellData[(int) FavoritesGridColumns.ColForum].Image = -1;
//				cellData[(int) FavoritesGridColumns.ColForum].Text = string.Empty;
//			}
//			cellData[commentCol].Text = Comment.ToString();
//			cellData[commentCol].Image = -1;

			cellData[(int)FavoritesGridColumns.Comment].Text = Comment;
		}
开发者ID:rsdn,项目名称:janus,代码行数:29,代码来源:FavoritesFolder.cs

示例2: GetCellInfo

        protected override CellInfo GetCellInfo(DateTime dt)
        {
            CellInfo ci = new CellInfo(dt);
            do
            {
                if (null == m_calendarData)
                    break;

                DataRow[] drc = m_calendarData.Select(
                    String.Format("calDate='{0}-{1}-{2}'", ci.date.Year, ci.date.Month, ci.date.Day));

                if (drc.Length != 1)
                    break;

                if (showTrainers)
                {
                    ci.sTip += String.Format("Trainer: {0}", drc[0]["trainer"]);
                }

                if (showClientCount)
                {
                    if (showTrainers)
                        ci.sTip += "\n";

                    ci.sTip += String.Format("Clients:{0}", drc[0]["clientsCount"]);
                }

            } while (false);
            return ci;
        }
开发者ID:AndrianDTR,项目名称:Atlantic,代码行数:30,代码来源:DayView.cs

示例3: Equals

            public ushort nSize;        // Size of the cell content on the main b-tree page

            public bool Equals(CellInfo ci)
            {
                if (ci.CellID >= ci.Cells.Length || CellID >= Cells.Length) return false;
                if (ci.Cells[ci.CellID] != Cells[CellID]) return false;
                if (ci.nKey != nKey || ci.nData != nData || ci.nPayload != this.nPayload) return false;
                if (ci.nHeader != nHeader || ci.nLocal != nLocal) return false;
                if (ci.iOverflow != iOverflow || ci.nSize != nSize) return false;
                return true;
            }
开发者ID:JiujiangZhu,项目名称:feaserver,代码行数:11,代码来源:MemPage+CellInfo.cs

示例4: Equals

        public byte[] pCell; // Pointer to the start of cell content

        #endregion Fields

        #region Methods

        public bool Equals(CellInfo ci)
        {
            if (ci.iCell >= ci.pCell.Length || iCell >= this.pCell.Length) return false;
            if (ci.pCell[ci.iCell] != this.pCell[iCell]) return false;
            if (ci.nKey != this.nKey || ci.nData != this.nData || ci.nPayload != this.nPayload) return false;
            if (ci.nHeader != this.nHeader || ci.nLocal != this.nLocal) return false;
            if (ci.iOverflow != this.iOverflow || ci.nSize != this.nSize) return false;
            return true;
        }
开发者ID:JiujiangZhu,项目名称:feaserver,代码行数:15,代码来源:CellInfo.cs

示例5:

		void IGetData.GetData(NodeInfo nodeInfo, CellInfo[] cellData)
		{
			var om = _provider.GetRequiredService<IOutboxManager>();
			cellData[0].Text = Description;
			cellData[0].ImageIndex = ImageIndex;
			cellData[1].Text = $"{(om.NewMessages.Count == 0 ? string.Empty : om.NewMessages.Count.ToString())}/{(om.RateMarks.Count == 0 ? string.Empty : om.RateMarks.Count.ToString())}/{(om.DownloadTopics.Count == 0 ? string.Empty : om.DownloadTopics.Count.ToString())}";

			nodeInfo.Highlight = (om.NewMessages.Count > 0)
				|| (om.RateMarks.Count > 0) || (om.DownloadTopics.Count > 0);
		}
开发者ID:rsdn,项目名称:janus,代码行数:10,代码来源:OutboxFeature.cs

示例6:

		void IGetData.GetData(NodeInfo nodeInfo, CellInfo[] cellData)
		{
			cellData[OutboxManager.ForumColumn].Text = Source;
			cellData[OutboxManager.ForumColumn].ImageIndex = 
				OutboxImageManager.RegetTopicImageIndex;

			cellData[OutboxManager.SubjectColun].Text = Hint;
			
			cellData[OutboxManager.AddInfoColumn].Text = "ID = " + MessageID;
		}
开发者ID:rsdn,项目名称:janus,代码行数:10,代码来源:DownloadTopic.cs

示例7: ptrmapPutOvflPtr

 internal void ptrmapPutOvflPtr(byte[] pCell, ref RC pRC)
 {
     if (pRC != 0)
         return;
     var info = new CellInfo();
     Debug.Assert(pCell != null);
     btreeParseCellPtr(pCell, ref info);
     Debug.Assert((info.nData + (this.HasIntKey ? 0 : info.nKey)) == info.nPayload);
     if (info.iOverflow != 0)
     {
         Pgno ovfl = ConvertEx.Get4(pCell, info.iOverflow);
         this.Shared.ptrmapPut(ovfl, PTRMAP.OVERFLOW1, this.ID, ref pRC);
     }
 }
开发者ID:JiujiangZhu,项目名称:feaserver,代码行数:14,代码来源:MemPage+AutoVacuum.cs

示例8: btreeParseCellPtr

 internal void btreeParseCellPtr(byte[] cell, int cellID, ref CellInfo info)
 {
     var nPayload = (uint)0;    // Number of bytes of cell payload
     Debug.Assert(MutexEx.Held(Shared.Mutex));
     if (info.Cells != cell)
         info.Cells = cell;
     info.CellID = cellID;
     Debug.Assert(Leaf == 0 || Leaf == 1);
     var n = (ushort)ChildPtrSize; // Number bytes in cell content header
     Debug.Assert(n == 4 - 4 * Leaf);
     if (HasIntKey)
     {
         if (HasData != 0)
             n += (ushort)ConvertEx.GetVarint4(cell, (uint)(cellID + n), out nPayload);
         else
             nPayload = 0;
         n += (ushort)ConvertEx.GetVarint9L(cell, (uint)(cellID + n), out info.nKey);
         info.nData = nPayload;
     }
     else
     {
         info.nData = 0;
         n += (ushort)ConvertEx.GetVarint4(cell, (uint)(cellID + n), out nPayload);
         info.nKey = nPayload;
     }
     info.nPayload = nPayload;
     info.nHeader = n;
     if (Check.LIKELY(nPayload <= this.MaxLocal))
     {
         // This is the (easy) common case where the entire payload fits on the local page.  No overflow is required.
         if ((info.nSize = (ushort)(n + nPayload)) < 4)
             info.nSize = 4;
         info.nLocal = (ushort)nPayload;
         info.iOverflow = 0;
     }
     else
     {
         // If the payload will not fit completely on the local page, we have to decide how much to store locally and how much to spill onto
         // overflow pages.  The strategy is to minimize the amount of unused space on overflow pages while keeping the amount of local storage
         // in between minLocal and maxLocal.
         // Warning:  changing the way overflow payload is distributed in any way will result in an incompatible file format.
         var minLocal = (int)MinLocal; // Minimum amount of payload held locally
         var maxLocal = (int)MaxLocal;// Maximum amount of payload held locally
         var surplus = (int)(minLocal + (nPayload - minLocal) % (Shared.UsableSize - 4));// Overflow payload available for local storage
         info.nLocal = (surplus <= maxLocal ? (ushort)surplus : (ushort)minLocal);
         info.iOverflow = (ushort)(info.nLocal + n);
         info.nSize = (ushort)(info.iOverflow + 4);
     }
 }
开发者ID:JiujiangZhu,项目名称:feaserver,代码行数:49,代码来源:MemPage+Cell.cs

示例9: ToCellInfo

        /// <summary>
        /// Получить CellInfo на основе CellController.
        /// </summary>
        /// <param name="cell">Ячейка.</param>
        public static CellInfo ToCellInfo(CellController cell)
        {
            var res = new CellInfo();
            res.IndexCell = cell.Index;

            var item = cell.Item;
            if (item != null)
            {
                res.IndexItem = item.BaseItem.Index;
                res.Modification = item.Modification;
                res.RarityItem = (int)item.RarityItem;
            }

            return res;
        }
开发者ID:VegK,项目名称:Interface,代码行数:19,代码来源:CellInfo.cs

示例10: ComboBoxDrawItem

		private void ComboBoxDrawItem(object sender, DrawItemEventArgs e)
		{
			e.DrawBackground();

			if (e.Index < 0)
				return;

			var bounds = e.Bounds;
			var cont = (FeatureContainer)_comboBox.Items[e.Index];

			bounds.X += _leftMargin + cont.Level * Config.Instance.ForumDisplayConfig.GridIndent;

			var cd = new CellInfo[5];
			var ni = new NodeInfo(_comboBox.ForeColor, _comboBox.BackColor, _comboBox.Font, false);
			((IGetData)cont.Feature).GetData(ni, cd);

			if (cd[0].Image != null)
			{
				e.Graphics.DrawImage(
					cd[0].Image,
					bounds.X,
					bounds.Y,
					cd[0].Image.Width,
					cd[0].Image.Height);

				bounds.X += cd[0].Image.Width;
			}

			var brush =
				(e.State & DrawItemState.Selected) == 0
					? _comboBox.DroppedDown
						? new SolidBrush(ni.ForeColor)
						: SystemBrushes.ControlText
					: SystemBrushes.HighlightText;

			e.Graphics.DrawString(
				cont.Feature.ToString(),
				ni.Highlight ? new Font(_comboBox.Font, FontStyle.Bold) : _comboBox.Font,
				brush, 
				bounds);
		}
开发者ID:rsdn,项目名称:janus,代码行数:41,代码来源:NavigationComboBoxGenerator.cs

示例11: Clear

        public bool isIncrblobHandle; // True if this cursor is an incr. io handle

        #endif

        #region Methods

        public void Clear()
        {
            pNext = null;
            pPrev = null;
            pKeyInfo = null;
            pgnoRoot = 0;
            cachedRowid = 0;
            info = new CellInfo();
            wrFlag = 0;
            atLast = 0;
            validNKey = false;
            eState = 0;
            pKey = null;
            nKey = 0;
            skipNext = 0;
            #if !SQLITE_OMIT_INCRBLOB
            isIncrblobHandle = false;
            aOverflow = null;
            #endif
            iPage = 0;
        }
开发者ID:JiujiangZhu,项目名称:feaserver,代码行数:27,代码来源:BtCursor.cs

示例12: ptrmapPutOvflPtr

 static void ptrmapPutOvflPtr(MemPage page, byte[] cell, ref RC rcRef)
 {
     if (rcRef != RC.OK) return;
     Debug.Assert(cell != null);
     var info = new CellInfo();
     btreeParseCellPtr(page, cell, ref info);
     Debug.Assert((info.Data + (page.IntKey ? 0 : info.Key)) == info.Payload);
     if (info.Overflow != 0)
     {
         Pid ovfl = ConvertEx.Get4(cell, info.Overflow);
         ptrmapPut(page.Bt, ovfl, PTRMAP.OVERFLOW1, page.ID, ref rcRef);
     }
 }
开发者ID:BclEx,项目名称:GpuStructs,代码行数:13,代码来源:Btree.cs

示例13: cellSizePtr

        static ushort cellSizePtr(MemPage page, byte[] cell)
        {
#if DEBUG
            // The value returned by this function should always be the same as the (CellInfo.nSize) value found by doing a full parse of the
            // cell. If SQLITE_DEBUG is defined, an assert() at the bottom of this function verifies that this invariant is not violated.
            var debuginfo = new CellInfo();
            btreeParseCellPtr(page, cell, ref debuginfo);
#else
            var debuginfo = new CellInfo();
#endif
            var iter = page.ChildPtrSize;
            uint size = 0;
            if (page.IntKey)
            {
                if (page.HasData)
                    iter += ConvertEx.GetVarint32(cell, out size); // iter += ConvertEx.GetVarint32(iter, out size);
                else
                    size = 0;

                // pIter now points at the 64-bit integer key value, a variable length integer. The following block moves pIter to point at the first byte
                // past the end of the key value.
                int end = iter + 9; // end = &pIter[9];
                while (((cell[iter++]) & 0x80) != 0 && iter < end) { } // while ((iter++) & 0x80 && iter < end);
            }
            else
                iter += ConvertEx.GetVarint32(cell, iter, out size); //pIter += getVarint32( pIter, out nSize );

            if (size > page.MaxLocal)
            {
                int minLocal = page.MinLocal;
                size = (uint)(minLocal + (size - minLocal) % (page.Bt.UsableSize - 4));
                if (size > page.MaxLocal)
                    size = (uint)minLocal;
                size += 4;
            }
            size += (uint)iter; // size += (uint32)(iter - cell);

            // The minimum size of any cell is 4 bytes.
            if (size < 4)
                size = 4;

            Debug.Assert(size == debuginfo.Size);
            return (ushort)size;
        }
开发者ID:BclEx,项目名称:GpuStructs,代码行数:44,代码来源:Btree.cs

示例14: AddInitialCell

		public void AddInitialCell(CPos location)
		{
			if (!self.World.Map.Contains(location))
				return;

			CellInfo[location] = new CellInfo(0, location, false);
			Queue.Add(new PathDistance(Heuristic(location), location));
		}
开发者ID:Berzeger,项目名称:OpenRA,代码行数:8,代码来源:PathSearch.cs

示例15: ClearCell

        public void ClearCell(ulong packedCoord, ref CellInfo cellInfo)
        {
            Debug.Assert(m_cellInfos.ContainsKey(packedCoord), "Could not find navmesh cell info for clearing!");

            // Remove information about containing cell
            for (int i = 0; i < cellInfo.ComponentNum; ++i)
            {
                bool success = m_componentCells.Remove(cellInfo.StartingIndex + i);
                Debug.Assert(success, "Inconsistency! Couldn't remove information about cell of a cached navmesh component cell");
            }

            m_cellInfos.Remove(packedCoord);
            DeallocateComponentStartingIndex(cellInfo.StartingIndex, cellInfo.ComponentNum);
        }
开发者ID:2asoft,项目名称:SpaceEngineers,代码行数:14,代码来源:MyNavmeshComponents.cs


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