コード例 #1
0
 ///<summary>
 ///</summary>
 public OilListView(Aircraft parentAircraft, ICommonCollection <ATLB> atlbCollection, OilGraphicModel graph)
     : this()
 {
     SortDirection   = SortDirection.Desc;
     OldColumnIndex  = 1;
     _parentAircraft = parentAircraft;
     _atbs           = atlbCollection;
     _graph          = graph;
 }
コード例 #2
0
ファイル: OilGraphForm.cs プロジェクト: jecus/Cas
        public OilGraphForm(OilGraphicModel graph, DateTime from, DateTime to)
        {
            InitializeComponent();

            _graph = graph;
            FillData();

            this.Text   += $@" (Period: {from.Date:dd.MM.yyyy}  - {to.Date:dd.MM.yyyy})";
            label2.Text += $@" {(to - from).TotalDays:####} days";
        }
コード例 #3
0
ファイル: OilListScreen.cs プロジェクト: mkbiltek2019/Cas
        protected override void AnimatedThreadWorkerDoWork(object sender, DoWorkEventArgs e)
        {
            _graph = new OilGraphicModel();
            _directivesViewer._graph = _graph;
            _initialDirectiveArray.Clear();

            AnimatedThreadWorker.ReportProgress(0, "load Fligths");

            GlobalObjects.AircraftFlightsCore.LoadAircraftFlights(CurrentAircraft.ItemId);

            var flights = GlobalObjects.AircraftFlightsCore.GetAircraftFlightsByAircraftId(CurrentAircraft.ItemId);

            _initialDirectiveArray.AddRange(flights.Where(t => t.FlightDate >= dateTimePickerDateFrom.Value &&
                                                          t.FlightDate <= dateTimePickerDateTo.Value));
            _maintenanceChecks = new List <MaintenanceCheck>(GlobalObjects.CasEnvironment.NewLoader.GetObjectListAll <MaintenanceCheckDTO, MaintenanceCheck>(new List <Filter>()
            {
                new Filter("ParentAircraft", CurrentAircraft.ItemId),
                new Filter("Grouping", true)
            }, true));

            var ids = GlobalObjects.ComponentCore.GetAicraftBaseComponents(CurrentAircraft.ItemId).
                      Where(d => d.BaseComponentType == BaseComponentType.Engine).Select(i => i.ItemId);

            _workParams =
                GlobalObjects.CasEnvironment.NewLoader
                .GetObjectList <ComponentWorkInRegimeParamDTO, ComponentWorkInRegimeParams>(new Filter("ComponentId",
                                                                                                       ids));

            _oilConditions =
                GlobalObjects.CasEnvironment.NewLoader
                .GetObjectList <ComponentOilConditionDTO, ComponentOilCondition>(new Filter[]
            {
                new Filter("ComponentId", ids),
                new Filter("FlightId", flights.Select(i => i.ItemId))
            });

            AnimatedThreadWorker.ReportProgress(40, "filter Fligths");

            FilterItems(_initialDirectiveArray, _resultDirectiveArray);

            AnimatedThreadWorker.ReportProgress(100, "Complete");
        }