예제 #1
0
파일: Script.cs 프로젝트: zxyxz/GDX-RPG
        public void setScript(string script)
        {
            this.script = script;
            getScript   = translate = null;
            onClick     = null;
            try {
                Form1.m_reader.execute(this, script);
            } catch (Exception) {
                //throw 个激霸
            }

            //set default opaction
            if (getScript == null)
            {
                getScript = () => script;
            }
            if (translate == null)
            {
                translate = () => getScript();
            }
            if (onClick == null)
            {
                onClick = () => {
                    var form = new ScriptEditForm().init(this);
                    form.ShowDialog();
                }
            }
            ;
            modify = true;
        }
예제 #2
0
        private void 编辑源文件ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Script script = currentSelectScript();

            if (script == null)
            {
                return;
            }
            var form = new ScriptEditForm().init(script);

            form.ShowDialog();
        }