FrmTest.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Collections;
using System.Runtime.InteropServices;
using System.Diagnostics;
namespace ColorStatistics
{
public partial class FrmTest : Form
{
public FrmTest()
{
InitializeComponent();
}
List<Statistics.MajorColor> MC;
int PixelAmount = 0;
private void CmdOpen_Click(object sender, EventArgs e)
{
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.FilterIndex = 4;
openFileDialog.RestoreDirectory = true;
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
Thumb.Image = (Bitmap)Bitmap.FromFile(openFileDialog.FileName);
}
}
public static Color IntToColor(int color)
{
int R = color & 255;
int G = (color & 65280) / 256;
int B = (color & 16711680) / 65536;
return Color.FromArgb(255, R, G, B);
}
private void PicR_Click(object sender, EventArgs e)
{
}
private void PicR_Paint(object sender, PaintEventArgs e)
{
if (MC != null)
{
e.Graphics.Clear(PicR.BackColor);
Font font = new Font("宋体", 9f);
SolidBrush B = new SolidBrush(Color.Black);
e.Graphics.DrawString(" 颜色 ", font, B, new PointF(0, 0));
e.Graphics.DrawString(" 百分比 ", font, B, new PointF(120, 0));
e.Graphics.DrawString("数量", font, B, new PointF(250, 0));
B.Dispose();
后面还有 44 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。