Exemplo n.º 1
0
        public Main(InfoObjectBase _infObj)
        {
            infObj     = _infObj;
            infObj.sql = new Mssql();

            infObj.progName = Application.ProductName.ToString();
            infObj.progVer  = Application.ProductVersion.ToString();

            infObj.systemType = "ERP";

            versionManager        = new VersionManeger(infObj.connWG);
            infObj.userPermission = new UserPermission(infObj.connWG, infObj.systemType);


            //添加组件列表
            DataRow dr = infObj.componentFileDt.NewRow();

            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);
            dr             = infObj.componentFileDt.NewRow();
            dr["FileName"] = "FastReport.Bars.dll"; dr["FileVersion"] = "2019.3.5.0";
            infObj.componentFileDt.Rows.Add(dr);
            dr             = infObj.componentFileDt.NewRow();
            dr["FileName"] = "FastReport.dll"; dr["FileVersion"] = "2019.3.5.0";
            infObj.componentFileDt.Rows.Add(dr);
            dr             = infObj.componentFileDt.NewRow();
            dr["FileName"] = "FastReport.Editor.dll"; dr["FileVersion"] = "2019.3.5.0";
            infObj.componentFileDt.Rows.Add(dr);

            FileVersion.JudgeFile(infObj.updateHost, infObj.componentFileDt);
        }
Exemplo n.º 2
0
        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");
            }
        }
Exemplo n.º 3
0
        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");
            }
        }