コード例 #1
0
            public MgWebLayout CreateWebLayout(MgResourceIdentifier resId)
            {
                if (_wl != null)
                {
                    return(_wl);
                }

                _wl = new MgWebLayout(_resSvc, resId);
                return(_wl);
            }
コード例 #2
0
        protected void CreateWebLayoutFromResource(int paramSetId)
        {
            if (_wl != null)
            {
                return;
            }

            _unitTestVm.Execute("Select ParamValue from Params WHERE ParamSet={0} AND ParamName=\"WEBLAYOUT\"", paramSetId);
            string wlId = _unitTestVm.GetString("ParamValue");

            if (string.IsNullOrEmpty(wlId))
            {
                wlId = "Library://UnitTest/layouts/Test.WebLayout";
            }
            MgResourceIdentifier resId = new MgResourceIdentifier(wlId);

            _wl = _creator.CreateWebLayout(resId);
        }
コード例 #3
0
        static void Main(string[] args)
        {
            var webConfigPath = @"C:\Program Files\OSGeo\MapGuide\Web\www\webconfig.ini";

            MapGuideApi.MgInitializeWebTier(webConfigPath);

            MgUserInformation user = new MgUserInformation("Anonymous", "");
            MgSiteConnection  conn = new MgSiteConnection();

            conn.Open(user);
            MgSite site      = conn.GetSite();
            string sessionId = site.CreateSession();

            Console.WriteLine("Session ID: " + sessionId);
            MgResourceIdentifier wlId   = new MgResourceIdentifier("Library://Samples/Sheboygan/Layouts/SheboyganAsp.WebLayout");
            MgResourceService    resSvc = (MgResourceService)conn.CreateService(MgServiceType.ResourceService);

            MgWebLayout layout = new MgWebLayout(resSvc, wlId);

            Console.WriteLine("Web Layout Title: " + layout.GetTitle());
            Console.WriteLine("Looks good! Press any key to continue");
            Console.Read();
        }
コード例 #4
0
            public MgWebLayout CreateWebLayout(MgResourceIdentifier resId)
            {
                if (_wl != null)
                    return _wl;

                _wl = new MgWebLayout(_resSvc, resId);
                return _wl;
            }