예제 #1
0
 public FilePackageHelper(string string_1, int int_1, IActionType interface31_1, IStreamContractHelper interface9_1)
 {
     this.string_0      = string_1;
     this.int_0         = int_1;
     this.interface31_0 = interface31_1;
     this.interface9_0  = interface9_1;
 }
        private void testToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (SelectedSection == null)
            {
                return;
            }
            ToolStripMenuItem menu = sender as ToolStripMenuItem;
            IActionType       type = menu.Tag as IActionType;

            if (type != null)
            {
                ActionItem item = new ActionItem(type.DisplayName);
                item.Params =
                    new SectionParamCollection(MpeInstaller.ActionProviders[type.DisplayName].GetDefaultParams());
                ActionEdit dlg = new ActionEdit(Package, item);
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    if (SelectedSection != null)
                    {
                        SelectedSection.Actions.Items.Add(item);
                        list_actions.Items.Add(item);
                    }
                }
            }
        }
예제 #3
0
 public IEnumerable <ParameterValue> CreateParameterValues(IActionType actionProcessor)
 {
     if (actionProcessor.ParameterObject != null)
     {
         return(actionProcessor.ParameterObject.Select(x => new ParameterValue(x.Key, x.Value.GetType())));
     }
     return(new List <ParameterValue>());
 }
예제 #4
0
 public Class75()
 {
     this.bool_0        = false;
     this.string_0      = "";
     this.interface31_0 = null;
     this.interface9_0  = null;
     this.p2PSessionMessageTypeRoom_0 = null;
 }
예제 #5
0
 private ActionView ViewModelFromDomainModel(IActionType domainAction, int uniqueId)
 {
     return(new ActionView
     {
         Id = uniqueId,
         Name = domainAction.Name,
         Params = domainAction.ParamSchemas
                  .Select(ViewModelFromDomainModel)
                  .ToList()
     });
 }
예제 #6
0
        public IAction CreateAction(IActionConfig config, IActionType type)
        {
            if (config == null || !config.Enabled)
            {
                return(null);
            }

            lock (mActions.SyncRoot)
            {
                CAction action = mActions[config.Name] as CAction;
                if (action == null)
                {
                    if (type == null)
                    {
                        type = mSystemContext.ActionTypeManager.GetConfig(config.Type);
                    }

                    if (type != null && type.Enabled && !type.ActionClass.Equals(""))
                    {
                        if (!type.FileName.Equals(""))
                        {
                            action = CommonUtil.CreateInstance(SystemContext, type.FileName, type.ActionClass) as CAction;
                        }
                        else
                        {
                            action = CommonUtil.CreateInstance(type.ActionClass) as CAction;
                        }
                    }

                    if (action != null)
                    {
                        if (action.Init(this, config, type))
                        {
                            action.OnActionStateChanged += new ActionStateChanged(DoActionStateChanged);
                            action.OnBeforeAction       += new ActionEvent(DoBeforeAction);
                            action.OnAfterAction        += new ActionEvent(DoAfterAction);

                            mActions.Add(action.Name, action);

                            action.RefreshState();
                        }
                        else
                        {
                            return(null);
                        }
                    }
                }
                else
                {
                    action.Config = config;
                }
                return(action);
            }
        }
예제 #7
0
 public Class75(IActionType interface31_1, IStreamContractHelper interface9_1, P2PSessionMessageTypeRoom p2PSessionMessageTypeRoom_1)
 {
     this.bool_0        = false;
     this.string_0      = "";
     this.interface31_0 = null;
     this.interface9_0  = null;
     this.p2PSessionMessageTypeRoom_0 = null;
     this.interface31_0 = interface31_1;
     this.interface9_0  = interface9_1;
     this.p2PSessionMessageTypeRoom_0 = p2PSessionMessageTypeRoom_1;
 }
