Ejemplo n.º 1
0
        private void DateTimePickerAirTimeValueChanged(object sender, EventArgs e)
        {
            dateTimePickerLandTime.ValueChanged -= DateTimePickerLandTimeValueChanged;

            TimeSpan workTime =
                UsefulMethods.GetDifference(dateTimePickerOff.Value.TimeOfDay,
                                            dateTimePickerStart.Value.TimeOfDay);

            dateTimePickerWorkTime.Value = dateTimePickerStart.Value.Date.Add(workTime);

            TimeSpan land =
                UsefulMethods.GetDifference(workTime,
                                            dateTimePickerAirTime.Value.TimeOfDay);

            dateTimePickerLandTime.Value = dateTimePickerStart.Value.Date.Add(land);

            //общее время работы в воздухе с учетом 20% времени работы на земле за данный пуск
            TimeSpan work120Time = dateTimePickerAirTime.Value.TimeOfDay.Add(TimeSpan.FromMinutes(land.TotalMinutes * 0.2));

            dateTimePickerWork120.Value = dateTimePickerStart.Value.Date.Add(work120Time);

            SetLifelenght();

            dateTimePickerLandTime.ValueChanged += DateTimePickerLandTimeValueChanged;
        }
Ejemplo n.º 2
0
        private void DateTimePickerLDGValueChanged(object sender, EventArgs e)
        {
            if (sender != dateTimePickerTakeOff && sender != dateTimePickerLDG)
            {
                return;
            }

            TimeSpan flightDifference =
                UsefulMethods.GetDifference(dateTimePickerLDG.Value.TimeOfDay,
                                            dateTimePickerTakeOff.Value.TimeOfDay);
            TimeSpan day =
                UsefulMethods.GetDifference(flightDifference,
                                            dateTimePickerNight.Value.TimeOfDay);

            textFlight.Text =
                UsefulMethods.TimeToString(flightDifference);
            textBoxDay.Text =
                UsefulMethods.TimeToString(day);

            if (sender == dateTimePickerTakeOff)
            {
                InvokeTakeOffTimeChanget(dateTimePickerTakeOff.Value);
            }
            if (sender == dateTimePickerLDG)
            {
                InvokeLDGTimeChanget(dateTimePickerLDG.Value);
            }
            InvokeFlightTimeChanget(flightDifference);
        }
Ejemplo n.º 3
0
        private void SetWorkLandAirTime()
        {
            dateTimePickerAirTime.ValueChanged  -= DateTimePickerAirTimeValueChanged;
            dateTimePickerLandTime.ValueChanged -= DateTimePickerLandTimeValueChanged;

            TimeSpan air =
                UsefulMethods.GetDifference(_landingTime.TimeOfDay,
                                            _takeOffTime.TimeOfDay);

            dateTimePickerAirTime.Value = dateTimePickerStart.Value.Date.Add(air);

            TimeSpan workTime = UsefulMethods.GetDifference(dateTimePickerOff.Value.TimeOfDay, dateTimePickerStart.Value.TimeOfDay);

            dateTimePickerWorkTime.Value = dateTimePickerStart.Value.Date.Add(workTime);

            TimeSpan land =
                UsefulMethods.GetDifference(workTime, air);

            dateTimePickerLandTime.Value = dateTimePickerStart.Value.Date.Add(land);

            //общее время работы в воздухе с учетом 20% времени работы на земле за данный пуск
            TimeSpan work120Time = air.Add(TimeSpan.FromMinutes(land.TotalMinutes * 0.2));

            dateTimePickerWork120.Value = dateTimePickerStart.Value.Date.Add(work120Time);

            SetLifelenght();

            dateTimePickerAirTime.ValueChanged  += DateTimePickerAirTimeValueChanged;
            dateTimePickerLandTime.ValueChanged += DateTimePickerLandTimeValueChanged;
        }
Ejemplo n.º 4
0
        private void dateTimePickerTakeOffD_ValueChanged(object sender, EventArgs e)
        {
            if (sender != dateTimePickerTakeOffD && sender != dateTimePickerLDGD)
            {
                return;
            }

            var flightDifference = UsefulMethods.GetDifference(dateTimePickerLDGD.Value.TimeOfDay, dateTimePickerTakeOffD.Value.TimeOfDay);

            textFlightD.Text = UsefulMethods.TimeToString(flightDifference);
        }
