Exemplo n.º 1
0
        private void DEBUG_btn_add_fake_act_Click(object sender, RoutedEventArgs e)
        {
            Random rnd = new Random();

            UserControls.SingleRun sr = new UserControls.SingleRun(DateTime.Now, "Fake shoes", rnd.Next(1000, 12000), TimeSpan.FromMinutes(rnd.Next(45, 120)));
            StackPanelMain.Children.Add(sr);
        }
Exemplo n.º 2
0
        public void refreshMainPanel()
        {
            StackPanelMain.Children.Clear();

            int sum        = 0;
            var st_results = context.SP_SelectAllRuns_WithShouesName();

            foreach (SP_SelectAllRuns_WithShouesName_Result line in st_results)
            {
                sum = sum + line.Distance;
                UserControls.SingleRun run = new UserControls.SingleRun(line.Date, line.Name, line.Distance, line.Time);
                StackPanelMain.Children.Add(run);
            }

            text_Sum.Text = String.Format("Total distance: {0}", sum.ToString());
        }