コード例 #1
0
        public WinFormMVE(MainForm form)
        {
            Encoding encoding   = new UTF8Encoding(false);
            char     line_split = '\n';

            s.S slib = new s.S(line_split, encoding);
            slib.addDef("read", new s.library.Read(line_split, encoding));
            slib.addDef("write", new s.library.Write());
            slib.addDef("cache", new s.library.Cache());
            //slib.addDef("build-element", new BuildElement());
            slib.loadLib(s.LibPath.instance().calculate("mve/index.lisp"), "mve", s.Node <Object> .extend(DOM.build(), null));
            s.Function      fun = slib.run("./s/index/index.lisp") as s.Function;
            s.Node <Object> o   = fun.exec(null) as s.Node <Object>;

            s.Function getElement = s.Node <Object> .kvs_find1st(o, "getElement") as s.Function;

            s.Function init = s.Node <Object> .kvs_find1st(o, "init") as s.Function;

            s.Function destroy = s.Node <Object> .kvs_find1st(o, "destroy") as s.Function;

            Control els = getElement.exec(null) as Control;

            form.Controls.Add(els);
            els.Dock = DockStyle.Fill;
            init.exec(null);
            form.FormClosing += new System.Windows.Forms.FormClosingEventHandler(form_FormClosing);
            this.destroy      = destroy;
        }
コード例 #2
0
        public override object exec(s.Node <object> args)
        {
            Control c = args.First() as Control;

            args = args.Rest();
            String key = args.First() as String;

            args = args.Rest();
            s.Function act = args.First() as s.Function;
            if (key == "click")
            {
                c.Click += new EventHandler(new SEventHandle(act).run);
            }
            return(null);
        }
コード例 #3
0
 public SEventHandle(s.Function fun)
 {
     this.fun = fun;
 }