Example #1
0
        public WinFormProfilesPage()
        {
            InitializeComponent();

            _profilesVm      = new ProfilesViewModel();
            _page            = Repository.Instance.ViewManager.CreateViewFor(_profilesVm).View;
            wpfControl.Child = _page;
            this.MonitorVisibility();
        }
Example #2
0
        public ActionResult Profiles()
        {
            var views = ApplicationManager.BuildViews();

            var model = new ProfilesViewModel();

            model.Profiles = views.Profiles.GetSummaries();

            return(View(model));
        }
Example #3
0
        public void SetUp()
        {
            _selectedProfileProvider = Substitute.For <ISelectedProfileProvider>();
            _translationUpdater      = Substitute.For <ITranslationUpdater>();

            _profilesViewModel = new ProfilesViewModel(_selectedProfileProvider, _translationUpdater, new DesignTimeCommandLocator(), null, null);

            _translation = new ProfileMangementTranslation();
            _profilesViewModel.Translation = _translation;
        }
        public ActionResult Details(ProfilesViewModel pvm)
        {
            var userId = User.Identity.GetUserId();
            var userbd = db.Users.Find(userId);

            userbd.Name        = pvm.Name;
            userbd.PhoneNumber = pvm.PhoneNumber;
            userbd.Picture     = pvm.Picture;
            userbd.Videos      = pvm.Videos;
            userbd.Hobbies     = pvm.Hobbies;
            userbd.Description = pvm.Description;
            db.SaveChanges();

            return(RedirectToAction("Details"));
        }
Example #5
0
 public void Reset()
 {
     _profilesVm       = new ProfilesViewModel();
     _page.DataContext = _profilesVm;
 }
 private void BuildProfilesViewModel()
 {
     _profilesViewModel = new ProfilesViewModel(_selectedProfileProvider, _translationUpdater, new DesignTimeCommandLocator(), null, null, _gpoSettings);
 }
Example #7
0
 public ProfilesView(ProfilesViewModel viewModel)
 {
     InitializeComponent();
     this.DataContext = viewModel;
 }