private void DoubleClickTempMove(Point point) { if (_dgvMain.GetID() == 0) { return; } TempMoveList tempMoveList = TempMoveList.getInstance(); TempMove tempMove = tempMoveList.getItem(_dgvMain.GetID()); TempMove_AddEdit tempMoveAE = new TempMove_AddEdit(tempMove); if (tempMoveAE.ShowDialog() == DialogResult.OK) { loadCars(); } }
private ToolStripMenuItem CreateNewTempMove() { ToolStripMenuItem item = CreateItem("Новое временное перемещение"); item.Click += delegate { Car car = _dgvMain.GetCar(); if (car == null) { return; } TempMove tempMove = car.createTempMove(); TempMove_AddEdit tempMoveAE = new TempMove_AddEdit(tempMove); tempMoveAE.ShowDialog(); }; return(item); }