Example #1
0
        public void LoadCpus()
        {
            var cpusList = ReadCpusCsv("Cpus.csv");

            SqliteRepositoryBase.FileNameInternal = "benchmarks.sqlite3";

            var cpuRepository = new CpuRepository();

            foreach (var cpuItem in cpusList)
            {
                var cpu = new Cpu()
                {
                    Manufacturer = cpuItem["Vendor"],
                    Model        = cpuItem["Model"],
                    Category     = cpuItem["Architecture"],
                    Specs        = new CommonSpecs()
                    {
                        Cores   = 1,
                        Threads = 1
                    }
                };

                cpuRepository.Create(cpu);
            }
        }
Example #2
0
        public void Test1()
        {
            SqliteRepositoryBase.FileNameInternal = "benchmarks.sqlite3";

            var cpuRepository = new CpuRepository();

            var cpu = new Cpu()
            {
                Manufacturer = "Intel",
                Model        = "Core i7 2600",
                Category     = "x86"
            };

            cpuRepository.Create(cpu);
        }
Example #3
0
        private void CpuAddItem_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                var redactor = new CPURedactor();

                if (redactor.ShowDialog() == true)
                {
                    //CpuRepository repository = new CpuRepository(_connectionString);
                    cpuRepository.Create(redactor.curCPU);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }