|
|
发表于 2024-11-4 23:24:17
|
显示全部楼层
本帖最后由 xinruyu369 于 2024-11-4 23:40 编辑
" j8 d6 p$ y, u( _+ @
% e3 T- V ^. I8 V8 P. U/ |6 n9 j* z: Q" J
using System; K. ~9 }: v2 a J& ^0 ^
using System.Diagnostics;
) I7 j% d/ Q4 O' d3 \6 _/ a8 ~' C6 r9 |7 c I: _" i
var currentFile = Mastercam.IO.FileManager;
$ Q2 u9 a4 o+ n5 p; d* Hif (currentFile!= null)% r1 [+ t- i B3 E4 w
{
8 G7 u5 w) i! a; U! U string currentFilePath = currentFile.Path;
. W3 I3 @! S" X( s# R7 O8 R string currentFolder = Path.GetDirectoryName(currentFilePath);
$ E- O; g6 [: i2 G7 z/ M- I" x Process.Start("explorer.exe", currentFolder);% b4 @& c, I+ k' o) d
}# r' h# T( |" x
版主,您好,指点一下这个需要获取路径要怎么写啊?
p4 p. Z; i. r: d# m |
|