public override Task SetViewModelAsync(PropertyPageViewModel propertyPageViewModel)
        {
            textBox1.DataBindings.Add("Text", propertyPageViewModel, nameof(SamplePropertyPageViewModel.TargetFramework));
            textBox2.DataBindings.Add("Text", propertyPageViewModel, nameof(SamplePropertyPageViewModel.AssemblyName));

            return(Task.CompletedTask);
        }
Example #2
0
        public override Task SetViewModelAsync(PropertyPageViewModel propertyPageViewModel)
        {
            mViewModel = (CosmosPropertyPageViewModel)propertyPageViewModel;

            #region Profile

            butnProfileClone.Click  += new EventHandler(butnProfileClone_Click);
            butnProfileDelete.Click += new EventHandler(butnProfileDelete_Click);
            butnProfileRename.Click += new EventHandler(butnProfileRename_Click);

            lboxProfile.SelectedIndexChanged += delegate(Object sender, EventArgs e)
            {
                var xProfile = (ProfileItem)lboxProfile.SelectedItem;
                if (xProfile.Prefix != mViewModel.BuildProperties.Profile)
                {
                    // Save existing profile
                    mViewModel.BuildProperties.SaveProfile(mViewModel.BuildProperties.Profile);
                    // Load newly selected profile
                    mViewModel.BuildProperties.LoadProfile(xProfile.Prefix);
                    mViewModel.BuildProperties.Profile = xProfile.Prefix;

                    UpdateUI();
                }
            };

            #endregion

            # region Deploy
Example #3
0
 public virtual void InitializePropertyPage(PropertyPageViewModel viewModel) {
     _ignoreEvents = true;
     IsDirty = false;
     ViewModel = viewModel;
     ViewModel.PropertyChanged += ViewModel_PropertyChanged;
     ViewModel.ParentControl = this;
     _ignoreEvents = false;
 }
Example #4
0
        protected async override Task OnSetObjects(bool isClosing) {
            if (isClosing) {
                _control.DetachViewModel();
                return;
            } else {
                //viewModel can be non-null when the configuration is changed. 
                if (_control == null) {
                    _control = CreatePropertyPageControl();
                }
            }

            _viewModel = CreatePropertyPageViewModel();

            await _viewModel.Initialize();

            _control.InitializePropertyPage(_viewModel);
        }
        public ActionResult Show(int propertyId, string propertyName)
        {
            PropertyPageViewModel propertyModel = new PropertyPageViewModel();

            var property = ServiceLocator.GetPropertyService().GetPropertyById(propertyId);

            var properties = ServiceLocator.GetPropertyService().GetProperties(property.State);

            propertyModel.CompleteProperties = properties.ToList().FindAll(o => o.IsComplete);
            propertyModel.InCompleteProperties = properties.ToList().FindAll(o => !o.IsComplete);
            propertyModel.State = property.State.ToString();
            propertyModel.Property = property;

            var model = new PageViewModel();
            model.View = "Property";
            model.Title = "Properties";
            model.SelectedNavigation = "Properties";
            model.Model = propertyModel;

            return View("StandardPageLayout", model);
        }
        public ActionResult State(State state)
        {
            PropertyPageViewModel propertyModel = new PropertyPageViewModel();

            var properties = ServiceLocator.GetPropertyService().GetProperties(state);

            propertyModel.CompleteProperties = properties.ToList().FindAll(o => o.IsComplete);
            propertyModel.InCompleteProperties = properties.ToList().FindAll(o => !o.IsComplete);
            propertyModel.State = state.ToString();

            if (this.Request.IsAjaxRequest())
            {
                return this.PartialView("PropertiesInState", propertyModel);
            }

            var model = new PageViewModel();
            model.View = "AustralianMap";
            model.Title = "Properties";
            model.SelectedNavigation = "Properties";
            model.Model = propertyModel;

            return View("StandardPageLayout", model);
        }
Example #7
0
 public override Task SetViewModelAsync(PropertyPageViewModel propertyPageViewModel)
 {
     DataContext = propertyPageViewModel;
     return(Task.CompletedTask);
 }