当前位置: 首页>>代码示例>>C#>>正文


C# AutoCompleteStringCollection.Contains方法代码示例

本文整理汇总了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);
                    }
                }
            }
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:52,代码来源:TypeBrowserDialog.cs

示例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;
 }
开发者ID:jpfrost,项目名称:CotsSalesAndInventory,代码行数:21,代码来源:Main.cs

示例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);
        }
开发者ID:Sakuani,项目名称:AnimeManager,代码行数:14,代码来源:MainForm.cs

示例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);
        }
开发者ID:Sakuani,项目名称:AnimeManager,代码行数:18,代码来源:MainForm.cs

示例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);
             }
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:49,代码来源:TypeBrowserDialog.cs


注:本文中的System.Windows.Forms.AutoCompleteStringCollection.Contains方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。