示例#1
0
 public override NextCall Invoke(WorkflowMethod invoker)
 {
     _lcid = GetSecureInput<int>();
     var cfd = new ContentFormDefinition();
     ShortStringPropertySettings settings = new ShortStringPropertySettings();
     settings.Items = new Dictionary<string, CsdStringSetting>();
     settings.ControlType = ShortStringControlType.DropDown;
     ContentDefinition def = WAFContext.GetTemporaryLocalDefinition();
     var cultures = from c in CultureInfo.GetCultures(CultureTypes.AllCultures) orderby c.EnglishName select c;
     foreach (CultureInfo ci in cultures) {
         if (!settings.Items.ContainsKey(ci.LCID.ToString())) settings.Items.Add(ci.LCID.ToString(), new CsdStringSetting(ci.EnglishName + (_lcid == ci.LCID ? " [Current] " : def.Culture.ContainsKey(ci.LCID) ? " [Used] " : "") + " " + ci.LCID));
     }
     cfd.AddPropertyShortString("newLCID", "New LCID", _lcid.ToString(), null, settings);
     string caption = "Please select the LCID you want to change to:";
     var cf = new WMContentForm(DialogueIcon.Question, caption, 600, 50, cfd);
     return new NextCall(cf, onComplete);
 }
示例#2
0
 public override NextCall Invoke(WorkflowMethod invoker)
 {
     _find = Session.GetSetting<string>(this.GetType().FullName + "_find", PersistenceScope.UserSession, "");
     _replace = Session.GetSetting<string>(this.GetType().FullName + "_replace", PersistenceScope.UserSession, "");
     _where = Session.GetSetting<string>(this.GetType().FullName + "_where", PersistenceScope.UserSession, "allContent");
     _caseSensitive = Session.GetSetting<bool>(this.GetType().FullName + "_caseSensitive", PersistenceScope.UserSession, false);
     _searchHtmlSource = Session.GetSetting<bool>(this.GetType().FullName + "_searchHtmlSource", PersistenceScope.UserSession, false);
     _allRevision = Session.GetSetting<bool>(this.GetType().FullName + "_allRevisions", PersistenceScope.UserSession, false);
     _allCultures = Session.GetSetting<bool>(this.GetType().FullName + "_allCultures", PersistenceScope.UserSession, false);
     _allSites = Session.GetSetting<bool>(this.GetType().FullName + "_allSites", PersistenceScope.UserSession, false);
     ContentFormDefinition cfd = new ContentFormDefinition();
     cfd.AddPropertyShortString("find", "Find", _find);
     cfd.AddPropertyShortString("replace", "Replace", _replace);
     ShortStringPropertySettings s = new ShortStringPropertySettings();
     s.ControlType = ShortStringControlType.DropDown;
     s.Items = new Dictionary<string, CsdStringSetting>();
     s.Items.Add("allContent", new CsdStringSetting("Any content"));
     s.Items.Add("selectedContent", new CsdStringSetting("Selected contents..."));
     s.Items.Add("selectTypes", new CsdStringSetting("Selected types..."));
     cfd.AddPropertyShortString("where", "Where", _where, null, s);
     cfd.AddPropertyCheckBox("caseSensitive", "Match case", _caseSensitive);
     cfd.AddPropertyCheckBox("searchHtmlSource", "HTML source", _searchHtmlSource);
     cfd.AddPropertyCheckBox("allRevisions", "All revisions", _allRevision);
     cfd.AddPropertyCheckBox("allCultures", "All languages", _allCultures);
     cfd.AddPropertyCheckBox("allSites", "All sites", _allSites);
     cfd.AddPropertyHeading("", "<br /><font color=\"gray\">WARNING: It is not possible to undo a replace operation. </font>", false, false, true);
     string[] buttons = new string[] { "Find..." };
     WMContentForm contentFormDiag = new WMContentForm(DialogueIcon.Question, "Find and replace text:", 400, 220, cfd, buttons, true);
     return new NextCall(contentFormDiag, onCompleteStep1);
 }
