首页 \ 问答 \ wro4j - 使用运行时解决方案构建所有组(wro4j - build all groups using runtime solution)

wro4j - 使用运行时解决方案构建所有组(wro4j - build all groups using runtime solution)

我正在使用基于maven + spring-mvc的web应用程序的wro4j。 我有两个不同的wro.properties文件,在开发模式和部署模式下以不同方式配置Web应用程序。 wro4j配置为使用运行时解决方案运行。 到目前为止,设置工作正常。

我现在想要做的是,在部署模式下,所有wro4j组应该在服务器启动时立即构建(而不是每个wro资源的on-first-request)。 我没有为此找到配置选项 - 有吗? 如果没有,我该如何实现呢?

(我知道我可以使用编译模式进行部署,但是考虑到我已经设置了运行时模式,我想知道我是否可以依赖它)


I'm using wro4j with a maven + spring-mvc based web application. I have two different wro.properties file to configure the web app differently when in development mode vs deployment mode. wro4j is configured to run using the runtime solution. The setup is working fine so far.

What I want to be able to do now is that in deployment mode, all the wro4j groups should be built immediately on server start up (as opposed to on-first-request per wro resource). I haven't found a configuration option for this - is there one? If not, how can I go about making this happen?

(I know I can probably get similar result using compile mode for deployment, but given that I already have runtime mode set up I am wondering if I can piggy back on that)


原文:https://stackoverflow.com/questions/24583490
更新时间:2023-12-07 14:12

最满意答案

尝试这个,

foreach(var pb in this.Controls.OfType<PictureBox>())
{
  //do stuff
}

这将为您提供PictureBoxes。 并在foreach循环中检查其名称。 如果符合您的条件,请添加列表。


Try this,

foreach(var pb in this.Controls.OfType<PictureBox>())
{
  //do stuff
}

This will give you the PictureBoxes. And check its name inside the foreach loop. Add the list if it fits your conditions.

相关问答

更多
  • 我会走另一条路。 创建一个PictureBox并在其中绘制Paint事件中的所有内容。 通过地图的x和y坐标为可见切片执行嵌套循环,并使用Graphics.Draw命令绘制这些切片。 在绘制背景图块后,您可以循环显示单元列表并将它们绘制在顶部。 您可以在鼠标按下时进行简单的命中测试,以查看被点击的内容。 这将减少资源消耗,并允许您稍后进行更好的动画和图形(认为精灵跨越瓷砖边界或大于单个物理图块的图块)。 I would go a different route. Create one single Pict ...
  • Diamant tmp = firstDiamant; firstDiamant = secondDiamnt; secondDiamnt = tmp; 或许我不明白你的问题。 好的.. Bitmap tmp = new Bitmap(pictureBox1.Image); pictureBox1.Image = pictureBox2.Image; pictureBox2.Image = tmp; Diamant tmp = firstDiamant; ...
  • 一种方法: For Each PictureBox In Me.Controls If PictureBox IsNot PictureBox1 AndAlso PictureBox1.Bounds.IntersectsWith(PictureBox.Bounds) Then collision = True Exit For 'Exit when at least one collision found Else : collision = False End If Ne ...
  • 尝试这个, foreach(var pb in this.Controls.OfType()) { //do stuff } 这将为您提供PictureBoxes。 并在foreach循环中检查其名称。 如果符合您的条件,请添加列表。 Try this, foreach(var pb in this.Controls.OfType()) { //do stuff } This will give you the PictureBoxes. And ...
  • 如果我在Form的Paint事件处理程序中调用我的所有PictureBoxes SendToBack方法,我似乎再次得到了我想要的行为。 奇怪的是,我无法为那里的所有其他对象调用BringToFront方法,或者我的LineShapes / Rectangles全部消失:/ 现在,这解决了我的问题,但我希望行为不会再次改变。 If I call all of my PictureBoxes SendToBack methods in my Form's Paint event handler, I seem ...
  • 你可以用Linq做到这一点: var pictureboxes = this.Controls.OfType().ToList(); foreach (PictureBox pb in pictureboxes) { pb.Height = 500; pb.Name = "some_name"; //etc } you can do it using Linq: var pictureboxes = this.Controls.OfType
  • 尝试使用c#开源ispy软件http://www.ispyconnect.com/ Update: As I think this is a problem with form refresh, I created a thread to periodically refresh my form. And I think the non-update problem is resolved. private void MyForm_Load(object sender, EventArgs e) ...
  • 您可以尝试暂停表单的布局逻辑: SuspendLayout(); // set images to pictureboxes ResumeLayout(false); You can try to suspend form's layout logic: SuspendLayout(); // set images to pictureboxes ResumeLayout(false);
  • 如果这是WinForms,您可以使用ControlCollection.Find按名称获取控件 - 假设您的每个pictureboxN控件都具有匹配的.Name属性值。 例如 pictureBox23.Name = "pictureBox23"; 像这样: for( int i = 0; i < this.Bans.Count; i++ ) { String pictureBoxName = "pictureBox" + i.ToString(CultureInfo.InvariantCultu ...
  • 我怀疑这是问题所在: this.bluePictureBox.Location = this.pictureBox2.Location; 您将图片框2中蓝色图片框的位置设置为图片框2相对于容器的位置。 我怀疑你想要: this.bluePictureBox.Location = new Point(0, 0); 这对于红色图片框来说没有太大问题的唯一原因是图片框1靠近屏幕的顶部。 即便如此,你可以看到它不是它的全高/宽度,它不在图片框1的左上角。 I suspect this is the proble ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。