123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace LYFZ.Software.MainBusiness.ReportPrint.SuperSmallForm
- {
- public partial class ModelSetSuperSmallForm : LYFZ.Software.UI.ReportPrint.SuperSmallForm.ModelSetSuperSmallForm
- {
- public ModelSetSuperSmallForm()
- {
- }
- private string _oldsize = "";
- /// <summary>
- /// 默认大小
- /// </summary>
- public string OldSize
- {
- set { _oldsize = value; }
- get { return _oldsize; }
- }
- private bool _oldisprint;
- /// <summary>
- /// 是否打印图片背景(true:打印出背景图片; false:不打印出背景图片)
- /// </summary>
- public bool OldIsPrint
- {
- get { return _oldisprint; }
- set { _oldisprint = value; }
- }
- private string _setsize = "";
- /// <summary>
- /// 设置后大小
- /// </summary>
- public string SetSize
- {
- set { _setsize = value; }
- get { return _setsize; }
- }
- private bool _isprint = true;
- /// <summary>
- /// 是否打印图片背景(true:打印出背景图片; false:不打印出背景图片)
- /// </summary>
- public bool IsPrint
- {
- get { return _isprint; }
- set { _isprint = value; }
- }
- /// <summary>
- /// 窗体加载事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void ModelSetSuperSmallForm_Load(object sender, EventArgs e)
- {
- if (this.OldSize != "")
- {
- nudModelWidth.Value = Convert.ToDecimal(this.OldSize.Split(',')[0].Trim());
- nudModelHeight.Value = Convert.ToDecimal(this.OldSize.Split(',')[1].Trim());
- }
- if (this.OldIsPrint)
- { this.chkPrint.Checked = true; }
- else { this.chkPrint.Checked = false; }
- }
- /// <summary>
- /// 确定
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void btnOK_Click(object sender, EventArgs e)
- {
- if (this.chkPrint.Checked)
- { this.IsPrint = true; }
- else { this.IsPrint = false; }
- this.SetSize = nudModelWidth.Value.ToString().Trim() + "," + nudModelHeight.Value.ToString().Trim();
- this.Close();
- }
- /// <summary>
- /// 取消
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void btnCancel_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- }
- }
|