コード例 #1
0
        private void buttonWriteEmpty_Click(object sender, EventArgs e)
        {
            if (lprocess)
            {
                MessageBox.Show(Resources.任务运行中_不可执行, Resources.设备忙, MessageBoxButtons.OK, MessageBoxIcon.Warning); return;
            }
            S50 empty = new S50();

            empty.ExportToMfd("mff08_empty.kmf");
            BackgroundWorker bgw = new BackgroundWorker();

            bgw.DoWork += new DoWorkEventHandler(cmf_write);
            bgw.WorkerReportsProgress = true;
            bgw.ProgressChanged      += new ProgressChangedEventHandler(default_rpt);
            bgw.RunWorkerAsync(new string[] { "mff08_empty.kmf", "A", "x", "" });
        }
コード例 #2
0
        private void buttonKeyWrite_Click(object sender, EventArgs e)
        {
            if (lprocess)
            {
                MessageBox.Show(Resources.任务运行中_不可执行, Resources.设备忙, MessageBoxButtons.OK, MessageBoxIcon.Warning); return;
            }
            S50 empty = new S50();

            empty.ExportToMfd("mff08_empty.kmf");
            if (keyfileBox.Text == "")
            {
                MessageBox.Show(Resources.您没有给定最后一次写卡导致0块损坏的卡数据文件来作为写卡时的, Resources.错误, MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            BackgroundWorker bgw = new BackgroundWorker();

            bgw.DoWork += new DoWorkEventHandler(cmf_write);
            bgw.WorkerReportsProgress = true;
            bgw.ProgressChanged      += new ProgressChangedEventHandler(default_rpt);
            bgw.RunWorkerAsync(new string[] { "mff08_empty.kmf", "C", "", keyfileBox.Text });
        }