我不是 P4.NET 方面的专家,我想在树视图中显示 perforce 的仓库(windowsform 应用程序 c#)...
* "p4 dirs" 获取所有 depots => p4 dirs "//*" 例如这可能会给 depot1 depot2 ..etc
P4Connection p4 = new P4Connection();
p4.Connect();
P4RecordSet tab1 = p4.Run("dirs","//depot/*"); // to get folders in depot
foreach (P4Record a in tab1 )
{
richTextBox1.Text += (a["dir"]) + "\n";// show the results in richTextBox
}
*要获取目录中的文件列表,请运行 fstat=> p4 fstat "//depot1/*"
P4RecordSet tab2 = p4.Run("fstat","//depot/your_folder/*"); // to get files existing in your_folder
foreach (P4Record b in tab2 )
{
richTextBox1.Text += (b["depotFile"]) + "\n";// show the results in richTextBox
}
现在,如何使用此代码构建树视图?任何帮助将是最受欢迎的