TextEdit.cs 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898
  1. using System;
  2. using System.ComponentModel;
  3. using System.Diagnostics;
  4. using System.Drawing;
  5. using System.Runtime.CompilerServices;
  6. using System.Windows.Forms;
  7. using Microsoft.VisualBasic.CompilerServices;
  8. namespace Dongke.IBOSS.PRD.Framework.Controls
  9. {
  10. [DesignerGenerated]
  11. [EditorBrowsable(EditorBrowsableState.Never)]
  12. public class TextEdit : Form
  13. {
  14. private IContainer components;
  15. [AccessedThroughProperty("TableLayoutPanel1")]
  16. private TableLayoutPanel _TableLayoutPanel1;
  17. [AccessedThroughProperty("OK_Button")]
  18. private Button _OK_Button;
  19. [AccessedThroughProperty("Cancel_Button")]
  20. private Button _Cancel_Button;
  21. [AccessedThroughProperty("Panel1")]
  22. private Panel _Panel1;
  23. [AccessedThroughProperty("TextBox1")]
  24. private TextBox _TextBox1;
  25. [AccessedThroughProperty("Button1")]
  26. private Button _Button1;
  27. [AccessedThroughProperty("ContextMenuStrip1")]
  28. private ContextMenuStrip _ContextMenuStrip1;
  29. [AccessedThroughProperty("页码ToolStripMenuItem")]
  30. private ToolStripMenuItem _页码ToolStripMenuItem;
  31. [AccessedThroughProperty("总页数ToolStripMenuItem")]
  32. private ToolStripMenuItem _总页数ToolStripMenuItem;
  33. [AccessedThroughProperty("当前日期ToolStripMenuItem")]
  34. private ToolStripMenuItem _当前日期ToolStripMenuItem;
  35. [AccessedThroughProperty("当前日期2ToolStripMenuItem")]
  36. private ToolStripMenuItem _当前日期2ToolStripMenuItem;
  37. [AccessedThroughProperty("当前年ToolStripMenuItem")]
  38. private ToolStripMenuItem _当前年ToolStripMenuItem;
  39. [AccessedThroughProperty("ToolStripMenuItem1")]
  40. private ToolStripMenuItem _ToolStripMenuItem1;
  41. [AccessedThroughProperty("ToolStripMenuItem2")]
  42. private ToolStripMenuItem _ToolStripMenuItem2;
  43. [AccessedThroughProperty("ToolStripMenuItem3")]
  44. private ToolStripMenuItem _ToolStripMenuItem3;
  45. [AccessedThroughProperty("ToolStripMenuItem4")]
  46. private ToolStripMenuItem _ToolStripMenuItem4;
  47. [AccessedThroughProperty("ToolStripMenuItem5")]
  48. private ToolStripMenuItem _ToolStripMenuItem5;
  49. [AccessedThroughProperty("Button2")]
  50. private Button _Button2;
  51. [AccessedThroughProperty("ContextMenuStrip2")]
  52. private ContextMenuStrip _ContextMenuStrip2;
  53. [AccessedThroughProperty("ToolStripSeparator1")]
  54. private ToolStripSeparator _ToolStripSeparator1;
  55. [AccessedThroughProperty("Button3")]
  56. private Button _Button3;
  57. [AccessedThroughProperty("ContextMenuStrip3")]
  58. private ContextMenuStrip _ContextMenuStrip3;
  59. [AccessedThroughProperty("Label1")]
  60. private Label _Label1;
  61. [AccessedThroughProperty("Label2")]
  62. private Label _Label2;
  63. internal virtual TableLayoutPanel TableLayoutPanel1
  64. {
  65. get
  66. {
  67. return _TableLayoutPanel1;
  68. }
  69. [MethodImpl(MethodImplOptions.Synchronized)]
  70. set
  71. {
  72. _TableLayoutPanel1 = value;
  73. }
  74. }
  75. internal virtual Button OK_Button
  76. {
  77. get
  78. {
  79. return _OK_Button;
  80. }
  81. [MethodImpl(MethodImplOptions.Synchronized)]
  82. set
  83. {
  84. EventHandler value2 = OK_Button_Click;
  85. if (_OK_Button != null)
  86. {
  87. _OK_Button.Click -= value2;
  88. }
  89. _OK_Button = value;
  90. if (_OK_Button != null)
  91. {
  92. _OK_Button.Click += value2;
  93. }
  94. }
  95. }
  96. internal virtual Button Cancel_Button
  97. {
  98. get
  99. {
  100. return _Cancel_Button;
  101. }
  102. [MethodImpl(MethodImplOptions.Synchronized)]
  103. set
  104. {
  105. EventHandler value2 = Cancel_Button_Click;
  106. if (_Cancel_Button != null)
  107. {
  108. _Cancel_Button.Click -= value2;
  109. }
  110. _Cancel_Button = value;
  111. if (_Cancel_Button != null)
  112. {
  113. _Cancel_Button.Click += value2;
  114. }
  115. }
  116. }
  117. internal virtual Panel Panel1
  118. {
  119. get
  120. {
  121. return _Panel1;
  122. }
  123. [MethodImpl(MethodImplOptions.Synchronized)]
  124. set
  125. {
  126. _Panel1 = value;
  127. }
  128. }
  129. internal virtual TextBox TextBox1
  130. {
  131. get
  132. {
  133. return _TextBox1;
  134. }
  135. [MethodImpl(MethodImplOptions.Synchronized)]
  136. set
  137. {
  138. _TextBox1 = value;
  139. }
  140. }
  141. internal virtual Button Button1
  142. {
  143. get
  144. {
  145. return _Button1;
  146. }
  147. [MethodImpl(MethodImplOptions.Synchronized)]
  148. set
  149. {
  150. EventHandler value2 = Button1_Click;
  151. if (_Button1 != null)
  152. {
  153. _Button1.Click -= value2;
  154. }
  155. _Button1 = value;
  156. if (_Button1 != null)
  157. {
  158. _Button1.Click += value2;
  159. }
  160. }
  161. }
  162. internal virtual ContextMenuStrip ContextMenuStrip1
  163. {
  164. get
  165. {
  166. return _ContextMenuStrip1;
  167. }
  168. [MethodImpl(MethodImplOptions.Synchronized)]
  169. set
  170. {
  171. _ContextMenuStrip1 = value;
  172. }
  173. }
  174. internal virtual ToolStripMenuItem 页码ToolStripMenuItem
  175. {
  176. get
  177. {
  178. return _页码ToolStripMenuItem;
  179. }
  180. [MethodImpl(MethodImplOptions.Synchronized)]
  181. set
  182. {
  183. EventHandler value2 = 页码ToolStripMenuItem_Click;
  184. if (_页码ToolStripMenuItem != null)
  185. {
  186. _页码ToolStripMenuItem.Click -= value2;
  187. }
  188. _页码ToolStripMenuItem = value;
  189. if (_页码ToolStripMenuItem != null)
  190. {
  191. _页码ToolStripMenuItem.Click += value2;
  192. }
  193. }
  194. }
  195. internal virtual ToolStripMenuItem 总页数ToolStripMenuItem
  196. {
  197. get
  198. {
  199. return _总页数ToolStripMenuItem;
  200. }
  201. [MethodImpl(MethodImplOptions.Synchronized)]
  202. set
  203. {
  204. EventHandler value2 = 页码ToolStripMenuItem_Click;
  205. if (_总页数ToolStripMenuItem != null)
  206. {
  207. _总页数ToolStripMenuItem.Click -= value2;
  208. }
  209. _总页数ToolStripMenuItem = value;
  210. if (_总页数ToolStripMenuItem != null)
  211. {
  212. _总页数ToolStripMenuItem.Click += value2;
  213. }
  214. }
  215. }
  216. internal virtual ToolStripMenuItem 当前日期ToolStripMenuItem
  217. {
  218. get
  219. {
  220. return _当前日期ToolStripMenuItem;
  221. }
  222. [MethodImpl(MethodImplOptions.Synchronized)]
  223. set
  224. {
  225. EventHandler value2 = 页码ToolStripMenuItem_Click;
  226. if (_当前日期ToolStripMenuItem != null)
  227. {
  228. _当前日期ToolStripMenuItem.Click -= value2;
  229. }
  230. _当前日期ToolStripMenuItem = value;
  231. if (_当前日期ToolStripMenuItem != null)
  232. {
  233. _当前日期ToolStripMenuItem.Click += value2;
  234. }
  235. }
  236. }
  237. internal virtual ToolStripMenuItem 当前日期2ToolStripMenuItem
  238. {
  239. get
  240. {
  241. return _当前日期2ToolStripMenuItem;
  242. }
  243. [MethodImpl(MethodImplOptions.Synchronized)]
  244. set
  245. {
  246. EventHandler value2 = 页码ToolStripMenuItem_Click;
  247. if (_当前日期2ToolStripMenuItem != null)
  248. {
  249. _当前日期2ToolStripMenuItem.Click -= value2;
  250. }
  251. _当前日期2ToolStripMenuItem = value;
  252. if (_当前日期2ToolStripMenuItem != null)
  253. {
  254. _当前日期2ToolStripMenuItem.Click += value2;
  255. }
  256. }
  257. }
  258. internal virtual ToolStripMenuItem 当前年ToolStripMenuItem
  259. {
  260. get
  261. {
  262. return _当前年ToolStripMenuItem;
  263. }
  264. [MethodImpl(MethodImplOptions.Synchronized)]
  265. set
  266. {
  267. EventHandler value2 = 页码ToolStripMenuItem_Click;
  268. if (_当前年ToolStripMenuItem != null)
  269. {
  270. _当前年ToolStripMenuItem.Click -= value2;
  271. }
  272. _当前年ToolStripMenuItem = value;
  273. if (_当前年ToolStripMenuItem != null)
  274. {
  275. _当前年ToolStripMenuItem.Click += value2;
  276. }
  277. }
  278. }
  279. internal virtual ToolStripMenuItem ToolStripMenuItem1
  280. {
  281. get
  282. {
  283. return _ToolStripMenuItem1;
  284. }
  285. [MethodImpl(MethodImplOptions.Synchronized)]
  286. set
  287. {
  288. EventHandler value2 = 页码ToolStripMenuItem_Click;
  289. if (_ToolStripMenuItem1 != null)
  290. {
  291. _ToolStripMenuItem1.Click -= value2;
  292. }
  293. _ToolStripMenuItem1 = value;
  294. if (_ToolStripMenuItem1 != null)
  295. {
  296. _ToolStripMenuItem1.Click += value2;
  297. }
  298. }
  299. }
  300. internal virtual ToolStripMenuItem ToolStripMenuItem2
  301. {
  302. get
  303. {
  304. return _ToolStripMenuItem2;
  305. }
  306. [MethodImpl(MethodImplOptions.Synchronized)]
  307. set
  308. {
  309. EventHandler value2 = 页码ToolStripMenuItem_Click;
  310. if (_ToolStripMenuItem2 != null)
  311. {
  312. _ToolStripMenuItem2.Click -= value2;
  313. }
  314. _ToolStripMenuItem2 = value;
  315. if (_ToolStripMenuItem2 != null)
  316. {
  317. _ToolStripMenuItem2.Click += value2;
  318. }
  319. }
  320. }
  321. internal virtual ToolStripMenuItem ToolStripMenuItem3
  322. {
  323. get
  324. {
  325. return _ToolStripMenuItem3;
  326. }
  327. [MethodImpl(MethodImplOptions.Synchronized)]
  328. set
  329. {
  330. EventHandler value2 = 页码ToolStripMenuItem_Click;
  331. if (_ToolStripMenuItem3 != null)
  332. {
  333. _ToolStripMenuItem3.Click -= value2;
  334. }
  335. _ToolStripMenuItem3 = value;
  336. if (_ToolStripMenuItem3 != null)
  337. {
  338. _ToolStripMenuItem3.Click += value2;
  339. }
  340. }
  341. }
  342. internal virtual ToolStripMenuItem ToolStripMenuItem4
  343. {
  344. get
  345. {
  346. return _ToolStripMenuItem4;
  347. }
  348. [MethodImpl(MethodImplOptions.Synchronized)]
  349. set
  350. {
  351. EventHandler value2 = 页码ToolStripMenuItem_Click;
  352. if (_ToolStripMenuItem4 != null)
  353. {
  354. _ToolStripMenuItem4.Click -= value2;
  355. }
  356. _ToolStripMenuItem4 = value;
  357. if (_ToolStripMenuItem4 != null)
  358. {
  359. _ToolStripMenuItem4.Click += value2;
  360. }
  361. }
  362. }
  363. internal virtual ToolStripMenuItem ToolStripMenuItem5
  364. {
  365. get
  366. {
  367. return _ToolStripMenuItem5;
  368. }
  369. [MethodImpl(MethodImplOptions.Synchronized)]
  370. set
  371. {
  372. EventHandler value2 = 页码ToolStripMenuItem_Click;
  373. if (_ToolStripMenuItem5 != null)
  374. {
  375. _ToolStripMenuItem5.Click -= value2;
  376. }
  377. _ToolStripMenuItem5 = value;
  378. if (_ToolStripMenuItem5 != null)
  379. {
  380. _ToolStripMenuItem5.Click += value2;
  381. }
  382. }
  383. }
  384. internal virtual Button Button2
  385. {
  386. get
  387. {
  388. return _Button2;
  389. }
  390. [MethodImpl(MethodImplOptions.Synchronized)]
  391. set
  392. {
  393. EventHandler value2 = Button2_Click;
  394. if (_Button2 != null)
  395. {
  396. _Button2.Click -= value2;
  397. }
  398. _Button2 = value;
  399. if (_Button2 != null)
  400. {
  401. _Button2.Click += value2;
  402. }
  403. }
  404. }
  405. internal virtual ContextMenuStrip ContextMenuStrip2
  406. {
  407. get
  408. {
  409. return _ContextMenuStrip2;
  410. }
  411. [MethodImpl(MethodImplOptions.Synchronized)]
  412. set
  413. {
  414. _ContextMenuStrip2 = value;
  415. }
  416. }
  417. internal virtual ToolStripSeparator ToolStripSeparator1
  418. {
  419. get
  420. {
  421. return _ToolStripSeparator1;
  422. }
  423. [MethodImpl(MethodImplOptions.Synchronized)]
  424. set
  425. {
  426. _ToolStripSeparator1 = value;
  427. }
  428. }
  429. internal virtual Button Button3
  430. {
  431. get
  432. {
  433. return _Button3;
  434. }
  435. [MethodImpl(MethodImplOptions.Synchronized)]
  436. set
  437. {
  438. EventHandler value2 = Button3_Click;
  439. if (_Button3 != null)
  440. {
  441. _Button3.Click -= value2;
  442. }
  443. _Button3 = value;
  444. if (_Button3 != null)
  445. {
  446. _Button3.Click += value2;
  447. }
  448. }
  449. }
  450. internal virtual ContextMenuStrip ContextMenuStrip3
  451. {
  452. get
  453. {
  454. return _ContextMenuStrip3;
  455. }
  456. [MethodImpl(MethodImplOptions.Synchronized)]
  457. set
  458. {
  459. _ContextMenuStrip3 = value;
  460. }
  461. }
  462. internal virtual Label Label1
  463. {
  464. get
  465. {
  466. return _Label1;
  467. }
  468. [MethodImpl(MethodImplOptions.Synchronized)]
  469. set
  470. {
  471. _Label1 = value;
  472. }
  473. }
  474. internal virtual Label Label2
  475. {
  476. get
  477. {
  478. return _Label2;
  479. }
  480. [MethodImpl(MethodImplOptions.Synchronized)]
  481. set
  482. {
  483. _Label2 = value;
  484. }
  485. }
  486. public TextEdit()
  487. {
  488. base.Load += TextEdit_Load;
  489. InitializeComponent();
  490. }
  491. [DebuggerNonUserCode]
  492. protected override void Dispose(bool disposing)
  493. {
  494. try
  495. {
  496. if (disposing && components != null)
  497. {
  498. components.Dispose();
  499. }
  500. }
  501. finally
  502. {
  503. base.Dispose(disposing);
  504. }
  505. }
  506. [System.Diagnostics.DebuggerStepThrough]
  507. private void InitializeComponent()
  508. {
  509. this.components = new System.ComponentModel.Container();
  510. this.TableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
  511. this.OK_Button = new System.Windows.Forms.Button();
  512. this.Cancel_Button = new System.Windows.Forms.Button();
  513. this.Panel1 = new System.Windows.Forms.Panel();
  514. this.TextBox1 = new System.Windows.Forms.TextBox();
  515. this.ContextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
  516. this.页码ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
  517. this.总页数ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
  518. this.当前日期ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
  519. this.当前日期2ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
  520. this.当前年ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
  521. this.ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
  522. this.ToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
  523. this.ToolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
  524. this.ToolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem();
  525. this.ToolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem();
  526. this.ToolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
  527. this.Button1 = new System.Windows.Forms.Button();
  528. this.Button2 = new System.Windows.Forms.Button();
  529. this.ContextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components);
  530. this.Button3 = new System.Windows.Forms.Button();
  531. this.ContextMenuStrip3 = new System.Windows.Forms.ContextMenuStrip(this.components);
  532. this.Label1 = new System.Windows.Forms.Label();
  533. this.Label2 = new System.Windows.Forms.Label();
  534. this.TableLayoutPanel1.SuspendLayout();
  535. this.Panel1.SuspendLayout();
  536. this.ContextMenuStrip1.SuspendLayout();
  537. base.SuspendLayout();
  538. this.TableLayoutPanel1.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right;
  539. this.TableLayoutPanel1.ColumnCount = 2;
  540. this.TableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50f));
  541. this.TableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50f));
  542. this.TableLayoutPanel1.Controls.Add(this.OK_Button, 0, 0);
  543. this.TableLayoutPanel1.Controls.Add(this.Cancel_Button, 1, 0);
  544. System.Windows.Forms.Control tableLayoutPanel = this.TableLayoutPanel1;
  545. System.Drawing.Point location = new System.Drawing.Point(297, 201);
  546. tableLayoutPanel.Location = location;
  547. this.TableLayoutPanel1.Name = "TableLayoutPanel1";
  548. this.TableLayoutPanel1.RowCount = 1;
  549. this.TableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50f));
  550. System.Windows.Forms.Control tableLayoutPanel2 = this.TableLayoutPanel1;
  551. System.Drawing.Size size = new System.Drawing.Size(146, 27);
  552. tableLayoutPanel2.Size = size;
  553. this.TableLayoutPanel1.TabIndex = 0;
  554. this.OK_Button.Anchor = System.Windows.Forms.AnchorStyles.None;
  555. System.Windows.Forms.Control oK_Button = this.OK_Button;
  556. location = new System.Drawing.Point(3, 3);
  557. oK_Button.Location = location;
  558. this.OK_Button.Name = "OK_Button";
  559. System.Windows.Forms.Control oK_Button2 = this.OK_Button;
  560. size = new System.Drawing.Size(67, 21);
  561. oK_Button2.Size = size;
  562. this.OK_Button.TabIndex = 0;
  563. this.OK_Button.Text = "确定";
  564. this.Cancel_Button.Anchor = System.Windows.Forms.AnchorStyles.None;
  565. this.Cancel_Button.DialogResult = System.Windows.Forms.DialogResult.Cancel;
  566. System.Windows.Forms.Control cancel_Button = this.Cancel_Button;
  567. location = new System.Drawing.Point(76, 3);
  568. cancel_Button.Location = location;
  569. this.Cancel_Button.Name = "Cancel_Button";
  570. System.Windows.Forms.Control cancel_Button2 = this.Cancel_Button;
  571. size = new System.Drawing.Size(67, 21);
  572. cancel_Button2.Size = size;
  573. this.Cancel_Button.TabIndex = 1;
  574. this.Cancel_Button.Text = "取消";
  575. this.Panel1.Controls.Add(this.TextBox1);
  576. this.Panel1.Dock = System.Windows.Forms.DockStyle.Top;
  577. System.Windows.Forms.Control panel = this.Panel1;
  578. location = new System.Drawing.Point(0, 0);
  579. panel.Location = location;
  580. this.Panel1.Name = "Panel1";
  581. System.Windows.Forms.Control panel2 = this.Panel1;
  582. size = new System.Drawing.Size(443, 193);
  583. panel2.Size = size;
  584. this.Panel1.TabIndex = 1;
  585. this.TextBox1.AcceptsReturn = true;
  586. this.TextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
  587. this.TextBox1.Font = new System.Drawing.Font("宋体", 14.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
  588. this.TextBox1.HideSelection = false;
  589. System.Windows.Forms.Control textBox = this.TextBox1;
  590. location = new System.Drawing.Point(0, 0);
  591. textBox.Location = location;
  592. this.TextBox1.Multiline = true;
  593. this.TextBox1.Name = "TextBox1";
  594. this.TextBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
  595. System.Windows.Forms.Control textBox2 = this.TextBox1;
  596. size = new System.Drawing.Size(443, 193);
  597. textBox2.Size = size;
  598. this.TextBox1.TabIndex = 1;
  599. this.ContextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[11]
  600. {
  601. this.页码ToolStripMenuItem, this.总页数ToolStripMenuItem, this.当前日期ToolStripMenuItem, this.当前日期2ToolStripMenuItem, this.当前年ToolStripMenuItem, this.ToolStripMenuItem1, this.ToolStripMenuItem2, this.ToolStripMenuItem3, this.ToolStripMenuItem4, this.ToolStripMenuItem5,
  602. this.ToolStripSeparator1
  603. });
  604. this.ContextMenuStrip1.Name = "ContextMenuStrip1";
  605. System.Windows.Forms.Control contextMenuStrip = this.ContextMenuStrip1;
  606. size = new System.Drawing.Size(129, 230);
  607. contextMenuStrip.Size = size;
  608. this.页码ToolStripMenuItem.Name = "页码ToolStripMenuItem";
  609. System.Windows.Forms.ToolStripItem toolStripItem = this.页码ToolStripMenuItem;
  610. size = new System.Drawing.Size(128, 22);
  611. toolStripItem.Size = size;
  612. this.页码ToolStripMenuItem.Text = "页码";
  613. this.总页数ToolStripMenuItem.Name = "总页数ToolStripMenuItem";
  614. System.Windows.Forms.ToolStripItem toolStripItem2 = this.总页数ToolStripMenuItem;
  615. size = new System.Drawing.Size(128, 22);
  616. toolStripItem2.Size = size;
  617. this.总页数ToolStripMenuItem.Text = "总页数";
  618. this.当前日期ToolStripMenuItem.Name = "当前日期ToolStripMenuItem";
  619. System.Windows.Forms.ToolStripItem toolStripItem3 = this.当前日期ToolStripMenuItem;
  620. size = new System.Drawing.Size(128, 22);
  621. toolStripItem3.Size = size;
  622. this.当前日期ToolStripMenuItem.Text = "当前日期";
  623. this.当前日期ToolStripMenuItem.ToolTipText = "插入当前日期,以-号分格";
  624. this.当前日期2ToolStripMenuItem.Name = "当前日期2ToolStripMenuItem";
  625. System.Windows.Forms.ToolStripItem toolStripItem4 = this.当前日期2ToolStripMenuItem;
  626. size = new System.Drawing.Size(128, 22);
  627. toolStripItem4.Size = size;
  628. this.当前日期2ToolStripMenuItem.Text = "当前日期2";
  629. this.当前日期2ToolStripMenuItem.ToolTipText = "长日期格式";
  630. this.当前年ToolStripMenuItem.Name = "当前年ToolStripMenuItem";
  631. System.Windows.Forms.ToolStripItem toolStripItem5 = this.当前年ToolStripMenuItem;
  632. size = new System.Drawing.Size(128, 22);
  633. toolStripItem5.Size = size;
  634. this.当前年ToolStripMenuItem.Text = "当前年";
  635. this.ToolStripMenuItem1.Name = "ToolStripMenuItem1";
  636. System.Windows.Forms.ToolStripItem toolStripMenuItem = this.ToolStripMenuItem1;
  637. size = new System.Drawing.Size(128, 22);
  638. toolStripMenuItem.Size = size;
  639. this.ToolStripMenuItem1.Text = "当前月";
  640. this.ToolStripMenuItem2.Name = "ToolStripMenuItem2";
  641. System.Windows.Forms.ToolStripItem toolStripMenuItem2 = this.ToolStripMenuItem2;
  642. size = new System.Drawing.Size(128, 22);
  643. toolStripMenuItem2.Size = size;
  644. this.ToolStripMenuItem2.Text = "当前日";
  645. this.ToolStripMenuItem3.Name = "ToolStripMenuItem3";
  646. System.Windows.Forms.ToolStripItem toolStripMenuItem3 = this.ToolStripMenuItem3;
  647. size = new System.Drawing.Size(128, 22);
  648. toolStripMenuItem3.Size = size;
  649. this.ToolStripMenuItem3.Text = "当前时间";
  650. this.ToolStripMenuItem4.Name = "ToolStripMenuItem4";
  651. System.Windows.Forms.ToolStripItem toolStripMenuItem4 = this.ToolStripMenuItem4;
  652. size = new System.Drawing.Size(128, 22);
  653. toolStripMenuItem4.Size = size;
  654. this.ToolStripMenuItem4.Text = "行号";
  655. this.ToolStripMenuItem4.ToolTipText = "表格详细数据行号,从1开始计算";
  656. this.ToolStripMenuItem5.Name = "ToolStripMenuItem5";
  657. System.Windows.Forms.ToolStripItem toolStripMenuItem5 = this.ToolStripMenuItem5;
  658. size = new System.Drawing.Size(128, 22);
  659. toolStripMenuItem5.Size = size;
  660. this.ToolStripMenuItem5.Text = "页行号";
  661. this.ToolStripMenuItem5.ToolTipText = "每页从1重新开始计算的行号";
  662. this.ToolStripSeparator1.Name = "ToolStripSeparator1";
  663. System.Windows.Forms.ToolStripItem toolStripSeparator = this.ToolStripSeparator1;
  664. size = new System.Drawing.Size(125, 6);
  665. toolStripSeparator.Size = size;
  666. System.Windows.Forms.Control button = this.Button1;
  667. location = new System.Drawing.Point(17, 203);
  668. button.Location = location;
  669. this.Button1.Name = "Button1";
  670. System.Windows.Forms.Control button2 = this.Button1;
  671. size = new System.Drawing.Size(106, 23);
  672. button2.Size = size;
  673. this.Button1.TabIndex = 2;
  674. this.Button1.Text = "插入系统变量.…";
  675. this.Button1.UseVisualStyleBackColor = true;
  676. System.Windows.Forms.Control button3 = this.Button2;
  677. location = new System.Drawing.Point(133, 203);
  678. button3.Location = location;
  679. this.Button2.Name = "Button2";
  680. System.Windows.Forms.Control button4 = this.Button2;
  681. size = new System.Drawing.Size(128, 23);
  682. button4.Size = size;
  683. this.Button2.TabIndex = 2;
  684. this.Button2.Text = "插入自定义变量.…";
  685. this.Button2.UseVisualStyleBackColor = true;
  686. this.ContextMenuStrip2.Name = "ContextMenuStrip2";
  687. System.Windows.Forms.Control contextMenuStrip2 = this.ContextMenuStrip2;
  688. size = new System.Drawing.Size(61, 4);
  689. contextMenuStrip2.Size = size;
  690. System.Windows.Forms.Control button5 = this.Button3;
  691. location = new System.Drawing.Point(17, 230);
  692. button5.Location = location;
  693. this.Button3.Name = "Button3";
  694. System.Windows.Forms.Control button6 = this.Button3;
  695. size = new System.Drawing.Size(106, 23);
  696. button6.Size = size;
  697. this.Button3.TabIndex = 2;
  698. this.Button3.Text = "插入字段变量.…";
  699. this.Button3.UseVisualStyleBackColor = true;
  700. this.ContextMenuStrip3.Name = "ContextMenuStrip3";
  701. System.Windows.Forms.Control contextMenuStrip3 = this.ContextMenuStrip3;
  702. size = new System.Drawing.Size(61, 4);
  703. contextMenuStrip3.Size = size;
  704. System.Windows.Forms.Control label = this.Label1;
  705. location = new System.Drawing.Point(10, 258);
  706. label.Location = location;
  707. this.Label1.Name = "Label1";
  708. System.Windows.Forms.Control label2 = this.Label1;
  709. size = new System.Drawing.Size(421, 55);
  710. label2.Size = size;
  711. this.Label1.TabIndex = 3;
  712. this.Label1.Text = "注1:此属性可以有纯文本及文本与系统变量、自定义变量、字段变量的任意组合,但请注意,在打印预览时,程序仅对系统变量、自定义变量、字段变量进行简单的替换操作。而不会进行表达式的计算操作,如果需要对表达式进行计算,请使用\"表达式\"控件。";
  713. System.Windows.Forms.Control label3 = this.Label2;
  714. location = new System.Drawing.Point(14, 316);
  715. label3.Location = location;
  716. this.Label2.Name = "Label2";
  717. System.Windows.Forms.Control label4 = this.Label2;
  718. size = new System.Drawing.Size(413, 25);
  719. label4.Size = size;
  720. this.Label2.TabIndex = 3;
  721. this.Label2.Text = "注2:如果不同类型的变量名称存在相同的情况 ,则程序替换变量的顺序是:先字段变量,再自定义变量,最后才是系统变量。";
  722. base.AcceptButton = this.OK_Button;
  723. System.Drawing.SizeF sizeF = new System.Drawing.SizeF(6f, 12f);
  724. base.AutoScaleDimensions = sizeF;
  725. base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
  726. base.CancelButton = this.Cancel_Button;
  727. size = new System.Drawing.Size(443, 346);
  728. base.ClientSize = size;
  729. base.Controls.Add(this.Label1);
  730. base.Controls.Add(this.Panel1);
  731. base.Controls.Add(this.Button2);
  732. base.Controls.Add(this.Label2);
  733. base.Controls.Add(this.Button3);
  734. base.Controls.Add(this.Button1);
  735. base.Controls.Add(this.TableLayoutPanel1);
  736. base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
  737. base.MaximizeBox = false;
  738. base.MinimizeBox = false;
  739. base.Name = "TextEdit";
  740. base.ShowInTaskbar = false;
  741. base.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
  742. this.Text = "文本控件文本编辑器";
  743. this.TableLayoutPanel1.ResumeLayout(false);
  744. this.Panel1.ResumeLayout(false);
  745. this.Panel1.PerformLayout();
  746. this.ContextMenuStrip1.ResumeLayout(false);
  747. base.ResumeLayout(false);
  748. }
  749. private void OK_Button_Click(object sender, EventArgs e)
  750. {
  751. base.DialogResult = DialogResult.OK;
  752. Close();
  753. }
  754. private void Cancel_Button_Click(object sender, EventArgs e)
  755. {
  756. base.DialogResult = DialogResult.Cancel;
  757. Close();
  758. }
  759. private void Button1_Click(object sender, EventArgs e)
  760. {
  761. ContextMenuStrip1.Show((Control)sender, 0, 0);
  762. }
  763. private void 页码ToolStripMenuItem_Click(object sender, EventArgs e)
  764. {
  765. string text = ((ToolStripMenuItem)sender).Text;
  766. text = "[" + text + "]";
  767. TextBox1.Paste(text);
  768. TextBox1.Focus();
  769. }
  770. private void Button2_Click(object sender, EventArgs e)
  771. {
  772. ContextMenuStrip2.Show((Control)sender, 0, 0);
  773. }
  774. private void TextEdit_Load(object sender, EventArgs e)
  775. {
  776. checked
  777. {
  778. if (mbsjmodule.FieldsString2 == null)
  779. {
  780. Button2.Enabled = false;
  781. }
  782. else if (mbsjmodule.FieldsString2.GetLength(0) < 0)
  783. {
  784. Button2.Enabled = false;
  785. }
  786. else
  787. {
  788. Button2.Enabled = true;
  789. string[] array = new string[mbsjmodule.FieldsString2.GetLength(0) - 1 + 1];
  790. int num = 0;
  791. int num2 = mbsjmodule.FieldsString2.GetLength(0) - 1;
  792. for (int i = num; i <= num2; i++)
  793. {
  794. array[i] = mbsjmodule.FieldsString2[i, 0];
  795. }
  796. Array.Sort(array);
  797. int num3 = 0;
  798. int num4 = array.Length - 1;
  799. for (int j = num3; j <= num4; j++)
  800. {
  801. if (Operators.CompareString(array[j], "", TextCompare: false) != 0)
  802. {
  803. ToolStripItem toolStripItem = ContextMenuStrip2.Items.Add(array[j]);
  804. toolStripItem.Click += 页码ToolStripMenuItem_Click;
  805. }
  806. }
  807. if (ContextMenuStrip2.Items.Count <= 0)
  808. {
  809. Button2.Enabled = false;
  810. }
  811. }
  812. if (mbsjmodule.FieldsString == null)
  813. {
  814. Button3.Enabled = false;
  815. return;
  816. }
  817. if (mbsjmodule.FieldsString.Length < 0)
  818. {
  819. Button3.Enabled = false;
  820. return;
  821. }
  822. Button3.Enabled = true;
  823. Array.Sort(mbsjmodule.FieldsString);
  824. int num5 = 0;
  825. int num6 = mbsjmodule.FieldsString.Length - 1;
  826. for (int k = num5; k <= num6; k++)
  827. {
  828. ToolStripItem toolStripItem2 = ContextMenuStrip3.Items.Add(mbsjmodule.FieldsString[k]);
  829. toolStripItem2.Click += 页码ToolStripMenuItem_Click;
  830. }
  831. }
  832. }
  833. private void Button3_Click(object sender, EventArgs e)
  834. {
  835. ContextMenuStrip3.Show((Control)sender, 0, 0);
  836. }
  837. }
  838. }