public void GraficoPesoStart() { DataPoint dados; List <MassaView> lst = MassaViewModel.listar(); MassaView aux; Graficopeso.Series[0].DataPoints = new DataPointCollection(); for (int i = 0; i < lst.Count; i++) { aux = lst[i]; dados = new DataPoint() { XValue = aux.Dataupadate, YValue = aux.Massa, AxisXLabel = "", Exploded = false, LightingEnabled = false, LegendText = Graficopeso.Series[0].LegendText + " em " + aux.Dataupadate.ToShortDateString() + ": " + aux.Massa + "kg", LabelLineEnabled = false, MarkerEnabled = false, ShowInLegend = true, ShadowEnabled = false }; Graficopeso.Series[0].DataPoints.Add(dados); } }
private void Salvar_Click(object sender, EventArgs e) { App.Current.Actives.ActivePerfil.Idavatar = 1; PerfilViewModel.Gravar(App.Current.Actives.ActivePerfil); MassaView massa = new MassaView() { Idmassa = MassaViewModel.listar().Count + 1, Dataupadate = DateTime.Now.Date, Massa = App.Current.Actives.ActivePerfil.Peso }; massa.Gravar(); NavigationService.Navigate(new Uri("/View/FrmMenuInicial.xaml", UriKind.Relative)); Image img = new Image(); img.Source = AvatarViewModel.BuscarporID(1).imgAvatar; }