예제 #1
0
        public MainWindowViewModel()
        {
            Draft      = 25;
            Speed      = 18;
            DraftAtAft = 10;
            DraftAtFwd = 12;

            PowerRecords = ExcelFileDataExtractor.ReadPowerValuesFromXLS();

            List <DataPoint> psPoints, puPoints;

            ComputePlotPoints(out puPoints, out psPoints);
            AbsolutePowerUsagePlotModel = new GreenFLOATOxyplotModel(TRIM, POWER_SAVINGS_PERCENTAGE)
            {
                Title = ABSOLUTE_POWER_USAGE
            };
            PowerSavingsPlotModel = new GreenFLOATOxyplotModel(TRIM, POWER_USAGE)
            {
                Title = POWER_SAVINGS
            };
            SFOCPlotModel = new GreenFLOATOxyplotModel(SPEED_IN_KNOTS, FUEL_CONSUMPTION)
            {
                Title = "SFOC"
            };
            DraftAtAftPlotModel = new GreenFLOATOxyplotBarGraphModel("Draft@Aft", DraftAtAft);
            DraftAtFwdPlotModel = new GreenFLOATOxyplotBarGraphModel("Draft@Fwd", DraftAtFwd);

            UpdatePowerGraphs();
            ReadSFOCValuesFromXLS();
        }
        public MainWindowViewModel()
        {
            Draft = 25;
            Speed = 18;
            DraftAtAft = 10;
            DraftAtFwd = 12;

            PowerRecords = ExcelFileDataExtractor.ReadPowerValuesFromXLS();

            List<DataPoint> psPoints, puPoints;
            ComputePlotPoints(out puPoints, out psPoints);
            AbsolutePowerUsagePlotModel = new GreenFLOATOxyplotModel(TRIM, POWER_SAVINGS_PERCENTAGE) { Title = ABSOLUTE_POWER_USAGE };
            PowerSavingsPlotModel = new GreenFLOATOxyplotModel(TRIM, POWER_USAGE) { Title = POWER_SAVINGS };
            SFOCPlotModel = new GreenFLOATOxyplotModel(SPEED_IN_KNOTS, FUEL_CONSUMPTION) { Title = "SFOC" };
            DraftAtAftPlotModel = new GreenFLOATOxyplotBarGraphModel("Draft@Aft", DraftAtAft);
            DraftAtFwdPlotModel = new GreenFLOATOxyplotBarGraphModel("Draft@Fwd", DraftAtFwd);

            UpdatePowerGraphs();
            ReadSFOCValuesFromXLS();
        }