• 大小: 0.08M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2024-04-24
  • 语言: C#
  • 标签: 动态  移动  图片  

资源简介

根据鼠标光标位置动态移动生成的图标

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp2 {
public partial class AddDeviceForm : Form {

//public event EventHandler GetValue;
public delegate void AAAA(int a int a1string b1);
public event AAAA eventAAA;
public AddDeviceForm() {
InitializeComponent();
this.FormClosed += AddDeviceForm_FormClosed;
}

private void AddDeviceForm_FormClosed(object sender FormClosedEventArgs e) {
//int s = Convert.ToInt32(this.textBox1.Text);
//int s1 = Convert.ToInt32(this.textBox2.Text);
//string f = file;
//if (GetValue != null) {
// GetValue(s + “_“ + f e);
//}
//if (eventAAA != null) {
// eventAAA(ss1f);
//}
}

private string file;

private void buttonOK_Click(object sender EventArgs e) {
//判断文件是否选择、时间是否有问题、存数据库
if (eventAAA != null) {
eventAAA(100 100 file);
}
}

private void buttonCancel_Click(object sender EventArgs e) {

}

private void button1_Click(object sender EventArgs e) {
OpenFileDialog fileDialog = new OpenFileDialog();
fileDialog.Multiselect = true;
fileDialog.title = “请选择文件“;
file = string.Empty;
if (fileDialog.ShowDialog() == DialogResult.OK) {
file = fileDialog.FileName;//返回文件的完整路径                
}
}
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-12-24 14:49  WindowsFormsApp2\
     目录           0  2020-12-24 14:49  WindowsFormsApp2\.vs\
     目录           0  2020-12-24 14:49  WindowsFormsApp2\.vs\WindowsFormsApp2\
     目录           0  2020-12-24 14:49  WindowsFormsApp2\.vs\WindowsFormsApp2\v15\
     文件       54784  2021-01-04 17:16  WindowsFormsApp2\.vs\WindowsFormsApp2\v15\.suo
     目录           0  2020-12-24 14:49  WindowsFormsApp2\.vs\WindowsFormsApp2\v15\Server\
     目录           0  2020-12-24 14:49  WindowsFormsApp2\.vs\WindowsFormsApp2\v15\Server\sqlite3\
     目录           0  2020-05-29 17:02  WindowsFormsApp2\.vs\WindowsFormsApp2\v16\
     文件       75776  2020-05-15 14:24  WindowsFormsApp2\.vs\WindowsFormsApp2\v16\.suo
     目录           0  2020-12-24 14:49  WindowsFormsApp2\WindowsFormsApp2\
     文件        1153  2020-05-12 17:36  WindowsFormsApp2\WindowsFormsApp2.sln
     文件        1579  2020-05-15 14:07  WindowsFormsApp2\WindowsFormsApp2\AddDeviceForm.cs
     文件       16639  2020-05-15 11:44  WindowsFormsApp2\WindowsFormsApp2\AddDeviceForm.Designer.cs
     文件        6025  2020-05-15 11:43  WindowsFormsApp2\WindowsFormsApp2\AddDeviceForm.resx
     文件         187  2020-05-12 17:36  WindowsFormsApp2\WindowsFormsApp2\App.config
     目录           0  2020-12-24 14:49  WindowsFormsApp2\WindowsFormsApp2\bin\
     目录           0  2020-12-24 14:49  WindowsFormsApp2\WindowsFormsApp2\bin\Debug\
     文件       20480  2021-01-04 17:16  WindowsFormsApp2\WindowsFormsApp2\bin\Debug\WindowsFormsApp2.exe
     文件         187  2020-05-12 17:36  WindowsFormsApp2\WindowsFormsApp2\bin\Debug\WindowsFormsApp2.exe.config
     文件       44544  2021-01-04 17:16  WindowsFormsApp2\WindowsFormsApp2\bin\Debug\WindowsFormsApp2.pdb
     文件          71  2020-05-13 17:40  WindowsFormsApp2\WindowsFormsApp2\delegateTestRun.cs
     文件         266  2020-05-17 17:01  WindowsFormsApp2\WindowsFormsApp2\DeviceInfo.cs
     文件        4211  2020-05-17 17:25  WindowsFormsApp2\WindowsFormsApp2\Form1.cs
     文件        3096  2020-05-15 13:44  WindowsFormsApp2\WindowsFormsApp2\Form1.Designer.cs
     文件        5817  2020-05-15 13:44  WindowsFormsApp2\WindowsFormsApp2\Form1.resx
     目录           0  2020-12-24 14:49  WindowsFormsApp2\WindowsFormsApp2\obj\
     目录           0  2020-12-24 14:49  WindowsFormsApp2\WindowsFormsApp2\obj\Debug\
     文件        1423  2020-05-15 11:39  WindowsFormsApp2\WindowsFormsApp2\obj\Debug\DesignTimeResolveAssemblyReferences.cache
     文件        7491  2020-05-15 16:08  WindowsFormsApp2\WindowsFormsApp2\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     文件           0  2020-05-15 15:18  WindowsFormsApp2\WindowsFormsApp2\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
     文件           0  2020-05-15 15:18  WindowsFormsApp2\WindowsFormsApp2\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
............此处省略23个文件信息

评论

共有 条评论