CustomColorDlg.cs
上传用户:nnpulika
上传日期:2013-02-15
资源大小:597k
文件大小:21k
源码类别:

状态条

开发平台:

C#

  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. using System.Drawing.Drawing2D;
  7. using System.Diagnostics;
  8. using System.Resources;
  9. using System.Reflection;
  10. using UtilityLibrary.WinControls;
  11. using UtilityLibrary.General;
  12. namespace UtilityLibrary.WinControls
  13. {
  14. /// <summary>
  15. /// Summary description for CustomColorDlg.
  16. /// </summary>
  17. public class CustomColorDlg : System.Windows.Forms.Form
  18. {
  19. #region Class Variables
  20. private System.Windows.Forms.Button button1;
  21. private System.Windows.Forms.Button button2;
  22. private System.Windows.Forms.Label label2;
  23. private System.Windows.Forms.Label label3;
  24. private System.Windows.Forms.Label label4;
  25. private System.Windows.Forms.Label label5;
  26. private System.Windows.Forms.Label label6;
  27. private System.Windows.Forms.Label label7;
  28. private System.Windows.Forms.Label Label1;
  29. private Color currentColor = Color.White;
  30. private System.Windows.Forms.Panel currentColorPanel;
  31. private System.Windows.Forms.PictureBox paletteBox;
  32. private NumericTextBox hueEdit;
  33. private NumericTextBox satEdit;
  34. private NumericTextBox lumEdit;
  35. private NumericTextBox redEdit;
  36. private NumericTextBox greenEdit;
  37. private NumericTextBox blueEdit;
  38. private System.Windows.Forms.PictureBox lumBox;
  39. private Color paletteColor;
  40. private bool drawCrossHair = true;
  41. private Point crossPos = new Point(0, 0);
  42. private float DELTA_WIDTH = 240.0f/200.0f;
  43. private float DELTA_HEIGHT = 240.0f/186.0f;
  44. private bool updatingUI = false;
  45. private ResourceManager rm = null;
  46. /// <summary>
  47. /// Required designer variable.
  48. /// </summary>
  49. private System.ComponentModel.Container components = null;
  50. #endregion
  51. #region Constructors
  52. public CustomColorDlg()
  53. {
  54. Assembly thisAssembly = Assembly.GetAssembly(Type.GetType("UtilityLibrary.WinControls.CustomColorDlg"));
  55. rm = new ResourceManager("UtilityLibrary.Resources.ImagesColorPicker", thisAssembly);
  56. //
  57. // Required for Windows Form Designer support
  58. //
  59. InitializeComponent();
  60. paletteBox.Image = (Bitmap)rm.GetObject("Palette");
  61. }
  62. /// <summary>
  63. /// Clean up any resources being used.
  64. /// </summary>
  65. protected override void Dispose( bool disposing )
  66. {
  67. if( disposing )
  68. {
  69. if(components != null)
  70. {
  71. components.Dispose();
  72. }
  73. }
  74. base.Dispose( disposing );
  75. }
  76. #endregion
  77. #region Properties
  78. public Color CurrentColor
  79. {
  80. get 
  81. {
  82. return currentColor;
  83. }
  84. set
  85. {
  86. currentColor = value;
  87. }
  88. }
  89. #endregion
  90. #region Implementation
  91. void CustomColorDlg_Load(object sender, System.EventArgs e)
  92. {
  93. updatingUI = true;
  94. currentColorPanel.BackColor = CurrentColor;
  95. float r = CurrentColor.R;
  96. float g = CurrentColor.G;
  97. float b = CurrentColor.B;
  98. redEdit.Text = (Convert.ToInt32(r)).ToString();
  99. greenEdit.Text = (Convert.ToInt32(g)).ToString();
  100. blueEdit.Text = (Convert.ToInt32(b)).ToString();
  101. float h = 0;
  102. float s = 0;
  103. float l = 0;
  104. // Get h,s,l
  105. ColorUtil.RGBToHSL( (int)r, (int)g, (int)b, ref h, ref s, ref l);
  106. hueEdit.Text = Convert.ToString((int)h);
  107. satEdit.Text = Convert.ToString((int)s);
  108. lumEdit.Text = Convert.ToString((int)l);
  109. // Get palette color for interpolating the luminosity picture box
  110. ColorUtil.HSLToRGB( h, s, 120, ref r, ref g, ref b);
  111. paletteColor = Color.FromArgb((int)r, (int)g, (int)b);
  112. lumBox.Invalidate();
  113. // Calculate coordinates using default values for Hue and Sat
  114. CalculatePaletteMarkerCoordinates((int)h, (int)s);
  115. updatingUI = false;
  116. }
  117. void LumBox_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
  118. {
  119. Rectangle r = new Rectangle(0, 5 , lumBox.Width - 10, lumBox.Height-10);
  120. // Draw the color gradient
  121. LinearGradientBrush b = new LinearGradientBrush(r,Color.White, CurrentColor, 
  122. System.Drawing.Drawing2D.LinearGradientMode.Vertical);
  123. ColorBlend cb = new ColorBlend(3);
  124. cb.Colors[0] = Color.White;
  125. cb.Colors[1] = paletteColor;
  126. cb.Colors[2] = Color.Black;
  127. cb.Positions[0] = 0f;
  128. cb.Positions[1] = 0.5f;
  129. cb.Positions[2] = 1.0f;
  130. b.InterpolationColors = cb;
  131. e.Graphics.FillRectangle(b,r);
  132. b.Dispose();
  133. // Draw border around gradient rectangle
  134. Rectangle borderRect = r;
  135. borderRect.Inflate(0, 0);
  136. e.Graphics.DrawRectangle(new Pen(new SolidBrush(Color.Black), 1), borderRect);
  137. // Draw the indicator
  138. Point[] pts = new Point[3];
  139. int iTop = 240 - Convert.ToInt32(lumEdit.Text);
  140. iTop = ((lumBox.Height - 10) * iTop )/240 + 4;
  141. // Make sure we don't go out of bounds
  142. if ( iTop > lumBox.Height - 5 ) iTop = lumBox.Height - 5;
  143. if ( iTop < 5 ) iTop = 5;
  144. pts[0] = new Point(lumBox.Width - 8, iTop);
  145. pts[1] = new Point(lumBox.Width - 2, iTop - 7);
  146. pts[2] = new Point(lumBox.Width - 2, iTop + 7);
  147. e.Graphics.FillPolygon(Brushes.Black, pts);
  148. }
  149. void lumBox_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
  150. {
  151. if ( lumBox.Capture == true )
  152. {
  153. int y  = e.Y;
  154. if ( y < 5 ) y = 5;
  155. if ( y > lumBox.Height - 5 ) y = lumBox.Height - 5;
  156. int lum = 240 - ((y-5) * 240)/(lumBox.Height-10);
  157. lumEdit.Text = lum.ToString();
  158. LuminosityChanged();
  159. }
  160. }
  161. void lumBox_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
  162. {
  163. lumBox.Capture = false;
  164. LuminosityChanged();
  165. }
  166. void lumBox_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
  167. {
  168. lumBox.Capture = true;
  169. int y  = e.Y;
  170. if ( y < 5 ) y = 5;
  171. if ( y > lumBox.Height - 5 ) y = lumBox.Height - 5;
  172. int lum = 240 - ((y-5) * 240)/(lumBox.Height-10);
  173. lumEdit.Text = lum.ToString();
  174. LuminosityChanged();
  175. }
  176. void LuminosityChanged()
  177. {
  178. if ( lumEdit.Text.Length == 0) 
  179. return;
  180. updatingUI = true;
  181. float h = (float)Convert.ToDouble(hueEdit.Text);
  182. float s = (float)Convert.ToDouble(satEdit.Text);
  183. float l = (float)Convert.ToDouble(lumEdit.Text);
  184. ConvertToRGB(h, s, l);
  185. updatingUI = false;
  186. }
  187. void HueSatChanged()
  188. {
  189. // Calculate new Hue and Sat bases on mouse position coordinates
  190. updatingUI = true;
  191. float h = crossPos.X * DELTA_WIDTH;
  192. float s = (240.0f -(crossPos.Y * DELTA_HEIGHT));
  193. float l = (float)Convert.ToDouble(lumEdit.Text);
  194. hueEdit.Text = Convert.ToString((int)h);
  195. satEdit.Text = Convert.ToString((int)s);
  196.             ConvertToRGB(h, s, l);
  197. updatingUI = false;
  198. }
  199.       void HueSatTextBoxChanged()
  200. {
  201. // Calculate palette box marker coordinates positon base on
  202. // the new hue or sat value
  203. if ( hueEdit.Text == "" || satEdit.Text == "" )
  204. return;
  205. updatingUI = true;
  206. float h = (float)Convert.ToDouble(hueEdit.Text);
  207. float s = (float)Convert.ToDouble(satEdit.Text);
  208. float l = (float)Convert.ToDouble(lumEdit.Text);
  209. CalculatePaletteMarkerCoordinates((int)h, (int)s);
  210. ConvertToRGB(h, s, l);
  211. updatingUI = false;
  212.                       
  213. }
  214. void RGBTextChanged()
  215. {
  216. // Make sure none of the text boxes is empty
  217. if ( redEdit.Text == "" || greenEdit.Text == "" || blueEdit.Text == "" )
  218. return;
  219. updatingUI = true;
  220. float r = (float)Convert.ToDouble(redEdit.Text);
  221. float g = (float)Convert.ToDouble(greenEdit.Text);
  222. float b = (float)Convert.ToDouble(blueEdit.Text);
  223. float h = 0.0f;
  224. float s = 0.0f;
  225. float l = 0.0f;
  226. // convert to h, s, and l
  227. ColorUtil.RGBToHSL((int)r, (int)g, (int)b, ref h, ref s, ref l);
  228. // Update text boxes
  229. hueEdit.Text = Convert.ToString((int)h);
  230. satEdit.Text = Convert.ToString((int)s);
  231. lumEdit.Text = Convert.ToString((int)l);
  232. // Update current color
  233. CurrentColor = Color.FromArgb((int)r, (int)g, (int)b);
  234. currentColorPanel.BackColor = CurrentColor;
  235. // Update palette color (luminosity box)
  236. ColorUtil.HSLToRGB( h, s, 120, ref r, ref g, ref b);
  237. paletteColor = Color.FromArgb((int)r, (int)g, (int)b);
  238. lumBox.Invalidate();
  239. // Update palette box
  240. CalculatePaletteMarkerCoordinates((int)h, (int)s);
  241. updatingUI = false;
  242. }
  243. void ConvertToRGB(float h, float s, float l)
  244. {
  245. // Now get the new RGB values
  246. float r = 0.0f;
  247. float g = 0.0f;
  248. float b = 0.0f;
  249. ColorUtil.HSLToRGB(h, s, l, ref r, ref g, ref b);
  250. CurrentColor = Color.FromArgb((int)r, (int)g, (int)b);
  251. redEdit.Text = (Convert.ToInt32(r)).ToString();
  252. greenEdit.Text = (Convert.ToInt32(g)).ToString();
  253. blueEdit.Text = (Convert.ToInt32(b)).ToString();
  254. currentColorPanel.BackColor = CurrentColor;
  255. // Palette color is the pure form of the hue/sat
  256. ColorUtil.HSLToRGB( h, s, 120, ref r, ref g, ref b);
  257. paletteColor = Color.FromArgb((int)r, (int)g, (int)b);
  258. lumBox.Invalidate();
  259. }
  260. void CalculatePaletteMarkerCoordinates( int Hue, int Sat)
  261. {
  262. crossPos.X = (int)(Hue/DELTA_WIDTH);
  263. crossPos.Y = (int)((240 - Sat)/DELTA_HEIGHT);
  264. paletteBox.Invalidate();
  265. }
  266. void paletteBox_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
  267. {
  268. if ( paletteBox.Capture != true )
  269. return;
  270. crossPos.X = e.X;
  271. crossPos.Y = e.Y;
  272. // Make sure mouse does not go out of the palette picture area
  273. Rectangle rc = paletteBox.ClientRectangle;
  274. bool updateMousePos = false;
  275. if ( e.X <= rc.Left ) 
  276. {
  277. updateMousePos = true;
  278. crossPos.X = rc.Left;
  279. }
  280. if ( e.X >= rc.Right)
  281. {   updateMousePos = true;
  282. crossPos.X = rc.Right;
  283. }
  284. if ( e.Y <= rc.Top )
  285. {
  286. updateMousePos = true;
  287. crossPos.Y = rc.Top;
  288. }
  289. if ( e.Y >= rc.Bottom ) 
  290. {
  291. updateMousePos = true;
  292. crossPos.Y = rc.Bottom;
  293. }  
  294.           
  295. if ( updateMousePos )
  296. Cursor.Position = paletteBox.PointToScreen(new Point(crossPos.X, crossPos.Y));
  297. HueSatChanged();
  298. }
  299. void paletteBox_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
  300. {
  301. paletteBox.Capture = false;
  302. drawCrossHair = true;
  303. crossPos.X = e.X;
  304. crossPos.Y = e.Y;
  305. paletteBox.Invalidate();
  306. HueSatChanged();
  307. }
  308. void paletteBox_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
  309. {
  310. paletteBox.Capture = true;
  311. drawCrossHair = false;
  312. crossPos.X = e.X;
  313. crossPos.Y = e.Y;
  314. paletteBox.Invalidate();
  315. }
  316. void paletteBox_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
  317. {
  318. // Draw the cross-hair
  319. if ( drawCrossHair )
  320. {
  321. Pen p = new Pen(Brushes.Black, 3);
  322. int x = crossPos.X;
  323. int y = crossPos.Y;
  324. e.Graphics.DrawLine(p,x - 10, y , x - 5, y );
  325. e.Graphics.DrawLine(p,x + 10, y , x + 5, y );
  326. e.Graphics.DrawLine(p,x , y + 11, x , y +5);
  327. e.Graphics.DrawLine(p,x , y - 10, x , y -4);
  328. }
  329. }
  330. void hueEdit_TextChanged(object sender, System.EventArgs e)
  331. {
  332. if ( !updatingUI )
  333. HueSatTextBoxChanged();
  334. }
  335. void satEdit_TextChanged(object sender, System.EventArgs e)
  336. {
  337. if ( !updatingUI )
  338. HueSatTextBoxChanged();
  339. }
  340. void lumEdit_TextChanged(object sender, System.EventArgs e)
  341. {
  342. if ( !updatingUI )
  343. LuminosityChanged();
  344. }
  345. void redEdit_TextChanged(object sender, System.EventArgs e)
  346. {
  347. if ( !updatingUI )
  348. RGBTextChanged();
  349. }
  350. void greenEdit_TextChanged(object sender, System.EventArgs e)
  351. {
  352. if ( !updatingUI )
  353. RGBTextChanged();
  354. }
  355. void blueEdit_TextChanged(object sender, System.EventArgs e)
  356. {
  357. if ( !updatingUI )
  358. RGBTextChanged();
  359. }
  360. #endregion
  361. #region Windows Form Designer generated code
  362. /// <summary>
  363. /// Required method for Designer support - do not modify
  364. /// the contents of this method with the code editor.
  365. /// </summary>
  366. private void InitializeComponent()
  367. {
  368. System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(CustomColorDlg));
  369. this.paletteBox = new System.Windows.Forms.PictureBox();
  370. this.lumBox = new System.Windows.Forms.PictureBox();
  371. this.currentColorPanel = new System.Windows.Forms.Panel();
  372. this.button1 = new System.Windows.Forms.Button();
  373. this.button2 = new System.Windows.Forms.Button();
  374. this.hueEdit = new NumericTextBox();
  375. this.satEdit = new NumericTextBox();
  376. this.lumEdit = new NumericTextBox();
  377. this.redEdit = new NumericTextBox();
  378. this.greenEdit = new NumericTextBox();
  379. this.blueEdit = new NumericTextBox();
  380. this.Label1 = new System.Windows.Forms.Label();
  381. this.label2 = new System.Windows.Forms.Label();
  382. this.label3 = new System.Windows.Forms.Label();
  383. this.label4 = new System.Windows.Forms.Label();
  384. this.label5 = new System.Windows.Forms.Label();
  385. this.label6 = new System.Windows.Forms.Label();
  386. this.label7 = new System.Windows.Forms.Label();
  387. this.SuspendLayout();
  388. // 
  389. // paletteBox
  390. // 
  391. this.paletteBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  392. this.paletteBox.Location = new System.Drawing.Point(10, 12);
  393. this.paletteBox.Name = "paletteBox";
  394. this.paletteBox.Size = new System.Drawing.Size(202, 188);
  395. this.paletteBox.TabIndex = 0;
  396. this.paletteBox.TabStop = false;
  397. this.paletteBox.Paint += new System.Windows.Forms.PaintEventHandler(this.paletteBox_Paint);
  398. this.paletteBox.MouseUp += new System.Windows.Forms.MouseEventHandler(this.paletteBox_MouseUp);
  399. this.paletteBox.MouseMove += new System.Windows.Forms.MouseEventHandler(this.paletteBox_MouseMove);
  400. this.paletteBox.MouseDown += new System.Windows.Forms.MouseEventHandler(this.paletteBox_MouseDown);
  401. // 
  402. // lumBox
  403. // 
  404. this.lumBox.Location = new System.Drawing.Point(220, 7);
  405. this.lumBox.Name = "lumBox";
  406. this.lumBox.Size = new System.Drawing.Size(24, 198);
  407. this.lumBox.TabIndex = 1;
  408. this.lumBox.TabStop = false;
  409. this.lumBox.Paint += new System.Windows.Forms.PaintEventHandler(this.LumBox_Paint);
  410. this.lumBox.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lumBox_MouseUp);
  411. this.lumBox.MouseMove += new System.Windows.Forms.MouseEventHandler(this.lumBox_MouseMove);
  412. this.lumBox.MouseDown += new System.Windows.Forms.MouseEventHandler(this.lumBox_MouseDown);
  413. // 
  414. // currentColorPanel
  415. // 
  416. this.currentColorPanel.BackColor = System.Drawing.SystemColors.Control;
  417. this.currentColorPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  418. this.currentColorPanel.Location = new System.Drawing.Point(12, 212);
  419. this.currentColorPanel.Name = "currentColorPanel";
  420. this.currentColorPanel.Size = new System.Drawing.Size(66, 48);
  421. this.currentColorPanel.TabIndex = 2;
  422. // 
  423. // button1
  424. // 
  425. this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
  426. this.button1.Location = new System.Drawing.Point(52, 298);
  427. this.button1.Name = "button1";
  428. this.button1.Size = new System.Drawing.Size(64, 22);
  429. this.button1.TabIndex = 3;
  430. this.button1.Text = "Add Color";
  431. // 
  432. // button2
  433. // 
  434. this.button2.DialogResult = System.Windows.Forms.DialogResult.Cancel;
  435. this.button2.Location = new System.Drawing.Point(138, 298);
  436. this.button2.Name = "button2";
  437. this.button2.Size = new System.Drawing.Size(64, 22);
  438. this.button2.TabIndex = 4;
  439. this.button2.Text = "Cancel";
  440. // 
  441. // hueEdit
  442. // 
  443. this.hueEdit.Location = new System.Drawing.Point(124, 218);
  444. this.hueEdit.MaxLength = 3;
  445. this.hueEdit.Name = "hueEdit";
  446. this.hueEdit.SetRange = new System.Drawing.Size(0, 240);
  447. this.hueEdit.Size = new System.Drawing.Size(30, 20);
  448. this.hueEdit.TabIndex = 5;
  449. this.hueEdit.Text = "160";
  450. this.hueEdit.TextChanged += new System.EventHandler(this.hueEdit_TextChanged);
  451. // 
  452. // satEdit
  453. // 
  454. this.satEdit.Location = new System.Drawing.Point(124, 241);
  455. this.satEdit.MaxLength = 3;
  456. this.satEdit.Name = "satEdit";
  457. this.satEdit.SetRange = new System.Drawing.Size(0, 240);
  458. this.satEdit.Size = new System.Drawing.Size(30, 20);
  459. this.satEdit.TabIndex = 6;
  460. this.satEdit.Text = "0";
  461. this.satEdit.TextChanged += new System.EventHandler(this.satEdit_TextChanged);
  462. // 
  463. // lumEdit
  464. // 
  465. this.lumEdit.Location = new System.Drawing.Point(124, 264);
  466. this.lumEdit.MaxLength = 3;
  467. this.lumEdit.Name = "lumEdit";
  468. this.lumEdit.SetRange = new System.Drawing.Size(0, 240);
  469. this.lumEdit.Size = new System.Drawing.Size(30, 20);
  470. this.lumEdit.TabIndex = 7;
  471. this.lumEdit.Text = "0";
  472. this.lumEdit.TextChanged += new System.EventHandler(this.lumEdit_TextChanged);
  473. // 
  474. // redEdit
  475. // 
  476. this.redEdit.Location = new System.Drawing.Point(200, 218);
  477. this.redEdit.MaxLength = 3;
  478. this.redEdit.Name = "redEdit";
  479. this.redEdit.SetRange = new System.Drawing.Size(0, 255);
  480. this.redEdit.Size = new System.Drawing.Size(30, 20);
  481. this.redEdit.TabIndex = 8;
  482. this.redEdit.Text = "0";
  483. this.redEdit.TextChanged += new System.EventHandler(this.redEdit_TextChanged);
  484. // 
  485. // greenEdit
  486. // 
  487. this.greenEdit.Location = new System.Drawing.Point(200, 241);
  488. this.greenEdit.MaxLength = 3;
  489. this.greenEdit.Name = "greenEdit";
  490. this.greenEdit.SetRange = new System.Drawing.Size(0, 255);
  491. this.greenEdit.Size = new System.Drawing.Size(30, 20);
  492. this.greenEdit.TabIndex = 9;
  493. this.greenEdit.Text = "0";
  494. this.greenEdit.TextChanged += new System.EventHandler(this.greenEdit_TextChanged);
  495. // 
  496. // blueEdit
  497. // 
  498. this.blueEdit.Location = new System.Drawing.Point(200, 264);
  499. this.blueEdit.MaxLength = 3;
  500. this.blueEdit.Name = "blueEdit";
  501. this.blueEdit.SetRange = new System.Drawing.Size(0, 255);
  502. this.blueEdit.Size = new System.Drawing.Size(30, 20);
  503. this.blueEdit.TabIndex = 10;
  504. this.blueEdit.Text = "0";
  505. this.blueEdit.TextChanged += new System.EventHandler(this.blueEdit_TextChanged);
  506. // 
  507. // Label1
  508. // 
  509. this.Label1.Location = new System.Drawing.Point(96, 220);
  510. this.Label1.Name = "Label1";
  511. this.Label1.Size = new System.Drawing.Size(26, 18);
  512. this.Label1.TabIndex = 11;
  513. this.Label1.Text = "Hue";
  514. this.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  515. // 
  516. // label2
  517. // 
  518. this.label2.Location = new System.Drawing.Point(96, 243);
  519. this.label2.Name = "label2";
  520. this.label2.Size = new System.Drawing.Size(26, 18);
  521. this.label2.TabIndex = 12;
  522. this.label2.Text = "Sat";
  523. this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  524. // 
  525. // label3
  526. // 
  527. this.label3.Location = new System.Drawing.Point(96, 266);
  528. this.label3.Name = "label3";
  529. this.label3.Size = new System.Drawing.Size(26, 18);
  530. this.label3.TabIndex = 13;
  531. this.label3.Text = "Lum";
  532. this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  533. // 
  534. // label4
  535. // 
  536. this.label4.Location = new System.Drawing.Point(166, 220);
  537. this.label4.Name = "label4";
  538. this.label4.Size = new System.Drawing.Size(34, 18);
  539. this.label4.TabIndex = 14;
  540. this.label4.Text = "Red:";
  541. this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
  542. // 
  543. // label5
  544. // 
  545. this.label5.Location = new System.Drawing.Point(158, 242);
  546. this.label5.Name = "label5";
  547. this.label5.Size = new System.Drawing.Size(42, 18);
  548. this.label5.TabIndex = 15;
  549. this.label5.Text = "Green:";
  550. this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
  551. // 
  552. // label6
  553. // 
  554. this.label6.Location = new System.Drawing.Point(158, 266);
  555. this.label6.Name = "label6";
  556. this.label6.Size = new System.Drawing.Size(42, 18);
  557. this.label6.TabIndex = 16;
  558. this.label6.Text = "Blue:";
  559. this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
  560. // 
  561. // label7
  562. // 
  563. this.label7.Location = new System.Drawing.Point(18, 266);
  564. this.label7.Name = "label7";
  565. this.label7.Size = new System.Drawing.Size(60, 14);
  566. this.label7.TabIndex = 17;
  567. this.label7.Text = "Color|Solid";
  568. // 
  569. // CustomColorDlg
  570. // 
  571. this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
  572. this.ClientSize = new System.Drawing.Size(246, 330);
  573. this.Controls.AddRange(new System.Windows.Forms.Control[] {
  574.   this.label7,
  575.   this.label6,
  576.   this.label5,
  577.   this.label4,
  578.   this.label3,
  579.   this.label2,
  580.   this.Label1,
  581.   this.blueEdit,
  582.   this.greenEdit,
  583.   this.redEdit,
  584.   this.lumEdit,
  585.   this.satEdit,
  586.   this.hueEdit,
  587.   this.button2,
  588.   this.button1,
  589.   this.currentColorPanel,
  590.   this.lumBox,
  591.   this.paletteBox});
  592. this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
  593. this.MaximizeBox = false;
  594. this.MinimizeBox = false;
  595. this.Name = "CustomColorDlg";
  596. this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
  597. this.Text = "Define Color";
  598. this.Load += new System.EventHandler(this.CustomColorDlg_Load);
  599. this.ResumeLayout(false);
  600. }
  601. #endregion
  602. }
  603. }