DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
DiffTool.c
См. документацию.
1[WorkbenchPluginAttribute("SVN Diff", "Just for testing", "ctrl+`", "", {"ScriptEditor"})]
3{
4 [Attribute("TortoiseProc /command:diff /path:$path", "editbox")]
5 string CommandLine;
6
7 override void Run()
8 {
9 ScriptEditor mod = Workbench.GetModule("ScriptEditor");
10 if (mod)
11 {
12 string file;
13 string absPath;
14 if (mod.GetCurrentFile(file) && Workbench.GetAbsolutePath(file, absPath))
15 {
16 string command = CommandLine;
17 command.Replace("$path", absPath);
18 Workbench.RunCmd(command);
19 Print( command );
20 Print( absPath );
21 }
22 }
23 }
24
25 override void Configure()
26 {
27 Workbench.ScriptDialog("Configure SVN Diff", "Usage: \n$path - will be replaced with file name", this);
28 }
29
30 [ButtonAttribute("OK")]
31 void OkButton() {}
32}
33
RestartDayzTool DayZTool WorkbenchPluginAttribute("DayZ Run", "Just for testing", "ctrl+2", "", {"ScriptEditor"})
Определения DayZTools.c:62
Определения EnEntity.c:824
Определения workbenchApi.c:109
override void Run()
Определения DiffTool.c:7
string CommandLine
Определения DiffTool.c:5
void OkButton()
Определения DiffTool.c:31
override void Configure()
Определения DiffTool.c:25
Определения DiffTool.c:3
proto external bool GetCurrentFile(out string filename)
Определения workbenchApi.c:30
static proto native int RunCmd(string command, bool wait=false)
static proto native WBModuleDef GetModule(string type)
static proto int ScriptDialog(string caption, string text, Class data)
static proto bool GetAbsolutePath(string relativePath, out string absPath)
Определения workbenchApi.c:7
Определения workbenchApi.c:102
proto void Print(void var)
Prints content of variable to console/log.
proto int Replace(string sample, string replace)
Replace all occurrances of 'sample' in 'str' by 'replace'.