• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IResourceManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IResourceManager的典型用法代码示例。如果您正苦于以下问题:C# IResourceManager类的具体用法?C# IResourceManager怎么用?C# IResourceManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IResourceManager类属于命名空间,在下文中一共展示了IResourceManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: YammerAuthProvider

 /// <summary>
 /// Initializes a new instance of the <see cref="YammerAuthProvider"/> class.
 /// </summary>
 /// <param name="appSettings">
 /// The application settings (in web.config).
 /// </param>
 public YammerAuthProvider(IResourceManager appSettings)
     : base(appSettings, appSettings.GetString("oauth.yammer.Realm"), Name, "ClientId", "AppSecret")
 {
     this.ClientId = appSettings.GetString("oauth.yammer.ClientId");
     this.ClientSecret = appSettings.GetString("oauth.yammer.ClientSecret");
     this.PreAuthUrl = appSettings.GetString("oauth.yammer.PreAuthUrl");
 }
开发者ID:Qasemt,项目名称:NServiceKit,代码行数:13,代码来源:YammerAuthProvider.cs


示例2: AppConfig

 public AppConfig(IResourceManager appSettings)
 {
     this.Env = appSettings.Get("Env", Env.Local);
     this.EnableCdn = appSettings.Get("EnableCdn", false);
     this.CdnPrefix = appSettings.Get("CdnPrefix", "");
     this.AdminUserNames = appSettings.Get("AdminUserNames", new List<string>());
 }
开发者ID:peter-dangelo,项目名称:ServiceStackMVC,代码行数:7,代码来源:AppHost.cs


示例3: GameModeScene

        public GameModeScene(IGameScreenManager manager)
            : base(manager)
        {
            services = (SCSServices)manager.Game.Services.GetService(typeof(SCSServices));

            resourceManager = (IResourceManager)manager.Game.Services.GetService(typeof(IResourceManager));
        }
开发者ID:doanhtdpl,项目名称:boom-game,代码行数:7,代码来源:GameModeScene.cs


示例4: DeltaScriptInclusionFilter

 public DeltaScriptInclusionFilter(
     IEnumerable<IDeltaInstanceProvider> deltaInstanceProviders,
     IResourceManager resourceManager
     ) {
         _deltaInstanceProviders = deltaInstanceProviders;
         _resourceManager = resourceManager;
 }
开发者ID:akhurst,项目名称:ricealumni,代码行数:7,代码来源:DeltaScriptInclusionFilter.cs


示例5: BlueprintButton

        public BlueprintButton(string c1, string c1N, string c2, string c2N, string res, string resname,
                               IResourceManager resourceManager)
        {
            _resourceManager = resourceManager;

            Compo1 = c1;
            Compo1Name = c1N;

            Compo2 = c2;
            Compo2Name = c2N;

            Result = res;
            ResultName = resname;

            _icon = _resourceManager.GetSprite("blueprint");

            Label = new TextSprite("blueprinttext", "", _resourceManager.GetFont("CALIBRI"))
                        {
                            Color = Color.GhostWhite,
                            ShadowColor = Color.DimGray,
                            ShadowOffset = new Vector2(1, 1),
                            Shadowed = true
                        };

            Update(0);
        }
开发者ID:millpond,项目名称:space-station-14,代码行数:26,代码来源:BlueprintButton.cs


示例6: GetResources

        public static IResourceManager GetResources()
        {
            if (m_instance == null)
                m_instance = ResourceManagerFactory.CreateResourceManager();

            return m_instance;            
        }
开发者ID:killbug2004,项目名称:WSProf,代码行数:7,代码来源:ResourcesCache.cs


示例7: FacebookAuthProvider

 public FacebookAuthProvider(IResourceManager appSettings)
     : base(appSettings, Realm, Name, "AppId", "AppSecret")
 {
     this.AppId = appSettings.GetString("oauth.facebook.AppId");
     this.AppSecret = appSettings.GetString("oauth.facebook.AppSecret");
     this.Permissions = appSettings.Get("oauth.facebook.Permissions", new string[0]);
 }
开发者ID:namman,项目名称:ServiceStack,代码行数:7,代码来源:FacebookAuthProvider.cs