예제 #8
0
 public IAction CreateAction(IActionConfig config)
 {
     if (config != null)
     {
         IActionType type = mSystemContext.ActionTypeManager.GetConfig(config.Type);
         return(CreateAction(config, type));
     }
     else
     {
         return(null);
     }
 }
예제 #9
0
 public void ShowAddDialog(IActionType type)
 {
     Text     = "新增动作模块";
     mIsOk    = false;
     mManager = type.SystemContext.ActionConfigManager;
     mType    = type;
     mConfig  = null;
     InitTypeList(mManager.SystemContext);
     if (InitDialog())
     {
         ShowDialog();
     }
 }
예제 #10
0
파일: Action.cs 프로젝트: ewin66/Monitor
        public bool Init(IActionManager manager, IActionConfig config, IActionType type)
        {
            mConfig  = config;
            mManager = manager;
            mType    = type;

            if (!IsInit && Verify(ACOpts.Exec_Init))
            {
                if (mManager.SystemContext.MonitorSystem.IsLocal)
                {
                    if (InitAction())
                    {
                        State = ActionState.Init;

                        Config = mConfig;

                        if (!IsActive && mConfig.AutoRun)
                        {
                            this.Start();
                        }

                        return(true);
                    }
                }
                else if (mManager.SystemContext.RemoteManageClient != null)
                {
                    SystemContext.RemoteManageClient.OnConnected    -= new ClientConnectEvent(DoConnected);
                    SystemContext.RemoteManageClient.OnDisconnected -= new ClientConnectEvent(DoDisconnected);
                    SystemContext.RemoteManageClient.OnReceiveData  -= new ClientReceiveEvent(DoReceiveData);

                    SystemContext.RemoteManageClient.OnConnected    += new ClientConnectEvent(DoConnected);
                    SystemContext.RemoteManageClient.OnDisconnected += new ClientConnectEvent(DoDisconnected);
                    SystemContext.RemoteManageClient.OnReceiveData  += new ClientReceiveEvent(DoReceiveData);

                    IRemoteSystem rs = mManager.SystemContext.MonitorSystem as IRemoteSystem;
                    if (rs != null)
                    {
                        StringBuilder sb = new StringBuilder(mManager.SystemContext.RequestHeadInfo);
                        sb.Append(string.Format("{0}<Action>", Name));
                        sb.Append("Init<Command>");
                        sb.Append(string.Format("{0}<Type>", mType.ToXml()));
                        sb.Append(string.Format("{0}<Config>", mConfig.ToXml()));

                        return(mManager.SystemContext.RemoteManageClient.WaitReliableSend(rs.Config.IP, rs.Config.Port, sb.ToString()));
                    }
                }
            }
            return(false);
        }
예제 #11
0
        public void ShowAddDialog(IConfigManager <IActionType> manager)
        {
            Text     = "新增动作类型";
            mIsOk    = false;
            mConfig  = null;
            mManager = manager;

            if (mManager.SystemContext.MonitorSystem.Verify(manager.TypeName, "联动模块", (ushort)ACOpts.Manager_Add, false))
            {
                if (InitDialog())
                {
                    ShowDialog();
                }
            }
        }
예제 #12
0
        public override void ShowEditDialog(IConfig config)
        {
            Text     = "编辑动作类型 - [" + config.Name + "]";
            mIsOk    = false;
            mManager = null;
            mConfig  = config as IActionType;

            if (config.Verify(ACOpts.Manager_Modify, false))
            {
                if (InitDialog())
                {
                    ShowDialog();
                }
            }
        }
예제 #13
0
        public override void ShowEditDialog(IConfig config)
        {
            Text     = "编辑动作模块 - [" + config.Name + "]";
            mIsOk    = false;
            mManager = null;
            mType    = null;
            mConfig  = config as IActionConfig;

            if (config.Verify(ACOpts.Manager_Modify, false))
            {
                InitTypeList(config.SystemContext);
                if (InitDialog())
                {
                    ShowDialog();
                }
            }
        }