示例#3
0
 public override NextCall Invoke(WorkflowMethod invoker)
 {
     if (!Session.Access.IsStored) throw new Exception(Session.Access.UserType + " user does not have editable properties. ");
     SystemUser user = Session.GetUser();
     ContentFormDefinition cfd = new ContentFormDefinition();
     cfd.AddPropertyShortString("Username", "Username", user.UserName).Focus = true;
     cfd.AddPropertyShortString("NewPassword1", "New Password", "", null, new ShortStringPropertySettings() { ControlType = ShortStringControlType.Password });
     cfd.AddPropertyShortString("NewPassword2", "Confirm Password", "", null, new ShortStringPropertySettings() { ControlType = ShortStringControlType.Password });
     cfd.AddPropertyShortString("OldPassword", "Old Password", "", null, new ShortStringPropertySettings() { ControlType = ShortStringControlType.Password });
     cfd.AddPropertyShortString("Email", "Email", user.Email);
     cfd.AddPropertyShortString("Mobile", "Mobile", user.Mobile);
     cfd.AddPropertyShortString("Forename", "Forename", user.Forename);
     cfd.AddPropertyShortString("Surname", "Surname", user.Surname);
     cfd.AddPropertyShortString("Company", "Company", user.Company);
     cfd.AddPropertyShortString("Street", "Street address", user.Street);
     cfd.AddPropertyShortString("ProvinceState", "State or province", user.ProvinceState);
     cfd.AddPropertyShortString("PostZipCode", "Postal zip code", user.PostZipCode);
     cfd.AddPropertyShortString("City", "City", user.City);
     cfd.AddPropertyShortString("Country", "Country", user.Country);
     return new NextCall(new WMContentForm(DialogueIcon.Info, "My user details", 450, 290, cfd, new string[] { "Save" }, true), onComplete);
 }
示例#4
0
 NextCall directlyViaHttp(WorkflowMethod invoker)
 {
     ContentFormDefinition cfd = new ContentFormDefinition();
     if (downloadError != null) {
         cfd.AddPropertyHeading(null, "<br /><font color=red>" + HttpUtility.HtmlEncode(downloadError) + "</font><br /><br />", false, true, true);
     } else {
         cfd.AddPropertyHeading(null, "<br /><br />", false, true, true);
     }
     downloadError = null;
     cfd.AddPropertyShortString("url", "Site URL", Session.GetSetting<string>("MergeDef.Url", PersistenceScope.Application, "http://"), true);
     cfd.AddPropertyShortString("username", "Admin Username");
     cfd.AddPropertyShortString("password", "Admin Password", null, null, new ShortStringPropertySettings() { ControlType = ShortStringControlType.Password });
     var diag = new WMContentForm(DialogueIcon.None, "Please provide connection details:", 400, 130, cfd);
     return new NextCall(diag, onDirectlyViaHttpAnswer);
 }
示例#5
0
文件: Default.aspx.cs 项目: kyvkri/MG
    NextCall edit(WorkflowMethod invoker)
    {
        WFContext.Caption = "Editing webfram settings...";
        WFContext.InBackgroundMode = true;
        ContentFormDefinition cfd = new ContentFormDefinition();
        try {
            {
                var settings = new ShortStringPropertySettings();
                settings.Enabled = false;
                cfd.AddPropertyShortString("guid", "This server GUID", WAFRuntime.WebFarm.ThisServer.Guid.ToString(), null, settings);
            }
            {
                var settings = new ShortStringPropertySettings();
                settings.Enabled = false;
                cfd.AddPropertyShortString("name", "This server Name", WAFRuntime.WebFarm.ThisServer.Name, null, settings);
            }
        } catch {

        }
        {
            var settings = new LongStringPropertySettings();
            settings.Width = Unit.Percentage(100);
            settings.Height = Unit.Percentage(99);
            settings.Layout = PropertyLayout.NoTitle;
            cfd.AddPropertyLongString("xmlText", null, WAFRuntime.WebFarm.GetConfig(), null, settings);
        }

        WMContentForm diag = new WMContentForm(DialogueIcon.None, "Web farm settings:", 720, 400, cfd, new string[] { "Save", "Refresh", "Restart all servers", "Close" }, false);
        return new NextCall(diag, onComplete);
    }
