Exemplo n.º 1
0
 private void button2_Click(object sender, EventArgs e)
 {
     using (var frm = new SimpleDictionaryForm((XElement)comboBox1.SelectedItem))
     {
         frm.ShowDialog();
     }
 }
Exemplo n.º 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();
                }
            }
        }
Exemplo n.º 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();
         }
     }
 }