/// <summary>
 /// 添加一个脚本
 /// </summary>
 /// <param name="script"></param>
 public void AddScript(StackingMainLayout script)
 {
     if (Scripts.Contains(script) == false)
     {
         Scripts.Add(script);
         ItemAddEvent?.Invoke(script);
     }
 }
        /// <summary>
        /// 添加一个脚本
        /// </summary>
        /// <param name="script"></param>
        public StackingMainLayout AddScript()
        {
            IScriptLayout script = new IScriptLayout();

            script.ScriptName = GetScriptName();
            StackingMainLayout stackingMainLayout = StackingMainLayout.InstanceStackingMainLayout(script);

            Scripts.Add(stackingMainLayout);

            ItemAddEvent?.Invoke(stackingMainLayout);
            return(stackingMainLayout);
        }
Exemplo n.º 3
0
 protected virtual void OnItemAdd(Characteristics characteristics)
 {
     ItemAddEvent?.Invoke(characteristics);
 }