摘要:
public bool DeleteFiles(string path) { if (Directory.Exists(path)==false) { MessageBox.Show("Path is not Existed!"); return false; } DirectoryInfo dir = new DirectoryInfo(path); FileInfo[] files = dir.GetFile... 阅读全文
摘要:
private void btnStartNDI_Click(object sender, EventArgs e) { myTimer1.Tick += new EventHandler(TimerEventProcessor); myTimer1.Interval = 1000; myTimer1.Start(); while (exitFlag == false) { ... 阅读全文
摘要:
/// <summary> /// 把剩余的图片和txt重新命名 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnFinish_Click(object sender, EventArgs e) { DirectoryInfo dir = new DirectoryInfo(_path); FileInfo[] files = ... 阅读全文
摘要:
/// <summary> /// 从指定文件读取内容 /// </summary> /// <param name="file"></param> /// <returns></returns> private string ReadTxt(string file) { FileStream fs = new FileStream(file,FileMode.Open,FileAccess.Read); StreamReader reader = new Str... 阅读全文
摘要:
Image image = Image.FromFile(item.FullName); Image bt = new Bitmap(image); listImages.Add(bt); image.Dispose(); 阅读全文
摘要:
public static Bitmap CropBitmap(Bitmap bitmap, int cropX, int cropY, int cropWidth, int cropHeight) { Rectangle rect = new Rectangle(cropX, cropY, cropWidth, cropHeight); Bitmap cropped = bitmap.Clone(rect, bitmap.PixelFormat); return cropped; } static void Main(string[] args) { string path = ... 阅读全文