Пример #1
0
        static public void Initilize(WinFormsEngine engine)
        {
            engine.AddGeneralModifier <Panel>(p => {
                p.AutoSize = true;
                p.Dock     = DockStyle.Fill;
            });
            engine.AddGeneralModifier <ContainerControl>(c => c.Dock = DockStyle.Fill);

            engine.AddSimpleInstancer <Panel>("DockPanel");
            engine.AddPublicPropertyAttributeLinksForType <Panel>();

            engine.AddSimpleInstancer("HorizontalLayout", () => new FlowLayoutPanel()
            {
                FlowDirection = FlowDirection.LeftToRight,
                WrapContents  = false
            });
            engine.AddSimpleInstancer("VerticalLayout", () => new FlowLayoutPanel()
            {
                FlowDirection = FlowDirection.TopDown,
                WrapContents  = false
            });
            engine.AddPublicPropertyAttributeLinksForType <FlowLayoutPanel>();

            engine.AddSimpleInstancer <TableLayoutPanel>("Table");
            engine.AddLinkInfo <TableLayoutPanel, string>("columns", (t, s) => t.SetColumnsDefinitionString(s), t => t.GetColumnsDefinitionString());
            engine.AddLinkInfo <TableLayoutPanel, string>("rows", (t, s) => t.SetRowsDefinitionString(s), t => t.GetRowsDefinitionString());

            engine.AddLinkInfo <Control, int>("column", (c, i) => c.SetColumn(i), c => c.GetColumn());
            engine.AddLinkInfo <Control, int>("row", (c, i) => c.SetRow(i), c => c.GetRow());

            engine.AddSimpleInstancer <SplitContainer>();
            engine.AddPublicPropertyAttributeLinksForType <SplitContainer>();
            engine.AddDynamicChildrenInfo <SplitContainer>("panel1", c => c.Panel1.Controls);
            engine.AddDynamicChildrenInfo <SplitContainer>("panel2", c => c.Panel2.Controls);
        }
Пример #2
0
        static public void Initilize(WinFormsEngine engine)
        {
            engine.AddSimpleInstancer <Button>();
            engine.AddPublicPropertyAttributeLinksForType <Button>();

            engine.AddFunctionInfo <Button>("click", (b, s) => b.Click += s.GetEventHandler());
        }
Пример #3
0
        static public void Initilize(WinFormsEngine engine)
        {
            engine.AddSimpleInstancer <TextBox>("TextField");
            engine.AddPublicPropertyAttributeLinksForType <TextBox>();

            engine.AddSimpleInstancer <NumericUpDown>("NumericField");
            engine.AddPublicPropertyAttributeLinksForType <NumericUpDown>();
        }
Пример #4
0
        static public void Initilize(WinFormsEngine engine)
        {
            engine.AddSimpleInstancer <TabControl>();
            engine.AddPublicPropertyAttributeLinksForType <TabControl>();

            engine.AddSimpleInstancer <TabPage>();
            engine.AddPublicPropertyAttributeLinksForType <TabPage>();
        }
Пример #5
0
        static public void Initilize(WinFormsEngine engine)
        {
            engine.AddSimpleInstancer <MenuStrip>("Menu");
            engine.AddPublicPropertyAttributeLinksForType <MenuStrip>();
            engine.AddDynamicChildrenInfo <MenuStrip>(m => m.Items);

            engine.AddSimpleInstancer <ToolStripMenuItem>("MenuItem");
            engine.AddPublicPropertyAttributeLinksForType <ToolStripMenuItem>();
            engine.AddDynamicChildrenInfo <ToolStripMenuItem>(i => i.DropDownItems);
            engine.AddFunctionInfo <ToolStripMenuItem>("click", (i, s) => i.Click += s.GetEventHandler());
        }
Пример #6
0
 static public void Initilize(WinFormsEngine engine)
 {
     engine.AddSimpleInstancer <ListBox>();
     engine.AddPublicPropertyAttributeLinksForType <ListBox>();
     engine.AddDynamicChildrenInfo <ListBox>(b => b.Items);
 }
Пример #7
0
 static public void Initilize(WinFormsEngine engine)
 {
     engine.AddSimpleInstancer <Form>("Window");
 }
Пример #8
0
 static public void Initilize(WinFormsEngine engine)
 {
     engine.AddSimpleInstancer <TrackBar>("Slider");
     engine.AddPublicPropertyAttributeLinksForType <TrackBar>();
 }
Пример #9
0
        static public void Initilize(WinFormsEngine engine)
        {
            engine.AddPublicPropertyAttributeLinksForType <Control>();

            engine.AddDynamicChildrenInfo <Control>(c => c.Controls);
        }