private void MenuGroup_Delete_Click(object sender, EventArgs e) { ImageLabel senderLabel = MenuGroup.SourceControl as ImageLabel; if (senderLabel == null) { return; //想定外 } ShipGroupData group = KCDatabase.Instance.ShipGroup[(int)senderLabel.Tag]; if (group != null && group.GroupID >= 0) { if (MessageBox.Show(string.Format("グループ [{0}] を削除しますか?\r\nこの操作は元に戻せません。", group.Name), "確認", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == System.Windows.Forms.DialogResult.Yes) { if (SelectedTab == senderLabel) { ShipView.Rows.Clear(); SelectedTab = null; } KCDatabase.Instance.ShipGroup.ShipGroups.Remove(group); TabPanel.Controls.Remove(senderLabel); senderLabel.Dispose(); } } else { MessageBox.Show("このグループは削除できません。", "エラー", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
public void Dispose() { Name.Dispose(); ActionKind.Dispose(); AirSuperiority.Dispose(); Distance.Dispose(); Squadrons.Dispose(); }
public void Dispose() { Name.Dispose(); foreach (var ship in Ships) { ship.Dispose(); } }
public void Dispose() { Number.Dispose(); State.Dispose(); }
public void Dispose() { ShipName.Dispose(); Equipments.Dispose(); }
void ReleaseDesignerOutlets() { if (FinishedButton != null) { FinishedButton.Dispose(); FinishedButton = null; } if (ImageCountLabel != null) { ImageCountLabel.Dispose(); ImageCountLabel = null; } if (ImageLabel != null) { ImageLabel.Dispose(); ImageLabel = null; } if (imageStackLabel != null) { imageStackLabel.Dispose(); imageStackLabel = null; } if (ImageViewSession != null) { ImageViewSession.Dispose(); ImageViewSession = null; } if (IndependentButton != null) { IndependentButton.Dispose(); IndependentButton = null; } if (LeftArrow != null) { LeftArrow.Dispose(); LeftArrow = null; } if (MissedButton != null) { MissedButton.Dispose(); MissedButton = null; } if (PromptedButton != null) { PromptedButton.Dispose(); PromptedButton = null; } if (RightArrow != null) { RightArrow.Dispose(); RightArrow = null; } if (StatsLabel != null) { StatsLabel.Dispose(); StatsLabel = null; } }