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


C# AutoCompleteStringCollection.Clear方法代码示例

本文整理汇总了C#中System.Windows.Forms.AutoCompleteStringCollection.Clear方法的典型用法代码示例。如果您正苦于以下问题:C# AutoCompleteStringCollection.Clear方法的具体用法?C# AutoCompleteStringCollection.Clear怎么用?C# AutoCompleteStringCollection.Clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.AutoCompleteStringCollection的用法示例。


在下文中一共展示了AutoCompleteStringCollection.Clear方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UpdateAutoCompleteList

        /// <summary>
        /// När positionen har ändrats i hoppet laddas AutoComplete listan om
        /// </summary>
        /// <param name="_dataGridViewList"></param>
        /// <param name="tabControl1"></param>
        /// <param name="_diveNo"></param>
        /// <param name="_diveNoReadOnly"></param>
        /// <param name="_diveName"></param>
        /// <param name="_diveNameReadOnly"></param>
        /// <param name="groupBox"></param>
        public static void UpdateAutoCompleteList(DataGridView currentDataGridView, TabControl tabControl1, AutoCompleteStringCollection _diveNo, AutoCompleteStringCollection _diveNoReadOnly, AutoCompleteStringCollection _diveName, AutoCompleteStringCollection _diveNameReadOnly, GroupBox groupBox)
        {
            //int columnIndex = currentDataGridView.CurrentCell.ColumnIndex;
            //string headerText = currentDataGridView.Columns[columnIndex].HeaderText;
            int rad = currentDataGridView.CurrentCell.RowIndex;

            string position = currentDataGridView.Rows[rad].Cells[0].Value.ToString();
            string height = "";

            _diveName.Clear();
            _diveNo.Clear();

            DiveType.DiveHeight diveHeight = DiveType.DiveHeight._1M;

            //hämtar den valda höjden
            foreach (Control button in groupBox.Controls)
            {
                RadioButton b = button as RadioButton;
                if (b.Checked)
                    height = b.Text.ToString();
            }

            switch (height)
            {
                case "1 m":
                    diveHeight = DiveType.DiveHeight._1M;
                    break;
                case "3 m":
                    diveHeight = DiveType.DiveHeight._3M;
                    break;
                case "5 m":
                    diveHeight = DiveType.DiveHeight._5M;
                    break;
                case "7,5 m":
                    diveHeight = DiveType.DiveHeight._7_5M;
                    break;
                case "10 m":
                    diveHeight = DiveType.DiveHeight._10M;
                    break;
            }

            DiveType diveType = new DiveType();
            diveType.Height = diveHeight;
            SetDiveTypePosition(diveType, position);

            foreach (string s in _diveNoReadOnly)
            {
                diveType.No = Int32.Parse(s);
                if (diveType.Difficulty != 0)
                    _diveNo.Add(s);
            }

            //diveType = new DiveType();
            //diveType.Height = diveHeight;
            //SetDiveTypePosition(diveType, position);

            foreach (string s in _diveNameReadOnly)
            {
                diveType.Name = s;
                diveType.SetNo();
                if (diveType.Difficulty != 0)
                    _diveName.Add(s);
            }
        }
开发者ID:uvRen,项目名称:teamb-simhopp,代码行数:74,代码来源:NewEventPresenter.cs


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