/// <summary> /// 按钮:函数调用 /// </summary> private void button29_Click(object sender, EventArgs e) { FunctionCallForm fcf = new FunctionCallForm(); fcf.ShowDialog(this); }
/// <summary> /// 菜单:编辑 /// </summary> private void toolStripMenuItem5_Click(object sender, EventArgs e) { if (this.codeListBox.SelectedIndex == -1) { return; } var editPack = this.core.GetEditPackage(this.codeListBox.SelectedIndex); var editIndex = this.codeListBox.SelectedIndex; switch (editPack.nodeType) { case ActionPackageType.act_dialog: var editDialogDf = new DialogForm("显示对话", true, editPack.argsDict["context"].valueExp); editDialogDf.ShowDialog(this); break; case ActionPackageType.script: var editScriptDf = new DialogForm("代码片段", true, editPack.argsDict["context"].valueExp); editScriptDf.ShowDialog(this); break; case ActionPackageType.notation: var editNf = new NotationForm(true, editPack.argsDict["context"].valueExp); editNf.ShowDialog(this); break; case ActionPackageType.act_wait: var editWf = new WaitForm(true, Convert.ToInt32(editPack.argsDict["time"].valueExp)); editWf.ShowDialog(this); break; case ActionPackageType.act_a: var editAf = new AForm(true, editPack.argsDict["name"].valueExp, editPack.argsDict["face"].valueExp, editPack.argsDict["loc"].valueExp, editPack.argsDict["vid"].valueExp); editAf.ShowDialog(this); break; case ActionPackageType.act_picture: var editPf = new PicturesForm(true, editPack.argsDict["id"].valueExp, editPack.argsDict["filename"].valueExp, editPack.argsDict["x"].valueExp, editPack.argsDict["y"].valueExp, editPack.argsDict["xscale"].valueExp, editPack.argsDict["yscale"].valueExp, editPack.argsDict["opacity"].valueExp, editPack.argsDict["ro"].valueExp); editPf.ShowDialog(this); break; case ActionPackageType.act_call: var editFcf = new FunctionCallForm(true, editPack.argsDict["name"].valueExp, editPack.argsDict["sign"].valueExp); editFcf.ShowDialog(this); break; case ActionPackageType.act_move: var editMf = new MoveForm(true, editPack.argsDict["name"].valueExp, editPack.argsDict["id"].valueExp, editPack.argsDict["time"].valueExp, editPack.argsDict["target"].valueExp, editPack.argsDict["dash"].valueExp, editPack.argsDict["acc"].valueExp); editMf.ShowDialog(this); break; case ActionPackageType.act_button: var editBf = new ButtonForm(true, editPack.argsDict["id"].valueExp, editPack.argsDict["x"].valueExp, editPack.argsDict["y"].valueExp, editPack.argsDict["target"].valueExp, editPack.argsDict["type"].valueExp, editPack.argsDict["normal"].valueExp, editPack.argsDict["over"].valueExp, editPack.argsDict["on"].valueExp); editBf.ShowDialog(this); break; case ActionPackageType.act_jump: var editJf = new JumpForm(true, editPack.argsDict["filename"].valueExp, editPack.argsDict["target"].valueExp, editPack.argsDict["cond"].valueExp); editJf.ShowDialog(this); break; case ActionPackageType.act_label: var editLf = new LabelForm(true, editPack.argsDict["name"].valueExp); editLf.ShowDialog(this); break; case ActionPackageType.act_vocal: var editVocalf = new VocalForm(true, editPack.argsDict["name"].valueExp, editPack.argsDict["vid"].valueExp); editVocalf.ShowDialog(); break; case ActionPackageType.act_scamera: var editScf = new SCameraForm(true, editPack.argsDict["name"].valueExp, editPack.argsDict["x"].valueExp, editPack.argsDict["y"].valueExp, editPack.argsDict["ro"].valueExp); editScf.ShowDialog(this); break; case ActionPackageType.act_deletepicture: var editDpf = new DeleteViewForm(0, true, editPack.argsDict["id"].valueExp); editDpf.ShowDialog(this); break; case ActionPackageType.act_deletecstand: var editDcf = new DeleteViewForm(1, true, editPack.argsDict["id"].valueExp); editDcf.ShowDialog(this); break; case ActionPackageType.act_deletebutton: var editDsf = new DeleteViewForm(2, true, editPack.argsDict["id"].valueExp); editDsf.ShowDialog(this); break; case ActionPackageType.act_bg: var editBgf = new BgForm(true, editPack.argsDict["id"].valueExp, editPack.argsDict["filename"].valueExp, editPack.argsDict["ro"].valueExp); editBgf.ShowDialog(this); break; case ActionPackageType.act_var: var editVf = new VarForm(true, editPack.argsDict["opLeft"].valueExp, editPack.argsDict["op"].valueExp, editPack.argsDict["opRight"].valueExp); editVf.ShowDialog(this); break; case ActionPackageType.act_if: var editIff = new IfForm(true, Convert.ToBoolean(editPack.argsDict["?elseflag"].valueExp), editPack.argsDict["expr"].valueExp, editPack.argsDict["op1"].valueExp, editPack.argsDict["opr"].valueExp, editPack.argsDict["op2"].valueExp); editIff.ShowDialog(this); break; case ActionPackageType.act_switch: var editSwf = new SwitchesForm("开关操作", true, editPack.argsDict["id"].valueExp, editPack.argsDict["dash"].valueExp); editSwf.ShowDialog(this); break; //case ActionPackageType.act_bgm: // MusicForm editBgmf = new MusicForm("插入音乐", 0, true); // editBgmf.ShowDialog(this); // break; default: MessageBox.Show(@"该项目不支持编辑"); break; } this.codeListBox.SelectedIndex = editIndex; }