我有一个wix安装程序,我们运行了几个自定义操作,比如注册等.但是我们只希望这些在安装上运行,而不是在升级或卸载时运行.
我已经尝试将其设置为NOT Installed AND REINSTALL,但这也不起作用.
有人想知道只有在安装而不是升级或卸载时才通过自定义操作运行某些应用程序的正确属性是什么?
<InstallExecuteSequence>
<Custom Action="PosConfig.CustomAction" Before="StartServices"><![CDATA[NOT Installed AND NOT UPGRADINGPRODUCTCODE AND UILevel>3]]></Custom>
<Custom Action="Register.CustomAction" After="PosConfig.CustomAction">NOT Installed AND NOT UPGRADINGPRODUCTCODE </Custom>
<Custom Action="OPOSSelectorFirst.CustomAction" After="Register.CustomAction"><![CDATA[NOT Installed AND NOT UPGRADINGPRODUCTCODE AND &ProductFeature=3 AND Not OPOSDLLINSTALLED]]></Custom>
<Custom Action="OPOSSelectorUpdate.CustomAction" After="OPOSSelectorFirst.CustomAction"><![CDATA[NOT Installed AND NOT UPGRADINGPRODUCTCODE AND &ProductFeature=3 AND Not OPOSDLLINSTALLED]]></Custom>
</InstallExecuteSequence>
Run Code Online (Sandbox Code Playgroud)
编辑:添加了我的自定义动作序列.
我目前正在研究一些sql的东西,但运行时遇到了一些问题.
我有这种方法寻找现金交易,并取消现金返还,但有时没有现金交易,所以该值变为NULL,你不能从NULL减去.我试图在它周围放置一个ISNULL,但它仍然变为空.
谁能帮我这个?
;WITH tran_payment AS
(
SELECT 1 AS payment_method, NULL AS payment_amount, null as tran_header_cid
UNION ALL
SELECT 998 AS payment_method, 2 AS payment_amount, NULL as tran_header_cid
),
paytype AS
(
SELECT 1 AS mopid, 2 AS mopshort
),
tran_header AS
(
SELECT 1 AS cid
)
SELECT p.mopid AS mopid,
p.mopshort AS descript,
payment_value AS PaymentValue,
ISNULL(DeclaredValue, 0.00) AS DeclaredValue
from paytype p
LEFT OUTER JOIN (SELECT CASE
When (tp.payment_method = 1)
THEN
(ISNULL(SUM(tp.payment_amount), 0)
- (SELECT …Run Code Online (Sandbox Code Playgroud) 我正在尝试从wcf服务向trace.axd文件写入消息,但是我的跟踪消息根本没有.
我用来编写消息的代码是:
System.Diagnostics.Trace.Write("Value updated to: " + value.ToString());
Run Code Online (Sandbox Code Playgroud)
在Web配置文件中,我启用了跟踪:
<trace enabled="true" requestLimit="15" pageOutput="false" localOnly="false"/>
Run Code Online (Sandbox Code Playgroud)
但是,当我查看trace.axd文件时,我的消息不可用.我甚至已经完成了代码,我知道它会触及Trace.Write值.
我唯一可以想到的是导致这种情况,因为该方法上面有IgnoreDataMember.
有谁有想法吗?
我正在尝试将png图像加载到我的游戏中,但由于某种原因它无法找到图像.
这是我试图加载图像的标题屏幕:
public TitleScreen(ContentManager contentManager)
{
titleScreen = contentManager.Load<Texture2D>("gfx\\titleScreen");
bgScreen = contentManager.Load<Texture2D>("gfx\\bgScreen");
arialFont = contentManager.Load<SpriteFont>("Arial");
}
Run Code Online (Sandbox Code Playgroud)
我在这里设置内容的根目录:
Content.RootDirectory = "Content";
Run Code Online (Sandbox Code Playgroud)
当我的程序点击屏幕截图时,它无法找到图像,但是它的路径是正确的,图像也被设置为内容并复制到输出目录.
当我尝试调试它时,它告诉我它找不到图像"Content\gfx\titleScreen.xnb".出于某种原因,它正在尝试加载xnb文件,是否有我可以更改它的地方,或者我还需要做其他任何事情吗?
在我的一个页面上,我需要确保用户在继续之前打印了页面,因此我使用简单的onclick方法拦截按钮单击,这会提示用户确认是否已打印页面.
如果他们打印了页面,我想继续并进行回发,但是如果用户按下取消,我希望用户留在当前页面上.这种情况不会发生,即使按下取消,页面仍然会返回到服务器,并且用户将显示在下一个屏幕上.
按钮:
<button type="submit" name="Continue" value="Continue" class="button" onclick="clientClick();">Continue</button>
Run Code Online (Sandbox Code Playgroud)
Javascript函数提醒用户:
function clientClick() {
if (confirm("MESSAGE")) {
return true;
}
return false;
}
Run Code Online (Sandbox Code Playgroud)