예제 #1
0
 private void button3_Click(object sender, EventArgs e)
 {
     using (var frm = new ImportDictionaryForm((XElement)comboBox1.SelectedItem))
     {
         frm.ShowDialog();
     }
 }
예제 #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            var ext = (ExtensionData)dgvDictionary.SelectedRows[0].DataBoundItem;

            if (ext.DictionaryType.Contains("Import"))
            {
                using (var frm = new ImportDictionaryForm(ext))
                {
                    frm.ShowDialog();
                    RefreshDataSource();
                }
            }
            else if (ext.DictionaryType.Contains("Simple"))
            {
                using (var frm = new SimpleDictionaryForm(ext.Extension))
                {
                    frm.ShowDialog();
                }
            }
        }
예제 #3
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     if ((DictionaryTypeEnum)cbDictionaryType.SelectedItem == DictionaryTypeEnum.ImportDictionary)
     {
         using (var frm = new ImportDictionaryForm())
         {
             frm.ShowDialog();
             XDoc.XPathSelectElement("*//Extenders").Add(frm.GetNewExtElement().Extension);
             ExtensionDatas.Add(frm.GetNewExtElement());
             RefreshDataSource();
         }
     }
     if ((DictionaryTypeEnum)cbDictionaryType.SelectedItem == DictionaryTypeEnum.SimpleDictionary)
     {
         using (var frm = new SimpleDictionaryForm())
         {
             frm.ShowDialog();
             //XDoc.XPathSelectElement("*//Extenders").Add(frm.GetNewExtElement().Extension);
             //ExtensionDatas.Add(frm.GetNewExtElement());
             RefreshDataSource();
         }
     }
 }