コード例 #1
0
        private void ListViewDefferedCategoriesMouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (listViewDefferedCategories.SelectedItems.Count > 0)
            {
                DeferredCategoryAddingForm form = new DeferredCategoryAddingForm(_currentAircraft,
                                                                                 (DeferredCategory)listViewDefferedCategories.SelectedItems[0].Tag);
                form.ShowDialog();

                if (form.DialogResult == DialogResult.OK)
                {
                    UpdateInformation();
                }
            }
        }
コード例 #2
0
        private void ButtonAddClick(object sender, EventArgs e)
        {
            DeferredCategoryAddingForm form = new DeferredCategoryAddingForm(_currentAircraft);

            form.ShowDialog();

            if (form.DialogResult != DialogResult.OK)
            {
                return;
            }

            if (form.DefferedCategory != null)
            {
                _defferedCategories.Add(form.DefferedCategory);
            }
            UpdateInformation();
        }