private void OnActionModelEdited(string name) { ActionModelType?type = EpisModel.FindTypeOfAction(name); switch (type) { case (ActionModelType.SecretAnnouncement): { SecretAnnouncementEditor ActionModelEditor = new SecretAnnouncementEditor(); SecretAnnouncementInfo modelInfo = EpisModel.GetSecretAnnouncementInfo(name); if (modelInfo != null) { ActionModelEditor.SetOriginalActionModel(modelInfo); ActionModelEditor.ShowDialog(); } break; } case (ActionModelType.PublicAnnouncement): { PublicAnnouncementEditor ActionModelEditor = new PublicAnnouncementEditor(); PublicAnnouncementInfo modelInfo = EpisModel.GetPublicAnnouncementInfo(name); if (modelInfo != null) { ActionModelEditor.SetOriginalActionModel(modelInfo); ActionModelEditor.ShowDialog(); } break; } } }
private void OnActionModelEdited(string name) { ActionModelType? type = EpisModel.FindTypeOfAction(name); switch (type) { case(ActionModelType.SecretAnnouncement): { SecretAnnouncementEditor ActionModelEditor = new SecretAnnouncementEditor(); SecretAnnouncementInfo modelInfo = EpisModel.GetSecretAnnouncementInfo(name); if (modelInfo != null) { ActionModelEditor.SetOriginalActionModel(modelInfo); ActionModelEditor.ShowDialog(); } break; } case (ActionModelType.PublicAnnouncement): { PublicAnnouncementEditor ActionModelEditor = new PublicAnnouncementEditor(); PublicAnnouncementInfo modelInfo = EpisModel.GetPublicAnnouncementInfo(name); if (modelInfo != null) { ActionModelEditor.SetOriginalActionModel(modelInfo); ActionModelEditor.ShowDialog(); } break; } } }