コード例 #1
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            if (lstDictionaries.CheckedItems.Count > 20)
            {
                MessageBox.Show("Selected dictionaries exceed the maximum allowed. \nPlease select less than 20 items!",
                                "HySpell Setup and Diagnostics [Dictionaries]", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                OutRefDicts.CollectionName = "ReferenceDictionaries";

                for (int i = 0; i < lstDictionaries.CheckedItems.Count; i++)
                {
                    ListViewItem        item   = lstDictionaries.CheckedItems[i];
                    ReferenceDictionary refDic = new ReferenceDictionary(i, item.SubItems[0].Text, item.SubItems[2].Text, item.SubItems[1].Text);
                    OutRefDicts.Add(refDic);
                }
                DialogResult = DialogResult.OK;
            }
        }
コード例 #2
0
 public void Add(ReferenceDictionary newDict)
 {
     rDictArray.Add(newDict);
 }