示例#1
0
        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;
        }
示例#2
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
            FluentSharp.O2.Views.ASCX.MerlinWizard.Ascx_ExtensionMethods_2.add_Message(o2Wizard.Steps, "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");
        }