當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。