Esempio n. 1
0
 private void btnOk_Click(object sender, EventArgs e)
 {
     if (this.cmbTemplate.Text == "")
     {
         MessageBox.Show("条码模板为空,设置无效。", "工艺", MessageBoxButtons.OK);
     }
     else if (this.txtCellStart.Text.Trim() == "")
     {
         MessageBox.Show("起始单元格为空,设置无效。", "工艺", MessageBoxButtons.OK);
     }
     else if (this.txtCellEnd.Text.Trim() == "")
     {
         MessageBox.Show("结束单元格为空,设置无效。", "工艺", MessageBoxButtons.OK);
     }
     else
     {
         this.info.Type         = InterPicType.BarCode;
         this.info.AttrName     = this.cmbAttrList.SelectedValue.ToString();
         this.info.TemplateName = this.cmbTemplate.Text;
         this.info.CellStart    = this.txtCellStart.Text.Trim();
         this.info.CellEnd      = this.txtCellEnd.Text.Trim();
         this.Script            = PPCardCompiler.CreateInterPicXml(this.info);
         this.PicType           = this.info.Type;
         base.DialogResult      = DialogResult.OK;
     }
 }
Esempio n. 2
0
 private void btnOk_Click(object sender, EventArgs e)
 {
     this.info.Type = PPCConvert.ToPicType(this.cmbPicType.Text);
     if (this.info.Type == InterPicType.SourceFile)
     {
         this.info.FileIndex = Convert.ToInt32(this.numFileIndex.Value);
     }
     else
     {
         this.info.FileIndex = -1;
     }
     this.info.CellStart = this.txtCellStart.Text.Trim();
     this.info.CellEnd   = this.txtCellEnd.Text.Trim();
     this.info.Grayscale = this.chkGrayscale.Checked;
     this.Script         = PPCardCompiler.CreateInterPicXml(this.info);
     this.PicType        = this.info.Type;
     base.DialogResult   = DialogResult.OK;
 }