コード例 #1
0
        /// <summary>
        /// Get the TaskDefinitionId of the task to be run, from the SelectProgram property on the command's control
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        private TaskDefinitionId GetTaskIdFromCommandCtrlProp(ExecOperCommand command)
        {
            Task      task    = Manager.MGDataTable.GetTaskByID(command.TaskTag) as Task;
            MgForm    form    = task.getForm() as MgForm;
            MgControl control = form.CtrlTab.getCtrl(command.DitIdx) as MgControl;
            Property  prop    = control.getProp(PropInterface.PROP_TYPE_SELECT_PROGRAM);

            return(prop.TaskDefinitionId);
        }
コード例 #2
0
        /// <summary>
        /// Set TaskDefinitionId on the property of the subform control
        /// </summary>
        /// <param name="destSubformCtrl">subform control</param>
        private void SetCalledTaskDefinitionId(MgControl destSubformCtrl)
        {
            // If 'Connect to' property was 'none'
            if (!destSubformCtrl.checkIfExistProp(PropInterface.PROP_TYPE_PRGTSK_NUM))
            {
                destSubformCtrl.setProp(PropInterface.PROP_TYPE_PRGTSK_NUM, null);
            }

            Property prop = destSubformCtrl.getProp(PropInterface.PROP_TYPE_PRGTSK_NUM);

            prop.SetTaskDefinitionId(TaskDefinitionId);
        }
コード例 #3
0
 /// <summary>
 ///   CTOR
 /// </summary>
 /// <param name = "ctrlRef">a reference to the control </param>
 internal RunTimeEvent(MgControl ctrlRef)
     : this(null, ctrlRef)
 {
     if (ctrlRef != null && getType() == Char.MinValue) // not initialized yet
     {
         // on the first time, if a TRIGGER property exists, parse the event and add it to the control
         Property prop = ctrlRef.getProp(PropInterface.PROP_TYPE_TRIGGER);
         if (prop != null)
         {
             var xmlParser = new XmlParser(prop.getValue());
             fillData(xmlParser, (Task)ctrlRef.getForm().getTask());
         }
     }
 }
コード例 #4
0
        /// <summary>
        /// Creates a command for a subform open
        /// </summary>
        /// <param name="subformCtrl"></param>
        /// <returns></returns>
        private LocalRunTimeCommandBase CreateSubformCallCommand(SubformOpenEventCommand command)
        {
            Task      task        = Manager.MGDataTable.GetTaskByID(command.TaskTag) as Task;
            MgForm    form        = task.getForm() as MgForm;
            MgControl subformCtrl = form.CtrlTab.getCtrl(command.DitIdx) as MgControl;
            Property  prop        = subformCtrl.getProp(PropInterface.PROP_TYPE_PRGTSK_NUM);

            return(new LocalRunTimeCommandOpenTask(prop.TaskDefinitionId)
            {
                ArgList = subformCtrl.ArgList,
                CallingTaskTag = task.getTaskTag(),
                PathParentTaskTag = task.getTaskTag(),
                SubformDitIdx = subformCtrl.getDitIdx()
            });
        }