예제 #1
0
        private void addCustomAPIButton_ButtonClick(object sender, EventArgs e)
        {
            using (EditAPI dialog = new EditAPI(_tableOrViewMapping.ContainingProject))
            {
                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    dialog.API.JoinToTableMapping(_tableOrViewMapping);
                    AddAPI(dialog.API);

                    PropertyChanged(sender, e);
                }
            }
        }
예제 #2
0
        private void EditAPI()
        {
            using (EditAPI dialog = new EditAPI(_tableOrViewMapping.ContainingProject, (API)apisListBox.SelectedItem))
            {
                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    int itemIndex = apisListBox.SelectedIndex;

                    apisListBox.Items.Remove(apisListBox.SelectedItem);
                    apisListBox.Items.Insert(itemIndex, dialog.API);

                    SaveOptions();
                }
            }
        }