03-图像操作/批量添加水印/IMGwatermark/Form1.cs
(开头部分) 16KB这里只显示每个文件的开头 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.IO;
using System.Drawing.Text;
using System.Drawing.Imaging;
namespace IMGwatermark
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
#region 获取系统字体
private void GetSystemFont(ToolStripComboBox cb)
{
InstalledFontCollection myFont = new InstalledFontCollection();
foreach (FontFamily ff in myFont.Families)
{
cb.Items.Add(ff.Name);
}
cb.SelectedItem = "宋体";
}
#endregion
private void Form1_Load(object sender, EventArgs e)
{
cbbPosition.SelectedIndex = 0;
}
string [] ImgArray=null;
string ImgDirectoryPath=null;
private void btnLoadImg_Click(object sender, EventArgs e)
{
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
lbImgList.Items.Clear();
ImgArray = openFileDialog1.FileNames;
string ImgP = ImgArray[0].ToString();
ImgP = ImgP.Remove(ImgP.LastIndexOf("\\"));
ImgDirectoryPath = ImgP;
for (int i = 0; i < ImgArray.Length; i++)
{
string ImgPath = ImgArray[i].ToString();
string ImgName = ImgPath.Substring(ImgPath.LastIndexOf("\\") + 1, ImgPath.Length - ImgPath.LastIndexOf("\\") - 1);
lbImgList.Items.Add(ImgName);
}
tsslStatus.Text = "图片总数:" + lbImgList.Items.Count;
}
}
private void lbImgList_SelectedIndexChanged(object sender, EventArgs e)
后面还有 358 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