示例8: BuildBranch

        public RequestDelegate BuildBranch(IApplicationBuilder app, IEnumerable<IResourceStartup> resourceStartups, IEnumerable<IResource> resources, IResourceManager resourceManager)
        {
            var branchApp = app.New();
            branchApp.Map($"/{_serverOptions.BasePath}", glimpseApp =>
            {
                // REGISTER: resource startups
                foreach (var resourceStartup in resourceStartups)
                {
                    var startupApp = glimpseApp.New();

                    var resourceBuilderStartup = new ResourceBuilder(startupApp, resourceManager);
                    resourceStartup.Configure(resourceBuilderStartup);

                    glimpseApp.Use(next =>
                    {
                        startupApp.Run(next);

                        var startupBranch = startupApp.Build();

                        return context =>
                        {
                            if (CanExecute(context, resourceStartup.Type))
                            {
                                return startupBranch(context);
                            }

                            return next(context);
                        };
                    });
                }

                // REGISTER: resources
                var resourceBuilder = new ResourceBuilder(glimpseApp, resourceManager);
                foreach (var resource in resources)
                {
                    resourceBuilder.Run(resource.Name, resource.Parameters?.GenerateUriTemplate(), resource.Type, resource.Invoke);
                }

                glimpseApp.Run(async context =>
                {
                    // RUN: resources
                    var result = resourceManager.Match(context);
                    if (result != null)
                    {
                        if (CanExecute(context, result.Type))
                        {
                            await result.Resource(context, result.Paramaters);
                        }
                        else
                        {
                            // TODO: Review, do we want a 401, 404 or continue users pipeline 
                            context.Response.StatusCode = 401;
                        }
                    }
                });
            });
            branchApp.Use(subNext => { return async ctx => await _next(ctx); });

            return branchApp.Build();
        }
开发者ID:mike-kaufman,项目名称:Glimpse.Prototype,代码行数:60,代码来源:GlimpseServerMiddleware.cs


示例9: Load

    public void Load(IDataNode dataNode, IResourceManager resourceManager)
    {
      _shaderName = dataNode.ReadParameter("key");
      _vertexShader = dataNode.ReadParameter("vertex");
      _fragmentShader = dataNode.ReadParameter("fragment");

      if (dataNode.HasParameter("numbers"))
      {
        var floats = dataNode.ReadParameterList("numbers");
        foreach (var f in floats)
        {
          _numericParameters.Add(f, default(float));
        }
      }

      if (dataNode.HasParameter("vectors"))
      {
        var vectors = dataNode.ReadParameterList("vectors");
        foreach (var v in vectors)
        {
          _vectorParameters.Add(v, default(Vector3));
        }
      }


      if (dataNode.HasParameter("textures"))
      {
        var textures = dataNode.ReadParameterList("textures");
        foreach (var t in textures)
        {
          _textureParameters.Add(t, null);
        }
      }

    }
开发者ID:dgopena,项目名称:Starter3D.Base,代码行数:35,代码来源:Shader.cs


示例10: Hotbar

 public Hotbar(IResourceManager resourceManager)
 {
     _resourceManager = resourceManager;
     hotbarBG = resourceManager.GetSprite("main_hotbar");
     createSlots();
     Update(0);
 }
开发者ID:Gartley,项目名称:ss13remake,代码行数:7,代码来源:Hotbar.cs


示例11: EditorEnvironment

		public EditorEnvironment(
			MainEditorWindow mainEditorWindow, IResourceManager resourceManager, IComponentContext context)
		{
			this.mainEditorWindow = mainEditorWindow;
			this.resourceManager = resourceManager;
			this.context = context;
		}
开发者ID:gleblebedev,项目名称:toe,代码行数:7,代码来源:EditorEnvironment.cs


示例12: MediaController

 public MediaController(IResourceManager resourceManager,
     IImageHelper imageHelper,
     IRepository<ThumbnailSize> thumbRepository) {
     _resourceManager = resourceManager;
     _imageHelper = imageHelper;
     _thumbRepository = thumbRepository;
 }
开发者ID:wolfweb,项目名称:Ww,代码行数:7,代码来源:MediaController.cs


