ChangeColor.cs 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. namespace PaintDotNet.DedicatedAnalysis.menuGrayiron
  11. {
  12. public partial class ChangeColor : Form
  13. {
  14. /// <summary>
  15. /// 调色板
  16. /// </summary>
  17. PaintDotNet.ColorsForm colorsForm1;
  18. /// <summary>
  19. /// 调色板
  20. /// </summary>
  21. PaintDotNet.ColorsForm colorsForm2;
  22. /// <summary>
  23. /// 调色板
  24. /// </summary>
  25. PaintDotNet.ColorsForm colorsForm3;
  26. /// <summary>
  27. /// 调色板
  28. /// </summary>
  29. PaintDotNet.ColorsForm colorsForm4;
  30. /// <summary>
  31. /// 调色板
  32. /// </summary>
  33. PaintDotNet.ColorsForm colorsForm5;
  34. /// <summary>
  35. /// 调色板
  36. /// </summary>
  37. PaintDotNet.ColorsForm colorsForm6;
  38. /// <summary>
  39. /// 调色板
  40. /// </summary>
  41. PaintDotNet.ColorsForm colorsForm7;
  42. /// <summary>
  43. /// 调色板
  44. /// </summary>
  45. PaintDotNet.ColorsForm colorsForm8;
  46. /// <summary>
  47. /// 颜色默认值
  48. /// </summary>
  49. private static Color color1 = Color.Red;
  50. /// <summary>
  51. /// 颜色默认值
  52. /// </summary>
  53. private static Color color2 = Color.Red;
  54. /// <summary>
  55. /// 颜色默认值
  56. /// </summary>
  57. private static Color color3 = Color.Red;
  58. /// <summary>
  59. /// 颜色默认值
  60. /// </summary>
  61. private static Color color4 = Color.Red;
  62. /// <summary>
  63. /// 颜色默认值
  64. /// </summary>
  65. private static Color color5 = Color.Red;
  66. /// <summary>
  67. /// 颜色默认值
  68. /// </summary>
  69. private static Color color6 = Color.Red;
  70. /// <summary>
  71. /// 颜色默认值
  72. /// </summary>
  73. private static Color color7 = Color.Red;
  74. /// <summary>
  75. /// 颜色默认值
  76. /// </summary>
  77. private static Color color8 = Color.Red;
  78. private System.Windows.Forms.GroupBox groupBox1;
  79. private System.Windows.Forms.Button button2;
  80. private System.Windows.Forms.Button button1;
  81. private System.Windows.Forms.GroupBox groupBox2;
  82. private System.Windows.Forms.Label label8;
  83. private System.Windows.Forms.Label label7;
  84. private System.Windows.Forms.Label label6;
  85. private System.Windows.Forms.Label label5;
  86. private System.Windows.Forms.Label label4;
  87. private System.Windows.Forms.Label label3;
  88. private System.Windows.Forms.Label label2;
  89. private System.Windows.Forms.Label label1;
  90. private System.Windows.Forms.Panel panel8;
  91. private System.Windows.Forms.Panel panel7;
  92. private System.Windows.Forms.Panel panel6;
  93. private System.Windows.Forms.Panel panel5;
  94. private System.Windows.Forms.Panel panel4;
  95. private System.Windows.Forms.Panel panel3;
  96. private System.Windows.Forms.Panel panel2;
  97. private System.Windows.Forms.Panel panel1;
  98. /// <summary>
  99. /// Required designer variable.
  100. /// </summary>
  101. private System.ComponentModel.IContainer components = null;
  102. #region Windows Form Designer generated code
  103. private void InitializeLanguageText()
  104. {
  105. this.groupBox1.Text = PdnResources.GetString("Menu.operation.text");
  106. this.button2.Text = PdnResources.GetString("CommonAction.Save");
  107. this.button1.Text = PdnResources.GetString("Menu.File.Close.Text");
  108. this.groupBox2.Text = PdnResources.GetString("Menu.Colorsetting.text");
  109. this.label8.Text = PdnResources.GetString("Menu.Level8.text") + ":";
  110. this.label7.Text = PdnResources.GetString("Menu.Level7.text") + ":";
  111. this.label6.Text = PdnResources.GetString("Menu.Level6.text") + ":";
  112. this.label5.Text = PdnResources.GetString("Menu.Level5.text") + ":";
  113. this.label4.Text = PdnResources.GetString("Menu.Level4.text") + ":";
  114. this.label3.Text = PdnResources.GetString("Menu.Level3.text") + ":";
  115. this.label2.Text = PdnResources.GetString("Menu.Level2.text") + ":";
  116. this.label1.Text = PdnResources.GetString("Menu.Level1.text") + ":";
  117. this.Text = PdnResources.GetString("Menu.Colorsetting.text");
  118. }
  119. /// <summary>
  120. /// Required method for Designer support - do not modify
  121. /// the contents of this method with the code editor.
  122. /// </summary>
  123. private void InitializeComponent()
  124. {
  125. this.groupBox1 = new System.Windows.Forms.GroupBox();
  126. this.button2 = new System.Windows.Forms.Button();
  127. this.button1 = new System.Windows.Forms.Button();
  128. this.groupBox2 = new System.Windows.Forms.GroupBox();
  129. this.panel8 = new System.Windows.Forms.Panel();
  130. this.panel7 = new System.Windows.Forms.Panel();
  131. this.panel6 = new System.Windows.Forms.Panel();
  132. this.panel5 = new System.Windows.Forms.Panel();
  133. this.panel4 = new System.Windows.Forms.Panel();
  134. this.panel3 = new System.Windows.Forms.Panel();
  135. this.panel2 = new System.Windows.Forms.Panel();
  136. this.panel1 = new System.Windows.Forms.Panel();
  137. this.label8 = new System.Windows.Forms.Label();
  138. this.label7 = new System.Windows.Forms.Label();
  139. this.label6 = new System.Windows.Forms.Label();
  140. this.label5 = new System.Windows.Forms.Label();
  141. this.label4 = new System.Windows.Forms.Label();
  142. this.label3 = new System.Windows.Forms.Label();
  143. this.label2 = new System.Windows.Forms.Label();
  144. this.label1 = new System.Windows.Forms.Label();
  145. this.groupBox1.SuspendLayout();
  146. this.groupBox2.SuspendLayout();
  147. this.SuspendLayout();
  148. //
  149. // groupBox1
  150. //
  151. this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
  152. | System.Windows.Forms.AnchorStyles.Right)));
  153. this.groupBox1.Controls.Add(this.button2);
  154. this.groupBox1.Controls.Add(this.button1);
  155. this.groupBox1.Location = new System.Drawing.Point(12, 12);
  156. this.groupBox1.Name = "groupBox1";
  157. this.groupBox1.Size = new System.Drawing.Size(560, 70);
  158. this.groupBox1.TabIndex = 0;
  159. this.groupBox1.TabStop = false;
  160. //
  161. // button2
  162. //
  163. this.button2.AutoEllipsis = true;
  164. this.button2.Location = new System.Drawing.Point(479, 24);
  165. this.button2.Name = "button2";
  166. this.button2.Size = new System.Drawing.Size(75, 25);
  167. this.button2.TabIndex = 1;
  168. this.button2.UseVisualStyleBackColor = true;
  169. this.button2.Click += new System.EventHandler(this.button2_Click);
  170. //
  171. // button1
  172. //
  173. this.button1.AutoEllipsis = true;
  174. this.button1.Location = new System.Drawing.Point(378, 24);
  175. this.button1.Name = "button1";
  176. this.button1.Size = new System.Drawing.Size(70, 25);
  177. this.button1.TabIndex = 0;
  178. this.button1.UseVisualStyleBackColor = true;
  179. this.button1.Click += new System.EventHandler(this.button1_Click);
  180. //
  181. // groupBox2
  182. //
  183. this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  184. | System.Windows.Forms.AnchorStyles.Left)
  185. | System.Windows.Forms.AnchorStyles.Right)));
  186. this.groupBox2.Controls.Add(this.panel8);
  187. this.groupBox2.Controls.Add(this.panel7);
  188. this.groupBox2.Controls.Add(this.panel6);
  189. this.groupBox2.Controls.Add(this.panel5);
  190. this.groupBox2.Controls.Add(this.panel4);
  191. this.groupBox2.Controls.Add(this.panel3);
  192. this.groupBox2.Controls.Add(this.panel2);
  193. this.groupBox2.Controls.Add(this.panel1);
  194. this.groupBox2.Controls.Add(this.label8);
  195. this.groupBox2.Controls.Add(this.label7);
  196. this.groupBox2.Controls.Add(this.label6);
  197. this.groupBox2.Controls.Add(this.label5);
  198. this.groupBox2.Controls.Add(this.label4);
  199. this.groupBox2.Controls.Add(this.label3);
  200. this.groupBox2.Controls.Add(this.label2);
  201. this.groupBox2.Controls.Add(this.label1);
  202. this.groupBox2.Location = new System.Drawing.Point(12, 88);
  203. this.groupBox2.Name = "groupBox2";
  204. this.groupBox2.Size = new System.Drawing.Size(560, 161);
  205. this.groupBox2.TabIndex = 1;
  206. this.groupBox2.TabStop = false;
  207. //
  208. // panel8
  209. //
  210. this.panel8.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  211. | System.Windows.Forms.AnchorStyles.Left)
  212. | System.Windows.Forms.AnchorStyles.Right)));
  213. this.panel8.BackColor = System.Drawing.Color.Pink;
  214. this.panel8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  215. this.panel8.Location = new System.Drawing.Point(470, 111);
  216. this.panel8.Name = "panel8";
  217. this.panel8.Size = new System.Drawing.Size(69, 15);
  218. this.panel8.TabIndex = 16;
  219. this.panel8.Click += new System.EventHandler(this.panel8_Click);
  220. //
  221. // panel7
  222. //
  223. this.panel7.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  224. | System.Windows.Forms.AnchorStyles.Left)
  225. | System.Windows.Forms.AnchorStyles.Right)));
  226. this.panel7.BackColor = System.Drawing.Color.Purple;
  227. this.panel7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  228. this.panel7.Location = new System.Drawing.Point(340, 111);
  229. this.panel7.Name = "panel7";
  230. this.panel7.Size = new System.Drawing.Size(69, 15);
  231. this.panel7.TabIndex = 15;
  232. this.panel7.Click += new System.EventHandler(this.panel7_Click);
  233. //
  234. // panel6
  235. //
  236. this.panel6.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  237. | System.Windows.Forms.AnchorStyles.Left)
  238. | System.Windows.Forms.AnchorStyles.Right)));
  239. this.panel6.BackColor = System.Drawing.Color.YellowGreen;
  240. this.panel6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  241. this.panel6.Location = new System.Drawing.Point(200, 111);
  242. this.panel6.Name = "panel6";
  243. this.panel6.Size = new System.Drawing.Size(69, 15);
  244. this.panel6.TabIndex = 14;
  245. this.panel6.Click += new System.EventHandler(this.panel6_Click);
  246. //
  247. // panel5
  248. //
  249. this.panel5.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  250. | System.Windows.Forms.AnchorStyles.Left)
  251. | System.Windows.Forms.AnchorStyles.Right)));
  252. this.panel5.BackColor = System.Drawing.Color.Blue;
  253. this.panel5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  254. this.panel5.Location = new System.Drawing.Point(50, 111);
  255. this.panel5.Name = "panel5";
  256. this.panel5.Size = new System.Drawing.Size(69, 15);
  257. this.panel5.TabIndex = 13;
  258. this.panel5.Click += new System.EventHandler(this.panel5_Click);
  259. //
  260. // panel4
  261. //
  262. this.panel4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  263. | System.Windows.Forms.AnchorStyles.Left)
  264. | System.Windows.Forms.AnchorStyles.Right)));
  265. this.panel4.BackColor = System.Drawing.Color.Green;
  266. this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  267. this.panel4.Location = new System.Drawing.Point(470, 41);
  268. this.panel4.Name = "panel4";
  269. this.panel4.Size = new System.Drawing.Size(69, 15);
  270. this.panel4.TabIndex = 12;
  271. this.panel4.Click += new System.EventHandler(this.panel4_Click);
  272. //
  273. // panel3
  274. //
  275. this.panel3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  276. | System.Windows.Forms.AnchorStyles.Left)
  277. | System.Windows.Forms.AnchorStyles.Right)));
  278. this.panel3.BackColor = System.Drawing.Color.Yellow;
  279. this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  280. this.panel3.Location = new System.Drawing.Point(340, 41);
  281. this.panel3.Name = "panel3";
  282. this.panel3.Size = new System.Drawing.Size(69, 15);
  283. this.panel3.TabIndex = 11;
  284. this.panel3.Click += new System.EventHandler(this.panel3_Click);
  285. //
  286. // panel2
  287. //
  288. this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  289. | System.Windows.Forms.AnchorStyles.Left)
  290. | System.Windows.Forms.AnchorStyles.Right)));
  291. this.panel2.BackColor = System.Drawing.Color.Orange;
  292. this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  293. this.panel2.Location = new System.Drawing.Point(200, 41);
  294. this.panel2.Name = "panel2";
  295. this.panel2.Size = new System.Drawing.Size(69, 15);
  296. this.panel2.TabIndex = 10;
  297. this.panel2.Click += new System.EventHandler(this.panel2_Click);
  298. //
  299. // panel1
  300. //
  301. this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
  302. | System.Windows.Forms.AnchorStyles.Left)
  303. | System.Windows.Forms.AnchorStyles.Right)));
  304. this.panel1.BackColor = System.Drawing.Color.Red;
  305. this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  306. this.panel1.Location = new System.Drawing.Point(50, 41);
  307. this.panel1.Name = "panel1";
  308. this.panel1.Size = new System.Drawing.Size(69, 15);
  309. this.panel1.TabIndex = 9;
  310. this.panel1.Click += new System.EventHandler(this.panel1_Click);
  311. //
  312. // label8
  313. //
  314. this.label8.AutoEllipsis = true;
  315. this.label8.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  316. this.label8.Location = new System.Drawing.Point(425, 110);
  317. this.label8.Name = "label8";
  318. this.label8.Size = new System.Drawing.Size(45, 16);
  319. this.label8.TabIndex = 8;
  320. //
  321. // label7
  322. //
  323. this.label7.AutoEllipsis = true;
  324. this.label7.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  325. this.label7.Location = new System.Drawing.Point(296, 110);
  326. this.label7.Name = "label7";
  327. this.label7.Size = new System.Drawing.Size(45, 16);
  328. this.label7.TabIndex = 7;
  329. //
  330. // label6
  331. //
  332. this.label6.AutoEllipsis = true;
  333. this.label6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  334. this.label6.Location = new System.Drawing.Point(150, 110);
  335. this.label6.Name = "label6";
  336. this.label6.Size = new System.Drawing.Size(45, 16);
  337. this.label6.TabIndex = 6;
  338. //
  339. // label5
  340. //
  341. this.label5.AutoEllipsis = true;
  342. this.label5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  343. this.label5.Location = new System.Drawing.Point(6, 110);
  344. this.label5.Name = "label5";
  345. this.label5.Size = new System.Drawing.Size(45, 16);
  346. this.label5.TabIndex = 5;
  347. //
  348. // label4
  349. //
  350. this.label4.AutoEllipsis = true;
  351. this.label4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  352. this.label4.Location = new System.Drawing.Point(425, 40);
  353. this.label4.Name = "label4";
  354. this.label4.Size = new System.Drawing.Size(45, 16);
  355. this.label4.TabIndex = 4;
  356. //
  357. // label3
  358. //
  359. this.label3.AutoEllipsis = true;
  360. this.label3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  361. this.label3.Location = new System.Drawing.Point(296, 40);
  362. this.label3.Name = "label3";
  363. this.label3.Size = new System.Drawing.Size(45, 16);
  364. this.label3.TabIndex = 3;
  365. //
  366. // label2
  367. //
  368. this.label2.AutoEllipsis = true;
  369. this.label2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  370. this.label2.Location = new System.Drawing.Point(150, 40);
  371. this.label2.Name = "label2";
  372. this.label2.Size = new System.Drawing.Size(45, 16);
  373. this.label2.TabIndex = 2;
  374. //
  375. // label1
  376. //
  377. this.label1.AutoEllipsis = true;
  378. this.label1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  379. this.label1.Location = new System.Drawing.Point(0, 40);
  380. this.label1.Name = "label1";
  381. this.label1.Size = new System.Drawing.Size(45, 16);
  382. this.label1.TabIndex = 1;
  383. //
  384. // ChangeColor
  385. //
  386. this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
  387. this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
  388. this.ClientSize = new System.Drawing.Size(584, 261);
  389. this.Controls.Add(this.groupBox2);
  390. this.Controls.Add(this.groupBox1);
  391. this.MaximizeBox = false;
  392. this.MinimizeBox = false;
  393. this.Name = "ChangeColor";
  394. this.Load += new System.EventHandler(this.ChangeColor_Load);
  395. this.groupBox1.ResumeLayout(false);
  396. this.groupBox2.ResumeLayout(false);
  397. this.ResumeLayout(false);
  398. }
  399. #endregion
  400. public ChangeColor()
  401. {
  402. InitializeComponent();
  403. InitializeLanguageText();
  404. }
  405. private void InitOtherTools()
  406. {
  407. //
  408. //调色板
  409. //
  410. this.colorsForm1 = new ColorsForm();
  411. this.colorsForm1.StartPosition = FormStartPosition.CenterScreen;
  412. this.colorsForm1.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged);
  413. this.colorsForm2 = new ColorsForm();
  414. this.colorsForm2.StartPosition = FormStartPosition.CenterScreen;
  415. this.colorsForm2.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged);
  416. this.colorsForm3 = new ColorsForm();
  417. this.colorsForm3.StartPosition = FormStartPosition.CenterScreen;
  418. this.colorsForm3.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged);
  419. this.colorsForm4 = new ColorsForm();
  420. this.colorsForm4.StartPosition = FormStartPosition.CenterScreen;
  421. this.colorsForm4.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged);
  422. this.colorsForm5 = new ColorsForm();
  423. this.colorsForm5.StartPosition = FormStartPosition.CenterScreen;
  424. this.colorsForm5.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged);
  425. this.colorsForm6 = new ColorsForm();
  426. this.colorsForm6.StartPosition = FormStartPosition.CenterScreen;
  427. this.colorsForm6.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged);
  428. this.colorsForm7 = new ColorsForm();
  429. this.colorsForm7.StartPosition = FormStartPosition.CenterScreen;
  430. this.colorsForm7.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged);
  431. this.colorsForm8 = new ColorsForm();
  432. this.colorsForm8.StartPosition = FormStartPosition.CenterScreen;
  433. this.colorsForm8.UserPrimaryColorChanged += new ColorEventHandler(this.colorsFormUserPrimaryColorChanged);
  434. }
  435. private void colorsFormUserPrimaryColorChanged(object sender, ColorEventArgs ce)
  436. {
  437. }
  438. private void panel1_Click(object sender, EventArgs e)
  439. {
  440. this.colorsForm1.UserPrimaryColor = ColorBgra.FromColor(this.panel1.BackColor);
  441. this.colorsForm1.setSaveBtn_Click(new System.EventHandler(this.colorsForm1Changed));
  442. this.colorsForm1.ShowDialog();
  443. }
  444. private void colorsForm1Changed(object sender, EventArgs e)
  445. {
  446. this.panel1.BackColor = this.colorsForm1.UserPrimaryColor.ToColor();
  447. this.colorsForm1.Close();
  448. }
  449. private void panel2_Click(object sender, EventArgs e)
  450. {
  451. this.colorsForm2.UserPrimaryColor = ColorBgra.FromColor(this.panel2.BackColor);
  452. this.colorsForm2.setSaveBtn_Click(new System.EventHandler(this.colorsForm2Changed));
  453. this.colorsForm2.ShowDialog();
  454. }
  455. private void colorsForm2Changed(object sender, EventArgs e)
  456. {
  457. this.panel2.BackColor = this.colorsForm2.UserPrimaryColor.ToColor();
  458. this.colorsForm2.Close();
  459. }
  460. private void panel3_Click(object sender, EventArgs e)
  461. {
  462. this.colorsForm3.UserPrimaryColor = ColorBgra.FromColor(this.panel3.BackColor);
  463. this.colorsForm3.setSaveBtn_Click(new System.EventHandler(this.colorsForm3Changed));
  464. this.colorsForm3.ShowDialog();
  465. }
  466. private void colorsForm3Changed(object sender, EventArgs e)
  467. {
  468. this.panel3.BackColor = this.colorsForm3.UserPrimaryColor.ToColor();
  469. this.colorsForm3.Close();
  470. }
  471. private void panel4_Click(object sender, EventArgs e)
  472. {
  473. this.colorsForm4.UserPrimaryColor = ColorBgra.FromColor(this.panel4.BackColor);
  474. this.colorsForm4.setSaveBtn_Click(new System.EventHandler(this.colorsForm4Changed));
  475. this.colorsForm4.ShowDialog();
  476. }
  477. private void colorsForm4Changed(object sender, EventArgs e)
  478. {
  479. this.panel4.BackColor = this.colorsForm4.UserPrimaryColor.ToColor();
  480. this.colorsForm4.Close();
  481. }
  482. private void panel5_Click(object sender, EventArgs e)
  483. {
  484. this.colorsForm5.UserPrimaryColor = ColorBgra.FromColor(this.panel5.BackColor);
  485. this.colorsForm5.setSaveBtn_Click(new System.EventHandler(this.colorsForm5Changed));
  486. this.colorsForm5.ShowDialog();
  487. }
  488. private void colorsForm5Changed(object sender, EventArgs e)
  489. {
  490. this.panel5.BackColor = this.colorsForm5.UserPrimaryColor.ToColor();
  491. this.colorsForm5.Close();
  492. }
  493. private void panel6_Click(object sender, EventArgs e)
  494. {
  495. this.colorsForm6.UserPrimaryColor = ColorBgra.FromColor(this.panel6.BackColor);
  496. this.colorsForm6.setSaveBtn_Click(new System.EventHandler(this.colorsForm6Changed));
  497. this.colorsForm6.ShowDialog();
  498. }
  499. private void colorsForm6Changed(object sender, EventArgs e)
  500. {
  501. this.panel6.BackColor = this.colorsForm6.UserPrimaryColor.ToColor();
  502. this.colorsForm6.Close();
  503. }
  504. private void panel7_Click(object sender, EventArgs e)
  505. {
  506. this.colorsForm7.UserPrimaryColor = ColorBgra.FromColor(this.panel7.BackColor);
  507. this.colorsForm7.setSaveBtn_Click(new System.EventHandler(this.colorsForm7Changed));
  508. this.colorsForm7.ShowDialog();
  509. }
  510. private void colorsForm7Changed(object sender, EventArgs e)
  511. {
  512. this.panel7.BackColor = this.colorsForm7.UserPrimaryColor.ToColor();
  513. this.colorsForm7.Close();
  514. }
  515. private void panel8_Click(object sender, EventArgs e)
  516. {
  517. this.colorsForm8.UserPrimaryColor = ColorBgra.FromColor(this.panel8.BackColor);
  518. this.colorsForm8.setSaveBtn_Click(new System.EventHandler(this.colorsForm8Changed));
  519. this.colorsForm8.ShowDialog();
  520. }
  521. private void colorsForm8Changed(object sender, EventArgs e)
  522. {
  523. this.panel8.BackColor = this.colorsForm8.UserPrimaryColor.ToColor();
  524. this.colorsForm8.Close();
  525. }
  526. private void button1_Click(object sender, EventArgs e)
  527. {
  528. this.Close();
  529. }
  530. private void button2_Click(object sender, EventArgs e)
  531. {
  532. GrayironDialog.setUpColor1 = panel1.BackColor;
  533. GrayironDialog.setUpColor2 = panel2.BackColor;
  534. GrayironDialog.setUpColor3 = panel3.BackColor;
  535. GrayironDialog.setUpColor4 = panel4.BackColor;
  536. GrayironDialog.setUpColor5 = panel5.BackColor;
  537. GrayironDialog.setUpColor6 = panel6.BackColor;
  538. GrayironDialog.setUpColor7 = panel7.BackColor;
  539. GrayironDialog.setUpColor8 = panel8.BackColor;
  540. this.Close();
  541. }
  542. private void changeColor()
  543. {
  544. if (!GrayironDialog.setUpColor1.IsEmpty)
  545. {
  546. this.panel1.BackColor = GrayironDialog.setUpColor1;
  547. this.panel2.BackColor = GrayironDialog.setUpColor2;
  548. this.panel3.BackColor = GrayironDialog.setUpColor3;
  549. this.panel4.BackColor = GrayironDialog.setUpColor4;
  550. this.panel5.BackColor = GrayironDialog.setUpColor5;
  551. this.panel6.BackColor = GrayironDialog.setUpColor6;
  552. this.panel7.BackColor = GrayironDialog.setUpColor7;
  553. this.panel8.BackColor = GrayironDialog.setUpColor8;
  554. }
  555. }
  556. private void ChangeColor_Load(object sender, EventArgs e)
  557. {
  558. InitOtherTools();
  559. changeColor();
  560. }
  561. }
  562. }