示例#6
0
文件: Default.aspx.cs 项目: kyvkri/MG
 public override NextCall Invoke(WorkflowMethod invoker)
 {
     ContentFormDefinition cfd = new ContentFormDefinition();
     ShortStringPropertySettings s = new ShortStringPropertySettings();
     s.ControlType = ShortStringControlType.DropDown;
     s.Items = new Dictionary<string, CsdStringSetting>();
     s.Items.Add("m1", new CsdStringSetting("1 Megapixels"));
     s.Items.Add("m2", new CsdStringSetting("2 Megapixels"));
     s.Items.Add("m3", new CsdStringSetting("3 Megapixels"));
     s.Items.Add("m4", new CsdStringSetting("4 Megapixels"));
     s.Items.Add("m6", new CsdStringSetting("6 Megapixels"));
     s.Items.Add("m8", new CsdStringSetting("8 Megapixels"));
     s.Items.Add("m10", new CsdStringSetting("10 Megapixels"));
     s.Items.Add("m15", new CsdStringSetting("15 Megapixels"));
     cfd.AddPropertyHeading(null, "<br/>Please select the maximum amount of pixels for any image:<br/><br/>", false, true, true);
     cfd.AddPropertyShortString("megapixels", "Maximum", "m4", null, s);
     return new NextCall(new WMContentForm(DialogueIcon.Question, "Rescale large images", 400, 70, cfd), onComplete);
 }
示例#7
0
文件: Default.aspx.cs 项目: kyvkri/MG
    NextCall onSelectContentsComplete(WorkflowMethod invoker)
    {
        WMFindContent w = (WMFindContent)invoker;
        _nodeIds = w.SelectedKeys.Select(v => v.NodeId).Distinct().ToList();

        ContentFormDefinition cfd = new ContentFormDefinition();

        ShortStringPropertySettings s = new ShortStringPropertySettings();
        s.ControlType = ShortStringControlType.DropDown;
        s.Items = new Dictionary<string, CsdStringSetting>();
        foreach (var l in Session.Definitions.Culture.Values) {
            s.Items.Add(l.LCID.ToString(), new CsdStringSetting(l.Name));
        }
        cfd.AddPropertyShortString("target", "Ensure versions in", Session.LCID.ToString(), null, s);

        s = new ShortStringPropertySettings();
        s.ControlType = ShortStringControlType.DropDown;
        s.Items = new Dictionary<string, CsdStringSetting>();
        foreach (var l in Session.Definitions.Culture.Values) {
            s.Items.Add(l.LCID.ToString(), new CsdStringSetting(l.Name));
        }

        return new NextCall(new WMContentForm(DialogueIcon.Question, "Ensuring language versions", 400, 50, cfd), onSelectLanguageComplete);
    }
示例#8
0
文件: Default.aspx.cs 项目: kyvkri/MG
 public override NextCall Invoke(WorkflowMethod invoker)
 {
     var cfd = new ContentFormDefinition();
     string name;
     if (Session.Access.IsStored) {
         name = Session.GetUser().Name;
     } else {
         name = Utils.GetFriendlyName(Session.Access.UserType.ToString());
     }
     ShortStringPropertySettings s = new ShortStringPropertySettings();
     cfd.AddPropertyShortString("from", "From", name, null, s);
     s.Focus = true;
     cfd.AddPropertyLongString("message", "Message");
     var q = new WMContentForm(DialogueIcon.Question, "Please type message to send:", 400, 100, cfd);
     return new NextCall(q, onComplete);
 }
示例#9
0
文件: Default.aspx.cs 项目: kyvkri/MG
 public override NextCall Invoke(WorkflowMethod invoker)
 {
     if (!Session.Access.IsAdmin()) throw new AccessViolationException();
     ContentFormDefinition cfd = new ContentFormDefinition();
     cfd.AddPropertyShortString("FolderName", "Folder name", _newFolderName);
     WMContentForm cf = new WMContentForm(DialogueIcon.Info, "Create new folder:", 400, 30, cfd);
     return new NextCall(cf, onFormComplete);
 }
