public FormLogin() { InitializeComponent(); infObj = new InfoObjectBase(); main = new Main(infObj); //判断是否在debug模式 #if DEBUG infObj.debugFlag = true; #endif if (infObj.debugFlag) { this.Text += " -Debug"; } if (infObj.remoteFlag) { this.Text += " -Remote"; } labelVersion.Text = "Ver: " + infObj.progVer; SqlTestDelegate sqlTestDelegateSW = new SqlTestDelegate(SqlTestSW); sqlTestDelegateSW.BeginInvoke(infObj.connSW, null, null); textBoxUid.Text = infObj.userId; textBoxUid.SelectAll(); FileVersion.JudgeFile(infObj.updateHost, infObj.componentFileDt); //更新程序 if (main.GetNewVersion()) { Thread.Sleep(1000); UpdateMe.ProgUpdate(infObj.progName, infObj.updateHost + infObj.progName + ".exe"); } }
public FormLogin() { InitializeComponent(); GetMutilOpen(); //判断是否在debug模式 #if DEBUG infObj.testFlag = true; #endif if (infObj.testFlag) { this.Text += " -DEBUG"; } if (infObj.remoteFlag) { this.Text += " -Remote"; } FormLogin_Init(); //配置信息获取 labelVersion.Text = "Ver: " + infObj.progVer; SqlTestDelegate sqlTestDelegate = new SqlTestDelegate(SqlTest); sqlTestDelegate.BeginInvoke(infObj.connWG, null, null); textBoxUid.Text = infObj.userId; textBoxUid.SelectAll(); //添加组件列表 DataRow dr = infObj.componentFileDt.NewRow(); dr["FileName"] = "AutoUpdate.exe"; dr["FileVersion"] = "1.0.0.0"; infObj.componentFileDt.Rows.Add(dr); dr = infObj.componentFileDt.NewRow(); dr["FileName"] = "ICSharpCode.SharpZipLib.dll"; dr["FileVersion"] = "0.86.0"; infObj.componentFileDt.Rows.Add(dr); dr = infObj.componentFileDt.NewRow(); dr["FileName"] = "Microsoft.CSharp.dll"; dr["FileVersion"] = "4.0.30319.1"; infObj.componentFileDt.Rows.Add(dr); dr = infObj.componentFileDt.NewRow(); dr["FileName"] = "Microsoft.Office.Interop.Excel12.dll"; dr["FileVersion"] = "12.0.4518.1014"; infObj.componentFileDt.Rows.Add(dr); dr = infObj.componentFileDt.NewRow(); dr["FileName"] = "NPOI.dll"; dr["FileVersion"] = "2.0.0.0"; infObj.componentFileDt.Rows.Add(dr); dr = infObj.componentFileDt.NewRow(); dr["FileName"] = "NPOI.OOXML.dll"; dr["FileVersion"] = "2.0.0.0"; infObj.componentFileDt.Rows.Add(dr); dr = infObj.componentFileDt.NewRow(); dr["FileName"] = "NPOI.OpenXml4Net.dll"; dr["FileVersion"] = "2.0.0.0"; infObj.componentFileDt.Rows.Add(dr); dr = infObj.componentFileDt.NewRow(); dr["FileName"] = "NPOI.OpenXmlFormats.dll"; dr["FileVersion"] = "2.0.0.0"; infObj.componentFileDt.Rows.Add(dr); dr = infObj.componentFileDt.NewRow(); dr["FileName"] = "NPOI.xml"; dr["FileVersion"] = ""; infObj.componentFileDt.Rows.Add(dr); FileVersion.JudgeFile(infObj.updateHost + @"/download/", infObj.componentFileDt); //更新程序 if (main.GetNewVersion()) { UpdateMe.ProgUpdate(infObj.progName, infObj.updateHost + @"/download/" + infObj.progName + ".exe"); } }