本文整理汇总了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);
}
}