internal RequestViewModel(Xamarin.Forms.View element, SelectedViewModel SelectedViewModel, Xamarin.Forms.StackLayout spList, Xamarin.Forms.ControlTemplate ctControlTemplate) { this._element = element; this.SelectedViewModel = SelectedViewModel; this._spList = spList; this._ctControlTemplate = ctControlTemplate; }
public void PopViewModel(object viewModel) { if (!(viewModel is ShellViewModel) && SelectedViewModel.Equals(viewModel)) { m_viewModelStack.Pop(); SetViewRelatedHeaders(); RaisePropertyChangedEvent("SelectedViewModel"); } }
public Selected() { InitializeComponent(); var vm = new SelectedViewModel(); Machine.ViewModels.Ioc.SimpleIoc <IMachineStructEditor> .Register(vm); DataContext = vm; }
private bool CanExecuteOuvrirAcceuil(object obj) { if (SelectedViewModel.GetType() != typeof(ViewAccueilViewModel)) { return(true); } else { return(false); } }
public ActionResult Selected(string handle, int?v) { var model = new SelectedViewModel(); if (model.Get(handle, v)) { TempData["TOC"] = model.OuterTOC; return(View(model)); } return(RedirectToAction("Index", "Help")); }
private void Picker_SelectedIndexChanged(object sender, EventArgs e) { SelectedViewModel view = this.BindingContext as SelectedViewModel; if (null != view) { if (null != view.SelectedLang && null != view.GoCommand) { view.GoCommand.Execute("Lang"); } } }
private void OnRefresh(object sender, EventArgs e) { if (SelectedViewModel.GetType() == typeof(ViewAccueilViewModel) || SelectedViewModel.GetType() == typeof(ViewSerieViewModel) || SelectedViewModel.GetType() == typeof(ViewRechercheViewModel)) { SelectedViewModel = new ViewAccueilViewModel(); OpenInfoSerieEvent.GetInstance().Handler += OnOpenInfoSerie; RetourWindowAccueilEvent.GetInstance().Handler += OnRetourAccueil; } if (SelectedViewModel.GetType() == typeof(ViewProfilViewModel)) { SelectedViewModel = new ViewProfilViewModel(); OpenInfoSerieEvent.GetInstance().Handler += OnOpenInfoSerie; } }
public void PushViewModel(object viewModel) { Debug.Assert(!(viewModel is ShellViewModel), "ShellViewModel incorrectly pushed onto stack. Use ClearViewModels()."); ClearModalViewModel(); if (viewModel is ShellViewModel) { ClearViewModels(); } else if (!SelectedViewModel.Equals(viewModel)) { m_viewModelStack.Push(viewModel); } SetViewRelatedHeaders(); RaisePropertyChangedEvent("SelectedViewModel"); }
public MainViewModel() { AppInfo appInfo = new AppInfo(typeof(MainViewModel).Assembly); Title = appInfo.Title; ViewModels = new ObservableCollection <ViewModelBase> { new ObservableDictionaryViewModel(), new ObservableHashSetViewModel(), new ObservableKeyedDictionaryViewModel(), new ObservableListViewModel(), new ObservableSortedSetViewModel() }; ChangeViewCommand = new RelayCommand <ViewModelBase>(vm => SelectedViewModel = vm, vm => vm != SelectedViewModel); GenerateCommand = new RelayCommand(() => SelectedViewModel.Generate(), () => SelectedViewModel != null); ClearCommand = new RelayCommand(() => SelectedViewModel.Clear(), () => SelectedViewModel != null); }
internal ChangeCountViewModel(Xamarin.Forms.View element, SelectedViewModel SelectedViewModel, Action Recalc) { this._element = element; this.SelectedViewModel = SelectedViewModel; this.Recalc = Recalc; }
private void ShowCustom(object obj) { SelectedViewModel = new SelectedViewModel { ViewModel = new CustomViewModel(), ViewModelName = nameof(CustomViewModel) }; }
private void ShowCertificationLvl(object obj) { SelectedViewModel = new SelectedViewModel { ViewModel = new CertificationLvlViewModel(), ViewModelName = nameof(CertificationLvlViewModel) }; }
private void ShowBigBox(object obj) { SelectedViewModel = new SelectedViewModel { ViewModel = new BigBoxViewModel(), ViewModelName = nameof(BigBoxViewModel) }; }
private void SaveButton_Click(object sender, RoutedEventArgs e) => SelectedViewModel?.Save();