示例#10
0
    public override NextCall Invoke(WorkflowMethod invoker)
    {
        if (!Session.Access.IsStored) throw new Exception(Session.Access.UserType + " user does not have editable properties. ");
        SystemUser user = Session.GetUser();
        ContentFormDefinition cfd = new ContentFormDefinition();

        cfd.AddPropertyShortString("Username", Local.Text("Web.WAF.Edit.Welcome.DefaultUsername"), user.UserName).Focus = true;
        cfd.AddPropertyShortString("NewPassword1",Local.Text("Web.WAF.Edit.Welcome.DefaultNewPassword") , "", null, new ShortStringPropertySettings() { ControlType = ShortStringControlType.Password });
        cfd.AddPropertyShortString("NewPassword2", Local.Text("Web.WAF.Edit.Welcome.DefaultComfirmPassword"), "", null, new ShortStringPropertySettings() { ControlType = ShortStringControlType.Password });
        cfd.AddPropertyShortString("OldPassword", Local.Text("Web.WAF.Edit.Welcome.DefaultOldPassword") , "", null, new ShortStringPropertySettings() { ControlType = ShortStringControlType.Password });
        cfd.AddPropertyShortString("Email", Local.Text("Web.WAF.Edit.Welcome.DefaultEmail"), user.Email);
        cfd.AddPropertyShortString("Mobile", Local.Text("Web.WAF.Edit.Welcome.DefaultMobile"), user.Mobile);
        cfd.AddPropertyShortString("Forename",  Local.Text("Web.WAF.Edit.Welcome.DefaultForename"), user.Forename);
        cfd.AddPropertyShortString("Surname", Local.Text("Web.WAF.Edit.Welcome.DefaultSurename"), user.Surname);
        cfd.AddPropertyShortString("Company", Local.Text("Web.WAF.Edit.Welcome.DefaultCompany"), user.Company);
        cfd.AddPropertyShortString("Street",  Local.Text("Web.WAF.Edit.Welcome.DefaultStreetAddress"), user.Street);
        cfd.AddPropertyShortString("ProvinceState", Local.Text("Web.WAF.Edit.Welcome.DefaultStatOrProvince"), user.ProvinceState);
        cfd.AddPropertyShortString("PostZipCode",Local.Text("Web.WAF.Edit.Welcome.DefaultPostalZipCode"), user.PostZipCode);
        cfd.AddPropertyShortString("City", Local.Text("Web.WAF.Edit.Welcome.DefaultCity"), user.City);
        cfd.AddPropertyShortString("Country", Local.Text("Web.WAF.Edit.Welcome.DefaultCountry"), user.Country);
        return new NextCall(new WMContentForm(DialogueIcon.Info, Local.Text("Web.WAF.Edit.Welcome.DefaultMyUserDetails"), 450, 290, cfd, new string[] { Local.Text("Web.WAF.Edit.Welcome.DefaultSave") }, true), onComplete);
    }
