public ResourceView()
        {
            Resources = new Dictionary<string, ResourceTuple>();
            Fuels = new List<ResourceTuple>();
            LifeSupport = new List<ResourceTuple>();

            var lifeSupportPlot = new PlotViewModel(LineMode.LastN, 100, new LinearAxis());
            var fuelsPlot = new PlotViewModel(LineMode.Continuous, 300, new LinearAxis());

            foreach (var fuelName in fuelNames)
            {
                ResourceTuple tuple = new ResourceTuple { Name = fuelName };
                Resources[fuelName] = tuple;
                Fuels.Add(tuple);
                fuelsPlot.AddSeries(fuelName);
            }

            foreach (var lifeSupportName in lifeSupportNames)
            {
                ResourceTuple tuple = new ResourceTuple { Name = lifeSupportName };
                Resources[lifeSupportName] = tuple;
                LifeSupport.Add(tuple);
                lifeSupportPlot.AddSeries(lifeSupportName);
            }

            LifeSupportPlot = lifeSupportPlot;
            FuelsPlot = fuelsPlot;
        }
        public void Update(KRPC.Client.Services.SpaceCenter.Resources resources, double MET)
        {
            foreach (var name in resources.Names)
            {
                ResourceTuple tuple;
                if (Resources.ContainsKey(name))
                {
                    tuple = Resources[name];
                }
                else
                {
                    tuple = new ResourceTuple() { Name = name };

                    Resources[name] = tuple;
                }

                tuple.Ammount = resources.Amount(name);
                tuple.Maximum = resources.Max(name);
            }

            UpdateFuelPlots(resources, MET);
            UpdateLifeSupportPlots(resources, MET);

            OnPropertyChanged("Resources");
            OnPropertyChanged("Fuels");
        }