Example #1
0
        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;
            }
            }
        }
Example #2
0
 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;
             }
     }
 }