Ejemplo n.º 5
0
        private void DateTimePickerNightValueChanged(object sender, EventArgs e)
        {
            TimeSpan flightDifference =
                UsefulMethods.GetDifference(dateTimePickerLDG.Value.TimeOfDay,
                                            dateTimePickerTakeOff.Value.TimeOfDay);
            TimeSpan day =
                UsefulMethods.GetDifference(flightDifference,
                                            dateTimePickerNight.Value.TimeOfDay);

            textBoxDay.Text =
                UsefulMethods.TimeToString(day);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Пользователь ввел изменения в интервал времени, изменяем разницу
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void textTakeOffLDG_TextChanged(object sender, EventArgs e)
        {
            TimeSpan time1, time2;

            if (UsefulMethods.ParseTimePeriod(textTakeOffLDG.Text, out time1, out time2))
            {
                textFlight.Text = UsefulMethods.TimeToString(UsefulMethods.GetDifference(time2, time1));
            }
            else
            {
                textFlight.Text = "";
            }
        }
Ejemplo n.º 7
0
        /*
         * События формы
         */

        #region private void TextOutInTextChanged(object sender, EventArgs e)
        ///// <summary>
        ///// Пользователь ввел изменения в интервал времени, изменяем разницу
        ///// </summary>
        ///// <param name="sender"></param>
        ///// <param name="e"></param>
        //private void TextOutInTextChanged(object sender, EventArgs e)
        //{
        //    TimeSpan time1, time2;
        //    if (UsefulMethods.ParseTimePeriod(textOutIn.Text, out time1, out time2))
        //    {
        //        textBlock.Text = UsefulMethods.TimeToString(UsefulMethods.GetDifference(time2, time1));
        //    }
        //    else
        //    {
        //        textBlock.Text = "";
        //    }
        //}
        #endregion

        #region private void TextTakeOffLDGTextChanged(object sender, EventArgs e)
        ///// <summary>
        ///// Пользователь ввел изменения в интервал времени, изменяем разницу
        ///// </summary>
        ///// <param name="sender"></param>
        ///// <param name="e"></param>
        //private void TextTakeOffLDGTextChanged(object sender, EventArgs e)
        //{
        //    TimeSpan time1, time2;
        //    if (UsefulMethods.ParseTimePeriod(textTakeOffLDG.Text, out time1, out time2))
        //    {
        //        textFlight.Text = UsefulMethods.TimeToString(UsefulMethods.GetDifference(time2, time1));
        //    }
        //    else
        //    {
        //        textFlight.Text = "";
        //    }
        //}
        #endregion

        #region private void TextOutInLeave(object sender, EventArgs e)
        ///// <summary>
        ///// Пользователь покидает поле ввода интервала, приводим к нужному формату
        ///// </summary>
        ///// <param name="sender"></param>
        ///// <param name="e"></param>
        //private void TextOutInLeave(object sender, EventArgs e)
        //{
        //    TimeSpan time1, time2;
        //    if (UsefulMethods.ParseTimePeriod(textOutIn.Text, out time1, out time2))
        //        textOutIn.Text = UsefulMethods.TimePeriodToString(time1, time2);
        //}
        #endregion

        #region private void TextTakeOffLDGLeave(object sender, EventArgs e)
        ///// <summary>
        ///// Пользователь покидает поле ввода интервала, приводим к нужному формату
        ///// </summary>
        ///// <param name="sender"></param>
        ///// <param name="e"></param>
        //private void TextTakeOffLDGLeave(object sender, EventArgs e)
        //{
        //    TimeSpan time1, time2;
        //    if (UsefulMethods.ParseTimePeriod(textTakeOffLDG.Text, out time1, out time2))
        //        textTakeOffLDG.Text = UsefulMethods.TimePeriodToString(time1, time2);
        //}
        #endregion

        /*
         * Реализация
         */

        #region private bool ValidateTimePeriod(TextBox textBox)
        ///// <summary>
        ///// Проверяем введенный интервал времени
        ///// </summary>
        ///// <returns></returns>
        //private bool ValidateTimePeriod(TextBox textBox)
        //{

        //    TimeSpan time1, time2;
        //    if (!UsefulMethods.ParseTimePeriod(textBox.Text, out time1, out time2))
        //    {

        //        SimpleBalloon.Show(textBox, ToolTipIcon.Warning, "Incorrect time format", "Please enter the time period in the following format:\nHH.MM - HH.MM");

        //        return false;
        //    }

        //    //
        //    return true;
        //}
        #endregion

        #region private void DateTimePickerOutValueChanged(object sender, EventArgs e)
        private void DateTimePickerOutValueChanged(object sender, EventArgs e)
        {
            if (sender != dateTimePickerIn && sender != dateTimePickerOut)
            {
                return;
            }
            textBlock.Text =
                UsefulMethods.TimeToString(UsefulMethods.GetDifference(dateTimePickerIn.Value.TimeOfDay,
                                                                       dateTimePickerOut.Value.TimeOfDay));

            if (sender == dateTimePickerOut)
            {
                InvokeOutTimeChanget(dateTimePickerOut.Value);

                dateTimePickerTakeOff.Value = dateTimePickerOut.Value;
            }
            if (sender == dateTimePickerIn)
            {
                InvokeInTimeChanget(dateTimePickerIn.Value);

                dateTimePickerLDG.Value = dateTimePickerIn.Value;
            }
        }
Ejemplo n.º 8
0
        protected override List <CustomCell> GetListViewSubItems(IFlightNumberParams item)
        {
            var subItems = new List <CustomCell>();

            if (item is FlightNumber)
            {
                var flightNumber = item as FlightNumber;
                var author       = GlobalObjects.CasEnvironment.GetCorrector(flightNumber);

                subItems.Add(CreateRow(flightNumber.FlightNo.ToString(), Tag = flightNumber.FlightNo));
                subItems.Add(CreateRow("", ""));
                subItems.Add(CreateRow("", ""));
                subItems.Add(CreateRow("", ""));
                subItems.Add(CreateRow("", ""));
                subItems.Add(CreateRow("", ""));
                subItems.Add(CreateRow("", ""));
                subItems.Add(CreateRow("", ""));
                subItems.Add(CreateRow("", ""));
                subItems.Add(CreateRow("", ""));
                subItems.Add(CreateRow("", ""));
                subItems.Add(CreateRow("", ""));
                subItems.Add(CreateRow("", ""));
                subItems.Add(CreateRow(flightNumber.Description, flightNumber.Description));
                subItems.Add(CreateRow(flightNumber.Remarks, flightNumber.Remarks));
                subItems.Add(CreateRow(flightNumber.HiddenRemarks, flightNumber.HiddenRemarks));
                subItems.Add(CreateRow(author, author));
            }
            else
            {
                var    flightNumberPeriod = item as FlightNumberPeriod;
                var    author             = GlobalObjects.CasEnvironment.GetCorrector(flightNumberPeriod);
                string period;
                if (flightNumberPeriod.FlightType == FlightType.Schedule)
                {
                    period = $"{flightNumberPeriod.DepartureDate:dd-MMMM-yyyy} - {flightNumberPeriod.ArrivalDate:dd-MMMM-yyyy}";
                }
                else
                {
                    period = $"{flightNumberPeriod.DepartureDate:dd-MMMM-yyyy}";
                }

                var flightDifference = UsefulMethods.GetDifference(new TimeSpan(0, flightNumberPeriod.PeriodTo, 0), new TimeSpan(0, flightNumberPeriod.PeriodFrom, 0));
                var flightTime       = UsefulMethods.TimeToString(flightDifference);

                var aircrafts = "";

                foreach (var model in flightNumberPeriod.FlightNum.AircraftModels)
                {
                    aircrafts += $"{model.AircraftModel} ";
                }

                var days = "";
                if (flightNumberPeriod.IsMonday)
                {
                    if (days != "")
                    {
                        days += " , ";
                    }
                    days += "1";
                }
                if (flightNumberPeriod.IsTuesday)
                {
                    if (days != "")
                    {
                        days += " , ";
                    }
                    days += "2";
                }
                if (flightNumberPeriod.IsWednesday)
                {
                    if (days != "")
                    {
                        days += " , ";
                    }
                    days += "3";
                }
                if (flightNumberPeriod.IsThursday)
                {
                    if (days != "")
                    {
                        days += " , ";
                    }
                    days += "4";
                }
                if (flightNumberPeriod.IsFriday)
                {
                    if (days != "")
                    {
                        days += " , ";
                    }
                    days += "5";
                }
                if (flightNumberPeriod.IsSaturday)
                {
                    if (days != "")
                    {
                        days += " , ";
                    }
                    days += "6";
                }
                if (flightNumberPeriod.IsSunday)
                {
                    if (days != "")
                    {
                        days += " , ";
                    }
                    days += "7";
                }

                var departure = flightNumberPeriod.DepartureDate.Date.AddMinutes(flightNumberPeriod.PeriodFrom);
                var arrival   = flightNumberPeriod.DepartureDate.Date.AddMinutes(flightNumberPeriod.PeriodTo);

                var distance = $"{flightNumberPeriod.FlightNum.Distance} {flightNumberPeriod.FlightNum.DistanceMeasure}";

                subItems.Add(CreateRow("", ""));
                subItems.Add(CreateRow(period, period));
                subItems.Add(CreateRow(days, days));
                subItems.Add(CreateRow(flightNumberPeriod.FlightNum.StationFrom.ToString(), flightNumberPeriod.FlightNum.StationFrom));
                subItems.Add(CreateRow(departure.ToString("HH:mm"), departure));
                subItems.Add(CreateRow(flightNumberPeriod.FlightNum.StationTo.ToString(), flightNumberPeriod.FlightNum.StationTo));
                subItems.Add(CreateRow(arrival.ToString("HH:mm"), arrival));
                subItems.Add(CreateRow(flightTime, flightTime));
                subItems.Add(CreateRow(aircrafts, aircrafts));
                subItems.Add(CreateRow(distance, flightNumberPeriod.FlightNum.Distance));
                subItems.Add(CreateRow(flightNumberPeriod.FlightNum.FlightAircraftCode.ToString(), flightNumberPeriod.FlightNum.FlightAircraftCode));
                subItems.Add(CreateRow(flightNumberPeriod.FlightNum.FlightType.ToString(), flightNumberPeriod.FlightNum.FlightType));
                subItems.Add(CreateRow(flightNumberPeriod.FlightNum.FlightCategory.ToString(), flightNumberPeriod.FlightNum.FlightCategory));
                subItems.Add(CreateRow("", ""));
                subItems.Add(CreateRow("", ""));
                subItems.Add(CreateRow("", ""));
                subItems.Add(CreateRow(author, author));
            }

            return(subItems);
        }
Ejemplo n.º 9
0
        protected override List <CustomCell> GetListViewSubItems(FlightPlanOpsRecords item)
        {
            var subItems = new List <CustomCell>();

            var ll = Lifelength.Null;

            var llColor = radGridView1.ForeColor;

            var flightNum          = item.FlightTrackRecord.FlightNo;
            var period             = item.FlightTrackRecord.FlightNumberPeriod;
            var aircraft           = item.Aircraft?.ToString() ?? "";
            var aircraftExchange   = item.AircraftExchange?.ToString() ?? "";
            var direction          = $"{period.StationFrom.ShortName} - {period.StationTo.ShortName}";
            var reasonDelay        = item.DelayReason?.ToString() ?? "";
            var reasonCansellation = item.CancelReason?.ToString() ?? "";
            var reason             = item.Reason?.ToString() ?? "";
            var status             = item.Status != OpsStatus.Unknown ? item.Status.ToString() : "";

            var depArrS           = $"{period.DepartureDate.Date.AddMinutes(period.PeriodFrom):HH:mm} - {period.DepartureDate.Date.AddMinutes(period.PeriodTo):HH:mm}";
            var flightDifferenceS = UsefulMethods.GetDifference(new TimeSpan(0, period.PeriodTo, 0), new TimeSpan(0, period.PeriodFrom, 0));
            var flightTimeS       = UsefulMethods.TimeToString(flightDifferenceS);

            var depArrD            = "";
            var flightTimeD        = "";
            var depDelayString     = "";
            var arrDelayString     = "";
            var arrEstimatedString = "";
            var author             = GlobalObjects.CasEnvironment.GetCorrector(item);

            if (item.IsDispatcherEdit && item.IsDispatcherEditLdg)
            {
                depArrD = $"{period.DepartureDate.Date.AddMinutes(item.PeriodFrom):HH:mm} - {period.DepartureDate.Date.AddMinutes(item.PeriodTo):HH:mm}";
                var flightDifferenceD = UsefulMethods.GetDifference(new TimeSpan(0, item.PeriodTo, 0), new TimeSpan(0, item.PeriodFrom, 0));
                flightTimeD = UsefulMethods.TimeToString(flightDifferenceD);


                if (item.PeriodFrom > period.PeriodFrom)
                {
                    var depDelay = UsefulMethods.GetDifference(new TimeSpan(0, item.PeriodFrom, 0), new TimeSpan(0, period.PeriodFrom, 0));
                    depDelayString = UsefulMethods.TimeToString(depDelay);

                    arrEstimatedString = UsefulMethods.TimeToString(new TimeSpan(0, period.PeriodTo, 0).Add(depDelay));
                }

                if (item.PeriodTo > period.PeriodTo)
                {
                    var arrDelay = UsefulMethods.GetDifference(new TimeSpan(0, item.PeriodTo, 0), new TimeSpan(0, period.PeriodTo, 0));
                    arrDelayString = UsefulMethods.TimeToString(arrDelay);
                }
            }
            else if (item.IsDispatcherEdit)
            {
                depArrD = $"{period.DepartureDate.Date.AddMinutes(item.PeriodFrom):HH:mm} - --:--";

                if (item.PeriodFrom > period.PeriodFrom)
                {
                    var depDelay = UsefulMethods.GetDifference(new TimeSpan(0, item.PeriodFrom, 0), new TimeSpan(0, period.PeriodFrom, 0));
                    depDelayString = UsefulMethods.TimeToString(depDelay);

                    arrEstimatedString = UsefulMethods.TimeToString(new TimeSpan(0, period.PeriodTo, 0).Add(depDelay));
                }
                else
                {
                    arrEstimatedString = UsefulMethods.TimeToString(period.DepartureDate.Date.AddMinutes(item.PeriodFrom).TimeOfDay.Add(flightDifferenceS));
                }
            }
            else if (item.ParentFlight != null)
            {
                if (item.ParentFlight.TakeOffTime > period.PeriodFrom)
                {
                    var depDelay = UsefulMethods.GetDifference(new TimeSpan(0, item.ParentFlight.TakeOffTime, 0), new TimeSpan(0, period.PeriodFrom, 0));
                    depDelayString = UsefulMethods.TimeToString(depDelay);
                }
            }

            var depArrF     = "";
            var flightTimeF = "";
            var flType      = item.FlightTrackRecord.FlightType.ToString();
            var flCat       = item.FlightTrackRecord.FlightCategory.ToString();

            if (item.ParentFlight != null)
            {
                flCat  = item.ParentFlight.FlightCategory.ToString();
                flType = item.FlightType.ToString();

                depArrF = $"{period.DepartureDate.Date.AddMinutes(item.ParentFlight.TakeOffTime):HH:mm} - {period.DepartureDate.Date.AddMinutes(item.ParentFlight.LDGTime):HH:mm}";
                var flightDifferenceF = UsefulMethods.GetDifference(new TimeSpan(0, item.ParentFlight.LDGTime, 0), new TimeSpan(0, item.ParentFlight.TakeOffTime, 0));
                flightTimeF = UsefulMethods.TimeToString(flightDifferenceF);

                if (_calculated)
                {
                    if (previousHasFlight)
                    {
                        previousHasFlight = true;
                        ll = GlobalObjects.CasEnvironment.Calculator.GetFlightLifelengthIncludingThisFlight(item.ParentFlight);
                    }
                    else
                    {
                        var lastll = _tempDict[item.ParentFlight.AircraftId].Last();
                        lastll.Add(new Lifelength(0, 1, (int)flightDifferenceF.TotalMinutes));
                        ll      = lastll;
                        llColor = Color.Orange;

                        previousHasFlight = false;
                    }

                    if (_tempDict.ContainsKey(item.ParentFlight.AircraftId))
                    {
                        _tempDict[item.ParentFlight.AircraftId].Add(ll);
                    }
                    else
                    {
                        _tempDict.Add(item.ParentFlight.AircraftId, new List <Lifelength> {
                            ll
                        });
                    }


                    _tempDict[item.ParentFlight.AircraftId].Add(ll);
                }
            }
            else
            {
                if (item.AircraftExchangeId > 0 || item.AircraftId > 0)
                {
                    var a = item.AircraftExchangeId > 0 ? item.AircraftExchange : item.Aircraft;
                    if (_tempDict.ContainsKey(a.ItemId))
                    {
                        var lastll = _tempDict[a.ItemId].Last();
                        lastll.Add(new Lifelength(0, 1, (int)flightDifferenceS.TotalMinutes));
                        ll = lastll;

                        _tempDict[a.ItemId].Add(ll);
                        llColor           = Color.Red;
                        previousHasFlight = false;
                    }
                    else
                    {
                        ll      = GlobalObjects.CasEnvironment.Calculator.GetFlightLifelengthOnEndOfDay(a, item.Date);
                        llColor = Color.Red;
                        _tempDict.Add(a.ItemId, new List <Lifelength> {
                            ll
                        });
                    }
                }
            }

            var days = "";

            if (period.IsMonday)
            {
                if (days != "")
                {
                    days += " , ";
                }
                days += "1";
            }
            if (period.IsTuesday)
            {
                if (days != "")
                {
                    days += " , ";
                }
                days += "2";
            }
            if (period.IsWednesday)
            {
                if (days != "")
                {
                    days += " , ";
                }
                days += "3";
            }
            if (period.IsThursday)
            {
                if (days != "")
                {
                    days += " , ";
                }
                days += "4";
            }
            if (period.IsFriday)
            {
                if (days != "")
                {
                    days += " , ";
                }
                days += "5";
            }
            if (period.IsSaturday)
            {
                if (days != "")
                {
                    days += " , ";
                }
                days += "6";
            }
            if (period.IsSunday)
            {
                if (days != "")
                {
                    days += " , ";
                }
                days += "7";
            }

            subItems.Add(CreateRow(flightNum.ToString(), flightNum));
            subItems.Add(CreateRow(aircraft, item.Aircraft));
            subItems.Add(CreateRow(aircraftExchange, item.AircraftExchange));
            subItems.Add(CreateRow(status, item.Status));
            subItems.Add(CreateRow(reasonDelay, reasonDelay));
            subItems.Add(CreateRow(reasonCansellation, reasonCansellation));
            subItems.Add(CreateRow(reason, reason));
            subItems.Add(CreateRow(days, days));
            subItems.Add(CreateRow(direction, direction));
            subItems.Add(CreateRow(depArrS, depArrS));
            subItems.Add(CreateRow(flightTimeS, flightTimeS));
            subItems.Add(CreateRow(depArrD, depArrD));
            subItems.Add(CreateRow(flightTimeD, flightTimeD));
            subItems.Add(CreateRow(depDelayString, depDelayString));
            subItems.Add(CreateRow(arrEstimatedString, arrEstimatedString));
            subItems.Add(CreateRow(arrDelayString, arrDelayString));
            subItems.Add(CreateRow(depArrF, depArrF));
            subItems.Add(CreateRow(flightTimeF, flightTimeF));

            if (_calculated)
            {
                subItems.Add(CreateRow(ll.ToHoursMinutesAndCyclesFormat("", ""), ll, llColor));
                subItems.Add(CreateRow("", ""));
                subItems.Add(CreateRow("", ""));
                subItems.Add(CreateRow("", ""));
                subItems.Add(CreateRow("", ""));
                subItems.Add(CreateRow("", ""));
            }

            subItems.Add(CreateRow("", ""));
            subItems.Add(CreateRow("", ""));
            subItems.Add(CreateRow("", ""));
            subItems.Add(CreateRow("", ""));
            subItems.Add(CreateRow("", ""));
            subItems.Add(CreateRow(flType, flType));
            subItems.Add(CreateRow(flCat, flCat));
            subItems.Add(CreateRow(item.Remarks, item.Remarks));
            subItems.Add(CreateRow(item.HiddenRemarks, item.HiddenRemarks));
            subItems.Add(CreateRow(author, author));

            return(subItems);
        }
Ejemplo n.º 10
0
        protected override List <CustomCell> GetListViewSubItems(FlightTrackRecord item)
        {
            var aircrafts = "";
            var flightNo  = item.FlightNumberPeriod?.FlightNo.ToString();

            var flightDifference = UsefulMethods.GetDifference(new TimeSpan(0, item.FlightNumberPeriod.PeriodTo, 0), new TimeSpan(0, item.FlightNumberPeriod.PeriodFrom, 0));
            var flightTime       = UsefulMethods.TimeToString(flightDifference);

            var departure = item.FlightNumberPeriod.DepartureDate.Date.AddMinutes(item.FlightNumberPeriod.PeriodFrom);
            var arrival   = item.FlightNumberPeriod.DepartureDate.Date.AddMinutes(item.FlightNumberPeriod.PeriodTo);
            var author    = GlobalObjects.CasEnvironment.GetCorrector(item);
            var distance  = $"{item.FlightNumberPeriod.FlightNum.Distance} {item.FlightNumberPeriod.FlightNum.DistanceMeasure}";

            foreach (var model in item.FlightNumberPeriod.FlightNum.AircraftModels)
            {
                aircrafts += $"{model.AircraftModel} ";
            }

            var days = "";

            if (item.FlightNumberPeriod.IsMonday)
            {
                if (days != "")
                {
                    days += " , ";
                }
                days += "1";
            }
            if (item.FlightNumberPeriod.IsTuesday)
            {
                if (days != "")
                {
                    days += " , ";
                }
                days += "2";
            }
            if (item.FlightNumberPeriod.IsWednesday)
            {
                if (days != "")
                {
                    days += " , ";
                }
                days += "3";
            }
            if (item.FlightNumberPeriod.IsThursday)
            {
                if (days != "")
                {
                    days += " , ";
                }
                days += "4";
            }
            if (item.FlightNumberPeriod.IsFriday)
            {
                if (days != "")
                {
                    days += " , ";
                }
                days += "5";
            }
            if (item.FlightNumberPeriod.IsSaturday)
            {
                if (days != "")
                {
                    days += " , ";
                }
                days += "6";
            }
            if (item.FlightNumberPeriod.IsSunday)
            {
                if (days != "")
                {
                    days += " , ";
                }
                days += "7";
            }

            if (item.FlightType != FlightType.Schedule)
            {
                days += $" ({item.FlightNumberPeriod.DepartureDate:dd-MMMM-yyyy})";
            }

            return(new List <CustomCell>
            {
                CreateRow(flightNo, flightNo),
                CreateRow(aircrafts, aircrafts),
                CreateRow(days, days),
                CreateRow(item.FlightNumberPeriod.FlightNum.StationFrom.ToString(), item.FlightNumberPeriod.FlightNum.StationFrom),
                CreateRow(departure.ToString("HH:mm"), departure),
                CreateRow(item.FlightNumberPeriod.FlightNum.StationTo.ToString(), item.FlightNumberPeriod.FlightNum.StationTo),
                CreateRow(arrival.ToString("HH:mm"), arrival),
                CreateRow(flightTime, flightTime),
                CreateRow(distance, item.FlightNumberPeriod.FlightNum.Distance),
                CreateRow(item.FlightNumberPeriod.FlightNum.FlightAircraftCode.ToString(), item.FlightNumberPeriod.FlightNum.FlightAircraftCode),
                CreateRow(item.FlightNumberPeriod.FlightNum.FlightType.ToString(), item.FlightNumberPeriod.FlightNum.FlightType),
                CreateRow(item.FlightNumberPeriod.FlightNum.FlightCategory.ToString(), item.FlightNumberPeriod.FlightNum.FlightCategory),
                CreateRow(item.FlightNumberPeriod.FlightNum.Description, item.FlightNumberPeriod.FlightNum.Description),
                CreateRow(item.FlightNumberPeriod.FlightNum.Remarks, item.FlightNumberPeriod.FlightNum.Remarks),
                CreateRow(item.FlightNumberPeriod.FlightNum.HiddenRemarks, item.FlightNumberPeriod.FlightNum.HiddenRemarks),
                CreateRow(author, Tag = author)
            });
        }