91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 230KB
    文件類型: .rar
    金幣: 1
    下載: 0 次
    發布日期: 2021-06-09
  • 語言: C#
  • 標簽: c#??winform??顏色??獲取??

資源簡介

有時候做網頁時需要拾取屏幕顏色,然后就自己寫了個??梢匀譄徭I,可以16進制 rgb hsl轉換。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?System.Runtime.InteropServices;
using?MyHelper.Common;

namespace?MyHelper.GetColor
{
????public?partial?class?GetColorForm?:?Form
????{
????????public?GetColorForm()
????????{
????????????InitializeComponent();
????????}

????????private?void?button1_Click(object?sender?EventArgs?e)???//顯示16進制代碼顏色
????????{
????????????Color?c?=?this.colorHx16toRGB(this.textBox_16進制.Text);
????????????this.label_顏色顯示.BackColor?=?c;
????????????this.textBox_R.Text?=?c.R.ToString();
????????????this.textBox_G.Text?=?c.G.ToString();
????????????this.textBox_B.Text?=?c.B.ToString();
????????????HSLColor?hsl?=?new?HSLColor(c);
????????????this.textBox_H.Text?=?hsl.Hue?+?““;
????????????this.textBox_S.Text?=?((int)(hsl.Saturation?*?100))?+?““;
????????????this.textBox_L.Text?=?((int)(hsl.Lightness?*?100))?+?““;
????????}

????????private?void?button2_Click(object?sender?EventArgs?e)???//顯示RGB值顏色
????????{
????????????
????????????????Color?c=Color.FromArgb(Int32.Parse(this.textBox_R.Text)?Int32.Parse(this.textBox_G.Text)?Int32.Parse(this.textBox_B.Text));
????????????????this.label_顏色顯示.BackColor?=?c;
????????????????this.textBox_16進制.Text?=?ColorTranslator.ToHtml(c);
????????????????HSLColor?hsl?=?new?HSLColor(c);
????????????????this.textBox_H.Text?=?hsl.Hue?+?““;
????????????????this.textBox_S.Text?=?((int)(hsl.Saturation?*?100))?+?““;
????????????????this.textBox_L.Text?=?((int)(hsl.Lightness?*?100))?+?““;
????????}

????????private?void?button3_Click(object?sender?EventArgs?e)??//選擇顏色
????????{
????????????this.colorDialog1.AllowFullOpen?=?true;
????????????colorDialog1.AnyColor?=?true;
????????????colorDialog1.FullOpen?=?true;
????????????colorDialog1.SolidColorOnly?=?false;
????????????if?(colorDialog1.ShowDialog()?==?DialogResult.OK)
????????????{
????????????????this.textBox_16進制.ForeColor?=?this.colorDialog1.Color;
????????????????this.label_顏色顯示.BackColor?=?this.colorDialog1.Color;
????????????????//?String?str1?=?this.colorDialog1.Color.Name.ToString();
????????????????//?this.textBox1.Text?=?“#“+str1.Substring(2);
????????????????this.textBox_16進制.Text=?ColorTranslator.ToHtml(this.colorDialog1.Color);
????????????????this.textBox_R.Text?=?this.colorDialog1.Color.R.ToString();
????????????????this.textBox_G.Text?=?this.colorDialog1.Color.G.ToString();
????????????????this.textBox_B.Text?=?this.colorDialog1.Color.B.ToString();
????????????}
????????}

????????private?void?button_開始_Click(object?sender?EventArgs?e)??//開始獲取
????????{
????????????HotKey.RegisterHotKey(this.Handle?12455?true?true?false?false?Keys.P);
????????????this.TopMost?=?true;
????????????this.timer1.Start();
????????????this.button_開始.Enabled?=?false;
????????????this.button_停止.Enabled?=?true;
????????}
????????private?void?button_停止_Clic

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件?????121856??2013-01-09?21:27??MyHelper.GetColor\MyHelper.GetColor\bin\Debug\MyHelper.GetColor.exe

?????文件??????44544??2013-01-09?21:27??MyHelper.GetColor\MyHelper.GetColor\bin\Debug\MyHelper.GetColor.pdb

?????文件??????22472??2013-01-09?21:30??MyHelper.GetColor\MyHelper.GetColor\bin\Debug\MyHelper.GetColor.vshost.exe

?????文件???????8096??2013-01-09?21:26??MyHelper.GetColor\MyHelper.GetColor\GetColorForm.cs

?????文件??????17146??2013-01-09?21:20??MyHelper.GetColor\MyHelper.GetColor\GetColorForm.designer.cs

?????文件?????156226??2013-01-09?21:20??MyHelper.GetColor\MyHelper.GetColor\GetColorForm.resx

?????文件???????1886??2013-01-09?21:26??MyHelper.GetColor\MyHelper.GetColor\HotKey.cs

?????文件???????4690??2013-01-09?21:20??MyHelper.GetColor\MyHelper.GetColor\HSBColor.cs

?????文件???????6548??2013-01-09?21:20??MyHelper.GetColor\MyHelper.GetColor\HSLColor.cs

?????文件???????3987??2013-01-09?21:26??MyHelper.GetColor\MyHelper.GetColor\MyHelper.GetColor.csproj

?????文件????????863??2013-01-09?21:19??MyHelper.GetColor\MyHelper.GetColor\obj\Debug\DesignTimeResolveAssemblyReferences.cache

?????文件???????6899??2013-01-09?21:26??MyHelper.GetColor\MyHelper.GetColor\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

?????文件????????937??2013-01-09?21:30??MyHelper.GetColor\MyHelper.GetColor\obj\Debug\MyHelper.GetColor.csproj.FileListAbsolute.txt

?????文件????????982??2013-01-09?21:26??MyHelper.GetColor\MyHelper.GetColor\obj\Debug\MyHelper.GetColor.csproj.GenerateResource.Cache

?????文件???????2209??2013-01-09?21:26??MyHelper.GetColor\MyHelper.GetColor\obj\Debug\MyHelper.GetColor.csprojResolveAssemblyReference.cache

?????文件?????121856??2013-01-09?21:27??MyHelper.GetColor\MyHelper.GetColor\obj\Debug\MyHelper.GetColor.exe

?????文件?????100244??2013-01-09?21:26??MyHelper.GetColor\MyHelper.GetColor\obj\Debug\MyHelper.GetColor.GetColorForm.resources

?????文件??????44544??2013-01-09?21:27??MyHelper.GetColor\MyHelper.GetColor\obj\Debug\MyHelper.GetColor.pdb

?????文件????????180??2013-01-09?21:26??MyHelper.GetColor\MyHelper.GetColor\obj\Debug\MyHelper.GetColor.Properties.Resources.resources

?????文件????????505??2013-01-09?21:27??MyHelper.GetColor\MyHelper.GetColor\Program.cs

?????文件???????1354??2013-01-09?21:19??MyHelper.GetColor\MyHelper.GetColor\Properties\AssemblyInfo.cs

?????文件???????2886??2013-01-09?21:19??MyHelper.GetColor\MyHelper.GetColor\Properties\Resources.Designer.cs

?????文件???????5612??2013-01-09?21:19??MyHelper.GetColor\MyHelper.GetColor\Properties\Resources.resx

?????文件???????1104??2013-01-09?21:19??MyHelper.GetColor\MyHelper.GetColor\Properties\Settings.Designer.cs

?????文件????????249??2013-01-09?21:19??MyHelper.GetColor\MyHelper.GetColor\Properties\Settings.settings

?????文件????????941??2013-01-09?21:19??MyHelper.GetColor\MyHelper.GetColor.sln

????..A..H.?????32768??2013-01-09?22:00??MyHelper.GetColor\MyHelper.GetColor.v11.suo

?????目錄??????????0??2013-01-09?21:19??MyHelper.GetColor\MyHelper.GetColor\obj\Debug\TempPE

?????目錄??????????0??2013-01-16?16:37??MyHelper.GetColor\MyHelper.GetColor\bin\Debug

?????目錄??????????0??2013-01-09?21:25??MyHelper.GetColor\MyHelper.GetColor\bin\Release

............此處省略9個文件信息

評論

共有 條評論