コード例 #1
0
 public FormRoutesInScreenSetting(SequencedTrack track, int pos)
 {
     this.track = track.Track;
     this.pTracks = new List<ProccessedTrack>();
     if (RMMap == null)
         RMMap = new RouteManager();
     Route rt = TrackToRoute(track.Track);
     InitializeComponent();
     InitSourceGrid();
     foreach (Sequence seq in track.GetSequence(pos))
     {
         RMMap.CreateAndRoute(rt, seq.Start - 1, seq.End - 1);
         int iRouteSector = dataGridViewSel.Rows.Add(rt.NameOfRoute);
     }
     InitSelectedGrid();
 }
コード例 #2
0
 public bool InitRasterMap(RouteManager RM1)
 {
     RM = RM1;
     return true;
 }
コード例 #3
0
 private void buttonAdd_Click(object sender, EventArgs e)
 {
     int iRoute = dataGridViewSource.CurrentCell.RowIndex;
     if (iRoute < 0)
     {
         MessageBox.Show("Не выбрана строка");
         return;
     }
     DataGridViewRow row = dataGridViewSource.Rows[iRoute];
     int iBeg = Convert.ToInt32(row.Cells[1].Value);
     int iFin = Convert.ToInt32(row.Cells[2].Value);
     if (iFin < iBeg)
     {
         MessageBox.Show("Неправильно заданы границы");
         return;
     }
     Route rSource = RMSource[iRoute];
     if (RMMap == null)
         RMMap = new RouteManager();
     Route rm = RMMap.CreateAndRoute(rSource, iBeg - 1, iFin - 1);
     if (rm == null)
         return;
     int iRouteSector = dataGridViewSel.Rows.Add(rm.NameOfRoute);
     DataGridViewRow GridRow = dataGridViewSel.Rows[iRouteSector];
     SetSettingsGridCells(GridRow, iRouteSector);
 }
コード例 #4
0
 public bool InitRasterMap(RouteManager RM1)
 {
     bitmap=CreateInitialBitmap();
     RM = RM1;
     Cur = pictureBoxOutput.Cursor;
     CurHand = GetCursorFromBitmap();
     return true;
 }