예제 #1
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {

            Params = new GlymaParameters(e.InitParams);

            var mapLoadParamsManager = new MapLoadParamsManager();
            //if the query string contains values pass them on

            if (mapLoadParamsManager.IsValid(HtmlPage.Document.QueryString, MapLoadType.QueryString))
            {
                RootVisual = new MainPage(mapLoadParamsManager);
            }
            else if (mapLoadParamsManager.IsValid(e.InitParams, MapLoadType.InitParams))
            {
                RootVisual = new MainPage(mapLoadParamsManager);
            }
            else if (mapLoadParamsManager.IsValid(CookieManager.ReadAll(), MapLoadType.Cookie))
            {
                RootVisual = new MainPage(mapLoadParamsManager);
            }
            else
            {
                RootVisual = new MainPage();
            }
            RootVisual.MouseRightButtonDown += RootVisualOnMouseRightButtonDown;
        }
예제 #2
0
 /// <summary>
 /// The main page will pass through the DomainUid and NodeUid for the initial map to the map control within it
 /// </summary>
 /// <param name="mapLoadParamsManager">either the values from the Silverlight initparams, query string or cookie</param>
 public MainPage(MapLoadParamsManager mapLoadParamsManager)
     : this()
 {
     DomainId = mapLoadParamsManager.DomainUid;
     MapId = mapLoadParamsManager.MapUid;
     NodeId = mapLoadParamsManager.NodeUid;
     VideoSource = mapLoadParamsManager.VideoSource;
     IsLoadMapByGuid = mapLoadParamsManager.IsLoadMapByGuid;
 }