| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除文件 |
| | | /// </summary> |
| | | public static List<int> DeleteFiles(XYZArgs args, ref string err) |
| | | { |
| | | List<SysPublish> pubs = PubDBHelper.SelectPublishs(args.ids); |
| | | if (null == pubs || pubs.Count == 0) return null; |
| | | |
| | | List<int> list = new List<int>(); |
| | | foreach (SysPublish pub in pubs) |
| | | { |
| | | try |
| | | { |
| | | if (string.IsNullOrEmpty(pub.url) || string.IsNullOrEmpty(pub.path)) continue; |
| | | |
| | | String path = SGUtils.LFData + "\\" + pub.path.Replace("\\tileset.json", ""); |
| | | if (pub.url.Contains("/SG/") || !Directory.Exists(path)) |
| | | { |
| | | list.Add(pub.id); |
| | | continue; |
| | | } |
| | | |
| | | DelPath(path); |
| | | list.Add(pub.id); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogOut.Error(ex.Message + "\r\n" + ex.StackTrace); |
| | | err = ex.Message; |
| | | } |
| | | } |
| | | |
| | | return list; |
| | | } |
| | | |
| | | [DllImport("ReadLas.dll")] |
| | | public extern static int get_las_cs(string file_name); |
| | | } |