public void OnBlockTimelineSelection(CustomBlockTimelineCell cell)
 {
     if (cell.Payload != null)
     {
         customTreeView2.DoNewSelectionWithID((int)cell.Payload, myLinkType);
     }
     else
     {
         Console.WriteLine("Cell Name {0}", cell.Text);
     }
 }
Beispiel #2
0
 private CustomBlockTimelineCell CreateCell(int order, string text)
 {
     CustomBlockTimelineCell cell = new CustomBlockTimelineCell();
     cell.Order = order;
     cell.Text = text;
     cell.IsSelected = false;
     cell.Dock = DockStyle.Fill;
     cell.MouseUp += new MouseEventHandler(On_MouseUp);
     return cell;
 }
Beispiel #3
0
 public void DeSelectCell(CustomBlockTimelineCell cell)
 {
     if (cell != null)
     {
         cell.IsSelected = false;
         //_current_position = new TableLayoutPanelCellPosition(0, 0);
     }
 }
Beispiel #4
0
 public void SelectCell(CustomBlockTimelineCell cell)
 {
     if (cell != null)
     {
         cell.IsSelected = true;
         _current_position = tableLayoutPanel1.GetPositionFromControl(cell);
         Console.WriteLine("CurrentPosition {0}", _current_position.ToString());
     }
 }
Beispiel #5
0
 /// <summary>
 /// Deletes the specified cell.
 /// </summary>
 /// <param name="cell"></param>
 public void DeleteCell(CustomBlockTimelineCell cell)
 {
     if (cell != null)
     {
         TableLayoutPanelCellPosition pos =  tableLayoutPanel1.GetCellPosition(cell);
         tableLayoutPanel1.Controls.Remove(cell);
         if (IsColumnEmpty(pos.Column))
         {
             ShiftColumnsLeft(pos.Column);
             ReduceColumns();
         }
         else
         {
             ShiftRowsUp(pos.Row, pos.Column);
             ReduceRows();
         }
         //DeSelectCell(GetCurrentCell());
         //SelectCell(0, 0);
     }
 }
Beispiel #6
0
 public void SetCellPayload(CustomBlockTimelineCell cell, object payload)
 {
     if (cell != null)
     {
         cell.Payload = payload;
     }
 }