Example #1
0
        public DeleteAnswerMenu()
        {
            var answers = SQLiteDataAccess.LoadAnswers();

            if (answers.Count != 0)
            {
                foreach (var item in answers)
                {
                    Add(new Menu.MenuItem()
                    {
                        Name      = item.ToString().Substring(0, 98) + Environment.NewLine,
                        Function  = DeleteAnswerById,
                        Parameter = item.Id
                    });
                }
            }
            else
            {
                Add(new Menu.MenuItem()
                {
                    Name = "P U S T O"
                });
            }
        }
Example #2
0
        private void ShowAnswers(object obj)
        {
            var answers = SQLiteDataAccess.LoadAnswers();

            ShowElementsIfListNotEmpty(answers);
        }