示例13: BinaryResourceFormat

		public BinaryResourceFormat(
			IResourceManager resourceManager, IComponentContext context, IResourceErrorHandler errorHandler)
		{
			this.resourceManager = resourceManager;
			this.context = context;
			this.errorHandler = errorHandler;
		}
开发者ID:gleblebedev,项目名称:toe,代码行数:7,代码来源:BinaryResourceFormat.cs


示例14: HealthScannerWindow

        public HealthScannerWindow(Entity assignedEnt, Vector2D mousePos, UserInterfaceManager uiMgr,
                                   IResourceManager resourceManager)
        {
            _resourceManager = resourceManager;
            assigned = assignedEnt;
            _uiMgr = uiMgr;

            _overallHealth = new TextSprite("hpscan" + assignedEnt.Uid.ToString(), "",
                                            _resourceManager.GetFont("CALIBRI"));
            _overallHealth.Color = Color.ForestGreen;

            _background = _resourceManager.GetSprite("healthscan_bg");

            _head = _resourceManager.GetSprite("healthscan_head");
            _chest = _resourceManager.GetSprite("healthscan_chest");
            _arml = _resourceManager.GetSprite("healthscan_arml");
            _armr = _resourceManager.GetSprite("healthscan_armr");
            _groin = _resourceManager.GetSprite("healthscan_groin");
            _legl = _resourceManager.GetSprite("healthscan_legl");
            _legr = _resourceManager.GetSprite("healthscan_legr");

            Position = new Point((int) mousePos.X, (int) mousePos.Y);

            Setup();
            Update(0);
        }
开发者ID:Gartley,项目名称:ss13remake,代码行数:26,代码来源:HealthScannerWindow.cs


示例15: TargetingDummyElement

 public TargetingDummyElement(string spriteName, BodyPart part, IResourceManager resourceManager)
 {
     _resourceManager = resourceManager;
     BodyPart = part;
     _elementSprite = _resourceManager.GetSprite(spriteName);
     Update(0);
 }
开发者ID:Tri125,项目名称:space-station-14,代码行数:7,代码来源:TargetingDummyElement.cs


示例16: TargetingDummy

        public TargetingDummy(IPlayerManager playerManager, INetworkManager networkManager,
                              IResourceManager resourceManager)
        {
            _networkManager = networkManager;
            _playerManager = playerManager;
            _resourceManager = resourceManager;

            var head = new TargetingDummyElement("dummy_head", BodyPart.Head, _resourceManager);
            var torso = new TargetingDummyElement("dummy_torso", BodyPart.Torso, _resourceManager);
            var groin = new TargetingDummyElement("dummy_groin", BodyPart.Groin, _resourceManager);
            var armL = new TargetingDummyElement("dummy_arm_l", BodyPart.Left_Arm, _resourceManager);
            var armR = new TargetingDummyElement("dummy_arm_r", BodyPart.Right_Arm, _resourceManager);
            var legL = new TargetingDummyElement("dummy_leg_l", BodyPart.Left_Leg, _resourceManager);
            var legR = new TargetingDummyElement("dummy_leg_r", BodyPart.Right_Leg, _resourceManager);

            _elements.Add(head);
            _elements.Add(torso);
            _elements.Add(groin);
            _elements.Add(armL);
            _elements.Add(armR);
            _elements.Add(legL);
            _elements.Add(legR);
            head.Clicked += Selected;
            torso.Clicked += Selected;
            groin.Clicked += Selected;
            armL.Clicked += Selected;
            armR.Clicked += Selected;
            legL.Clicked += Selected;
            legR.Clicked += Selected;
            Update(0);
            UpdateHealthIcon();
        }
开发者ID:MSylvia,项目名称:space-station-14,代码行数:32,代码来源:TargetingDummy.cs


示例17: SceneNodeFactory

 public SceneNodeFactory(IShapeFactory shapeFactory, IResourceManager resourceManager)
 {
   if (shapeFactory == null) throw new ArgumentNullException("shapeFactory");
   if (resourceManager == null) throw new ArgumentNullException("resourceManager");
   _shapeFactory = shapeFactory;
   _resourceManager = resourceManager;
 }
