Ejemplo n.º 1
0
        public void ShowLayoutSimpleTest()
        {
            TestTable testTable = TestTable.CreateInstance();
            var       pn        = SetTestPanelUIBO(testTable);
            object    id        = null;

            pn.LoadData(ref id);
            ILayout currentLayout = pn.GetLayout();
            Control container;

            if (currentLayout != null)
            {
                currentLayout.AddControlToMainContainer(pn);

                //pn.CreateActionPanels();

                container = (Control)currentLayout;
            }
            else
            {
                container = pn;
            }

            var frm = new Form
            {
                StartPosition = FormStartPosition.CenterScreen,
                Location      = new Point(50, 50),
                Size          = new Size(700, 600)
            };

            frm.Controls.Add(container);
            container.Dock = DockStyle.Fill;
            frm.ShowDialog();
        }
Ejemplo n.º 2
0
        public void RunActionShowFormTest()
        {
            TestTable testTable = TestTable.CreateInstance();

            TestTable.Accessor accessor = TestTable.Accessor.Instance(null);
            //наполняем тестовыми действиями
            var action = new ActionMetaItem("Action1", ActionTypes.Action, true, null, null, null, null, null);

            /*
             * var action = new ActionMetaItem("Action1", "Show another form", "icon 1", "tooltip 1", String.Empty, String.Empty, String.Empty, String.Empty, null, ActionsAlignment.Right,
             *                              ActionsPanelType.Main, ActionsAppType.All, true, true, false, null, null, null, ActionTypes.ShowForm, ActionTypes.ShowForm, ActionTypes.Unknown, String.Empty)
             *               {BasePanelTypeName = "TestPanelAdvancedUI"};
             * accessor.Actions.Add(action);
             */
            //TODO здесь должен быть BaseFormManager, который создаст Layout и поместит на него панель
            var    pn = SetTestPanelUIBO(testTable);
            object id = null;

            pn.LoadData(ref id);

            ILayout currentLayout = pn.GetLayout();
            Control container;

            if (currentLayout != null)
            {
                currentLayout.AddControlToMainContainer(pn);
                currentLayout.AddActions(pn, testTable);
                container = (Control)currentLayout;
            }
            else
            {
                container = pn;
            }

            var frm = new Form
            {
                StartPosition = FormStartPosition.CenterScreen,
                Location      = new Point(50, 50),
                Size          = new Size(700, 600)
            };

            frm.Controls.Add(container);
            container.Dock = DockStyle.Fill;
            frm.ShowDialog();

            //BaseFormManager.ShowNormal(typeof(testPanelUI), null, null, 700, 500);
            //BaseFormManager.ShowNormal(typeof(TestTable), null, null, 700, 500);
        }
Ejemplo n.º 3
0
        public void ShowBaseLayoutTest()
        {
            TestTable testTable = TestTable.CreateInstance();

            TestTable.Accessor accessor = TestTable.Accessor.Instance(null);
            //наполняем тестовыми действиями
            accessor.Actions.Add(new ActionMetaItem("Action1", ActionTypes.Action, true, null, null, null, null, null));
            accessor.Actions.Add(new ActionMetaItem("Action2", ActionTypes.Action, true, null, null, null, null, null));
            accessor.Actions.Add(new ActionMetaItem("Action3", ActionTypes.Action, true, null, null, null, null, null));

            /*
             * accessor.Actions.Add(new ActionMetaItem("Action1", "This is action 1", "icon 1", "tooltip 1", String.Empty, String.Empty, String.Empty, String.Empty, null, ActionsAlignment.Left, ActionsPanelType.Main, ActionsAppType.All, true,
             *                                      true, false, null, null, null, ActionTypes.Action, ActionTypes.Action, ActionTypes.Unknown, String.Empty));
             * accessor.Actions.Add(new ActionMetaItem("Action2", "This is action 2", "icon 2", "tooltip 2", String.Empty, String.Empty, String.Empty, String.Empty, null, ActionsAlignment.Left, ActionsPanelType.Main, ActionsAppType.All, true,
             *                                      true, false, null, null, null, ActionTypes.Action, ActionTypes.Action, ActionTypes.Unknown, String.Empty));
             * accessor.Actions.Add(new ActionMetaItem("Action3", "Some another action 3", "icon 3", "tooltip 3", String.Empty, String.Empty, String.Empty, String.Empty, null, ActionsAlignment.Left, ActionsPanelType.Top, ActionsAppType.All, true,
             *                                      true, false, null, null, null, ActionTypes.Action, ActionTypes.Action, ActionTypes.Unknown, String.Empty));
             */
            //TODO здесь должен быть BaseFormManager, который создаст Layout и поместит на него панель
            var    pn = SetTestPanelUIBO(testTable);
            object id = null;

            pn.LoadData(ref id);
            ILayout currentLayout = pn.GetLayout();
            Control container;

            if (currentLayout != null)
            {
                currentLayout.AddControlToMainContainer(pn);
                container = (Control)currentLayout;
            }
            else
            {
                container = pn;
            }

            var frm = new Form
            {
                StartPosition = FormStartPosition.CenterScreen,
                Location      = new Point(50, 50),
                Size          = new Size(700, 600)
            };

            frm.Controls.Add(container);
            container.Dock = DockStyle.Fill;
            frm.ShowDialog();
        }