public GitFlowFeaturesSection() { Title = "Current Features"; IsVisible = false; model = new FeaturesViewModel(this); UpdateVisibleState(); }
public IActionResult Index() { var viewModel = new FeaturesViewModel(); var controllerFeature = new ControllerFeature(); _partManager.PopulateFeature(controllerFeature); viewModel.Controllers = controllerFeature.Controllers.ToList(); var metaDataReferenceFeature = new MetadataReferenceFeature(); _partManager.PopulateFeature(metaDataReferenceFeature); viewModel.MetadataReferences = metaDataReferenceFeature.MetadataReferences .ToList(); var tagHelperFeature = new TagHelperFeature(); _partManager.PopulateFeature(tagHelperFeature); viewModel.TagHelpers = tagHelperFeature.TagHelpers.ToList(); var viewComponentFeature = new ViewComponentFeature(); _partManager.PopulateFeature(viewComponentFeature); viewModel.ViewComponents = viewComponentFeature.ViewComponents.ToList(); return(View(viewModel)); }
// Methods public ActionResult <FeaturesViewModel> Index() { // FeaturesViewModel var viewModel = new FeaturesViewModel(); { // ControllerFeature var controllerFeature = new ControllerFeature(); _applicationPartManager.PopulateFeature(controllerFeature); viewModel.Controllers = controllerFeature.Controllers.Select(x => x.FullName).ToList(); // TagHelperFeature var tagHelperFeature = new TagHelperFeature(); _applicationPartManager.PopulateFeature(tagHelperFeature); viewModel.TagHelpers = tagHelperFeature.TagHelpers.Select(x => x.FullName).ToList(); // ViewComponentFeature var viewComponentFeature = new ViewComponentFeature(); _applicationPartManager.PopulateFeature(viewComponentFeature); viewModel.ViewComponents = viewComponentFeature.ViewComponents.Select(x => x.FullName).ToList(); } // Return return(viewModel); }
public FeaturesUI(FeaturesViewModel model) { InitializeComponent(); DataContext = model; FeaturesGrid.Loaded += FeaturesGridOnLoaded; }
private void btnFindCommuniKateTopPageLocation_Click(object sender, RoutedEventArgs e) { Microsoft.Win32.OpenFileDialog openFileDialog = new Microsoft.Win32.OpenFileDialog { Filter = "Open Board Format (*.OBF or *.OBZ)|*.obf; *.obz|Open Board Format file (*.OBF)|*.obf|Open Board Format archive (*.OBZ)|*.obz" }; if (openFileDialog.ShowDialog() == true) { string fileLocation = null; if (openFileDialog.FileName.EndsWith(@".obf") || openFileDialog.FileName.EndsWith(@".obz")) { txtCommuniKateTopPageLocation.Text = openFileDialog.FileName; fileLocation = txtCommuniKateTopPageLocation.Text; } else { txtCommuniKateTopPageLocation.Text = Properties.Resources.COMMUNIKATE_TOPPAGE_LOCATION_ERROR_LABEL; } // TODO: do this with binding only FeaturesViewModel viewModel = this.DataContext as FeaturesViewModel; if (viewModel != null && !string.IsNullOrWhiteSpace(fileLocation)) { viewModel.CommuniKatePagesetLocation = fileLocation; viewModel.CommuniKateStagedForDeletion = true; } } }
public override void Execute(object parameter) { if (m_information != null) { if (m_window == null) { var features = SingletonDataProviders.Providers.FeatureCache.FindByDatasetId(m_information.DatasetId); if (features == null || features.Count < 1) { return; } var window = new LargeFeatureView(); var viewModel = new FeaturesViewModel(features, m_name); window.DataContext = viewModel; window.WindowStartupLocation = WindowStartupLocation.CenterScreen; window.Show(); m_window = window; m_window.Closed += m_window_Closed; } m_window.BringIntoView(); } }
async Task GetList() { ViewModel = new FeaturesViewModel(); ViewModel.Features = new List <Feature>(); var featureList = await _featureServices.GetFeaturesAsync(); ViewModel.Features = featureList; }
public IActionResult Features(Project project) { var model = new FeaturesViewModel { Features = _featureServices.GetFeaturesByProjectId(project.Id) }; return(View(model)); }
private void ApplyChanges() { DictionaryViewModel.ApplyChanges(); GesturesViewModel.ApplyChanges(); PointingAndSelectingViewModel.ApplyChanges(); SoundsViewModel.ApplyChanges(); VisualsViewModel.ApplyChanges(); FeaturesViewModel.ApplyChanges(); WordsViewModel.ApplyChanges(); }
public IActionResult GetPinsFromBrand(string Brand, float Latitude, float Longitude) { var authorizeds = _authorizedRepository.GetAllByBrand(Brand); var search = new SearchViewModel(); foreach (var authorized in authorizeds) { //check if the distance of authorized is inside the avalaible radius var distance = Geolocation.CalculateDistance(Latitude, Longitude, Convert.ToDouble(authorized.Latitude), Convert.ToDouble(authorized.Longitude), 'K'); if (distance > DISTANCE_LIMIT) { continue; } var Authorized = new AuthorizedViewModel() { Id = authorized.Id, Nome = authorized.Nome, Titulo = authorized.Titulo, Descricao = authorized.Descricao, Endereco = authorized.Endereco, Telefone = authorized.Telefone, Latitude = Convert.ToDouble(authorized.Latitude), Longitude = Convert.ToDouble(authorized.Longitude), Email = authorized.Email, HorarioFuncionamento = authorized.HorarioFuncionamento, Servicos = authorized.Servicos }; var geometry = new GeometryViewModel { Coordinates = new List <double> { Convert.ToDouble(authorized.Longitude), Convert.ToDouble(authorized.Latitude) } }; var property = new PropertyViewModel { Title = authorized.Nome }; var feature = new FeaturesViewModel { Geometry = geometry, Property = property }; search.Features.Add(feature); search.Authorizeds.Add(Authorized); } var jsonString = JsonSerializer.Serialize(search); return(Ok(jsonString)); }
public ActionResult EditFeatures() { var list = db.Features.ToList(); var vm = new FeaturesViewModel() { Feature1Id = new SelectList(list, "FeatureId", "Description"), Feature2Id = new SelectList(list, "FeatureId", "Description"), Feature3Id = new SelectList(list, "FeatureId", "Description"), }; return(View(vm)); }
public void LoadFeaturesViewModel(FeaturesViewModel viewModel) { viewModel.PenHeadline = GetStringValue(_languageCurrent.FEATURES_PEN_HEADLINE, "FEATURES_PEN_HEADLINE"); viewModel.PenBodyFirst = GetStringValue(_languageCurrent.FEATURES_PEN_BODY_FIRST, "FEATURES_PEN_BODY_FIRST"); viewModel.PenBodyBold = GetStringValue(_languageCurrent.FEATURES_PEN_BODY_BOLD, "FEATURES_PEN_BODY_BOLD"); viewModel.PenBodyLast = GetStringValue(_languageCurrent.FEATURES_PEN_BODY_LAST, "FEATURES_PEN_BODY_LAST"); viewModel.InkHeadline = GetStringValue(_languageCurrent.FEATURES_INK_HEADLINE, "FEATURES_INK_HEADLINE"); viewModel.InkBodyFirst = GetStringValue(_languageCurrent.FEATURES_INK_BODY_FIRST, "FEATURES_INK_BODY_FIRST"); viewModel.InkBodyBold = GetStringValue(_languageCurrent.FEATURES_INK_BODY_BOLD, "FEATURES_INK_BODY_BOLD"); viewModel.InkBodyLast = GetStringValue(_languageCurrent.FEATURES_INK_BODY_LAST, "FEATURES_INK_BODY_LAST"); viewModel.WebCamHeadline = GetStringValue(_languageCurrent.FEATURES_WEBCAM_HEADLINE, "FEATURES_WEBCAM_HEADLINE"); viewModel.WebCamBodyFirst = GetStringValue(_languageCurrent.FEATURES_WEBCAM_BODY_FIRST, "FEATURES_WEBCAM_BODY_FIRST"); viewModel.WebCamBodyBold = GetStringValue(_languageCurrent.FEATURES_WEBCAM_BODY_BOLD, "FEATURES_WEBCAM_BODY_BOLD"); viewModel.WebCamBodyLast = GetStringValue(_languageCurrent.FEATURES_WEBCAM_BODY_LAST, "FEATURES_WEBCAM_BODY_LAST"); }
public ActionResult EditFeatures([Bind(Include = "F1,F2,F3,")] FeaturesViewModel vm) { if (ModelState.IsValid) { foreach (var i in db.Features.ToList()) { i.IsFeature = false; } db.Features.Find(vm.F1).IsFeature = true; db.Features.Find(vm.F2).IsFeature = true; db.Features.Find(vm.F3).IsFeature = true; db.SaveChanges(); return(RedirectToAction("AllFeatures")); } return(View(vm)); }
public ManagementViewModel( IAudioService audioService, IDictionaryService dictionaryService, IWindowManipulationService windowManipulationService) { //Instantiate child VMs DictionaryViewModel = new DictionaryViewModel(dictionaryService); GesturesViewModel = new GesturesViewModel(); PointingAndSelectingViewModel = new PointingAndSelectingViewModel(); SoundsViewModel = new SoundsViewModel(audioService); VisualsViewModel = new VisualsViewModel(windowManipulationService); FeaturesViewModel = new FeaturesViewModel(); WordsViewModel = new WordsViewModel(dictionaryService); //Instantiate interaction requests and commands ConfirmationRequest = new InteractionRequest <Confirmation>(); OkCommand = new DelegateCommand <Window>(Ok); //Can always click Ok CancelCommand = new DelegateCommand <Window>(Cancel); //Can always click Cancel }
public FeaturesPage() { InitializeComponent(); VM = (FeaturesViewModel)this.Resources["ViewModel"]; }
public FeaturesUI(FeaturesViewModel model) { InitializeComponent(); DataContext = model; }