Example #1
0
        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;
        }
Example #2
0
        /*
         * Перегруженные методы
         */

        #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
            {
            }
        }
Example #3
0
 private void ATLBFlightsListView_DisplayerRequested(object sender, ReferenceEventArgs e)
 {
     FlightDialog.Show(SelectedItem);
     e.Cancel = true;
 }
Example #4
0
 private void toolStripMenuItemAdd_Click(object sender, EventArgs e)
 {
     FlightDialog.Show(((Aircraft)currentATLB.Parent).ProposeNextFlight());
 }
Example #5
0
 private void toolStripMenuItemEdit_Click(object sender, EventArgs e)
 {
     FlightDialog.Show(ATLBFlightsViewer.SelectedItem);
 }