using System; using System.Reflection; using System.Windows.Forms; namespace MOKA_Factory_Tools { static class Program { /// /// 应用程序的主入口点。 /// [STAThread] static void Main() { // 程序集信息; Assembly asm = Assembly.GetExecutingAssembly(); // 获取公司名称; AssemblyCompanyAttribute asmcpn = (AssemblyCompanyAttribute)Attribute.GetCustomAttribute(asm, typeof(AssemblyCompanyAttribute)); // 获取版本信息; AssemblyCopyrightAttribute asmCP = (AssemblyCopyrightAttribute)Attribute.GetCustomAttribute(asm, typeof(AssemblyCopyrightAttribute)); // 获取描述; AssemblyDescriptionAttribute asmdis = (AssemblyDescriptionAttribute)Attribute.GetCustomAttribute(asm, typeof(AssemblyDescriptionAttribute)); SXLibrary.Log.WriteInfoLog(string.Format("Program hash value = {0}", asmCP.Copyright)); #region 创建数据库目录; string reportFolder = AppDomain.CurrentDomain.BaseDirectory + "DB"; if ( !System.IO.Directory.Exists(reportFolder) ) { System.IO.Directory.CreateDirectory(reportFolder); } // 创建数据库; if (!System.IO.File.Exists(reportFolder + "\\ReportData.db")) { if (SQLiteHelper.NewDbFile(reportFolder + "\\ReportData.db")) { SQLiteHelper.NewTable(reportFolder + "\\ReportData.db", "ReportData", "(id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,url text,content text)"); } } #endregion Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new login()); } } }