예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            RuntimeBlockBroker broker = initBroker();

            IBlockWeb bw     = XMLLoader.LoadBlockWeb("blockWeb-copy.xml", "a", broker, null);
            string    formId = bw.GetConnector("FormId").GetValue <string>();

            System.Windows.Forms.Form frm = bw[formId].ProcessRequest("GetUIElement") as System.Windows.Forms.Form;
            frm.ShowDialog();
        }
예제 #2
0
        private static RuntimeBlockBroker initBroker()
        {
            DBML.DBCore.file = @"d:\My\MyDev\AForm\DataSource\db.s3db";
            DBML.DBCore.initializeProvider(DBML.ProviderType.SQLite);


            //testAForm();
            RuntimeBlockBroker broker = new RuntimeBlockBroker();

            broker.AddBlock <WinForm>();
            broker.AddBlock <Label>();
            broker.AddBlock <TextBox>();
            broker.AddBlock <Button>();
            broker.AddBlock <RowFeeder>();
            broker.AddBlock <DataSaver>();
            broker.AddBlock <RequiredFieldValidator>();
            broker.AddBlock <DataGrid>();
            broker.AddBlock <GridFilterButton>();
            broker.AddBlock <LookupLabel>();
            broker.AddBlock <DropDown>();
            broker.AddBlock <TableLayout>();
            broker.AddBlock <CheckBox>();
            return(broker);
        }