private void LoadStatistics()
        {
            _statistics = new StatisticsObject();

            if (WaveServices.Storage.ExistsStorageFile(STATISTICS_FILE_NAME))
            {
                _statistics = WaveServices.Storage.Read <StatisticsObject>(STATISTICS_FILE_NAME);
            }
        }
Exemplo n.º 2
0
        public void AddStatistic(StatisticsObject statistic)
        {
            StatisticsEntity entity = new StatisticsEntity();

            entity.PartitionKey = string.Empty;
            entity.RowKey       = Guid.NewGuid().ToString();
            entity.CL_UnitFrom  = statistic.CL_UnitFrom;
            entity.CL_ValueFrom = statistic.CL_ValueFrom.ToString();
            entity.CL_UnitTo    = statistic.CL_UnitTo;
            entity.CL_ValueTo   = statistic.CL_ValueTo.ToString();
            entity.CL_UnitType  = statistic.CL_UnitType;
            entity.CL_Date      = statistic.CL_Date;
            Console.WriteLine(entity.ToString());

            TableOperation insertOperation = TableOperation.Insert(entity);

            table.Execute(insertOperation);
        }
 public void ResetStatistic()
 {
     _statistics = new StatisticsObject();
     SaveStatistics();
 }