예제 #1
0
 /// <summary>
 /// Invalidate this cell. For this type of class I must invalidate the whole grid, because I don't known the current cell position.
 /// </summary>
 public virtual void Invalidate()
 {
     if (m_Grid != null)
     {
         m_Grid.InvalidateCells();
     }
 }
예제 #2
0
        /// <summary>
        /// Fired when a cell is added from the selection or removed from the selection
        /// </summary>
        /// <param name="e"></param>
        protected virtual void OnSelectionChange(SelectionChangeEventArgs e)
        {
//			#warning Temporaneo
//			if (e.EventType == SelectionChangeEventType.Add)
//				System.Diagnostics.Debug.WriteLine("Selection.AddRange " + e.Range.ToString());
//			else if (e.EventType == SelectionChangeEventType.Remove)
//				System.Diagnostics.Debug.WriteLine("Selection.RemoveRange " + e.Range.ToString());
//			else if (e.EventType == SelectionChangeEventType.Clear)
//				System.Diagnostics.Debug.WriteLine("Selection.Clear");

            ClearCache();

            if (e.EventType == SelectionChangeEventType.Add || e.EventType == SelectionChangeEventType.Remove)
            {
                m_Grid.InvalidateRange(e.Range);
            }
            else             //clear
            {
                m_Grid.InvalidateCells();
            }

            if (SelectionChange != null)
            {
                SelectionChange(this, e);
            }
        }
예제 #3
0
 public override void OnChanged(EventArgs e)
 {
     base.OnChanged(e);
     Grid.InvalidateCells();
 }