示例#1
0
        protected virtual void DoGoToEvent(GoToEventArgs a)
        {
            if (GoTo != null)
            {
                GoTo(this, a);

                this.Close();
            }
        }
示例#2
0
        protected virtual void DoGoToEvent(GoToEventArgs a)
        {
            if (GoTo != null)
            {
                GoTo(this, a);

                this.Close();
            }
        }
示例#3
0
 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();
     }
 }
示例#4
0
 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();
     }
 }