我有一个像这样的3个radiobutton的窗口(删除所有非有趣的道具):
<Control Id="Back" Type="PushButton" Text="!(loc.WixUIBack)">
<Publish Event="NewDialog" Value="InstallDirDlg">1</Publish>
</Control>
<Control Id="Cancel" Type="PushButton" Text="!(loc.WixUICancel)">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
</Control>
<Control Id="Next" Type="PushButton" Text="!(loc.WixUINext)">
<Publish Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
</Control>
<Control Id="InstallTypeSelection" Type="RadioButtonGroup" Property="INSTALL_TYPE">
<RadioButtonGroup Property="INSTALL_TYPE">
<RadioButton Value="0" Text="InstallType A" />
<RadioButton Value="1" Text="InstallType B" />
<RadioButton Value="2"Text="InstallType C" />
</RadioButtonGroup>
Run Code Online (Sandbox Code Playgroud)
在"下一步"我想基于用户选择的Installtype来设置一些属性.
像这样..
if(INSTALL_TYPE == 0)
{
REG_VALUE_AUTO_LOGIN = 0;
REG_VALUE_TIMEOUT = 300;
}
if(INSTALL_TYPE == 1)
{
REG_VALUE_AUTO_LOGIN = 1;
REG_VALUE_TIMEOUT = 600;
}
Run Code Online (Sandbox Code Playgroud)
这在wix中如何工作?
如何将联系人应用于帐户?
所以我有一个帐户和一个联系人
帐户acc =新帐户{Name ="Ab ..",};
联系我们=新联系人{Name ="John",..};
然后
CreateOneToManyRequest createOneToManyRelationshipRequest =
new CreateOneToManyRequest
{
OneToManyRelationship = new OneToManyRelationshipMetadata
{
//What should I put here?
},
Lookup = new LookupAttributeMetadata
{
//And here?
}
};
CreateOneToManyResponse createOneToManyRelationshipResponse =
(CreateOneToManyResponse)_serviceProxy.Execute(
createOneToManyRelationshipRequest);
Run Code Online (Sandbox Code Playgroud)
我是在正确的轨道上吗?或者是否有其他方式将联系人连接到帐户?
我有这个算法在动画中的Canvas上绘制了很多像素.但是我无法控制动画的速度并且绘制得非常快,所以我添加了一个Thread.Sleep(1)但是当绘制几千个像素时它太慢了.我尝试了一个故事板方法,但最终变得非常缓慢.
那么还有Thread.sleep的替代方案来减慢我的循环吗?
void DrawGasket(object sender, DoWorkEventArgs e)
{
Random rnd = new Random();
Color color = Colors.White;
while (Counter <= noOfPx)
{
switch (rnd.Next(3))
{
case 0:
m_lastPoint.X = (m_top.X + m_lastPoint.X)/2;
m_lastPoint.Y = (m_top.Y + m_lastPoint.Y)/2;
color = Colors.White;
break;
case 1:
m_lastPoint.X = (m_left.X + m_lastPoint.X)/2;
m_lastPoint.Y = (m_left.Y + m_lastPoint.Y)/2;
color = Colors.Orange;
break;
case 2:
m_lastPoint.X = (m_right.X + m_lastPoint.X)/2;
m_lastPoint.Y = (m_right.Y + m_lastPoint.Y)/2;
color = Colors.Purple;
break;
}
Dispatcher.BeginInvoke(() =>
{
var px = …Run Code Online (Sandbox Code Playgroud) 我希望根据电话号码获取联系人,但在动态Ms中,电话号码以各种格式存储,如123 45 678,12 34 56 78,0112345678,01 12345678等.
所以在进行比较之前我必须删除它们中的空格,我确实尝试在字符串上使用Replace方法,但这在运行时给了我一个Illegal方法错误.
我是否真的必须检索所有联系人并为比较做另一个循环,或者有没有办法在查询中"清理"字符串?
string phone = "12345678";
var contacts = from c in orgContext.CreateQuery<Contact>()
join a in orgContext.CreateQuery<Account>() on c.AccountId.Id equals a.AccountId
where (c.Telephone1.Replace(" ", "").Contains(phone) || c.MobilePhone.Replace(" ","").Contains(phone))
select new DynamicContact
{
ContactId = c.ContactId,
FirstName = c.FirstName,
LastName = c.LastName,
....and more...
};
Run Code Online (Sandbox Code Playgroud)
编辑:
这是异常消息:
"where"条件无效.实体成员正在调用无效的属性或方法.
我们在程序中使用TCppWebBrowser组件作为一种聊天窗口,但由于TCppwebrowser正在使用IExplorerengine,所有点击的链接都在IExplorer中打开.我的一个想法是取消Onbeforenavigate2中的导航和一个Shell.execute,但希望有一个更优雅的解决方案,如我可以处理的windowsmessage或事件或其他东西.
c# ×3
dynamics-crm ×2
.net ×1
browser ×1
c++ ×1
delphi ×1
install ×1
installer ×1
linq ×1
silverlight ×1
twebbrowser ×1
wix ×1