// See https://aka.ms/new-console-template for more information
|
using System.Reflection;
|
|
Console.WriteLine("是否初始化数据库?(y)");
|
var str = Console.ReadLine();
|
if (str != "y")
|
return;
|
|
|
IStation.Settings.ParasHelper.DataBase.SQLite.AnalysisConnectString ="DataSource="+ IStation.Settings.ParasHelper.LocalFile.DataFolderDirectory+ "\\analysis.db";
|
//IStation.Settings.ParasHelper.DataBase.SQLite.ScheduleConnectString = "DataSource=" + IStation.Settings.ParasHelper.LocalFile.DataFolderDirectory+ "\\schedule.db";
|
//IStation.Settings.ParasHelper.DataBase.SQLite.HydraulicConnectString = "DataSource=" + IStation.Settings.ParasHelper.LocalFile.DataFolderDirectory+ "\\hydraulic.db";
|
//IStation.Settings.ParasHelper.DataBase.SQLite.MonitorConnectString = "DataSource=" + IStation.Settings.ParasHelper.LocalFile.DataFolderDirectory+ "\\monitor.db";
|
IStation.Settings.ParasHelper.Save();
|
|
//第一步
|
IStation.InitialHelper.InitAllDB();
|
Console.WriteLine("InitDb is ok");
|
|
//第二步
|
var station = new IStation.Service.Station().Get();
|
var all_pump_list = new List<IStation.Model.Pump>();
|
all_pump_list.AddRange(station.Station1);
|
all_pump_list.AddRange(station.Station2);
|
|
var helper = new IStation.Service.AnalysisHelper();
|
helper.AnalysisNew(all_pump_list, ana_factor_list);
|
helper.AnalysisParameter(all_pump_list);
|
Console.WriteLine("Analysis is ok");
|
|
|
|
Console.WriteLine("OK");
|
Console.ReadKey();
|