本文整理汇总了C#中System.Windows.Forms.AutoCompleteStringCollection.Contains方法的典型用法代码示例。如果您正苦于以下问题:C# AutoCompleteStringCollection.Contains方法的具体用法?C# AutoCompleteStringCollection.Contains怎么用?C# AutoCompleteStringCollection.Contains使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.AutoCompleteStringCollection
的用法示例。
在下文中一共展示了AutoCompleteStringCollection.Contains方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateTreeView
private void UpdateTreeView(Type[] types, AutoCompleteStringCollection autoCompleteStringCollection)
{
TreeNode assembliesNode = this.artifactTreeView.Nodes[SR.ReferencedAssemblies];
Hashtable assemblyNodes = new Hashtable();
IExtendedUIService2 extendedUIService = (IExtendedUIService2)this.serviceProvider.GetService(typeof(IExtendedUIService2));
foreach (Type type in types)
{
if (this.typeFilterProvider != null && !this.typeFilterProvider.CanFilterType(extendedUIService != null ? extendedUIService.GetRuntimeType(type) : type, false))
continue;
if (autoCompleteStringCollection.Contains(type.FullName))
continue;
autoCompleteStringCollection.Add(type.FullName);
TreeNode node = null;
if (type.Assembly != null)
{
node = assemblyNodes[type.Assembly] as TreeNode;
if (node == null)
{
node = new TreeNode(type.Assembly.GetName().Name, 3, 3);
node.Tag = type.Assembly;
assembliesNode.Nodes.Add(node);
assemblyNodes[type.Assembly] = node;
}
}
else
{
node = this.artifactTreeView.Nodes[SR.CurrentProject];
}
if (type.Namespace != null && type.Namespace.Length > 0)
{
bool found = false;
string namespaceName = type.Namespace;
foreach (TreeNode nsNode in node.Nodes)
{
if (nsNode.Text == namespaceName)
{
found = true;
break;
}
}
if (!found)
{
TreeNode nsNode = new TreeNode(namespaceName, 49, 49);
node.Nodes.Add(nsNode);
}
}
}
}
示例2: AddAutoCompleteForSalesTextBox
private void AddAutoCompleteForSalesTextBox()
{
var autoCompleteCollectionProductName = new AutoCompleteStringCollection();
for (var x = 0; x < invetoryGridView.Rows.Count; x++)
{
var itemName = invetoryGridView.Rows[x].Cells[0].Value.ToString();
if (!autoCompleteCollectionProductName.Contains(itemName))
{
autoCompleteCollectionProductName.Add(itemName);
}
}
//iniba ko para sa datagrid gagawa ng auto complete
/*foreach (DataRow dr in DatabaseConnection.DatabaseRecord.Tables["items"].Rows)
{
autoCompleteCollectionProductName.Add(dr["Item_Name"].ToString());
}*/
txtBoxProductName.AutoCompleteSource = AutoCompleteSource.CustomSource;
txtBoxProductName.AutoCompleteCustomSource = autoCompleteCollectionProductName;
cueTextBox2.AutoCompleteSource = AutoCompleteSource.CustomSource;
cueTextBox2.AutoCompleteCustomSource = autoCompleteCollectionProductName;
}
示例3: DataBaseDataAddButton_Click
// 追加ボタンをクリックしたときに発生するイベントメソッド
private void DataBaseDataAddButton_Click(object sender, EventArgs e)
{
// 視聴場所のリスト生成
AutoCompleteStringCollection placeList = new AutoCompleteStringCollection();
for (int i = 0; i < animeDataBase.Count; i++)
{
if (!placeList.Contains(animeDataBase[i].Place))
placeList.Add(animeDataBase[i].Place);
}
DataEditForm dataEditForm = new DataEditForm(placeList);
dataEditForm.ShowDialog(this);
}
示例4: DataBaseDataEditButton_Click
// 編集ボタンをクリックしたときに発生するイベントメソッド
private void DataBaseDataEditButton_Click(object sender, EventArgs e)
{
// データ件数が0
if (!(animeDataBase.Count > 0))
return;
// 視聴場所のリスト生成
AutoCompleteStringCollection placeList = new AutoCompleteStringCollection();
for (int i = 0; i < animeDataBase.Count; i++)
{
if (!placeList.Contains(animeDataBase[i].Place))
placeList.Add(animeDataBase[i].Place);
}
DataEditForm dataEditForm = new DataEditForm(animeDataBase[DataBaseView.CurrentRow.Index], placeList);
dataEditForm.ShowDialog(this);
}
示例5: UpdateTreeView
private void UpdateTreeView(System.Type[] types, AutoCompleteStringCollection autoCompleteStringCollection)
{
TreeNode node = this.artifactTreeView.Nodes["ReferencedAssemblies"];
Hashtable hashtable = new Hashtable();
IExtendedUIService2 service = (IExtendedUIService2) this.serviceProvider.GetService(typeof(IExtendedUIService2));
foreach (System.Type type in types)
{
if (((this.typeFilterProvider != null) && !this.typeFilterProvider.CanFilterType((service != null) ? service.GetRuntimeType(type) : type, false)) || autoCompleteStringCollection.Contains(type.FullName))
{
continue;
}
autoCompleteStringCollection.Add(type.FullName);
TreeNode node2 = null;
if (type.Assembly != null)
{
node2 = hashtable[type.Assembly] as TreeNode;
if (node2 == null)
{
node2 = new TreeNode(type.Assembly.GetName().Name, 3, 3) {
Tag = type.Assembly
};
node.Nodes.Add(node2);
hashtable[type.Assembly] = node2;
}
}
else
{
node2 = this.artifactTreeView.Nodes["CurrentProject"];
}
if ((type.Namespace != null) && (type.Namespace.Length > 0))
{
bool flag = false;
string text = type.Namespace;
foreach (TreeNode node3 in node2.Nodes)
{
if (node3.Text == text)
{
flag = true;
break;
}
}
if (!flag)
{
TreeNode node4 = new TreeNode(text, 0x31, 0x31);
node2.Nodes.Add(node4);
}
}
}
}