public static Form CreateForm(eSubFormTypes i_SubFormType) { Form subForm = null; switch (i_SubFormType) { case eSubFormTypes.PostPreview: { subForm = new SubFormPostPreview(); break; } case eSubFormTypes.PhotoPreview: { subForm = new SubFormPhotoPreview(); break; } case eSubFormTypes.PhotoUpload: { subForm = new SubFormPhotoUpload(); break; } } return(subForm); }
private MainForm() { InitializeComponent(); addObserversToNotifiers(); m_SubFormPhotoPreview = SubFormFactory.CreateForm(SubFormFactory.eSubFormTypes.PhotoPreview) as SubFormPhotoPreview; m_SubFormPostPreview = SubFormFactory.CreateForm(SubFormFactory.eSubFormTypes.PostPreview) as SubFormPostPreview; m_SubFormPhotoUpload = SubFormFactory.CreateForm(SubFormFactory.eSubFormTypes.PhotoUpload) as SubFormPhotoUpload; }