/// <summary>method: getPegNum /// Provides access to number of the Peg the disk is currently sitting on. /// </summary> /// <returns></returns> public int getPegNum(Disk aDisk) { int disk_PegNum = aDisk.disk_PegNum; return(disk_PegNum); }
/// <summary>method: getDiameter /// Provides access to the Disk diameter. /// </summary> /// <returns></returns> public int getDiameter(Disk aDisk) { int disk_Diam = aDisk.disk_Diam; return(disk_Diam); }
/// <summary> method: getDiskID /// Provides access to the DiskID. /// </summary> /// <returns></returns> public int getDiskID(Disk aDisk) { int diskID = aDisk.diskID; return(diskID); }
/// <summary>method: getDiskColour /// Provides access to the Disk colour. /// </summary> /// <returns></returns> public Color getDiskColour(Disk aDisk) { Color disk_Colour = aDisk.disk_Colour; return(disk_Colour); }
//--------------------------Drag and Drop procedures ------------------------------------ /// <summary>event handler: anyDisk_MouseDown /// Captures user input to select disk to move. If selection valid initiates /// drag and drop procedure and when complete instructs program to adjust /// data accordingly. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void anyDisk_MouseDown(object sender, MouseEventArgs e) { selectedDiskObj = (Disk)sender as Disk; DragDropEffects result = lbl_Disks[Convert.ToInt32(selectedDiskObj)].DoDragDrop(lbl_Disks, DragDropEffects.Move); }