本文整理汇总了C#中AttachmentPoint.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# AttachmentPoint.ToString方法的具体用法?C# AttachmentPoint.ToString怎么用?C# AttachmentPoint.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AttachmentPoint
的用法示例。
在下文中一共展示了AttachmentPoint.ToString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitPrintButton
private void InitPrintButton(AttachmentPoint attachmentPoint, PrintButton button)
{
button.AttachmentPoint = attachmentPoint;
Visibility visibility;
switch (_oClientType)
{
case OClientTypes.Person:
visibility = Visibility.Individual;
break;
case OClientTypes.Group:
visibility = Visibility.Group;
break;
case OClientTypes.Corporate:
visibility = Visibility.Corporate;
break;
default:
visibility = Visibility.All;
break;
}
button.Visibility = visibility;
button.ReportInitializer =
report =>
{
report.SetParamValue("user_id", User.CurrentUser.Id);
if (_credit != null) report.SetParamValue("contract_id", _credit.Id);
if (_saving != null) report.SetParamValue("saving_id", _saving.Id);
if (_guarantee != null) report.SetParamValue("guarantee_id", _guarantee.Id);
};
button.LoadReports();
//from extension
foreach (var item in PrintButtonContextMenuStrips)
{
var menuItems = item.GetContextMenuStrip(_client, _credit, _guarantee, _saving, attachmentPoint.ToString());
if (menuItems == null) continue;
foreach (var menuItem in menuItems)
{
button.Menu.Items.Add(menuItem);
}
}
}