static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            XmlFlexflow.configFilePath = Application.StartupPath + "\\flexflow.cfg";
            string ftpIPAddr = XmlFlexflow.ReadXmlNodeValue("FTP_IPADDR");
            //检查软件版本
            string releaseVersion = String.Empty;
            MSG    msg            = CheckAppVerionByFTP.checkAppVersionAndOutReleaseVersion(ftpIPAddr, out releaseVersion);

            if (!msg.Flag)
            {
                MessageBox.Show(msg.Msg, "提示:", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                return;
            }
            FormLogin frmLogin = new FormLogin();

            frmLogin.ShowDialog();
            if (DialogResult.OK != frmLogin.DialogResult)
            {
                //结束程序
                return;
            }
            //FrmMainOfProductsCost frmMainOfProductsCost = new FrmMainOfProductsCost();
            //Application.Run(frmMainOfProductsCost);
        }
Пример #2
0
        static void MainBackup()
        {
            XmlFlexflow.configFilePath = Application.StartupPath + "\\flexflow.cfg";
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            string ftpIPADDR = XmlFlexflow.ReadXmlNodeValue("FTP_IPADDR");

            //先测试是否可以ping通
            if (!ConnectByPing.pingTheAddress(ftpIPADDR))
            {
                if (DialogResult.No == MessageBox.Show("未能与版本服务器取得联系,是否继续?", "提示: ", MessageBoxButtons.YesNo, MessageBoxIcon.Information))
                {
                    return;
                }
                //继续。
                doNextStep();
                return;
            }
            string releaseVersion = string.Empty;
            //检查软件版本
            MSG msg = CheckAppVerionByFTP.checkAppVersionAndOutReleaseVersion(ftpIPADDR, out releaseVersion);

            if (!msg.Flag)
            {
                //MessageBox.Show(msg.Msg, "提示:", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                return;
            }
            doNextStep();
        }