protected virtual void MapGoTo(object sender, GoToEventArgs a)
 {
     if (a.Sector <= dc.i.Length / dc.i.sectorSize && a.Sector >= 0)
     {
         dc.selectedSector = a.Sector;
         int sectorsPerRow = sectorGrid.Width / dc.sectorSquareSize;
         if (dc.selectedSector > sectorsPerRow)
         {
             this.gridStartRow = (dc.selectedSector / sectorsPerRow) - 1;
         }
         gridScroll.Value = (int)this.gridStartRow;
         sectorGrid.Invalidate();
         sectorGrid.Update();
     }
     else
     {
         MessageBox.Show("Value too large or too small.");
         _mapGoToForm = new MapGoTo();
         _mapGoToForm.GoTo += MapGoTo;
         _mapGoToForm.ShowDialog();
     }
 }
 protected virtual void MapGoTo(object sender, GoToEventArgs a)
 {
     if (a.Sector <= dc.i.Length / dc.i.sectorSize && a.Sector >= 0)
     {
         dc.selectedSector = a.Sector;
         int sectorsPerRow = sectorGrid.Width / dc.sectorSquareSize;
         if (dc.selectedSector > sectorsPerRow)
         {
             this.gridStartRow = (dc.selectedSector / sectorsPerRow) - 1;
         }
         gridScroll.Value = (int)this.gridStartRow;
         sectorGrid.Invalidate();
         sectorGrid.Update();
     }
     else
     {
         MessageBox.Show("Value too large or too small.");
         _mapGoToForm       = new MapGoTo();
         _mapGoToForm.GoTo += MapGoTo;
         _mapGoToForm.ShowDialog();
     }
 }
 private void goToToolStripMenuItem_Click(object sender, EventArgs e)
 {
     _mapGoToForm = new MapGoTo();
     _mapGoToForm.GoTo += MapGoTo;
     _mapGoToForm.ShowDialog();
 }
 private void goToToolStripMenuItem_Click(object sender, EventArgs e)
 {
     _mapGoToForm       = new MapGoTo();
     _mapGoToForm.GoTo += MapGoTo;
     _mapGoToForm.ShowDialog();
 }