示例#11
0
    public override NextCall Invoke(WorkflowMethod invoker)
    {
        _find = Session.GetSetting<string>(this.GetType().FullName + "_find", PersistenceScope.UserSession, "");
        _replace = Session.GetSetting<string>(this.GetType().FullName + "_replace", PersistenceScope.UserSession, "");
        _where = Session.GetSetting<string>(this.GetType().FullName + "_where", PersistenceScope.UserSession, "allContent");
        _caseSensitive = Session.GetSetting<bool>(this.GetType().FullName + "_caseSensitive", PersistenceScope.UserSession, false);
        _searchHtmlSource = Session.GetSetting<bool>(this.GetType().FullName + "_searchHtmlSource", PersistenceScope.UserSession, false);
        _allRevision = Session.GetSetting<bool>(this.GetType().FullName + "_allRevisions", PersistenceScope.UserSession, false);
        _allCultures = Session.GetSetting<bool>(this.GetType().FullName + "_allCultures", PersistenceScope.UserSession, false);
        _allSites = Session.GetSetting<bool>(this.GetType().FullName + "_allSites", PersistenceScope.UserSession, false);
        ContentFormDefinition cfd = new ContentFormDefinition();

        cfd.AddPropertyShortString("find", Local.Text("Web.WAF.Edit.ContentFind"), _find);
        cfd.AddPropertyShortString("replace",Local.Text("Web.WAF.Edit.ContentReplace"), _replace);
        ShortStringPropertySettings s = new ShortStringPropertySettings();
        s.ControlType = ShortStringControlType.DropDown;
        s.Items = new Dictionary<string, CsdStringSetting>();
        s.Items.Add("allContent", new CsdStringSetting(Local.Text("Web.WAF.Edit.ContentAnyContent")));
        s.Items.Add("selectedContent", new CsdStringSetting(Local.Text("Web.WAF.Edit.ContentSelectedContents")));
        s.Items.Add("selectTypes", new CsdStringSetting(Local.Text("Web.WAF.Edit.ContentSelectedTypes")));
        cfd.AddPropertyShortString("where",Local.Text("Web.WAF.Edit.ContentWhere"), _where, null, s);
        cfd.AddPropertyCheckBox("caseSensitive", Local.Text("Web.WAF.Edit.ContentMatchCase"), _caseSensitive);
        cfd.AddPropertyCheckBox("searchHtmlSource",  Local.Text("Web.WAF.Edit.ContentHtmlSource"), _searchHtmlSource);
        cfd.AddPropertyCheckBox("allRevisions",Local.Text("Web.WAF.Edit.ContentAllRevisions"), _allRevision);
        cfd.AddPropertyCheckBox("allCultures", Local.Text("Web.WAF.Edit.ContentAllLanguages"), _allCultures);
        cfd.AddPropertyCheckBox("allSites",Local.Text("Web.WAF.Edit.ContentAllSites"), _allSites);

        cfd.AddPropertyHeading("", "<br /><font color=\"gray\">" + Local.Text("Web.WAF.Edit.ContentWarningHtml") + "</font>", false, false, true);
        string[] buttons = new string[] {Local.Text("Web.WAF.Edit.ContentFind...")  };
        WMContentForm contentFormDiag = new WMContentForm(DialogueIcon.Question, Local.Text("Web.WAF.Edit.ContentFindAndReplace"), 400, 220, cfd, buttons, true);
        return new NextCall(contentFormDiag, onCompleteStep1);
    }
示例#12
0
        public override NextCall Invoke(WorkflowMethod invoker)
        {
            if (!Session.Access.IsAdmin()) throw new AccessViolationException();
            ContentFormDefinition cfd = new ContentFormDefinition();

            cfd.AddPropertyShortString("FolderName", Local.Text("Web.WAF.Edit.ExplorerFolderName"), _newFolderName);

            WMContentForm cf = new WMContentForm(DialogueIcon.Info, Local.Text("Web.WAF.Edit.ExplorerCreateNewFolder"), 400, 30, cfd);
            return new NextCall(cf, onFormComplete);
        }
