void rootCanvas_Loaded(object sender, RoutedEventArgs e)
        {
            Explorer explorer = new Explorer("../../../Config.xml", "../../../Sample.xml");
            ExplorerContentMap rootMap = explorer.getRootContentMap();

            backgroundMapLayer = new LayerBackgroundMap(rootCanvas, rootMap);
            contentCardsLayer = new LayerContentCards(rootCanvas);

            //Link some events up between the layers. We can enable and disable features this way
            backgroundMapLayer.OnRegionClick += contentCardsLayer.drawRegionWindow;
            backgroundMapLayer.OnRegionClick += backgroundMapLayer.drawRegionOverlay;
            //contentCardsLayer.OnContentCardTouchUp += dockLayer.checkDraggedOn;
            contentCardsLayer.OnContentCardOffscreen += backgroundMapLayer.removeRegionOverlay;
            contentCardsLayer.OnContentCardOffscreen += contentCardsLayer.removeContentCard;
               // dockLayer.OnContentCardDroppedOnDock += backgroundMapLayer.removeRegionOverlay;
               // dockLayer.OnContentCardDroppedOnDock += contentCardsLayer.removeContentCard;
               // contentCardsLayer.OnContentCardsHeldDown += dockLayer.showUnusedDocks;
               // contentCardsLayer.OnContentCardsReleased += dockLayer.hideUnusedDocks;
        }
Exemplo n.º 2
0
        public Window1()
        {
            InitializeComponent();
            TableManager.RunTable(this, LayoutRoot);
            try
            {
                Explorer explorer = new Explorer("../../../Config.xml", "../../../Sample.xml");
                ExplorerContentMap rootMap = explorer.getRootContentMap();
                Canvas c = new Canvas();
                DraggableBackgroundMap backgroundMap = new DraggableBackgroundMap(rootMap);
                c.Children.Add(backgroundMap);
                LayoutRoot.Children.Add(c);

            }
            catch (Exception e)
            {
                System.Console.WriteLine("Got exception: " + e);
            }

            TableManager.IsFullScreen = true;
        }