private void buttonRegisterFlight_DisplayerRequested(object sender, ReferenceEventArgs e) { Aircraft a = currentATLB.Parent as Aircraft; if (a != null) { AircraftFlight flight = a.ProposeNextFlight(); // todo: Сергей Фролов, нужно сохранить Flight в открытом бортовом журнале (в гуях) //flight.ATLB = currentATLB; FlightDialog.Show(flight); } /*e.RequestedEntity = new DispatcheredDetailAddingScreen(currentATLB); * e.DisplayerText = currentATLB.RegistrationNumber + ". New Component";*/ e.Cancel = true; }
/* * Перегруженные методы */ #region public static void Show(AircraftFlight Flight) /// <summary> /// Вызывает диалог редактирования объекта. /// Данный метод придется вручную переписать. /// </summary> /// <param name="Flight"></param> public static void Show(AircraftFlight Flight) { FlightDialog dlg = GetDialogByObject(Flight) as FlightDialog; if (dlg == null) { dlg = new FlightDialog(Flight); RegisterDialog(dlg); } dlg.Show(); try { dlg.Activate(); } catch { } }
private void ATLBFlightsListView_DisplayerRequested(object sender, ReferenceEventArgs e) { FlightDialog.Show(SelectedItem); e.Cancel = true; }
private void toolStripMenuItemAdd_Click(object sender, EventArgs e) { FlightDialog.Show(((Aircraft)currentATLB.Parent).ProposeNextFlight()); }
private void toolStripMenuItemEdit_Click(object sender, EventArgs e) { FlightDialog.Show(ATLBFlightsViewer.SelectedItem); }