示例#13
0
    NextCall edit(WorkflowMethod invoker)
    {
        WFContext.Caption = "Editing webfram settings...";
        WFContext.InBackgroundMode = true;
        ContentFormDefinition cfd = new ContentFormDefinition();
        {
            cfd.AddPropertyHeading("", "&nbsp;", false, true, true);
        }
        {
            var settings = new LongStringPropertySettings();
            settings.Width = Unit.Percentage(100);
            settings.Height = Unit.Pixel(200);
            settings.Enabled = true;
            cfd.AddPropertyLongString("config", "WebFarm.config", WAFRuntime.WebFarm.GetConfig(), null, settings);
        }
        {
            var settings = new ShortStringPropertySettings();
            settings.Enabled = false;
            cfd.AddPropertyShortString("proguid", "This process GUID", WAFRuntime.WebFarm.ThisProcessGuid.ToString(), null, settings);
            settings = new ShortStringPropertySettings();
            settings.Enabled = false;
            cfd.AddPropertyShortString("insguid", "This installation GUID", WAFRuntime.WebFarm.ThisInstallationGuid.ToString(), null, settings);
            settings = new ShortStringPropertySettings();
            settings.Enabled = false;
            cfd.AddPropertyShortString("instname", "This installation name", WAFRuntime.WebFarm.ThisInstallationName, null, settings);
        }
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("<div>&nbsp;</div>");
            sb.Append("<table cellpadding=\"0\" cellspacing=\"0\">");
            sb.Append("<tr>");
            sb.Append("<td style=\"font-size:9px; color:gray; width:220px;\">INSTALLATION</td>");
            sb.Append("<td style=\"font-size:9px; color:gray; width:120px;\">CONTACT</td>");
            sb.Append("<td style=\"font-size:9px; color:gray; width:130px; text-align:right;\">PAGEVIEWS / MINUTE</td>");
            sb.Append("<td style=\"font-size:9px; color:gray; width:140px; text-align:right;\">REQUESTS / MINUTE</td>");
            sb.Append("</tr>");
            sb.Append("<tr>");
            sb.Append("<td style=\"font-size:9px; \">&nbsp;</td>");
            sb.Append("</tr>");
            var now = DateTime.Now;
            foreach (var p in WAFRuntime.WebFarm.Processes.OrderBy(p => p.Installation.Name)) {
                sb.Append("<tr>");
                sb.Append("<td><span title=\"Installation ID: " + p.Installation.Guid + "  Process ID: " + p.Guid + "\">" + p.Installation.Name + "</span></td>");
                sb.Append("<td>" + Utils.GetTimespanString(now.Subtract(p.LastPing)) + " ago</td>");
                sb.Append("<td style=\"text-align:right;\">" + p.Installation.PageViewsPerMinute.Count.ToString("### ##0") + "</td>");
                sb.Append("<td style=\"text-align:right;\">" + p.Installation.RequestsPerMinute.Count.ToString("### ##0") + "</td>");
                sb.Append("</tr>");
            }
            sb.Append("</table>");
            cfd.AddPropertyHeading("", sb.ToString(), false, true, true);
        }

        WMContentForm diag = new WMContentForm(DialogueIcon.None, "Web farm settings:", 720, 450, cfd, new string[] { "Refresh", "Save & Restart", "Close" }, false);
        return new NextCall(diag, onComplete);
    }
