Exemplo n.º 1
0
        private void Frm_BoxPrint_Load(object sender, EventArgs e)
        {
            if (!ChkSoftInstall("CODESOFT 7"))
            {
                MessageBoxEx.Show("本机没有安装Codesoft 7 不能使用");
                this.Enabled = false;
                return;
            }

            if (!Directory.Exists("C:\\SFIS"))
            {
                Directory.CreateDirectory("C:\\SFIS");
            }

            FileVersionInfo myFileVersion = FileVersionInfo.GetVersionInfo(System.Windows.Forms.Application.ExecutablePath);

            this.groupBox1.Text += string.Format("(Version: {0})", myFileVersion.FileVersion);
            string _StrErr = string.Empty;

            chkver = new WebServices.Check_Version.Check_Version();
            if (!chkver.CheckPrgVsersion("BOX_PRINT", this.ProductVersion, null, null, null, out _StrErr))
            {
                if (_StrErr == "OK")
                {
                    SendMsg(mLogMsgType.Error, "该程序为版本不是最新版\r\n请更新后运行");
                    RunFile(System.Windows.Forms.Application.StartupPath + @"\", "AutoUpdate.exe", "ISCM.exe");
                }
                else
                {
                    SendMsg(mLogMsgType.Error, "检查版本失败:" + _StrErr);
                }
                this.Enabled = false;
            }

            IniPrg = new IntPrgConfig(IniPrgConfigInfo);
            IniPrg.BeginInvoke(null, null);

            tb_Input.Enabled = false;
            tb_wo.Focus();
            string filePath = System.Environment.CurrentDirectory + "\\SFIS_ISCM.ini";

            LabDir     = ReadIniFile.IniReadValue("BoxPrint", "Patch", filePath);
            NumX.Value = Convert.ToInt16(ReadIniFile.IniReadValue("BoxPrint", "X", filePath));
            NumY.Value = Convert.ToInt16(ReadIniFile.IniReadValue("BoxPrint", "Y", filePath));

            LabLine.Text = string.Empty;
            LabLine.Text = Encoder.Encoder.DecryptString(Encoder.ReadIniFile.IniReadValue("BOX_PRINT", "LINE", IniFilePath));
        }
Exemplo n.º 2
0
        private void NumY_Leave(object sender, EventArgs e)
        {
            string filePath = System.Environment.CurrentDirectory + "\\SFIS_ISCM.ini";

            ReadIniFile.IniWriteValue("BoxPrint", "Y", NumY.Value.ToString(), filePath);
        }