开发者ID:dgopena,项目名称:Starter3D.Base,代码行数:7,代码来源:SceneNodeFactory.cs


示例18: TileSpawnPanel

        public TileSpawnPanel(Size size, IResourceManager resourceManager, IPlacementManager placementManager)
            : base("Tile Spawn Panel", size, resourceManager)
        {
            _resourceManager = resourceManager;
            _placementManager = placementManager;

            _tileList = new ScrollableContainer("tilespawnlist", new Size(200, 400), _resourceManager)
                            {Position = new Point(5, 5)};
            components.Add(_tileList);

            var searchLabel = new Label("Tile Search:", "CALIBRI", _resourceManager) {Position = new Point(210, 0)};
            components.Add(searchLabel);

            _tileSearchTextbox = new Textbox(125, _resourceManager) {Position = new Point(210, 20)};
            _tileSearchTextbox.OnSubmit += tileSearchTextbox_OnSubmit;
            components.Add(_tileSearchTextbox);

            _clearLabel = new Label("[Clear Filter]", "CALIBRI", _resourceManager)
                              {
                                  DrawBackground = true,
                                  DrawBorder = true,
                                  Position = new Point(210, 55)
                              };

            _clearLabel.Clicked += ClearLabelClicked;
            _clearLabel.BackgroundColor = Color.Gray;
            components.Add(_clearLabel);

            BuildTileList();

            Position = new Point((int) (Gorgon.CurrentRenderTarget.Width/2f) - (int) (ClientArea.Width/2f),
                                 (int) (Gorgon.CurrentRenderTarget.Height/2f) - (int) (ClientArea.Height/2f));
            _placementManager.PlacementCanceled += PlacementManagerPlacementCanceled;
        }
开发者ID:Gartley,项目名称:ss13remake,代码行数:34,代码来源:TileSpawnPanel.cs


示例19: ScrollableContainer

        public ScrollableContainer(string uniqueName, Vector2i size, IResourceManager resourceManager)
        {
            _resourceManager = resourceManager;

            Size = size;

            //if (RenderTargetCache.Targets.Contains(uniqueName))
            //    //Now this is an ugly hack to work around duplicate RenderImages. Have to fix this later.
            //    uniqueName = uniqueName + Guid.NewGuid();

            clippingRI = new RenderImage(uniqueName,(uint)Size.X,(uint) Size.Y);

            //clippingRI.SourceBlend = AlphaBlendOperation.SourceAlpha;
            //clippingRI.DestinationBlend = AlphaBlendOperation.InverseSourceAlpha;
            //clippingRI.SourceBlendAlpha = AlphaBlendOperation.SourceAlpha;
            //clippingRI.DestinationBlendAlpha = AlphaBlendOperation.InverseSourceAlpha;
            clippingRI.BlendSettings.ColorSrcFactor = BlendMode.Factor.SrcAlpha;
            clippingRI.BlendSettings.ColorDstFactor = BlendMode.Factor.OneMinusSrcAlpha;
            clippingRI.BlendSettings.AlphaSrcFactor = BlendMode.Factor.SrcAlpha;
            clippingRI.BlendSettings.AlphaDstFactor = BlendMode.Factor.OneMinusSrcAlpha;

            scrollbarH = new Scrollbar(true, _resourceManager);
            scrollbarV = new Scrollbar(false, _resourceManager);
            scrollbarV.size = Size.Y;

            scrollbarH.Update(0);
            scrollbarV.Update(0);

            Update(0);
        }
开发者ID:MSylvia,项目名称:space-station-14,代码行数:30,代码来源:ScrollableContainer.cs


示例20: Checkbox

 public Checkbox(IResourceManager resourceManager)
 {
     _resourceManager = resourceManager;
     checkbox = _resourceManager.GetSprite("checkbox0");
     checkboxCheck = _resourceManager.GetSprite("checkbox1");
     Update(0);
 }
开发者ID:MSylvia,项目名称:space-station-14,代码行数:7,代码来源:Checkbox.cs



注:本文中的IResourceManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IResourceResolver类代码示例发布时间:2022-05-24
下一篇:
C# IResourceLoader类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap