コード例 #1
0
ファイル: Smartform.cs プロジェクト: SimonAllport/FormSpider
        /// <summary>
        /// Actions
        /// </summary>
        /// <param name="HandleGUID"></param>
        /// <returns></returns>
        public static List<SmartFormViewActions> ArtefactActionss(String FormName, Guid EventGUID, Guid HandleGUID)
        {
            List<SmartFormViewActions> list = new List<SmartFormViewActions>();
            FormsManager frm = new FormsManager("dlx", 5555);

            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));
            var ev = form.Events[EventGUID].Handlers[HandleGUID];
            SourceCode.Forms.Authoring.Eventing.Handler e = form.Events[EventGUID].Handlers[HandleGUID];

            foreach (SourceCode.Forms.Authoring.Eventing.Action action in e.Actions)
            {
                list.Add(new SmartFormViewActions
                {
                    GUID = action.Guid,
                  //  properties = action.Properties,
                 //   parameters = action.Parameters,
                 //   results = action.Results,
                 //   validation = action.Validation,
                    viewguid = action.ViewGuid,
                    method = action.Method,
                    formguid = action.FormGuid,
                    executiontype = action.ExecutionType.ToString(),
                    controlguid = action.ControlGuid,
                    actiontype = action.ActionType.ToString()
                });
            }
            return list;
        }
コード例 #2
0
        /// <summary>
        /// Event Handlers
        /// </summary>
        /// <param name="EventGUID"></param>
        /// <returns></returns>
        public static List <SmartFromViewHandlers> FormHandlers(String FormName, Guid EventGUID)
        {
            Rules        rules = new Rules();
            FormsManager frm   = formmanager();

            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));
            return(rules.Handlers(form.Events[EventGUID]));
        }
コード例 #3
0
        public static List <SmartFormViewActionValidationMessage> ViewActionValidationMessages(String FormName, Guid EventGUID, Guid HandleGUID, Guid ActionGUID)
        {
            Rules        rules = new Rules();
            FormsManager frm   = formmanager();

            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));
            return(rules.Messages(form.Events[EventGUID].Handlers[HandleGUID].Actions[ActionGUID]));
        }
コード例 #4
0
        /// <summary>
        /// Conditions
        /// </summary>
        /// <param name="FormName"></param>
        /// <param name="EventGUID"></param>
        /// <param name="HandleGUID"></param>
        /// <returns></returns>
        public static List <SmartFormViewConditions> ArtefactConditions(String FormName, Guid EventGUID, Guid HandleGUID)
        {
            Rules        rules = new Rules();
            FormsManager frm   = formmanager();

            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));
            return(rules.Conditions(form.Events[EventGUID].Handlers[HandleGUID]));
        }
コード例 #5
0
        /// <summary>
        /// Gets a list of the form parameters
        /// </summary>
        /// <param name="FormName"></param>
        /// <returns></returns>
        public static List <SmartFormViewParameters> FormParameters(string FormName)
        {
            FormsManager frm = formmanager();

            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));
            Parameters parameters = new Parameters();

            return(parameters.ArtefactParameters(form.Parameters));
        }
コード例 #6
0
        /// <summary>
        /// Form Events
        /// </summary>
        /// <param name="FormName"></param>
        /// <returns></returns>
        public static List <SmartFormViewEvents> FormEventsEvents(string FormName)
        {
            Rules rules = new Rules();

            FormsManager frm = formmanager();

            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));

            return(rules.Events(form.Events));
        }
コード例 #7
0
        /// <summary>
        /// Form Controls
        /// </summary>
        /// <param name="FormName"></param>
        /// <returns></returns>
        public static List <SmartFormViewControls> FormControls(string FormName)
        {
            FormsManager frm = formmanager();

            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));

            Controls control = new Controls();

            return(control.ArtefactControls(form.Controls));
        }
コード例 #8
0
        /// <summary>
        /// List of form properties
        /// </summary>
        /// <param name="FormName"></param>
        /// <returns></returns>
        public static List <SmartFormViewProperties> GetFormProperties(string FormName)
        {
            List <SmartFormView> list = new List <SmartFormView>();
            FormsManager         frm  = formmanager();


            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));
            Properties prop = new Properties();

            return(prop.ArtefactProperties(form.Properties));
        }
コード例 #9
0
        public static List <SmartFormViewProperties> GetControlProperties(string FormName, Guid ControlGUID)
        {
            FormsManager frm = formmanager();


            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));

            SourceCode.Forms.Authoring.Control control = form.Controls[ControlGUID];

            Properties prop = new Properties();

            return(prop.ArtefactProperties(control.Properties));
        }
コード例 #10
0
        public static SmartFormViewProperties GetControlExpressions(string FormName, Guid ControlGUID)
        {
            List <SmartFormView> list = new List <SmartFormView>();
            FormsManager         frm  = formmanager();


            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));

            SourceCode.Forms.Authoring.Control control = form.Controls[ControlGUID];

            Properties prop = new Properties();

            return(prop.ArtefactControlExpressions(control.Expression));
        }
コード例 #11
0
ファイル: Smartform.cs プロジェクト: SimonAllport/FormSpider
        /// <summary>
        /// Conditions
        /// </summary>
        /// <param name="FormName"></param>
        /// <param name="EventGUID"></param>
        /// <param name="HandleGUID"></param>
        /// <returns></returns>
        public static List<SmartFormViewConditions> ArtefactConditions(String FormName,Guid EventGUID,Guid HandleGUID)
        {
            List<SmartFormViewConditions> list = new List<SmartFormViewConditions>();
            FormsManager frm = new FormsManager("dlx", 5555);
             SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));
             var ev = form.Events[EventGUID].Handlers[HandleGUID];
             SourceCode.Forms.Authoring.Eventing.Handler e = form.Events[EventGUID].Handlers[HandleGUID];

            foreach (SourceCode.Forms.Authoring.Eventing.Condition condition in e.Conditions)
            {

                list.Add(new SmartFormViewConditions
                {
                    GUID = condition.Guid,

                });

            }

            return list;
        }
コード例 #12
0
ファイル: Smartform.cs プロジェクト: SimonAllport/FormSpider
        /// <summary>
        /// Event Handlers
        /// </summary>
        /// <param name="EventGUID"></param>
        /// <returns></returns>
        public static List<SmartFromViewHandlers> FormHandlers(String FormName,Guid EventGUID)
        {
            List<SmartFromViewHandlers> list = new List<SmartFromViewHandlers>();
            FormsManager frm = new FormsManager("dlx", 5555);
            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));
            var ev = form.Events[EventGUID];

            SourceCode.Forms.Authoring.Eventing.Event e = form.Events[EventGUID];

                    foreach (SourceCode.Forms.Authoring.Eventing.Handler handle in e.Handlers)
                    {
                        list.Add(new SmartFromViewHandlers
                        {

                            Name = handle.HandlerType.ToString(),
                            GUID = handle.Guid
                        });

                    }

            return list;
        }
コード例 #13
0
ファイル: Smartform.cs プロジェクト: SimonAllport/FormSpider
        /// <summary>
        /// Validation Messages
        /// </summary>
        /// <param name="FormName"></param>
        /// <param name="EventGUID"></param>
        /// <param name="HandleGUID"></param>
        /// <param name="ActionGUID"></param>
        /// <returns></returns>
        public static List<SmartFormViewActionValidationMessage> SmartFormViewActionValidation(String FormName, Guid EventGUID, Guid HandleGUID, Guid ActionGUID)
        {
            List<SmartFormViewActionValidationMessage> list = new List<SmartFormViewActionValidationMessage>();
            FormsManager frm = new FormsManager("dlx", 5555);

            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));
            SourceCode.Forms.Authoring.Eventing.Action e = form.Events[EventGUID].Handlers[HandleGUID].Actions[ActionGUID];

            foreach (SourceCode.Forms.Authoring.ValidationMessage val in e.Validation.Messages)
            {

                list.Add(new SmartFormViewActionValidationMessage
                {
                    message = val.Message

                });
            }

            return list;
        }
コード例 #14
0
ファイル: Smartform.cs プロジェクト: SimonAllport/FormSpider
        /// <summary>
        /// Actions Results
        /// </summary>
        /// <param name="FormName"></param>
        /// <param name="EventGUID"></param>
        /// <param name="HandleGUID"></param>
        /// <param name="ActionGUID"></param>
        /// <returns></returns>
        public static List<SmartFormViewActionParameters> SmartFormViewActionResults(String FormName, Guid EventGUID, Guid HandleGUID, Guid ActionGUID)
        {
            List<SmartFormViewActionParameters> list = new List<SmartFormViewActionParameters>();
            FormsManager frm = new FormsManager("dlx", 5555);

            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));
            SourceCode.Forms.Authoring.Eventing.Action e = form.Events[EventGUID].Handlers[HandleGUID].Actions[ActionGUID];

            foreach (SourceCode.Forms.Authoring.Eventing.Mapping map in e.Results)
            {

                list.Add(new SmartFormViewActionParameters
                {

               //     validation = map.Validation,
                    targettype = map.TargetType.ToString(),
                    targetpath = map.TargetPath,
                    targetid = map.TargetID,
                    sourcevalue = map.SourceValue,
                    sourcetype = map.SourceType.ToString(),
                    sourcepath = map.SourcePath,
                    sourceid = map.SourceID

                });
            }

            return list;
        }
コード例 #15
0
ファイル: Smartform.cs プロジェクト: SimonAllport/FormSpider
        /// <summary>
        /// Gets the details of the form
        /// </summary>
        /// <param name="FormName"></param>
        public static SmartFormView LoadForm(string formname)
        {
            FormsManager frm = new FormsManager("dlx", 5555);
            FormInfo forminfo = frm.GetForm(formname);

            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetViewDefinition(formname));

            SmartFormView sf = new SmartFormView();
            sf.guid = form.Guid;
            sf.description = form.Description;

            sf.displayname = form.DisplayName;
            sf.name = form.Name;
            sf.guid = form.Guid;
            sf.theme = form.Theme;

            return sf;
        }
コード例 #16
0
ファイル: Smartform.cs プロジェクト: SimonAllport/FormSpider
        /// <summary>
        /// List of form properties 
        /// </summary>
        /// <param name="FormName"></param>
        /// <returns></returns>
        public static List<SmartFormViewProperties> GetFormProperties(string  FormName)
        {
            List<SmartFormView> list = new List<SmartFormView>();
            FormsManager frm = new FormsManager("dlx", 5555);

                SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));
            Properties prop = new Properties();
            return  prop.ArtefactProperties( form.Properties);
        }
コード例 #17
0
ファイル: Smartform.cs プロジェクト: SimonAllport/FormSpider
        public static List<SmartFormViewProperties> GetControlProperties(string FormName,Guid ControlGUID)
        {
            List<SmartFormView> list = new List<SmartFormView>();
            FormsManager frm = new FormsManager("dlx", 5555);

            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));

            SourceCode.Forms.Authoring.Control control = form.Controls[ControlGUID];

            Properties prop = new Properties();
            return prop.ArtefactProperties(control.Properties);
        }
コード例 #18
0
ファイル: Smartform.cs プロジェクト: SimonAllport/FormSpider
        /// <summary>
        /// Gets a list of the form parameters
        /// </summary>
        /// <param name="FormName"></param>
        /// <returns></returns>
        public static List<SmartFormViewParameters> FormParameters(string  FormName)
        {
            List<SmartFormViewParameters> list = new List<SmartFormViewParameters>();
               FormsManager frm = new FormsManager("dlx", 5555);
                SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));

            foreach (SourceCode.Forms.Authoring.FormParameter parameter in form.Parameters)
            {
                list.Add(new SmartFormViewParameters
                {
                    name = parameter.Name,
                    type = parameter.DataType.ToString(),
                    defaultvalue = parameter.DefaultValue
                });
            }

            return list;
        }
コード例 #19
0
ファイル: Smartform.cs プロジェクト: SimonAllport/FormSpider
        /// <summary>
        /// Form Controls
        /// </summary>
        /// <param name="FormName"></param>
        /// <returns></returns>
        public static List<SmartFormViewControls> FormControls(string FormName)
        {
            List<SmartFormViewControls> list = new List<SmartFormViewControls>();
            FormsManager frm = new FormsManager("dlx", 5555);
            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));

            foreach (SourceCode.Forms.Authoring.Control control in form.Controls)
            {
                list.Add(new SmartFormViewControls
                {
                    name = control.Name,
                    type = control.Type,
                guid = control.Guid
                });

            }
            return list;
        }
コード例 #20
0
ファイル: Smartform.cs プロジェクト: SimonAllport/FormSpider
        /// <summary>
        /// Form Events
        /// </summary>
        /// <param name="FormName"></param>
        /// <returns></returns>
        public static List<SmartFormViewEvents> FormEventsEvents(string FormName)
        {
            List<SmartFormViewEvents> list = new List<SmartFormViewEvents>();
            FormsManager frm = new FormsManager("dlx", 5555);
            SourceCode.Forms.Authoring.Form form = new SourceCode.Forms.Authoring.Form(frm.GetFormDefinition(FormName));

            foreach (SourceCode.Forms.Authoring.Eventing.Event ev in form.Events)
            {

                    list.Add(new SmartFormViewEvents
                    {
                        name = ev.Name,

                        type = ev.EventType.ToString(),
                        GUID = ev.Guid

                    });

            }

            return list;
        }