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


C# Position.IsEmpty方法代码示例

本文整理汇总了C#中SourceGrid.Position.IsEmpty方法的典型用法代码示例。如果您正苦于以下问题:C# Position.IsEmpty方法的具体用法?C# Position.IsEmpty怎么用?C# Position.IsEmpty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SourceGrid.Position的用法示例。


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

示例1: PositionToCellRange

		/// <summary>
		/// This method converts a Position to the real range of the cell. This is usefull when RowSpan or ColumnSpan is greater than 1.
		/// For example suppose to have at grid[0,0] a cell with ColumnSpan equal to 2. If you call this method with the position 0,0 returns 0,0-0,1 and if you call this method with 0,1 return again 0,0-0,1.
		/// </summary>
		/// <param name="pPosition"></param>
		/// <returns></returns>
		public virtual Range PositionToCellRange(Position pPosition)
		{
			if (pPosition.IsEmpty())
				return Range.Empty;

			ICellVirtual l_Cell = this.GetCell(pPosition.Row, pPosition.Column);
			if (l_Cell == null)
				return Range.Empty;
			else
				return new Range(pPosition);
			//return new Range(pPosition);
		}
开发者ID:js1987,项目名称:openpetragit,代码行数:18,代码来源:GridVirtual.cs

示例2: PositionToCellRange

		/// <summary>
		/// This method converts a Position to the real range of the cell. This is usefull when RowSpan or ColumnSpan is greater than 1.
		/// For example suppose to have at grid[0,0] a cell with ColumnSpan equal to 2. If you call this method with the position 0,0 returns 0,0-0,1 and if you call this method with 0,1 return again 0,0-0,1.
		/// </summary>
		/// <param name="pPosition"></param>
		/// <returns></returns>
		public override Range PositionToCellRange(Position pPosition)
		{
			if (pPosition.IsEmpty())
				return Range.Empty;

			Cells.ICell l_Cell = this[pPosition.Row, pPosition.Column];
			if (l_Cell == null)
				return Range.Empty;
			else
				return l_Cell.Range;
		}
开发者ID:wsrf2009,项目名称:KnxUiEditor,代码行数:17,代码来源:Grid.cs

示例3: GetCell

		/// <summary>
		/// Return the Cell at the specified Row and Col position. This method is called for sort operations and for Move operations. If position is Empty return null. This method calls GetCell(int p_iRow, int p_iCol)
		/// </summary>
		/// <param name="p_Position"></param>
		/// <returns></returns>
		public Cells.ICellVirtual GetCell(Position p_Position)
		{
			if (p_Position.IsEmpty())
				return null;
			else
				return GetCell(p_Position.Row, p_Position.Column);
		}
开发者ID:js1987,项目名称:openpetragit,代码行数:12,代码来源:GridVirtual.cs

示例4: GetPositionType

		/// <summary>
		/// Returns the type of a cell position
		/// </summary>
		/// <param name="position"></param>
		/// <returns></returns>
		public CellPositionType GetPositionType(Position position)
		{
			if (position.IsEmpty())
				return CellPositionType.Empty;
			else if (position.Row < FixedRows && position.Column < FixedColumns)
				return CellPositionType.FixedTopLeft;
			else if (position.Row < FixedRows)
				return CellPositionType.FixedTop;
			else if (position.Column < FixedColumns)
				return CellPositionType.FixedLeft;
			else
				return CellPositionType.Scrollable;
		}
开发者ID:js1987,项目名称:openpetragit,代码行数:18,代码来源:GridVirtual.cs

示例5: OnKeyDown

		protected override void OnKeyDown(KeyEventArgs e)
		{
			base.OnKeyDown(e);
			m_keybordActivePosition = Selection.ActivePosition;

			if (m_keybordActivePosition.IsEmpty() == false)
			{
				Cells.ICellVirtual focusCell = GetCell(m_keybordActivePosition);
				if (focusCell != null)
					Controller.OnKeyDown(new CellContext(this, m_keybordActivePosition, focusCell), e);
			}

			if (e.Handled == false)
				ProcessSpecialGridKey(e);
		}
开发者ID:js1987,项目名称:openpetragit,代码行数:15,代码来源:GridVirtual.cs

示例6: HandleMouseDoubleClick

		private void HandleMouseDoubleClick(Position clickPosition, EventArgs e)
		{
			if (clickPosition.IsEmpty() == true)
				return;
			Cells.ICellVirtual mouseDownCell = GetCell(clickPosition);
			if (mouseDownCell != null)
				Controller.OnDoubleClick(new CellContext(this, clickPosition, mouseDownCell), e);
		}
开发者ID:js1987,项目名称:openpetragit,代码行数:8,代码来源:GridVirtual.cs

示例7: ChangeMouseCell

		/// <summary>
		/// Fired when the cell under the mouse change. For internal use only.
		/// </summary>
		/// <param name="p_Cell"></param>
		public virtual void ChangeMouseCell(Position p_Cell)
		{
			if (m_MouseCellPosition != p_Cell)
			{
				//se la cella che sta perdento il mouse è anche quella che ha ricevuto un eventuale evento di MouseDown non scateno il MouseLeave (che invece verrà scatenato dopo il MouseUp)
				if (m_MouseCellPosition.IsEmpty() == false &&
				    m_MouseCellPosition != m_MouseDownPosition)
				{
					Controller.OnMouseLeave(new CellContext(this, m_MouseCellPosition), EventArgs.Empty);
				}

				m_MouseCellPosition = p_Cell;
				if (m_MouseCellPosition.IsEmpty() == false)
				{
					Controller.OnMouseEnter(new CellContext(this, m_MouseCellPosition), EventArgs.Empty);
				}
			}
		}
开发者ID:js1987,项目名称:openpetragit,代码行数:22,代码来源:GridVirtual.cs

示例8: FindDestinationRange

        /// <summary>
        /// Calculate the destination range for the drop or paste operations.
        /// </summary>
        /// <param name="destinationGrid"></param>
        /// <param name="dropDestination"></param>
        /// <returns></returns>
        public Range FindDestinationRange(GridVirtual destinationGrid, Position dropDestination)
        {
            if (dropDestination.IsEmpty())
                return Range.Empty;

            Position destinationStart = new Position(dropDestination.Row + (mSourceRange.Start.Row - mStartDragPosition.Row),
                dropDestination.Column + (mSourceRange.Start.Column - mStartDragPosition.Column) );

            destinationStart = Position.Max(destinationStart, new Position(0, 0));

            Range destination = mSourceRange;
            destination.MoveTo( destinationStart );

            destination = destination.Intersect(destinationGrid.CompleteRange);

            return destination;
        }
开发者ID:zhuangyy,项目名称:Motion,代码行数:23,代码来源:RangeData.cs

示例9: Contains

        /// <summary>
        /// Indicates if the specified cell is selected
        /// </summary>
        /// <param name="p_Cell"></param>
        /// <returns></returns>
        public virtual bool Contains(Position p_Cell)
        {
            if (p_Cell.IsEmpty() || IsEmpty())
                return false;

            //Range
            for (int i = 0; i < m_RangeCollection.Count; i++)
            {
                if (m_RangeCollection[i].Contains(p_Cell))
                    return true;
            }

            return false;
        }
开发者ID:zhuangyy,项目名称:Motion,代码行数:19,代码来源:RangeRegion.cs


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