Esempio n. 1
0
        void IMainForm.ShowAgent(Agent agent)
        {
            current = agent;
            BaseModule module = ucAgentsDocument.Control as BaseModule;

            if (module != null)
            {
                module.ShowModule(agent);
            }
            windowsUIView.Controller.Activate(ucAgentsDocument);
            current = null;
        }
Esempio n. 2
0
        void IMainForm.ShowHome(Home home)
        {
            current = home;
            BaseModule module = ucListingDocument.Control as BaseModule;

            if (module != null)
            {
                module.ShowModule(home);
            }
            windowsUIView.Controller.Activate(ucListingDocument);
            current = null;
        }
Esempio n. 3
0
        void windowsUIView_QueryControl(object sender, QueryControlEventArgs e)
        {
            BaseModule module = e.Document.Tag is BaseModule ? (BaseModule)e.Document.Tag :
                                Activator.CreateInstance(typeof(frmMain).Assembly.GetType(e.Document.ControlTypeName)) as BaseModule;

            module.InitModule(barManager1, windowsUIView);
            BaseTile tile = null;

            if (windowsUIView.Tiles.TryGetValue(e.Document, out tile))
            {
                TileItemFrame frame = tile.CurrentFrame;
                object        data  = current ?? ((frame != null) ? frame.Tag : null);
                module.ShowModule(data);
            }
            e.Document.Tag = module;
            e.Control      = module;
        }
Esempio n. 4
0
        void windowsUIView_TileClick(object sender, TileClickEventArgs e)
        {
            Tile tile = e.Tile as Tile;

            if (tile != null && tile.Document != null)
            {
                BaseModule module = tile.Document.Control as BaseModule;
                if (module != null)
                {
                    TileItemFrame frame = tile.CurrentFrame;
                    object        data  = (frame != null) ? frame.Tag : null;
                    module.ShowModule(data);
                }
                if (tile.ActivationTarget == page)
                {
                    page.Document = tile.Document;
                    page.Caption  = tile.Elements[0].Text;
                }
            }
        }