Exemple #1
0
        /// <summary>
        /// 删除函数
        /// </summary>
        /// <param name="parentName">所属场景名</param>
        /// <param name="functionName">函数名</param>
        public void DashDeleteFunction(string parentName, string functionName)
        {
            Halation.project.GetScene(parentName).DeleteFunction(functionName);
            string callName = String.Format("{0}@{1}", functionName, Halation.projectTreeChosen.Parent.Text);

            HalationInvoker.RemoveScene(callName);
            this.RefreshProjectTree();
        }
Exemple #2
0
        public void CutCode(int begin, int count)
        {
            // 这里不能clear,因为命令栈会保存每次的复制项
            Halation.CopyItems = new List <ActionPackage>();
            IHalationCommand cmd = new MenuCutCommand(Halation.currentCodePackage, begin, count, Halation.CopyItems);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #3
0
        public void PasteCode(int insertLine)
        {
            if (Halation.CopyItems == null || Halation.CopyItems.Count == 0)
            {
                return;
            }
            IHalationCommand cmd = new MenuPasteCommand(Halation.currentCodePackage, insertLine, Halation.CopyItems);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
 /// <summary>
 /// 增加一个场景
 /// </summary>
 /// <param name="scenario">场景名</param>
 /// <returns>操作成功与否</returns>
 public bool AddScene(string scenario)
 {
     if (this.sceneDict.ContainsKey(scenario))
     {
         return(false);
     }
     sceneDict.Add(scenario, new ScenePackage(scenario));
     HalationInvoker.AddScene(scenario);
     return(true);
 }
Exemple #5
0
        /// <summary>
        /// 增加一个函数
        /// </summary>
        /// <param name="funcName">函数名</param>
        /// <param name="argv">形参列表</param>
        /// <returns>操作成功与否</returns>
        public bool AddFunction(string funcName, List <string> argv)
        {
            if (this.funcList.Find(x => x.functionName == funcName) != null)
            {
                return(false);
            }
            var nf = new FunctionPackage(funcName, this, argv);

            this.funcList.Add(nf);
            HalationInvoker.AddScene(nf.functionCallName);
            return(true);
        }
Exemple #6
0
        public void DeleteCode(int begin, int count)
        {
            for (int i = begin; i < begin + count; i++)
            {
                var act = Halation.currentCodePackage.GetAction(i);
                if (act.nodeName == "pad" && act.indent <= Halation.currentCodePackage.GetAction(begin).indent)
                {
                    MessageBox.Show(@"不能删除插入节点");
                    return;
                }
            }
            IHalationCommand cmd = new MenuDeleteCommand(Halation.currentCodePackage, begin, count);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #7
0
        public void DashEditButton(string id, string x, string y, string target, string type, string normal, string over, string on)
        {
            IHalationCommand cmd = new EditButtonCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, id, x, y, target, type, normal, over, on);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #8
0
        public void DashCstand(string id, string name, string face, string x, string y, string loc)
        {
            IHalationCommand cmd = new CstandCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, id, name, face, x, y, loc);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #9
0
        public void DashEditBg(string id, string filename, string ro)
        {
            IHalationCommand cmd = new EditBgCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, id, filename, ro);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #10
0
        public void DashBranch(List <string> branchItems)
        {
            IHalationCommand cmd = new BranchCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, branchItems);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #11
0
        public void DashEditSCamera(string name, string r, string c, string ro)
        {
            IHalationCommand cmd = new EditSCameraCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, name, r, c, ro);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #12
0
        public void DashEditVar(string op1, string opm, string op2)
        {
            IHalationCommand cmd = new EditVarCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, op1, opm, op2);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #13
0
        public void DashWait(string span)
        {
            IHalationCommand cmd = new WaitCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, span);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #14
0
        public void DashEditVocal(string name, string vid)
        {
            IHalationCommand cmd = new EditVocalCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, name, vid);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #15
0
        public void DashEditSwitches(string id, string state)
        {
            IHalationCommand cmd = new EditSwitchCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, id, state);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #16
0
        public void DashEditJump(string target, string filename = "", string cond = "")
        {
            IHalationCommand cmd = new EditJumpCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, filename, target, cond);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #17
0
        public void DashLabel(string label)
        {
            IHalationCommand cmd = new LabelCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, label);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #18
0
        public void DashPlaySE(string filename, string vol)
        {
            IHalationCommand cmd = new SECommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, filename, vol);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #19
0
        public void DashMsgLayerOpt(string layerId, string target, string value)
        {
            IHalationCommand cmd = new MsgLayerOptCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, layerId, target, value);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #20
0
        public void DashEditPicture(string id, string filename, string x, string y, string xscale, string yscale, string opacity, string ro)
        {
            IHalationCommand cmd = new EditPictureCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, id, filename, x, y, xscale, yscale, opacity, ro);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #21
0
        public void DashEditFuncall(string funCallName, string args)
        {
            IHalationCommand cmd = new EditFuncallCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, funCallName, args);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #22
0
        public void DashEditScript(string context)
        {
            IHalationCommand cmd = new EditScriptCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, context);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #23
0
        public void DashEditIf(bool containElse, string expr, string op1, string opr, string op2)
        {
            IHalationCommand cmd = new EditIfCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, containElse, expr, op1, opr, op2);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #24
0
 public bool MenuRedo()
 {
     HalationInvoker.Redo(Halation.currentScriptName);
     return(HalationInvoker.IsAbleRedo(Halation.currentScriptName));
 }
Exemple #25
0
        public void DashShutdown()
        {
            IHalationCommand cmd = new ShutdownCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #26
0
        public void DashEditMove(string name, string id, string time, string target, string dash, string acc)
        {
            IHalationCommand cmd = new EditMoveCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, name, id, time, target, dash, acc);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #27
0
        public void DashEditDeletebutton(string id)
        {
            IHalationCommand cmd = new EditDeletebuttonCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, id);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #28
0
        public void DashMsgLayer(string toLayerId)
        {
            IHalationCommand cmd = new MsgLayerCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, toLayerId);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
Exemple #29
0
 public bool IsAbleRedo()
 {
     return(HalationInvoker.IsAbleRedo(Halation.currentScriptName));
 }
Exemple #30
0
        public void DashTrans(string type)
        {
            IHalationCommand cmd = new TransCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, type);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }