/// <summary> /// constructor of the Overview Plugin PageModel /// sets up eventhandler for structure refreshed event /// </summary> /// <param name="model"></param> public AddIngredientPageModel(IPluginCollector _pluginCollector) { Name = "AddIngredient"; pluginCollector = _pluginCollector; settingsModel = (MonitoringPluginSettingsModel)pluginCollector.SettingsModels.Where(x => x.Key == PluginNames.MonitoringPluginName).Select(x => x.Value).FirstOrDefault(); }
public AddMealPage(IPluginCollector pluginCollector, MealDataPoint point) { this.BindingContext = new AddMealPageModel(pluginCollector, point); model = (AddMealPageModel)this.BindingContext; model.WireEvents(this); InitializeComponent(); }
/// <summary> /// loads the PluginCollector and the list of the SettingsModels to a local variable /// </summary> /// <param name="pluginCollector"></param> public NavigationPageModel(IPluginCollector pluginCollector) { pluginCollector = pluginCollector; mainSettingsModel = pluginCollector.SettingsModels.Where(x => x.Key == PluginNames.MainPluginName).Select(x => x.Value).First(); List <SettingsModel> settingsModels = pluginCollector.SettingsModels.Values.ToList(); NavigationItems = (from item in settingsModels select item.SideBarItem).ToList(); }
public AddBloodSugarPageModel(IPluginCollector _pluginCollector, BloodSugarDataPoint point) { Name = "AddBloodSugar"; pluginCollector = _pluginCollector; Time = point.Date.TimeOfDay; Date = point.Date; BloodSugarValue = point.BloodSugarLevel; existingPoint = point; }
/// <summary> /// constructor of the Overview Plugin PageModel /// sets up eventhandler for structure refreshed event /// </summary> /// <param name="model"></param> public MonitoringPluginPageModel(IPluginCollector _pluginCollector) { Name = PluginNames.MonitoringPluginName; pluginCollector = _pluginCollector; BloodSugarDataPoints = new List <ChartDataPoint>(); MealDataPoints = new ObservableCollection <ChartDataPoint>(); MedDataPoints = new ObservableCollection <ChartDataPoint>(); SettingsModel = (MonitoringPluginSettingsModel)pluginCollector.SettingsModels.Where(x => x.Key == PluginNames.MonitoringPluginName).Select(x => x.Value).FirstOrDefault(); }
public AddMealPageModel(IPluginCollector _pluginCollector, MealDataPoint point) { Name = "AddMeal"; pluginCollector = _pluginCollector; Ingredients = point.Ingredients; Time = point.Date.TimeOfDay; Date = point.Date; BreadUnits = point.BreadUnits; EnergyAmount = point.EnergyAmount; existingPoint = point; }
public AddMedicinePageModel(IPluginCollector _pluginCollector, MedicineDataPoint point) { Name = "AddMedicine"; pluginCollector = _pluginCollector; Time = point.Date.TimeOfDay; Date = point.Date; MedicineUnits = Enum.GetNames(typeof(MedicineUnits)).ToList(); MedicineUnitIndex = MedicineUnits.ToList().IndexOf(point.Unit); MedicineAmount = point.Amount; MedicineName = point.Name; existingPoint = point; }
/// <summary> /// constructor of the Overview Plugin PageModel /// sets up eventhandler for structure refreshed event /// </summary> /// <param name="model"></param> public AddBloodSugarPageModel(IPluginCollector _pluginCollector) { Name = "AddBloodSugar"; pluginCollector = _pluginCollector; }
/// <summary> /// gets all settingsmodel from the plugincollector to get the widgets on application start /// </summary> /// <param name="pluginCollector"></param> public MainPageModel(IPluginCollector pluginCollector) { Name = "MainPlugin"; _pluginCollector = pluginCollector; //settingsModel = _pluginCollector.SettingsModels.Where(x => x.Key == PluginNames.MainPluginName).Select(x => x.Value).First(); }
/// <summary> /// constructor of the Overview Plugin PageModel /// sets up eventhandler for structure refreshed event /// </summary> /// <param name="model"></param> public AddMealPageModel(IPluginCollector _pluginCollector) { Name = "AddMeal"; pluginCollector = _pluginCollector; Ingredients = new List <Ingredient>(); }
public AddMedicinePage(IPluginCollector pluginCollector, MedicineDataPoint point) { this.BindingContext = new AddMedicinePageModel(pluginCollector, point); InitializeComponent(); }
/// <summary> /// constructor of the Overview Plugin PageModel /// sets up eventhandler for structure refreshed event /// </summary> /// <param name="model"></param> public AddMedicinePageModel(IPluginCollector _pluginCollector) { Name = "AddMedicine"; pluginCollector = _pluginCollector; MedicineUnits = Enum.GetNames(typeof(MedicineUnits)).ToList(); }
public AddBloodSugarPage(IPluginCollector pluginCollector, BloodSugarDataPoint point) { this.BindingContext = new AddBloodSugarPageModel(pluginCollector, point); InitializeComponent(); }