void
MsnSelectDlg::OnDel(AWEvent* event)
{
	const char* cname = 0;

	if (cmb_campaigns)
	cname = cmb_campaigns->GetSelectedItem();
	else if (lst_campaigns)
	cname = lst_campaigns->GetSelectedItem();

	Campaign* c = Campaign::SelectCampaign(cname);
	if (!c) return;

	Mission* m = c->GetMission(mission_id);
	if (!m) return;

	ConfirmDlg* confirm = manager->GetConfirmDlg();
	if (confirm) {
		char msg[256];
		sprintf_s(msg, Game::GetText("MsnSelectDlg.are-you-sure").data(), m->Name());
		confirm->SetMessage(msg);
		confirm->SetTitle(Game::GetText("MsnSelectDlg.confirm-delete"));
		confirm->SetParentControl(btn_del);

		manager->ShowConfirmDlg();
	}

	else {
		OnDelConfirm(event);
	}
}
void
MsnSelectDlg::OnEdit(AWEvent* event)
{
	const char* cname = 0;

	if (cmb_campaigns)
	cname = cmb_campaigns->GetSelectedItem();
	else if (lst_campaigns)
	cname = lst_campaigns->GetSelectedItem();

	Campaign* c = Campaign::SelectCampaign(cname);
	if (!c) return;

	Mission*    m     = c->GetMission(mission_id);
	if (!m) return;

	MsnEditDlg* editor = manager->GetMsnEditDlg();

	if (editor) {
		edit_mission = m;

		editor->SetMissionInfo(c->GetMissionInfo(mission_id));
		editor->SetMission(m);
		manager->ShowMsnEditDlg();
	}
}