Esempio n. 1
0
        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;
        }
Esempio n. 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();
        }