Ejemplo n.º 1
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;
        }
Ejemplo n.º 2
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;
        }
Ejemplo 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;
        }
Ejemplo 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;
                }
            }
        }
Ejemplo n.º 5
0
        void browserPage_ButtonClick(object sender, DevExpress.XtraBars.Docking2010.ButtonEventArgs e)
        {
            Page page = sender as Page;

            if (page != null)
            {
                BaseModule module = page.Document.Control as BaseModule;
                if (module != null && module is ucBrowser)
                {
                    if (string.Equals("Refresh", e.Button.Properties.Tag))
                    {
                        ((ucBrowser)module).RefreshBrowser();
                    }
                    if (string.Equals("Home", e.Button.Properties.Tag))
                    {
                        ((ucBrowser)module).Navigate();
                    }
                }
            }
        }