Ejemplo n.º 1
0
        private void Init()
        {
            //判断是否在debug模式
            #if DEBUG
            this.Text += "   -DEBUG";
            #endif

            //从文件详细信息中获取程序名称
            ProgName    = Application.ProductName.ToString();
            ProgVersion = Application.ProductVersion.ToString();

            this.Text += "   -Ver." + ProgVersion;

            HttpURL = GetHttpURL();

            //自动下载组件
            componentFileDt.Columns.Add("FileName", Type.GetType("System.String"));
            componentFileDt.Columns.Add("FileVersion", Type.GetType("System.String"));
            DataRow dr = componentFileDt.NewRow();
            dr["FileName"] = "AutoUpdate.exe"; dr["FileVersion"] = "1.0.0.0";
            componentFileDt.Rows.Add(dr);

            FileVersion.JudgeFile(HttpURL + @"/download/", componentFileDt);


            //检查软件是否存在更新版本
            if (GetNewVersion())
            {
                UpdateMe.ProgUpdate(ProgName, UpdateUrl);
            }


            Dgv_Show();
            Btn_Show_Work();
        }
Ejemplo n.º 2
0
 private void SoftwareUpdate() //销货单生成的主方法,定时器溢出后调用
 {
     if (!(workScrkFlag || workXhFlag || workPrintFlag))
     {
         if (GetNewVersion())
         {
             UpdateMe.ProgUpdate(ProgName, UpdateUrl);
         }
     }
 }
Ejemplo n.º 3
0
 private void SoftwareUpdate()
 {
     if (!(boxSize.workFlag || autoLrp.workFlag || bomList.workFlag))
     {
         if (GetNewVersion())
         {
             UpdateMe.ProgUpdate(ProgName, UpdateUrl);
         }
     }
 }
Ejemplo n.º 4
0
        private void Init()
        {
            //判断是否在debug模式
            #if DEBUG
            this.Text += "   -DEBUG";
            #endif

            //从文件详细信息中获取程序名称
            ProgName    = Application.ProductName.ToString();
            ProgVersion = Application.ProductVersion.ToString();

            this.Text += "   -Ver." + ProgVersion;


            HttpURL = GetHttpURL();

            //自动下载组件
            componentFileDt.Columns.Add("FileName", Type.GetType("System.String"));
            componentFileDt.Columns.Add("FileVersion", Type.GetType("System.String"));
            DataRow dr = componentFileDt.NewRow();
            dr["FileName"] = "AutoUpdate.exe"; dr["FileVersion"] = "1.0.0.0";
            componentFileDt.Rows.Add(dr);
            dr             = componentFileDt.NewRow();
            dr["FileName"] = "FastReport.Bars.dll"; dr["FileVersion"] = "2019.3.5.0";
            componentFileDt.Rows.Add(dr);
            dr             = componentFileDt.NewRow();
            dr["FileName"] = "FastReport.dll"; dr["FileVersion"] = "2019.3.5.0";
            componentFileDt.Rows.Add(dr);
            dr             = componentFileDt.NewRow();
            dr["FileName"] = "FastReport.Editor.dll"; dr["FileVersion"] = "2019.3.5.0";
            componentFileDt.Rows.Add(dr);

            FileVersion.JudgeFile(HttpURL + @"/download/", componentFileDt);


            //检查软件是否存在更新版本
            if (GetNewVersion())
            {
                UpdateMe.ProgUpdate(ProgName, UpdateUrl);
            }


            //获取初始化文件及打印模板目录
            localPath   = Directory.GetCurrentDirectory();
            iniFilePath = localPath + @"\" + iniFileName;

            //初始化检测
            ReadIniFile();
            tabControl1.SelectedTab = tabControl1.TabPages[0];
            btnPrintPreview.Enabled = false;

            //开始工作
            WorkStart();
        }
Ejemplo n.º 5
0
        private void Init()
        {
            //判断是否在debug模式
            #if DEBUG
            this.Text += "   -DEBUG";
            #endif

            //从文件详细信息中获取程序名称
            ProgName    = Application.ProductName.ToString();
            ProgVersion = Application.ProductVersion.ToString();

            this.Text += "   -Ver." + ProgVersion;

            HttpURL = GetHttpURL();

            //自动下载组件
            componentFileDt.Columns.Add("FileName", Type.GetType("System.String"));
            componentFileDt.Columns.Add("FileVersion", Type.GetType("System.String"));
            DataRow dr = componentFileDt.NewRow();
            dr["FileName"] = "AutoUpdate.exe"; dr["FileVersion"] = "1.0.0.0";
            componentFileDt.Rows.Add(dr);
            dr             = componentFileDt.NewRow();
            dr["FileName"] = "NPOI.xml"; dr["FileVersion"] = "";
            componentFileDt.Rows.Add(dr);

            FileVersion.JudgeFile(HttpURL + @"/WgFile/", componentFileDt);


            //检查软件是否存在更新版本
            if (GetNewVersion())
            {
                UpdateMe.ProgUpdate(ProgName, UpdateUrl);
            }

            //开始工作
            WorkStart();
            logAppendText("Initialization Succeed!" + "   -Ver " + ProgVersion);
            logger.Instance.WriteLog("Inittialization Succeed!" + "   -Ver " + ProgVersion);
        }