Esempio n. 1
0
        public static IAppComponent CreateAppComponent(Utils.eAppComponent i_Context, Control.ControlCollection i_Controls, User i_User)
        {
            IAppComponent appComponent = null;

            switch (i_Context)
            {
            case Utils.eAppComponent.UserAlbumPictures:
                appComponent = new UserAlbumPicturesComponent();
                break;

            case Utils.eAppComponent.UserEvents:
                appComponent = new UserEventsComponent()
                {
                    User = i_User
                };
                break;

            case Utils.eAppComponent.UserProfile:
                appComponent = new UserProfileComponent()
                {
                    User = i_User
                };
                break;
            }

            i_Controls.Add(appComponent as UserControl);
            return(appComponent);
        }
Esempio n. 2
0
 void IAppComponent.Initialize()
 {
     InitializeComponent();
     ButtonAttachAFile.Click += ButtonAttachAFile_Click;
     ButtonPost.Click        += ButtonPost_Click;
     m_userEventsComponent    = AppComponentFactory.CreateAppComponent(Utils.eAppComponent.UserEvents, Controls, User);
     m_userEventsComponent.Initialize();
     setEventsComponentVisualSettings();
 }