예제 #14
0
 public Node(Classification classification, IActionType preAction, IActionType action, IActionType postAction,
             ChoiceGroup children, Direction dir, AttackUI ui)
 {
     this.classification = classification;
     this.preAction      = preAction;
     this.action         = action;
     this.postAction     = postAction;
     if (children != null)
     {
         this.children = children;
     }
     else
     {
         this.children = new ChoiceGroup();
     }
     this.dir = dir;
     this.ui  = ui;
 }
예제 #15
0
        public static ScriptType Parse(string id, OrderedDictionary section, List <IActionType> types,
                                       Logger logger)
        {
            string name = id;
            List <ScriptAction> actions = new List <ScriptAction>();

            try
            {
                foreach (DictionaryEntry entry in section)
                {
                    if ((entry.Key as string) == "Name")
                    {
                        name = entry.Value as string;
                    }
                    else
                    {
                        string[] split = (entry.Value as string).Split(',');

                        if (split.Length < 2)
                        {
                            logger.Add("ScriptType " + id + ": Entry not in format: <Index>=<Action>,<Parameter>");
                        }
                        else
                        {
                            int         a          = int.Parse(split[0]);
                            int         p          = int.Parse(split[1]);
                            IActionType actionType = types.First(x => x.Code == (uint)a);

                            ScriptAction action = new ScriptAction(actionType, p);
                            actions.Add(action);
                        }
                    }
                }
            }
            catch (Exception)
            {
                string msg = "Error occured at ScriptType: [" + id + "]" + "\nPlease verify its format. Application will now close.";
                MessageBox.Show(msg, "Parse Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
                Application.Exit();
            }

            return(new ScriptType(id, name, actions));
        }
예제 #16
0
        protected bool SetConfig()
        {
            if (mConfig == null && mManager != null)
            {
                mConfig = mManager.CreateConfigInstance();
            }

            if (mConfig != null)
            {
                (mConfig as CConfig).Name = textBox_name.Text;
                mConfig.SetValue("Name", textBox_name.Text);

                mConfig.Desc            = textBox_desc.Text;
                mConfig.ConfigClass     = textBox_configClass.Text;
                mConfig.ConfigFormClass = textBox_formClass.Text;
                mConfig.ActionClass     = textBox_createClass.Text;
                mConfig.FileName        = textBox_fileName.Text;
                mConfig.Enabled         = checkBox_enabled.Checked;

                return(true);
            }
            return(false);
        }
예제 #17
0
 public static void AddActionProvider(IActionType ac)
 {
   ActionProviders.Add(ac.DisplayName, ac);
 }
 private IEnumerable <ParameterValue> CreateParemeterValues(IActionType actionType)
 {
     return(_automationService.CreateParameterValues(actionType));
 }
예제 #19
0
        public bool InitMonitor(IMonitorConfig config)
        {
            IVisionMonitorConfig vmConfig = config as IVisionMonitorConfig;

            if (vmConfig != null)
            {
                IVideoSourceConfig vsConfig = config.SystemContext.GetVideoSourceConfig(vmConfig.Watcher.ActiveVisionParamConfig.VSName);
                if (vsConfig != null)
                {
                    IVideoSourceType vsType = config.SystemContext.GetVideoSourceType(vsConfig.Type);

                    StringBuilder sb = new StringBuilder(config.SystemContext.RequestHeadInfo);
                    sb.Append(vsConfig.Name + "<VideoSource>");
                    sb.Append("Open;Play;InitKernel<Command>");
                    sb.Append(vsType.ToXml() + "<Type>");
                    sb.Append(vsConfig.ToXml() + "<Config><CommandSegment>");

                    IActionConfig  ac;
                    IActionParam[] apList;
                    if (!config.Watcher.ActiveActionParamConfig.LocalAlarmAction)
                    {
                        apList = config.Watcher.ActiveActionParamConfig.GetAlarmActionList();
                        if (apList != null)
                        {
                            foreach (IActionParam pc in apList)
                            {
                                ac = config.SystemContext.ActionConfigManager.GetConfig(pc.Name);
                                if (ac != null)
                                {
                                    IActionType at = config.SystemContext.ActionTypeManager.GetConfig(ac.Type);

                                    if (at != null)
                                    {
                                        sb.Append(ac.Name + "<Action>");
                                        sb.Append("Init;Start<Command>");
                                        sb.Append(at.ToXml() + "<Type>");
                                        sb.Append(ac.ToXml() + "<Config><CommandSegment>");
                                    }
                                }
                            }
                        }
                    }
                    if (!config.Watcher.ActiveActionParamConfig.LocalTransactAction)
                    {
                        apList = config.Watcher.ActiveActionParamConfig.GetTransactActionList();
                        if (apList != null)
                        {
                            foreach (IActionParam pc in apList)
                            {
                                ac = config.SystemContext.ActionConfigManager.GetConfig(pc.Name);
                                if (ac != null)
                                {
                                    IActionType at = config.SystemContext.ActionTypeManager.GetConfig(ac.Type);

                                    if (at != null)
                                    {
                                        sb.Append(ac.Name + "<Action>");
                                        sb.Append("Init;Start<Command>");
                                        sb.Append(at.ToXml() + "<Type>");
                                        sb.Append(ac.ToXml() + "<Config><CommandSegment>");
                                    }
                                }
                            }
                        }
                    }

                    IMonitorType vuType = config.SystemContext.GetMonitorType(config.Type);

                    sb.Append(config.Name + "<Monitor>");
                    sb.Append("Init<Command>");
                    sb.Append(vuType.ToXml() + "<Type>");
                    sb.Append(config.ToXml() + "<Config>");

                    IRemoteSystem rs = config.SystemContext.MonitorSystem as IRemoteSystem;
                    if (rs != null)
                    {
                        return(WaitReliableSend(rs.Config.IP, rs.Config.Port, sb.ToString()));
                    }
                    else
                    {
                        return(WaitReliableSend(config.Host, config.Port, sb.ToString()));
                    }
                }
            }
            else
            {
                IMonitorType vuType = config.SystemContext.GetMonitorType(config.Type);

                StringBuilder sb = new StringBuilder(config.SystemContext.RequestHeadInfo);
                sb.Append(config.Name + "<Monitor>");
                sb.Append("Init<Command>");
                sb.Append(vuType.ToXml() + "<Type>");
                sb.Append(config.ToXml() + "<Config>");

                IRemoteSystem rs = config.SystemContext.MonitorSystem as IRemoteSystem;
                if (rs != null)
                {
                    return(WaitReliableSend(rs.Config.IP, rs.Config.Port, sb.ToString()));
                }
                else
                {
                    return(WaitReliableSend(config.Host, config.Port, sb.ToString()));
                }
            }
            return(false);
        }
예제 #20
0
 public ScriptAction(ScriptAction other)
 {
     this.action = other.action;
     this.param  = other.param;
     this.offset = other.offset;
 }
예제 #21
0
 public ScriptAction(IActionType action, int param)
 {
     this.action = action;
     GetOffset(param, out this.param, out offset);
 }
예제 #22
0
 public CHKAlarmOutAction(IActionManager manager, IActionConfig config, IActionType type)
     : base(manager, config, type)
 {
 }
예제 #23
0
파일: Action.cs 프로젝트: ewin66/Monitor
        public CAction(IActionManager manager, IActionConfig config, IActionType type)
        {
            mSyncActionEvent = DoActionEvent;

            Init(manager, config, type);
        }
예제 #24
0
파일: Class43.cs 프로젝트: jollitycn/JGNet
 public void method_5(IActionType interface31_1)
 {
     this.interface31_0 = interface31_1;
 }
예제 #25
0
 public CSoundAction(IActionManager manager, IActionConfig config, IActionType type)
     : base(manager, config, type)
 {
 }
예제 #26
0
 public IEnumerable<ParameterValue> CreateParameterValues(IActionType actionProcessor)
 {
     if (actionProcessor.ParameterObject != null)
         return actionProcessor.ParameterObject.Select(x => new ParameterValue(x.Key, x.Value.GetType()));
     return new List<ParameterValue>();
 }
예제 #27
0
 public static void AddActionProvider(IActionType ac)
 {
     ActionProviders.Add(ac.DisplayName, ac);
 }
예제 #28
0
        public static void AddRemoteConfig(IMonitorSystemContext context, string name, string data, bool saveConfig)
        {
            IConfig config = null;

            if (data.StartsWith("<Monitor>"))
            {
                config = context.MonitorConfigManager.GetConfig(name);
                if (config == null)
                {
                    IMonitorConfig monitorConfig = context.MonitorConfigManager.BuildConfigFromXml(data) as IMonitorConfig;
                    if (monitorConfig != null)
                    {
                        context.MonitorConfigManager.Append(monitorConfig, saveConfig);
                    }
                }
            }
            else if (data.StartsWith("<MonitorType>"))
            {
                config = context.MonitorTypeManager.GetConfig(name);
                if (config == null)
                {
                    IMonitorType monitorType = context.MonitorTypeManager.BuildConfigFromXml(data) as IMonitorType;
                    if (monitorType != null)
                    {
                        context.MonitorTypeManager.Append(monitorType, saveConfig);
                    }
                }
            }
            else if (data.StartsWith("<VideoSource>"))
            {
                config = context.VideoSourceConfigManager.GetConfig(name);
                if (config == null)
                {
                    IVideoSourceConfig vsConfig = context.VideoSourceConfigManager.BuildConfigFromXml(data) as IVideoSourceConfig;
                    if (vsConfig != null)
                    {
                        context.VideoSourceConfigManager.Append(vsConfig, saveConfig);
                    }
                }
            }
            else if (data.StartsWith("<VideoSourceType>"))
            {
                config = context.VideoSourceTypeManager.GetConfig(name);
                if (config == null)
                {
                    IVideoSourceType vsType = context.VideoSourceTypeManager.BuildConfigFromXml(data) as IVideoSourceType;
                    if (vsType != null)
                    {
                        context.VideoSourceTypeManager.Append(vsType, saveConfig);
                    }
                }
            }
            else if (data.StartsWith("<Action>"))
            {
                config = context.ActionConfigManager.GetConfig(name);
                if (config == null)
                {
                    IActionConfig actionConfig = context.ActionConfigManager.BuildConfigFromXml(data) as IActionConfig;
                    if (actionConfig != null)
                    {
                        context.ActionConfigManager.Append(actionConfig, saveConfig);
                    }
                }
            }
            else if (data.StartsWith("<ActionType>"))
            {
                config = context.ActionTypeManager.GetConfig(name);
                if (config == null)
                {
                    IActionType actionType = context.ActionTypeManager.BuildConfigFromXml(data) as IActionType;
                    if (actionType != null)
                    {
                        context.ActionTypeManager.Append(actionType, saveConfig);
                    }
                }
            }
            else if (data.StartsWith("<Scheduler>"))
            {
                config = context.SchedulerConfigManager.GetConfig(name);
                if (config == null)
                {
                    ISchedulerConfig schedulerConfig = context.SchedulerConfigManager.BuildConfigFromXml(data) as ISchedulerConfig;
                    if (schedulerConfig != null)
                    {
                        context.SchedulerConfigManager.Append(schedulerConfig, saveConfig);
                    }
                }
            }
            else if (data.StartsWith("<SchedulerType>"))
            {
                config = context.SchedulerTypeManager.GetConfig(name);
                if (config == null)
                {
                    ISchedulerType schedulerType = context.SchedulerTypeManager.BuildConfigFromXml(data) as ISchedulerType;
                    if (schedulerType != null)
                    {
                        context.SchedulerTypeManager.Append(schedulerType, saveConfig);
                    }
                }
            }
            else if (data.StartsWith("<Task>"))
            {
                config = context.TaskConfigManager.GetConfig(name);
                if (config == null)
                {
                    ITaskConfig taskConfig = context.TaskConfigManager.BuildConfigFromXml(data) as ITaskConfig;
                    if (taskConfig != null)
                    {
                        context.TaskConfigManager.Append(taskConfig, saveConfig);
                    }
                }
            }
            else if (data.StartsWith("<TaskType>"))
            {
                config = context.TaskTypeManager.GetConfig(name);
                if (config == null)
                {
                    ITaskType taskType = context.TaskTypeManager.BuildConfigFromXml(data) as ITaskType;
                    if (taskType != null)
                    {
                        context.TaskTypeManager.Append(taskType, saveConfig);
                    }
                }
            }
            else if (data.StartsWith("<RemoteSystem>"))
            {
                config = context.RemoteSystemConfigManager.GetConfig(name);
                if (config == null)
                {
                    IRemoteSystemConfig rsConfig = context.RemoteSystemConfigManager.BuildConfigFromXml(data) as IRemoteSystemConfig;
                    if (rsConfig != null)
                    {
                        context.RemoteSystemConfigManager.Append(rsConfig, saveConfig);
                    }
                }
            }
            else if (data.StartsWith("<Role>"))
            {
                config = context.RoleConfigManager.GetConfig(name);
                if (config == null)
                {
                    IRoleConfig roleConfig = context.RoleConfigManager.BuildConfigFromXml(data) as IRoleConfig;
                    if (roleConfig != null)
                    {
                        context.RoleConfigManager.Append(roleConfig, saveConfig);
                    }
                }
            }
            else if (data.StartsWith("<User>"))
            {
                config = context.UserConfigManager.GetConfig(name);
                if (config == null)
                {
                    IUserConfig userConfig = context.UserConfigManager.BuildConfigFromXml(data) as IUserConfig;
                    if (userConfig != null)
                    {
                        context.UserConfigManager.Append(userConfig, saveConfig);
                    }
                }
            }
        }
예제 #29
0
 public CMonitorAction(IActionManager manager, IActionConfig config, IActionType type)
     : base(manager, config, type)
 {
 }
예제 #30
0
        public I CreateConfigInstance(string type, string name)
        {
            if (!type.Equals(""))
            {
                if (TypeName.Equals("Actions"))
                {
                    IActionType actionType = SystemContext.ActionTypeManager.GetConfig(type);
                    if (actionType != null)
                    {
                        return(CreateConfigInstance(actionType, name));
                    }
                }
                else if (TypeName.Equals("Schedulers"))
                {
                    ISchedulerType schedulerType = SystemContext.SchedulerTypeManager.GetConfig(type);
                    if (schedulerType != null)
                    {
                        return(CreateConfigInstance(schedulerType, name));
                    }
                }
                else if (TypeName.Equals("Tasks"))
                {
                    ITaskType taskType = SystemContext.TaskTypeManager.GetConfig(type);
                    if (taskType != null)
                    {
                        return(CreateConfigInstance(taskType, name));
                    }
                }
                else if (TypeName.Equals("Monitors"))
                {
                    IMonitorType monitorType = SystemContext.MonitorTypeManager.GetConfig(type);
                    if (monitorType != null)
                    {
                        return(CreateConfigInstance(monitorType, name));
                    }
                }
                else if (TypeName.Equals("VideoSources"))
                {
                    IVideoSourceType vsType = SystemContext.VideoSourceTypeManager.GetConfig(type);
                    if (vsType != null)
                    {
                        return(CreateConfigInstance(vsType, name));
                    }
                }
            }

            IConfig config = CreateConfigInstance();

            if (config != null)
            {
                if (name != null)
                {
                    ((CConfig)config).Name = name;
                }

                ITypeConfig tc = config as ITypeConfig;
                if (tc != null)
                {
                    tc.Type = type;
                }
            }

            return((I)config);
        }
예제 #31
0
파일: Task.cs 프로젝트: ewin66/Monitor
        public bool Init(ITaskManager manager, ITaskConfig config, ITaskType type)
        {
            mConfig  = config;
            mManager = manager;
            mType    = type;

            if (!IsInit && Verify(ACOpts.Exec_Init))
            {
                if (mManager.SystemContext.MonitorSystem.IsLocal)
                {
                    if (InitTask())
                    {
                        State = TaskState.Init;

                        Config = mConfig;

                        if (!IsActive && mConfig.AutoRun)
                        {
                            this.Start();
                        }

                        return(true);
                    }
                }
                else if (mManager.SystemContext.RemoteManageClient != null)
                {
                    SystemContext.RemoteManageClient.OnConnected    -= new ClientConnectEvent(DoConnected);
                    SystemContext.RemoteManageClient.OnDisconnected -= new ClientConnectEvent(DoDisconnected);
                    SystemContext.RemoteManageClient.OnReceiveData  -= new ClientReceiveEvent(DoReceiveData);

                    SystemContext.RemoteManageClient.OnConnected    += new ClientConnectEvent(DoConnected);
                    SystemContext.RemoteManageClient.OnDisconnected += new ClientConnectEvent(DoDisconnected);
                    SystemContext.RemoteManageClient.OnReceiveData  += new ClientReceiveEvent(DoReceiveData);

                    IRemoteSystem rs = mManager.SystemContext.MonitorSystem as IRemoteSystem;
                    if (rs != null)
                    {
                        StringBuilder sb = new StringBuilder(mManager.SystemContext.RequestHeadInfo);

                        ISchedulerConfig sc = mManager.SystemContext.SchedulerConfigManager.GetConfig(mConfig.Scheduler);
                        if (sc != null)
                        {
                            ISchedulerType st = mManager.SystemContext.SchedulerTypeManager.GetConfig(sc.Type);
                            if (st != null)
                            {
                                sb.Append(sc.Name + "<Scheduler>");
                                sb.Append("InitConfig<Command>");
                                sb.Append(st.ToXml() + "<Type>");
                                sb.Append(sc.ToXml() + "<Config><CommandSegment>");
                            }
                        }

                        IActionConfig  ac;
                        IActionParam[] apList = mConfig.GetActionList();
                        if (apList != null)
                        {
                            foreach (IActionParam pc in apList)
                            {
                                ac = mManager.SystemContext.ActionConfigManager.GetConfig(pc.Name);
                                if (ac != null)
                                {
                                    IActionType at = mManager.SystemContext.ActionTypeManager.GetConfig(ac.Type);

                                    if (at != null)
                                    {
                                        sb.Append(ac.Name + "<Action>");
                                        sb.Append("Init;Start<Command>");
                                        sb.Append(at.ToXml() + "<Type>");
                                        sb.Append(ac.ToXml() + "<Config><CommandSegment>");
                                    }
                                }
                            }
                        }

                        sb.Append(Name + "<Task>");
                        sb.Append("Init<Command>");
                        sb.Append(mType.ToXml() + "<Type>");
                        sb.Append(mConfig.ToXml() + "<Config>");

                        return(mManager.SystemContext.RemoteManageClient.WaitReliableSend(rs.Config.IP, rs.Config.Port, sb.ToString()));
                    }
                }
                return(false);
            }
            else
            {
                return(true);
            }
        }
예제 #32
0
 public void SetInterface31(IActionType interface31_1)
 {
     this.interface31_0 = interface31_1;
 }