|
发表于 2024-11-4 23:24:17
|
显示全部楼层
本帖最后由 xinruyu369 于 2024-11-4 23:40 编辑 # ]5 Z0 g( i; y8 p
( I& v3 F* E: r( ~9 \; G
/ [: w, W% |! Z: J
using System;2 ^4 N5 P. s1 D ^5 K
using System.Diagnostics;2 C6 K+ X3 ]5 G3 q
. o* G% j( q. @, N0 ~ var currentFile = Mastercam.IO.FileManager;2 t( f8 H& |, Y# G- I% O8 J+ z, q
if (currentFile!= null)
9 P: o+ y* ?3 q" t% y{$ L2 q# c! h9 G4 D* F
string currentFilePath = currentFile.Path;7 t- s* g* V$ W3 c. f2 l* D
string currentFolder = Path.GetDirectoryName(currentFilePath);/ L1 \5 D' R* P8 a& v
Process.Start("explorer.exe", currentFolder);5 G( c* s( J; t# t3 V
}
. o4 P9 }5 e0 t" l, G0 F* v版主,您好,指点一下这个需要获取路径要怎么写啊?
P6 o; r% W. T. L& Q |
|