예제 #1
0
        //Constructor for First Excercise
        public Strength_Execution(Trainingsplan_Basic tp, int excerciseNumber)
        {
            InitializeComponent();
            cur_exercise          = excerciseNumber;
            cur_tp                = tp;
            LTrainingsplan.Text   = tp.name;
            LExcerciseNumber.Text = excerciseNumber.ToString();

            GetTrainingsplanData();
            //Get or Create Execution ID
            try
            {
                var db_execution = new SQLiteConnection(App.filePath);
                IEnumerable <Excercise_Ausführung> ausf = db_execution.Query <Excercise_Ausführung>("Select execution_id FROM Excercise_Ausführung");
                List <Excercise_Ausführung>        af   = ausf.ToList <Excercise_Ausführung>();

                foreach (Excercise_Ausführung element in af)
                {
                    cur_execution = element.execution_id;
                }
                cur_execution++;
            }
            catch
            {
                using (SQLiteConnection conn = new SQLiteConnection(App.filePath))
                {
                    conn.CreateTable <Excercise_Ausführung>();
                    cur_execution = 0;
                }
            }
        }
예제 #2
0
        public Strength_Execution(Trainingsplan_Basic tp, int excerciseNumber, int excecutionNumber)
        {
            InitializeComponent();
            cur_exercise          = excerciseNumber;
            cur_tp                = tp;
            LTrainingsplan.Text   = tp.name;
            LExcerciseNumber.Text = excerciseNumber.ToString();
            GetTrainingsplanData();

            cur_execution = excecutionNumber;
        }
예제 #3
0
        void SaveTp(object sender, System.EventArgs e)
        {
            var db     = new SQLiteConnection(App.filePath);
            var tpname = tp.Text;

            Trainingsplan_Basic tp_basic = new Trainingsplan_Basic()
            {
                name = tpname
            };

            //Insert the Trainingsplan
            using (SQLiteConnection conn = new SQLiteConnection(App.filePath))
            {
                conn.CreateTable <Trainingsplan_Basic>();
                int RowsAdded = conn.Insert(tp_basic);
            }

            App.Current.MainPage = new Strength_StartPage();
        }
 public Overview_Singe_Trainingsplan_Ausf_Statistics(Trainingsplan_Basic tp)
 {
     InitializeComponent();
     this.tpb = tp;
 }
예제 #5
0
 public SE_Trainingsplan(Trainingsplan_Basic tp)
 {
     InitializeComponent();
     cur_tp = tp;
 }
예제 #6
0
 public Overview_Single_Trainingsplan(Trainingsplan_Basic tp)
 {
     InitializeComponent();
     this.tp = tp;
 }
예제 #7
0
        private void ToAusfOverview(object sender, EventArgs e)
        {
            Trainingsplan_Basic tp = (Trainingsplan_Basic)lv_Overview.SelectedItem;

            App.Current.MainPage = new Overview_Singe_Trainingsplan_Ausf_Change(tp);
        }
예제 #8
0
        private void ToTrainingsplan(object sender, EventArgs e)
        {
            Trainingsplan_Basic tp = (Trainingsplan_Basic)lv_Overview.SelectedItem;

            App.Current.MainPage = new SE_Trainingsplan(tp);
        }