ColControl.cs 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using PaintDotNet.Processing;
  11. namespace PaintDotNet.Instrument.CustomInterface
  12. {
  13. internal class ColControl : UserControl
  14. {
  15. public Button button;
  16. public Label label;
  17. public Panel panel;
  18. public DocumentWorkspaceWindow workspaceWindow;
  19. /// <summary>
  20. /// 判断选中
  21. /// </summary>
  22. public bool isSelect = false;
  23. public ColControl()
  24. {
  25. InitializeComponent();
  26. InitializeLanguageText();
  27. }
  28. private void InitializeLanguageText()
  29. {
  30. this.button.Text = PdnResources.GetString("Menu.Gallery.text");
  31. }
  32. private void InitializeComponent()
  33. {
  34. this.button = new System.Windows.Forms.Button();
  35. this.label = new System.Windows.Forms.Label();
  36. this.panel = new System.Windows.Forms.Panel();
  37. this.workspaceWindow = new DocumentWorkspaceWindow();
  38. this.SuspendLayout();
  39. //
  40. // button
  41. //
  42. this.button.Location = new System.Drawing.Point(1, 1);
  43. this.button.Name = "button";
  44. this.button.Size = new System.Drawing.Size(75, 23);
  45. this.button.TabIndex = 0;
  46. this.button.Text = "图库";
  47. //
  48. // label
  49. //
  50. this.label.Location = new System.Drawing.Point(1, 24);
  51. this.label.Name = "label";
  52. this.label.Size = new System.Drawing.Size(190, 23);
  53. this.label.TabIndex = 1;
  54. //
  55. // panel
  56. //
  57. this.panel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  58. | System.Windows.Forms.AnchorStyles.Left)
  59. | System.Windows.Forms.AnchorStyles.Right)));
  60. this.panel.Location = new System.Drawing.Point(1, 47);
  61. this.panel.Name = "panel";
  62. this.panel.Size = new System.Drawing.Size(566, 387);
  63. this.panel.TabIndex = 2;
  64. this.panel.Controls.Add(this.workspaceWindow);
  65. //
  66. //
  67. //
  68. this.workspaceWindow.Location = new System.Drawing.Point(0, 0);
  69. this.workspaceWindow.Dock = DockStyle.Fill;
  70. this.workspaceWindow.HookMouseEvents();
  71. this.workspaceWindow.AuxiliaryLineEnabled = false;
  72. this.workspaceWindow.RulersEnabled = true;
  73. this.workspaceWindow.Visible = false;
  74. //this.workspaceWindow.PanelBottom.Visible = false;
  75. this.workspaceWindow.removeEvent();
  76. //
  77. // ColControl
  78. //
  79. this.BackColor = System.Drawing.Color.White;
  80. this.Controls.Add(this.button);
  81. this.Controls.Add(this.label);
  82. this.Controls.Add(this.panel);
  83. this.Name = "ColControl";
  84. this.Size = new System.Drawing.Size(566, 440);
  85. this.ResumeLayout(false);
  86. }
  87. }
  88. }