public void runWizard()
 {
 	var o2Wizard = new O2Wizard("Enable/Disable Network Adapters", 500, 500);		
 	if (false == Netsh.isAvailable())
 		o2Wizard.Steps.add_Message("Error onEnable/Disable Network Adapters","no NetSh found on this system");
 	else
 	{        	
 		// step 1
 		var step1Message = string.Format("This wizard will allow the enable or disable the following Windows Network adapters: \r\n {0}\r\n{1}", 
 									 	Netsh.interfaces_getDetails(),
 									 	Netsh.interfaces_getIPConfig());
 		o2Wizard.Steps.add_Message("Current Network Adapter details", step1Message);        		        		
 		// step 2
 		o2Wizard.Steps.add_Action("Disabling Network Adapters", disableNetworkAdapters);
 		// step 3
 		o2Wizard.Steps.add_Action("Ping www.google.com", (step) => pingAddress(step,"www.google.com"));
 		// step 4
 		o2Wizard.Steps.add_Action("Enabling Network Adapters", enableNetworkAdapters);        		
 		// step 5
 		o2Wizard.Steps.add_Action("Ping www.google.com", (step) => pingAddress(step,"www.google.com"));
 		// step 6
 		o2Wizard.Steps.add_Action("All Done", endOfWizard);
 	}        	
 	o2Wizard.start();
 }    	    	    	    	    
 public string runWizard_BackupFolder(string startFolder, string targetFolder)
 {
     var o2Wizard = new O2Wizard("Backup folder: " + startFolder);            
     o2Wizard.Steps.add_Directory("Choose Directory To Backup", startFolder);
     o2Wizard.Steps.add_Directory("Choose Directory To Store Zip file", targetFolder);
     o2Wizard.Steps.add_Action("Confirm backup action", confirmBackupAction);
     o2Wizard.Steps.add_Action("Backing up files", executeTask);
     o2Wizard.start();            
     return "ok";
 }
		public void runWizard()
		{
	        var o2Wizard = new O2Wizard("Setup AppScan Source Edition (OunceLabs) MySql database");
	        	        
	        addStep_WelcomeMessage(o2Wizard);	        
	        addStep_EnterMySqlDetails(o2Wizard);	        
	        addStep_ShowMySqlDetails(o2Wizard);
	        addStep_TestMySqlDetails(o2Wizard);
	        
	        o2Wizard.start();		
        }
 public void startWizard()
 {			
     var o2Wizard = new O2Wizard("Execute XRule",500,400);
     scriptToExecute = getClickOnceScriptPath();
     
     //scriptToExecute = @"C:\O2\XRulesDatabase\_Rules\HelloWorld.cs.o2";
     if (File.Exists(scriptToExecute))
     {           
    		var compiledAssembly = new CompileEngine().compileSourceFile(scriptToExecute);
    		if (compiledAssembly != null)
    		{
     		add_StepExecuteScript(o2Wizard,compiledAssembly);            
     		o2Wizard.start();
     		return;
     	}
     }
     
     addStep_SelectXRuleToExecute(o2Wizard);
     addStep_CompileScript(o2Wizard);            	
     o2Wizard.start();         
 }
        public string runWizard(string startFolder)
        {                                     	
        	var o2Wizard = new O2Wizard("Search Engine - Use Case 1"); 

        	o2Wizard.Steps.add_Control(new FileMappings(),
        							  "Search Targets", 
        							  "Drag and Drop target folder with source files and Select files to index", step0_loadDefaultValues);        	
			o2Wizard.Steps.add_Action("Confirm files to index", confirmFilesToIndex);
        	o2Wizard.Steps.add_Control(typeof(ascx_SearchTargets),"Loading search targets", "Click next once loading is complete", step2_loadFiles);        	
        	o2Wizard.Steps.add_Control(typeof(ascx_SearchResults),"Search loaded targets", "Search Indexed files", step3_SearchResults);
        	        	         	        	         	
            o2Wizard.start();
            return "ok";
        }		
        public Thread runWizard(string startFolder, string targetFolder)
        {
            var o2Wizard = new O2Wizard("Backup folder: " + startFolder);
            
            //var steps = new List<IStep>();
            o2Wizard.Steps.add_Directory("Choose Directory To Backup", startFolder);
            o2Wizard.Steps.add_Directory("Choose Directory To Store Zip file", targetFolder);
            o2Wizard.Steps.add_Action("Confirm backup action", confirmBackupAction);
            o2Wizard.Steps.add_Action("Backing up files", executeTask);
            //steps.add_Message("All OK", "This is a message and all is OK");
            //steps.add_Message("Problem", "Something went wrong");

            //return steps.startWizard("Backup folder: " + startFolder);            
            o2Wizard.start();
            return null;
        }
Exemple #7
0
        public Thread runWizard(string svnUrl, string targetFolder)
        {
            var o2Wizard = new O2Wizard("Sync Rules Database via SVN");
        	//var steps = new List<IStep>();
        	var message = string.Format("This workflow will Syncronize the local copy of O2's Rule Database with the lastest version at O2's SVN code repository" + 
        								"{0}{0}SVN Url = {1}" + 
        								"{0}{0}Local Folder = {2}" + 
        								"{0}{0}Note that the local O2 Rule Database will be deleted!", Environment.NewLine, svnUrl.Replace("%20"," ") , targetFolder);
            o2Wizard.Steps.add_Message("Confirm", message);
            o2Wizard.Steps.add_Action("Download Files", (step) => downloadFiles(step, svnUrl, targetFolder));
            //o2Wizard.Steps.add_Directory("Downloaded Files", targetFolder);
            return o2Wizard.start();
            //return o2Wizard.start();

        	//return steps.startWizard("Sync Rules Database via SVN");            
        }