Skip to content

Commit

Permalink
added possibility to open GUI fro within the App
Browse files Browse the repository at this point in the history
  • Loading branch information
mapalmieri committed May 16, 2019
1 parent 0a122fd commit 951b787
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/proj/projbrowserview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import { isResultValid } from "../intocps-configurations/ResultConfig";
import * as fs from 'fs';
import Path = require("path");
const rimraf = require("rimraf");
const { BrowserWindow } = require('electron').remote
import { RTTester } from "../rttester/RTTester";
import { IntoCpsAppMenuHandler } from "../IntoCpsAppMenuHandler";
import { Utilities } from "../utilities";
Expand Down Expand Up @@ -412,6 +413,22 @@ export class BrowserController {
parent.refresh();
return null;
}

else if (path.endsWith("index.html") && !this.isResultFolder(Path.dirname(path))){
//open the GUI
parent.img = "into-cps-icon-projbrowser-config";
(<any>parent).coeConfig = path;
parent.opensInMainWindow = false;
let url = "file://"+path;
parent.dblClickHandler = function (item:ProjectBrowserItem){
let authWindow = new BrowserWindow({width:800,height:600,webPreferences:{nodeIntegration: false}});

authWindow.loadURL(url);
authWindow.show;
};
parent.refresh();
return null
}
else if (path.endsWith("mm.json") && !this.isResultFolder(Path.dirname(path))) {
// merge MultiModelConfig and folder
parent.img = "into-cps-icon-projbrowser-multimodel";
Expand Down

0 comments on commit 951b787

Please sign in to comment.