Exemple #1
0
        private void buttonEditSymbol_Click(object sender, EventArgs e)
        {
            ListView.SelectedListViewItemCollection selectedSymbols  = this.listViewSymbol.SelectedItems;
            SymbolDataSet.LocalizedSymbolRow        currentSymbolRow = selectedSymbols[0].Tag as SymbolDataSet.LocalizedSymbolRow;
            SymbolDetailForm detailForm = new SymbolDetailForm(currentSymbolRow);

            if (DialogResult.OK == detailForm.ShowDialog(this))
            {
                this.LoadDataSet();
            }
        }
Exemple #2
0
        private void buttonAddSymbol_Click(object sender, EventArgs e)
        {
            ListView.SelectedListViewItemCollection selectedItems      = this.listViewCategory.SelectedItems;
            SymbolDataSet.LocalizedCategoryRow      currentCategoryRow = selectedItems[0].Tag as SymbolDataSet.LocalizedCategoryRow;

            SymbolDataSet.LocalizedSymbolRow currentSymbolRow = this.symbolDataSet.LocalizedSymbol.NewLocalizedSymbolRow();
            currentSymbolRow.CategoryId = currentCategoryRow.CategoryId;
            this.symbolDataSet.LocalizedSymbol.AddLocalizedSymbolRow(currentSymbolRow);

            SymbolDetailForm detailForm = new SymbolDetailForm(currentSymbolRow);

            if (DialogResult.OK == detailForm.ShowDialog(this))
            {
                this.LoadDataSet();
            }
            else
            {
                this.symbolDataSet.LocalizedSymbol.RejectChanges();
            }
        }