Пример #1
0
        public static Form GetForm(FormType i_FormType, Form i_OpenedBy)
        {
            Form toReturn  = null;
            int  formIndex = (int)i_FormType;

            switch (formIndex)
            {
            case 0:
                toReturn = new FriendsBirthdayForm(i_OpenedBy);
                break;

            case 1:
                toReturn = new SearchForm(i_OpenedBy);
                break;

            case 2:
                toReturn = new ImageGalleryForm(i_OpenedBy);
                break;

            case 3:
                toReturn = new UploadPostForm(i_OpenedBy);
                break;

            case 4:
                toReturn = new AboutMeForm(i_OpenedBy);
                break;
            }

            if (toReturn == null)
            {
                throw new ArgumentException("Invalid FormType given!!!");
            }

            return(toReturn);
        }
Пример #2
0
        private void initializeAboutMeForm()
        {
            FormType    formType = FormType.AboutMe;
            AboutMeForm aboutMe  = ReturnableFormFactory.GetForm(formType, this) as AboutMeForm;

            Hide();
            aboutMe.ShowDialog();
        }
Пример #3
0
        private void initializeAboutMeForm()
        {
            FormType    formType = FormType.AboutMe;
            AboutMeForm aboutMe  = ReturnableFormFactory.GetForm(formType, this) as AboutMeForm;

            aboutMe.m_DoWhenFormIsClosed += () =>
            {
                setFormUsageDetails(aboutMe);
            };
            Hide();
            aboutMe.ShowDialog();
        }