示例#1
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);
        }
示例#2
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);
        }
示例#3
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);
        }
示例#4
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);
        }
示例#5
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);
        }
示例#6
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);
        }
示例#7
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);
        }
示例#8
0
        public void DashShutdown()
        {
            IHalationCommand cmd = new ShutdownCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
示例#9
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);
        }
示例#10
0
        public void DashEditScript(string context)
        {
            IHalationCommand cmd = new EditScriptCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, context);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
示例#11
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);
        }
示例#12
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);
        }
示例#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);
        }
示例#14
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);
        }
示例#15
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);
        }
示例#16
0
        public void DashLabel(string label)
        {
            IHalationCommand cmd = new LabelCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, label);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
示例#17
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);
        }
示例#18
0
        public void DashEditDeletebutton(string id)
        {
            IHalationCommand cmd = new EditDeletebuttonCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, id);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
示例#19
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);
        }
示例#20
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);
        }
示例#21
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);
        }
示例#22
0
        public void DashMsgLayer(string toLayerId)
        {
            IHalationCommand cmd = new MsgLayerCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, toLayerId);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
示例#23
0
        public void DashTrans(string type)
        {
            IHalationCommand cmd = new TransCommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, type);

            HalationInvoker.Dash(Halation.currentScriptName, cmd);
        }
示例#24
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);
        }
示例#25
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);
        }
示例#26
0
        public void DashEditA(string toName, string toFace, string toLoc, string toVocal)
        {
            IHalationCommand cmd = new EditACommand(Halation.CurrentSelectedLine, this.GetIndent(Halation.CurrentSelectedLine), Halation.currentCodePackage, toName, toFace, toLoc, toVocal);

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