Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (23 sloc) 1.16 KB
var demosFolder = PublicDI.config.LocalScriptsFolder.pathCombine(@"_Demos\Browser_Automation_IE_Demos");
var welcomeMessage = "ie.showMessage(\"Browser Automation / IE Demos\".line().line() + ".line() +
"\"Click on one of the demos from the left-hand directory\");";
var topPanel = O2Gui.open<Panel>("Browser Automation / IE Demos",1000,600);
var demoExecutionPanel = topPanel.add_GroupBox("Demo Execution").add_Panel();
var directory = demoExecutionPanel.parent().insert_Left<GroupBox>(200).set_Text("List of Available Demos").add_Directory(demosFolder);//.add_TreeView().showSelection().sort();
ascx_IE_ScriptExecution scriptExecution = demoExecutionPanel.add_Control<ascx_IE_ScriptExecution>().buildGui(welcomeMessage);
Action<string> showScript =
(file) =>
{
if (file.fileExists())
{
scriptExecution.script.commandsToExecute.open(file);
scriptExecution.script.onCompileExecuteOnce();
}
};
directory.eDirectoryEvent_DoubleClick += (file) => showScript( file);
return "done";
//using O2.XRules.Database.Utils
//O2File:ascx_IE_ScriptExecution.cs
//using FluentSharp.Watin
//O2Ref:FluentSharp.Watin.dll
//O2Ref:Watin.Core.dll