private void DeleteImage() { string name = video.CurrentImageName; string prefix = name.Split('_')[0]; VideoResourceAPI.Delete(Prefix2Type[prefix], name.TrimEnd(".png".ToArray())); Panels[(int)Prefix2Type[prefix]].UpdateAll(); }
// 按钮事件 删除视频(图片) public void DeleteVideo() { // 删除图片调用 DeleteImage 单独处理 if (video.CurrentVideoName == "" && video.CurrentImageName == "") { return; } else if (video.CurrentImageName != "") { DeleteImage(); return; } string name = video.CurrentVideoName; string prefix = name.Split('_')[0]; VideoResourceAPI.Delete(Prefix2Type[prefix], name.TrimEnd(".mp4".ToArray())); video.Stop(); Panels[(int)Prefix2Type[prefix]].UpdateAll(); }