//List<UnitsContainer> unitsContainers;

        //public MainWindow(IStatisticsRepository repo, UnitManager manager)
        public MainWindow(ContainersApi containers)
        {
            InitializeComponent();
            //this.repo = repo;
            //this.unitsContainers = manager.GetContainers();
            //this.UnitTypeComboBox.ItemsSource = this.unitsContainers;
            //UsageStatisticsGrid.ItemsSource = this.repo.GetAllStatistics();

            this.containers = containers;
            this.UnitTypeComboBox.ItemsSource    = containers.GetContainers();
            this.AddUnitTypeComboBox.ItemsSource = containers.GetContainers();
            UsageStatisticsGrid.ItemsSource      = containers.GetAllStatistics();
        }
        private void CountButtonClicked(object sender, RoutedEventArgs e)
        {
            double score;

            getProperties();

            var currentContainer = (UnitsContainer)UnitTypeComboBox.SelectedValue;

            if (currentContainer.Convert(baseType, baseVal, convertedType, out score))
            {
                this.convertedValTextBox.Text = score.ToString();
            }
            //this.repo.AddSingleStatistic(new StatisticDTO() {
            //    Type = unitType,
            //    BaseUnit = baseType,
            //    BaseValue = baseVal,
            //    ConvertedUnit = convertedType,
            //    ConvertedValue = convertedVal,
            //    Time = DateTime.Now
            //});

            //UsageStatisticsGrid.ItemsSource = this.repo.GetAllStatistics();
            UsageStatisticsGrid.ItemsSource = containers.GetAllStatistics();
        }