TextItemSetting.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825
  1. 
  2. using System.Data;
  3. using System.Drawing;
  4. using System.Windows.Forms;
  5. namespace Dongke.WinForm.Controls.InvoiceLayout
  6. {
  7. internal partial class TextItemSetting : Setting
  8. {
  9. #region 成员变量
  10. private TextAlignment _textAlign = TextAlignment.LeftOrTop; // 文本对齐方式
  11. private TextAlignment _textAlignVertical = TextAlignment.LeftOrTop; // 文本垂直对齐方式
  12. private ItemStyle _itemStyle = ItemStyle.Text; // 项目类别
  13. private string _defaultValue = string.Empty; // 默认值
  14. private string _textFormat = string.Empty; // 文本格式
  15. private string _culture = string.Empty; // culture
  16. private bool _isInit = true;
  17. private bool _isNew = false;
  18. private bool _isDataBinding = false;
  19. private DataTable _sysFormat;
  20. private DataTable _sysDefaultValue;
  21. #endregion
  22. #region 属性
  23. /// <summary>
  24. /// 是否自动文本换行
  25. /// </summary>
  26. public bool Wrap
  27. {
  28. get
  29. {
  30. return this.ckbWrap.Checked;
  31. }
  32. set
  33. {
  34. this.ckbWrap.Checked = value;
  35. }
  36. }
  37. /// <summary>
  38. /// 文本字体
  39. /// </summary>
  40. public Font TextFont
  41. {
  42. get
  43. {
  44. return txtPreview.Font;
  45. }
  46. set
  47. {
  48. txtPreview.Font = value;
  49. }
  50. }
  51. /// <summary>
  52. /// 文本颜色
  53. /// </summary>
  54. public Color TextColor
  55. {
  56. get
  57. {
  58. return txtPreview.ForeColor;
  59. }
  60. set
  61. {
  62. txtPreview.ForeColor = value;
  63. }
  64. }
  65. /// <summary>
  66. /// 文本内容
  67. /// </summary>
  68. public string TextPreview
  69. {
  70. get
  71. {
  72. return txtPreview.Text;
  73. }
  74. set
  75. {
  76. txtPreview.Text = value;
  77. }
  78. }
  79. /// <summary>
  80. /// 文本对齐方式
  81. /// </summary>
  82. public TextAlignment TextAlign
  83. {
  84. get
  85. {
  86. return _textAlign;
  87. }
  88. set
  89. {
  90. if (_textAlign != value)
  91. {
  92. _textAlign = value;
  93. }
  94. }
  95. }
  96. /// <summary>
  97. /// 文本垂直对齐方式
  98. /// </summary>
  99. public TextAlignment TextAlignVertical
  100. {
  101. get
  102. {
  103. return _textAlignVertical;
  104. }
  105. set
  106. {
  107. if (_textAlignVertical != value)
  108. {
  109. _textAlignVertical = value;
  110. }
  111. }
  112. }
  113. /// <summary>
  114. /// 行距
  115. /// </summary>
  116. public float LineSpace
  117. {
  118. get
  119. {
  120. return System.Convert.ToSingle(numLineSpace.Value);
  121. }
  122. set
  123. {
  124. decimal d = System.Convert.ToDecimal(value);
  125. if (d < numLineSpace.Minimum)
  126. {
  127. d = numLineSpace.Minimum;
  128. }
  129. else if (numLineSpace.Maximum < d)
  130. {
  131. d = numLineSpace.Maximum;
  132. }
  133. numLineSpace.Value = d;
  134. }
  135. }
  136. /// <summary>
  137. /// 字间距
  138. /// </summary>
  139. public float CharacterSpace
  140. {
  141. get
  142. {
  143. return System.Convert.ToSingle(numCharSpace.Value);
  144. }
  145. set
  146. {
  147. decimal d = System.Convert.ToDecimal(value);
  148. if (d < numCharSpace.Minimum)
  149. {
  150. d = numCharSpace.Minimum;
  151. }
  152. else if (numCharSpace.Maximum < d)
  153. {
  154. d = numCharSpace.Maximum;
  155. }
  156. numCharSpace.Value = d;
  157. }
  158. }
  159. /// <summary>
  160. /// X
  161. /// </summary>
  162. public float TextLocationY
  163. {
  164. get
  165. {
  166. return System.Convert.ToSingle(numLoctionY.Value);
  167. }
  168. set
  169. {
  170. decimal d = System.Convert.ToDecimal(value);
  171. if (d < numLoctionY.Minimum)
  172. {
  173. d = numLoctionY.Minimum;
  174. }
  175. else if (numLoctionY.Maximum < d)
  176. {
  177. d = numLoctionY.Maximum;
  178. }
  179. numLoctionY.Value = d;
  180. }
  181. }
  182. /// <summary>
  183. /// Y
  184. /// </summary>
  185. public float TextLocationX
  186. {
  187. get
  188. {
  189. return System.Convert.ToSingle(numLoctionX.Value);
  190. }
  191. set
  192. {
  193. decimal d = System.Convert.ToDecimal(value);
  194. if (d < numLoctionX.Minimum)
  195. {
  196. d = numLoctionX.Minimum;
  197. }
  198. else if (numLoctionX.Maximum < d)
  199. {
  200. d = numLoctionX.Maximum;
  201. }
  202. numLoctionX.Value = d;
  203. }
  204. }
  205. /// <summary>
  206. /// 宽
  207. /// </summary>
  208. public float TextWidth
  209. {
  210. get
  211. {
  212. return System.Convert.ToSingle(numWidth.Value);
  213. }
  214. set
  215. {
  216. decimal d = System.Convert.ToDecimal(value);
  217. if (d < numWidth.Minimum)
  218. {
  219. d = numWidth.Minimum;
  220. }
  221. else if (numWidth.Maximum < d)
  222. {
  223. d = numWidth.Maximum;
  224. }
  225. numWidth.Value = d;
  226. }
  227. }
  228. /// <summary>
  229. /// 高
  230. /// </summary>
  231. public float TextHeight
  232. {
  233. get
  234. {
  235. return System.Convert.ToSingle(numHeight.Value);
  236. }
  237. set
  238. {
  239. decimal d = System.Convert.ToDecimal(value);
  240. if (d < numHeight.Minimum)
  241. {
  242. d = numHeight.Minimum;
  243. }
  244. else if (numHeight.Maximum < d)
  245. {
  246. d = numHeight.Maximum;
  247. }
  248. numHeight.Value = d;
  249. }
  250. }
  251. /// <summary>
  252. /// 单行文字数
  253. /// </summary>
  254. public int CharacterCount
  255. {
  256. get
  257. {
  258. return System.Convert.ToInt32(numCharCount.Value);
  259. }
  260. set
  261. {
  262. decimal d = System.Convert.ToDecimal(value);
  263. if (d < numCharCount.Minimum)
  264. {
  265. d = numCharCount.Minimum;
  266. }
  267. else if (numCharCount.Maximum < d)
  268. {
  269. d = numCharCount.Maximum;
  270. }
  271. numCharCount.Value = d;
  272. }
  273. }
  274. /// <summary>
  275. /// 文本默认值
  276. /// </summary>
  277. public string DefaultValue
  278. {
  279. get
  280. {
  281. return ddlDefaultValue.Text;
  282. }
  283. set
  284. {
  285. _defaultValue = value;
  286. }
  287. }
  288. /// <summary>
  289. /// 文本格式
  290. /// </summary>
  291. public string TextFormat
  292. {
  293. get
  294. {
  295. return this.ddlTextFormat.Text;
  296. }
  297. set
  298. {
  299. _textFormat = value;
  300. }
  301. }
  302. /// <summary>
  303. /// Culture
  304. /// </summary>
  305. public string Culture
  306. {
  307. get
  308. {
  309. return _culture;
  310. }
  311. set
  312. {
  313. _culture = value;
  314. }
  315. }
  316. /// <summary>
  317. /// 项目类别
  318. /// </summary>
  319. public ItemStyle ItemStyle
  320. {
  321. get
  322. {
  323. return _itemStyle;
  324. }
  325. set
  326. {
  327. _itemStyle = value;
  328. }
  329. }
  330. /// <summary>
  331. /// 新建
  332. /// </summary>
  333. public bool IsNew
  334. {
  335. get
  336. {
  337. return _isNew;
  338. }
  339. set
  340. {
  341. _isNew = value;
  342. }
  343. }
  344. /// <summary>
  345. /// 来源绑定
  346. /// </summary>
  347. public bool IsDataBinding
  348. {
  349. get
  350. {
  351. return this._isDataBinding;
  352. }
  353. set
  354. {
  355. this._isDataBinding = value;
  356. this.ddlDefaultValue.Enabled = value;
  357. this.ddlTextFormat.Enabled = value;
  358. //this.lblPreview.Text = value ? "预览" : "打印内容";
  359. }
  360. }
  361. /// <summary>
  362. /// 项目名
  363. /// </summary>
  364. public string ItemName
  365. {
  366. get
  367. {
  368. return txtItemName.Text;
  369. }
  370. set
  371. {
  372. txtItemName.Text = value;
  373. }
  374. }
  375. #endregion
  376. #region 构造函数
  377. /// <summary>
  378. /// 构造函数
  379. /// </summary>
  380. public TextItemSetting()
  381. {
  382. InitializeComponent();
  383. InitializeDDL();
  384. TextWidth = LayoutCommon.DefaultTextItemSizeWidth;
  385. TextHeight = LayoutCommon.DefaultTextItemSizeHeight;
  386. }
  387. #endregion
  388. #region 函数
  389. /// <summary>
  390. /// 获取系统字体
  391. /// </summary>
  392. private void InitializeDDL()
  393. {
  394. _sysFormat = LayoutCommon.SYSFormat.Copy();
  395. _sysDefaultValue = LayoutCommon.SYSDefaultValue.Copy();
  396. ddlDefaultValue.DisplayMember = "InitialValueName";
  397. ddlDefaultValue.ValueMember = "InitialValueName";
  398. ddlDefaultValue.DataSource = _sysDefaultValue;
  399. ddlTextFormat.DisplayMember = "FormatName";
  400. ddlTextFormat.ValueMember = "FormatID";
  401. ddlTextFormat.DataSource = _sysFormat;
  402. }
  403. #endregion 函数
  404. #region 事件处理
  405. /// <summary>
  406. /// 文本设置
  407. /// </summary>
  408. /// <param name="sender">指定的对象</param>
  409. /// <param name="e">提供的事件数据</param>
  410. private void TextItemSetting_Shown(object sender, System.EventArgs e)
  411. {
  412. try
  413. {
  414. // 条码文本时,才显示条码属性
  415. //if (_itemStyle == ItemStyle.Barcode)
  416. //{
  417. // this.chkPic.Checked = true;
  418. // this.chkM.Visible = true;
  419. // this.chkFixedRatio.Visible = true;
  420. //}
  421. //else
  422. //{
  423. // this.chkPic.Checked = false;
  424. // this.chkM.Visible = false;
  425. // this.chkFixedRatio.Visible = false;
  426. //}
  427. if (_itemStyle == ItemStyle.Barcode ||
  428. _itemStyle == ItemStyle.QRCode)
  429. {
  430. this.btnSelectColor.Enabled = false;
  431. this.btnFont.Enabled = false;
  432. this.chkM.Visible = false;
  433. this.chkFixedRatio.Visible = false;
  434. this.ddlDefaultValue.Enabled = false;
  435. this.ddlTextFormat.Enabled = false;
  436. }
  437. this.chkM.Visible = false;
  438. this.chkFixedRatio.Visible = false;
  439. if (_textAlign == TextAlignment.Evenness)
  440. {
  441. numCharSpace.Enabled = false;
  442. numCharSpace.Value = 0;
  443. numCharCount.Enabled = false;
  444. numCharCount.Value = 0;
  445. }
  446. else
  447. {
  448. if (0 < numCharCount.Value)
  449. {
  450. rbtnLeft.Checked = true;
  451. grbTextAlignment.Enabled = false;
  452. numCharSpace.Enabled = false;
  453. decimal characterSpace = LayoutCommon.EqualityChars(numWidth.Value,
  454. numCharCount.Value,
  455. txtPreview.Font);
  456. if (characterSpace < numCharSpace.Minimum)
  457. {
  458. characterSpace = numCharSpace.Minimum;
  459. }
  460. else if (numCharSpace.Maximum < characterSpace)
  461. {
  462. characterSpace = numCharSpace.Maximum;
  463. }
  464. numCharSpace.Value = LayoutCommon.Truncate(characterSpace,
  465. numCharSpace.DecimalPlaces);
  466. }
  467. }
  468. if (_sysFormat != null)
  469. {
  470. if (_itemStyle == ItemStyle.Date)
  471. {
  472. _sysFormat.DefaultView.RowFilter = "SignDispNo = 0";
  473. }
  474. else if (_itemStyle == ItemStyle.Sign)
  475. {
  476. _sysFormat.DefaultView.RowFilter = "DateDispNo = 0";
  477. }
  478. else
  479. {
  480. _sysFormat.DefaultView.RowFilter = string.Empty;
  481. }
  482. }
  483. if (grbTextAlignment.Enabled)
  484. {
  485. switch (_textAlign)
  486. {
  487. case TextAlignment.LeftOrTop:
  488. rbtnLeft.Checked = true;
  489. txtPreview.TextAlign = HorizontalAlignment.Left;
  490. break;
  491. case TextAlignment.RightOrBottom:
  492. rbtnRight.Checked = true;
  493. txtPreview.TextAlign = HorizontalAlignment.Right;
  494. break;
  495. case TextAlignment.Center:
  496. rbtnCenter.Checked = true;
  497. txtPreview.TextAlign = HorizontalAlignment.Center;
  498. break;
  499. case TextAlignment.Evenness:
  500. rbtnEvenness.Checked = true;
  501. txtPreview.TextAlign = HorizontalAlignment.Left;
  502. break;
  503. }
  504. }
  505. if (grbTextAlignmentV.Enabled)
  506. {
  507. switch (_textAlignVertical)
  508. {
  509. case TextAlignment.LeftOrTop:
  510. rbtnTop.Checked = true;
  511. break;
  512. case TextAlignment.RightOrBottom:
  513. rbtnBottom.Checked = true;
  514. break;
  515. case TextAlignment.Center:
  516. rbtnCenterV.Checked = true;
  517. break;
  518. default:
  519. rbtnTop.Checked = true;
  520. break;
  521. }
  522. }
  523. if (_isNew || !_isDataBinding)
  524. {
  525. if (_sysFormat != null)
  526. {
  527. ddlTextFormat.SelectedIndex = 0;
  528. }
  529. if (_sysDefaultValue != null)
  530. {
  531. ddlDefaultValue.SelectedIndex = 0;
  532. }
  533. }
  534. else
  535. {
  536. if (_sysFormat != null)
  537. {
  538. if (_itemStyle == ItemStyle.Date)
  539. {
  540. // 日期
  541. DataRow[] drs = _sysFormat.Select
  542. (string.Format("Format = '{0}' AND ('{1}' = '' OR Culture = '{1}') AND DateDispNo <> 0",
  543. _textFormat,
  544. _culture));
  545. if (drs != null && 0 < drs.Length)
  546. {
  547. ddlTextFormat.SelectedValue = drs[0]["FormatID"];
  548. }
  549. else
  550. {
  551. ddlTextFormat.Text = _textFormat;
  552. }
  553. }
  554. else if (_itemStyle == ItemStyle.Sign)
  555. {
  556. // 符号
  557. ddlTextFormat.ValueMember = "FormatName";
  558. ddlTextFormat.SelectedValue = _textFormat;
  559. if (ddlTextFormat.SelectedIndex < 0)
  560. {
  561. ddlTextFormat.Text = _textFormat;
  562. }
  563. }
  564. else if (_itemStyle == InvoiceLayout.ItemStyle.Barcode ||
  565. _itemStyle == InvoiceLayout.ItemStyle.QRCode)
  566. {
  567. }
  568. else
  569. {
  570. ddlTextFormat.ValueMember = "Format";
  571. ddlTextFormat.SelectedValue = _textFormat;
  572. if (ddlTextFormat.SelectedIndex < 0)
  573. {
  574. ddlTextFormat.Text = _textFormat;
  575. }
  576. }
  577. }
  578. ddlDefaultValue.Text = _defaultValue;
  579. }
  580. }
  581. finally
  582. {
  583. _isInit = false;
  584. }
  585. }
  586. /// <summary>
  587. /// 设置文本颜色
  588. /// </summary>
  589. /// <param name="sender">指定的对象</param>
  590. /// <param name="e">提供的事件数据</param>
  591. private void btnSelectColor_Click(object sender, System.EventArgs e)
  592. {
  593. colorDialog.Color = txtPreview.ForeColor;
  594. if (colorDialog.ShowDialog() == DialogResult.OK)
  595. {
  596. txtPreview.ForeColor = colorDialog.Color;
  597. }
  598. }
  599. /// <summary>
  600. /// 设置文本格式
  601. /// </summary>
  602. /// <param name="sender">指定的对象</param>
  603. /// <param name="e">提供的事件数据</param>
  604. private void ddlTextFormat_SelectedIndexChanged(object sender, System.EventArgs e)
  605. {
  606. _culture = string.Empty;
  607. DataRowView dataRow = ddlTextFormat.SelectedItem as DataRowView;
  608. if (dataRow != null)
  609. {
  610. if (0 != System.Convert.ToInt32(dataRow["DateDispNo"]))
  611. {
  612. _itemStyle = ItemStyle.Date;
  613. _textFormat = dataRow["Format"].ToString();
  614. _culture = dataRow["Culture"].ToString();
  615. }
  616. else if (0 != System.Convert.ToInt32(dataRow["SignDispNo"]))
  617. {
  618. _itemStyle = ItemStyle.Sign;
  619. _textFormat = dataRow["FormatName"].ToString();
  620. }
  621. else
  622. {
  623. _itemStyle = ItemStyle.Text;
  624. _textFormat = dataRow["Format"].ToString();
  625. }
  626. }
  627. else
  628. {
  629. //if (_itemStyle != ItemStyle.Barcode)
  630. //{
  631. // _itemStyle = ItemStyle.Other;
  632. //}
  633. _textFormat = ddlTextFormat.Text;
  634. _culture = null;
  635. }
  636. }
  637. /// <summary>
  638. /// 设置文本对齐方式
  639. /// </summary>
  640. /// <param name="sender">指定的对象</param>
  641. /// <param name="e">提供的事件数据</param>
  642. private void rbtnTextAlignment_CheckedChanged(object sender, System.EventArgs e)
  643. {
  644. if (_isInit)
  645. {
  646. return;
  647. }
  648. if (rbtnLeft.Checked)
  649. {
  650. txtPreview.TextAlign = HorizontalAlignment.Left;
  651. _textAlign = TextAlignment.LeftOrTop;
  652. }
  653. else if (rbtnRight.Checked)
  654. {
  655. txtPreview.TextAlign = HorizontalAlignment.Right;
  656. _textAlign = TextAlignment.RightOrBottom;
  657. }
  658. else if (rbtnCenter.Checked)
  659. {
  660. txtPreview.TextAlign = HorizontalAlignment.Center;
  661. _textAlign = TextAlignment.Center;
  662. }
  663. else
  664. {
  665. txtPreview.TextAlign = HorizontalAlignment.Left;
  666. _textAlign = TextAlignment.Evenness;
  667. }
  668. if (rbtnTop.Checked)
  669. {
  670. _textAlignVertical = TextAlignment.LeftOrTop;
  671. }
  672. else if (rbtnBottom.Checked)
  673. {
  674. _textAlignVertical = TextAlignment.RightOrBottom;
  675. }
  676. else if (rbtnCenterV.Checked)
  677. {
  678. _textAlignVertical = TextAlignment.Center;
  679. }
  680. else
  681. {
  682. _textAlignVertical = TextAlignment.LeftOrTop;
  683. }
  684. if (rbtnEvenness.Checked)
  685. {
  686. numCharSpace.Enabled = false;
  687. numCharSpace.Value = 0;
  688. numCharCount.Enabled = false;
  689. numCharCount.Value = 0;
  690. }
  691. else
  692. {
  693. numCharSpace.Enabled = true;
  694. numCharCount.Enabled = true;
  695. }
  696. }
  697. /// <summary>
  698. /// 设置单行文字数
  699. /// </summary>
  700. /// <param name="sender">指定的对象</param>
  701. /// <param name="e">提供的事件数据</param>
  702. private void numCharCount_ValueChanged(object sender, System.EventArgs e)
  703. {
  704. if (_isInit)
  705. {
  706. return;
  707. }
  708. if (0 < numCharCount.Value)
  709. {
  710. rbtnLeft.Checked = true;
  711. grbTextAlignment.Enabled = false;
  712. numCharSpace.Enabled = false;
  713. decimal characterSpace = LayoutCommon.EqualityChars(
  714. numWidth.Value,
  715. numCharCount.Value,
  716. txtPreview.Font);
  717. if (characterSpace < numCharSpace.Minimum)
  718. {
  719. characterSpace = numCharSpace.Minimum;
  720. }
  721. else if (numCharSpace.Maximum < characterSpace)
  722. {
  723. characterSpace = numCharSpace.Maximum;
  724. }
  725. numCharSpace.Value = LayoutCommon.Truncate(characterSpace, numCharSpace.DecimalPlaces);
  726. }
  727. else
  728. {
  729. grbTextAlignment.Enabled = true;
  730. if (!rbtnEvenness.Checked)
  731. {
  732. numCharSpace.Enabled = true;
  733. }
  734. }
  735. }
  736. /// <summary>
  737. /// 设置文本字体。
  738. /// </summary>
  739. /// <param name="sender">指定的对象</param>
  740. /// <param name="e">提供的事件数据</param>
  741. private void txtPreview_FontChanged(object sender, System.EventArgs e)
  742. {
  743. if (_isInit)
  744. {
  745. return;
  746. }
  747. if (0 < numCharCount.Value)
  748. {
  749. decimal characterSpace = LayoutCommon.EqualityChars(
  750. numWidth.Value,
  751. numCharCount.Value,
  752. txtPreview.Font);
  753. if (characterSpace < numCharSpace.Minimum)
  754. {
  755. characterSpace = numCharSpace.Minimum;
  756. }
  757. else if (numCharSpace.Maximum < characterSpace)
  758. {
  759. characterSpace = numCharSpace.Maximum;
  760. }
  761. numCharSpace.Value = LayoutCommon.Truncate(characterSpace,
  762. numCharSpace.DecimalPlaces);
  763. }
  764. }
  765. /// <summary>
  766. /// 设置文本字体。
  767. /// </summary>
  768. /// <param name="sender">指定的对象</param>
  769. /// <param name="e">提供的事件数据</param>
  770. private void btnFont_Click(object sender, System.EventArgs e)
  771. {
  772. fontDialog.Font = TextFont;
  773. if (fontDialog.ShowDialog() == DialogResult.OK)
  774. {
  775. TextFont = fontDialog.Font;
  776. }
  777. }
  778. private void chkPic_CheckedChanged(object sender, System.EventArgs e)
  779. {
  780. chkM.Enabled = chkPic.Checked;
  781. chkFixedRatio.Enabled = chkPic.Checked;
  782. }
  783. #endregion 事件处理
  784. private void btnOK_Click(object sender, System.EventArgs e)
  785. {
  786. }
  787. }
  788. }