示例#1
0
 private void ConvertValues(GraphicsUnit unit, object lblWidth, object lblHeight, object vPitch, object hPitch, object bottomMargin, object topMargin, object leftMargin, object rightMargin)
 {
     if (unit == GraphicsUnit.Millimeter)
     {
         LabelWidthSpinEdit.EditValue      = LabelReportValuesHelper.ConvertInchToMillimeter(Convert.ToSingle(lblWidth));
         LabelHeightSpinEdit.EditValue     = LabelReportValuesHelper.ConvertInchToMillimeter(Convert.ToSingle(lblHeight));
         VerticalPitchSpinEdit.EditValue   = LabelReportValuesHelper.ConvertInchToMillimeter(Convert.ToSingle(vPitch));
         HorizontalPitchSpinEdit.EditValue = LabelReportValuesHelper.ConvertInchToMillimeter(Convert.ToSingle(hPitch));
         BottomMarginSpinEdit.EditValue    = LabelReportValuesHelper.ConvertInchToMillimeter(Convert.ToSingle(bottomMargin));
         TopMarginSpinEdit.EditValue       = LabelReportValuesHelper.ConvertInchToMillimeter(Convert.ToSingle(topMargin));
         LeftMarginSpinEdit.EditValue      = LabelReportValuesHelper.ConvertInchToMillimeter(Convert.ToSingle(leftMargin));
         RightMarginSpinEdit.EditValue     = LabelReportValuesHelper.ConvertInchToMillimeter(Convert.ToSingle(rightMargin));
     }
     else
     {
         if (unit == GraphicsUnit.Inch)
         {
             LabelWidthSpinEdit.EditValue      = LabelReportValuesHelper.ConvertMillimeterToInch(Convert.ToSingle(lblWidth));
             LabelHeightSpinEdit.EditValue     = LabelReportValuesHelper.ConvertMillimeterToInch(Convert.ToSingle(lblHeight));
             VerticalPitchSpinEdit.EditValue   = LabelReportValuesHelper.ConvertMillimeterToInch(Convert.ToSingle(vPitch));
             HorizontalPitchSpinEdit.EditValue = LabelReportValuesHelper.ConvertMillimeterToInch(Convert.ToSingle(hPitch));
             BottomMarginSpinEdit.EditValue    = LabelReportValuesHelper.ConvertMillimeterToInch(Convert.ToSingle(bottomMargin));
             TopMarginSpinEdit.EditValue       = LabelReportValuesHelper.ConvertMillimeterToInch(Convert.ToSingle(topMargin));
             LeftMarginSpinEdit.EditValue      = LabelReportValuesHelper.ConvertMillimeterToInch(Convert.ToSingle(leftMargin));
             RightMarginSpinEdit.EditValue     = LabelReportValuesHelper.ConvertMillimeterToInch(Convert.ToSingle(rightMargin));
         }
     }
 }
示例#2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     helper = new LabelReportValuesHelper();
     InitLabelProductEditor();
     InitProductNumberEditor();
     InitUnitEditor();
     InitPaperTypeEditor();
 }