public PeoplePage(HIF hif) { this.hif = hif; InitializeComponent(); BindingContext = hif; }
public PersonPage(HIF hif, Person person) { InitializeComponent(); Hif = hif; Person = person; viewModel = new PersonViewModel(person); BindingContext = viewModel; InitPickerItmes(RacePicker, Races.All, viewModel.Person.CensusData.Race); InitPickerItmes(GenderPicker, Genders.All, viewModel.Person.CensusData.Gender); InitPickerItmes(EthnicityPicker, Ethnicities.All, viewModel.Person.CensusData.Ethnicity); InitPickerItmes(EducationPicker, Educations.All, viewModel.Person.CensusData.Education); InitPickerItmes(RelationPicker, Relations.All, viewModel.Person.CensusData.Relation); RacePicker.SelectedIndexChanged += (sender, args) => { viewModel.Person.CensusData.Race = BindOnChange(RacePicker, Races.All); }; GenderPicker.SelectedIndexChanged += (sender, args) => { viewModel.Person.CensusData.Gender = BindOnChange(GenderPicker, Genders.All); }; EthnicityPicker.SelectedIndexChanged += (sender, args) => { viewModel.Person.CensusData.Ethnicity = BindOnChange(EthnicityPicker, Ethnicities.All); }; EducationPicker.SelectedIndexChanged += (sender, args) => { viewModel.Person.CensusData.Education = BindOnChange(EducationPicker, Educations.All); }; RelationPicker.SelectedIndexChanged += (sender, args) => { viewModel.Person.CensusData.Relation = BindOnChange(RelationPicker, Relations.All); }; }
public TipsPage(HIF hif) { this.hif = hif; InitializeComponent(); signature.StrokeCompleted += (sender, e) => { ButtonAccept.IsEnabled = !signature.IsBlank; }; }
public NoIncomePage(HIF hif, Person person) { InitializeComponent(); Hif = hif; Person = person; BindingContext = person; signature.StrokeCompleted += (sender, e) => { ButtonAccept.IsEnabled = !signature.IsBlank; }; }
public async void Handle_StartOver(object sender, EventArgs e) { var cont = await DisplayAlert("Delete Current Application?", "A new application will be blank and you will have to enter all your information again.", "Start Over", "Cancel"); if (!cont) { return; } var newHif = HIF.CreateNew(); hif.Delete(); hif = newHif; BindingContext = newHif; }
public BasicInfoViewModel(HIF hif) { HIF = hif; CalculateMaxIncome(hif.People.Count); HIF.PropertyChanged += (sender, e) => { OnPropertyChanged("HIF"); OnPropertyChanged("NumberOfAdults"); OnPropertyChanged("NumberOfChildren"); OnPropertyChanged("MinimumIncome"); CalculateMaxIncome(hif.People.Count); }; IncreaseAdults = new Command(HIF.IncreaseAdults); DecreaseAdults = new Command(HIF.DecreaseAdults); IncreaseChildren = new Command(HIF.IncreaseChildren); DecreaseChildren = new Command(HIF.DecreaseChildren); }
public EnergyPage(HIF hif) { hifModel = hif; InitializeComponent(); BindingContext = hif; //HouseholdTypePicker.ItemsSource = HouseholdTypes.All; //HouseholdStatusPicker.ItemsSource = HouseholdStatuses.All; //HeatSourcesPicker.ItemsSource = HeatSources.All; InitPickerItmes(HouseholdTypePicker, HouseholdTypes.All, hif.HouseholdType); InitPickerItmes(HouseholdStatusPicker, HouseholdStatuses.All, hif.HouseholdStatus); HouseholdTypePicker.SelectedIndexChanged += (sender, args) => { hif.HouseholdType = BindOnChange(HouseholdTypePicker, HouseholdTypes.All); }; HouseholdStatusPicker.SelectedIndexChanged += (sender, args) => { hif.HouseholdStatus = BindOnChange(HouseholdStatusPicker, HouseholdStatuses.All); }; }
public App() { InitializeComponent(); MobileCenter.Start($"android={Constants.MobileCenterAndroid};" + $"uwp={Constants.MobileCenterUWP};" + $"ios={Constants.MobileCenteriOS}", typeof(Analytics), typeof(Crashes)); if (UseMockDataStore) { DependencyService.Register <MockDataStore>(); } else { DependencyService.Register <HIFCloudDataStore>(); } // // Load Application // var lastPath = Settings.LastApplicationPath; var hif = HIF.CreateNew(); if (!string.IsNullOrEmpty(lastPath)) { var path = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), lastPath); Console.WriteLine("TRY READ " + path); if (System.IO.File.Exists(path)) { hif = HIF.ReadFile(path); } } MainPage = new NavigationPage(new HomePage(hif)); }
/// <summary> /// Stack, is an object used in teh DependencyParser, for the sake of forming dependencies and workign with the data /// </summary> public Stack() { hif = new HIF("Stack"); this.data = new List <String>(); this.data.Add("root"); }
public BasicInfoPage(HIF hif) { InitializeComponent(); BindingContext = new BasicInfoViewModel(hif); }