예제 #1
0
        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);
        }
예제 #2
0
 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;
 }