예제 #1
0
        private void listBoxBrands_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (listBoxBrands.SelectedIndex == -1)
            {
                return;
            }
            string            content;
            ChangeItemContent changeItemContentForm = new ChangeItemContent();

            changeItemContentForm.Owner   = this;
            changeItemContentForm.Content = listBoxBrands.Items[listBoxBrands.SelectedIndex].ToString();
            changeItemContentForm.ShowDialog();
            content = changeItemContentForm.Content;
            if (content.Length > 0)
            {
                listBoxBrands.Items[listBoxBrands.SelectedIndex] = content;
                SetAttribute sa = WordSetKind.Words[listBoxSet.SelectedItem.ToString()];
                sa.BrandName = content;
                WordSetKind.Words[listBoxSet.SelectedItem.ToString()] = sa;
            }
        }
예제 #2
0
 private void listBoxBrands_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     if (listBoxBrands.SelectedIndex == -1)
         return;
     string content;
     ChangeItemContent changeItemContentForm = new ChangeItemContent();
     changeItemContentForm.Owner = this;
     changeItemContentForm.Content = listBoxBrands.Items[listBoxBrands.SelectedIndex].ToString();
     changeItemContentForm.ShowDialog();
     content = changeItemContentForm.Content;
     if (content.Length > 0)
     {
         listBoxBrands.Items[listBoxBrands.SelectedIndex] = content;
         SetAttribute sa=WordSetKind.Words[listBoxSet.SelectedItem.ToString()];
         sa.BrandName = content;
         WordSetKind.Words[listBoxSet.SelectedItem.ToString()] = sa;
     }
 }