示例#14
0
    public override NextCall Invoke(WorkflowMethod invoker)
    {
        var cfd = new ContentFormDefinition();
        ScheduledTask task = Session.GetContent<ScheduledTask>(_taskNodeId);
        //cfd.AddPropertyCheckBox("Enabled", "Enabled", task.Enabled);
        cfd.AddPropertyShortString("Typename", "Typename", task.TypeName, true);
        cfd.AddPropertyShortString("FriendlyName", "Friendly name", task.FriendlyName, false);
        var intervalOptions = new Dictionary<string, CsdStringSetting>();
        intervalOptions.Add(((int)TaskShedulerIntervalUnit.Continuous).ToString(), new CsdStringSetting("CONTINOUSLY, with below interval as break between each run"));
        intervalOptions.Add(((int)TaskShedulerIntervalUnit.Minute).ToString(), new CsdStringSetting("MINUTE, but delay each start with interval below"));
        intervalOptions.Add(((int)TaskShedulerIntervalUnit.Hour).ToString(), new CsdStringSetting("HOUR, but delay each start with interval below"));
        intervalOptions.Add(((int)TaskShedulerIntervalUnit.Day).ToString(), new CsdStringSetting("DAY, but delay each start with interval below"));
        intervalOptions.Add(((int)TaskShedulerIntervalUnit.Week).ToString(), new CsdStringSetting("WEEK, but delay each start with interval below"));
        intervalOptions.Add(((int)TaskShedulerIntervalUnit.Month).ToString(), new CsdStringSetting("MONTH, but delay each start with interval below"));
        intervalOptions.Add(((int)TaskShedulerIntervalUnit.Quarter).ToString(), new CsdStringSetting("QUARTER, but delay each start with interval below"));
        intervalOptions.Add(((int)TaskShedulerIntervalUnit.Year).ToString(), new CsdStringSetting("YEAR, but delay each start with interval below"));
        cfd.AddPropertyShortString("IntervalUnit", "Run every", ((int)task.IntervalUnit).ToString(), null, new ShortStringPropertySettings() {
            ControlType = ShortStringControlType.DropDown, Items = intervalOptions
        });
        int secs;
        string startAtUnit;
        if (task.StartAt == 0) {
            startAtUnit = "Seconds";
            secs = 0;
        } else if (task.StartAt % (60 * 60 * 24) == 0) {
            startAtUnit = "Days";
            secs = task.StartAt / (60 * 60 * 24);
        } else if (task.StartAt % (60 * 60) == 0) {
            startAtUnit = "Hours";
            secs = task.StartAt / (60 * 60);
        } else if (task.StartAt % 60 == 0) {
            startAtUnit = "Minutes";
            secs = task.StartAt / 60;
        } else {
            startAtUnit = "Seconds";
            secs = task.StartAt;
        }

        cfd.AddPropertyInteger("StartAt", "Interval", secs);
        var startAtOptions = new Dictionary<string, CsdStringSetting>();
        startAtOptions.Add("Seconds", new CsdStringSetting("Seconds"));
        startAtOptions.Add("Minutes", new CsdStringSetting("Minutes"));
        startAtOptions.Add("Hours", new CsdStringSetting("Hours"));
        startAtOptions.Add("Days", new CsdStringSetting("Days"));
        cfd.AddPropertyShortString("StartAtUnit", "Interval unit", startAtUnit, null, new ShortStringPropertySettings() {
            ControlType = ShortStringControlType.DropDown, Items = startAtOptions
        });
        if (task.FailuresBeforeDisabling > 0) cfd.AddPropertyDescription("<font color=\"gray\"><br />The task will be automatically disabled after " + task.FailuresBeforeDisabling + " exceptions. </font>", true);
        _showSettingsButton = false;
        string friendlyTypeName = null;
        if (task.TypeName.Length > 0) {
            Type t;
            try {
                t = Utils.GetType(task.TypeName);
                if (typeof(IWorkflowMethodTaskWithSettings).IsAssignableFrom(t)) {
                    _showSettingsButton = true;
                    friendlyTypeName = t.Name;
                }
            } catch { }
        }
        string[] buttons;
        if (_showSettingsButton) {
            buttons = new string[] { "Configure " + friendlyTypeName, "Check Typename", "Task details", "Save & Close" };
        } else {
            buttons = new string[] { "Check Typename", "Task details", "Save & Close" };
        }
        var diag = new WMContentForm(DialogueIcon.Info, "Task options", 600, 160, cfd, buttons, true);
        return new NextCall(diag, onCompleteSettingsFromTask);
    }
示例#15
0
 public override NextCall Invoke(WorkflowMethod invoker)
 {
     var cfd = new ContentFormDefinition();
     cfd.AddPropertyShortString("node_id", "Node ID", "", true);
     var diag = new WMContentForm(DialogueIcon.Question, "Ensuring data integrity of one node", 400, 50, cfd);
     return new NextCall(diag, onAnswer);
 }
示例#16
0
 public override NextCall Invoke(WorkflowMethod invoker)
 {
     _parentFolderNodeId = this.GetSecureInput<int>();
     ContentFormDefinition cfd = new ContentFormDefinition();
     ShortStringPropertySettings s = new ShortStringPropertySettings();
     s.Layout = PropertyLayout.NoTitle;
     cfd.AddPropertyShortString("name", null, "New Folder", null, s);
     WMContentForm cf = new WMContentForm(DialogueIcon.Question, "Please name new folder:", 400, 40, cfd);
     return new NextCall(cf, onComplete, onError);
 }