本文整理汇总了C#中Model.List.IndexOf方法的典型用法代码示例。如果您正苦于以下问题:C# List.IndexOf方法的具体用法?C# List.IndexOf怎么用?C# List.IndexOf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Model.List
的用法示例。
在下文中一共展示了List.IndexOf方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetLayoutGroupForEmailParsingRule
//.........这里部分代码省略.........
{
itemSettings.Caption = CultureHelper.GetStringForCurentCulture("AddNewRuleForDataModel_SaveEmail_Choose_mode");
itemSettings.ShowCaption = DefaultBoolean.False;
itemSettings.NestedExtensionType = FormLayoutNestedExtensionItemType.Label;
LabelSettings lbSettings = (LabelSettings)itemSettings.NestedExtensionSettings;
lbSettings.Text = CultureHelper.GetStringForCurentCulture("AddNewRuleForDataModel_SaveEmail_Choose_mode");
});
saveEmailGroupItem.Items.AddEmptyItem();
saveEmailGroupItem.Items.AddEmptyItem();
for (k = 0; k < saveEmailProperties.Count; k++)
{
saveEmailGroupItem.Items.Add(itemSettings =>
{
itemSettings.Name = "SaveEmailProperties[" + k + "].Id";
itemSettings.ShowCaption = DefaultBoolean.False;
itemSettings.ClientVisible = false;
itemSettings.NestedExtensionType = FormLayoutNestedExtensionItemType.TextBox;
TextBoxSettings lbSettings = (TextBoxSettings)itemSettings.NestedExtensionSettings;
lbSettings.Text = saveEmailProperties[k].Id.ToString();
});
//saveEmailProperties[0].TableId
saveEmailGroupItem.Items.Add(itemSettings =>
{
itemSettings.Name = "SaveEmailProperties[" + k + "].TableId";
itemSettings.Caption = CultureHelper.GetStringForCurentCulture("AddNewRuleModel_TableId_Choose_table_");
itemSettings.ShowCaption = DefaultBoolean.False;
itemSettings.NestedExtensionType = FormLayoutNestedExtensionItemType.ComboBox;
ComboBoxSettings cbSettings = (ComboBoxSettings)itemSettings.NestedExtensionSettings;
cbSettings.Properties.DropDownStyle = DropDownStyle.DropDownList;
cbSettings.Properties.IncrementalFilteringMode = IncrementalFilteringMode.StartsWith;
cbSettings.Properties.DataSource = tables;
cbSettings.SelectedIndex = tables.IndexOf(saveEmailProperties[k].TableId);
});
//w => saveEmailProperties[0].Worksheet,
saveEmailGroupItem.Items.Add(itemSettings =>
{
itemSettings.Name = "_" + k + "_SaveEmailProperties_Worksheet";
itemSettings.Caption = CultureHelper.GetStringForCurentCulture("AddNewRuleForDataModel_Worksheet_Choose_spreadsheet");
itemSettings.ShowCaption = DefaultBoolean.False;
itemSettings.NestedExtensionType = FormLayoutNestedExtensionItemType.ComboBox;
ComboBoxSettings cbSettings = (ComboBoxSettings)itemSettings.NestedExtensionSettings;
cbSettings.Properties.DropDownStyle = DropDownStyle.DropDownList;
cbSettings.Properties.IncrementalFilteringMode = IncrementalFilteringMode.StartsWith;
cbSettings.Properties.DataSource = worksheetsList;
cbSettings.SelectedIndex = Convert.ToInt32(saveEmailProperties[k].Worksheet);
cbSettings.Properties.ClientSideEvents.SelectedIndexChanged = "function() {SaveEmailProperties_" + k + "__Worksheet.value=_" + k + "_SaveEmailProperties_Worksheet.GetValue();}";
});
saveEmailGroupItem.Items.Add(itemSettings =>
{
// itemSettings.Name = "SaveEmailProperties[" + k + "].Worksheet";
itemSettings.ShowCaption = DefaultBoolean.False;
itemSettings.ClientVisible = false;
//itemSettings.NestedExtensionType = FormLayoutNestedExtensionItemType.TextBox;
//TextBoxSettings lbSettings = (TextBoxSettings)itemSettings.NestedExtensionSettings;
//lbSettings.Text = saveEmailProperties[k].Worksheet;
}).SetNestedContent("<input data-val=\"true\" data-val-number=\"Значением поля Worksheet должно быть число.\" data-val-required=\"The Worksheet field is required.\"" +
"id=\"SaveEmailProperties_"+k+"__Worksheet\"" +
"name=\"SaveEmailProperties["+k+"].Worksheet\" type=\"hidden\" value="+saveEmailProperties[k].Worksheet+">");
//w => saveEmailProperties[0].Column,
saveEmailGroupItem.Items.Add(itemSettings =>
{
itemSettings.Name = "SaveEmailProperties[" + k + "].Column";