Example #1
0
        public RecipTableSrc(DietPhaseId phase, UIViewController parent)
        {
            m_parent_vc = parent;
            List <RecipeRecord> recipesList = RecipeManager.GetRecipesForPhase(new DietPhase(phase));

            m_tableItems = recipesList.ToArray();
        }
Example #2
0
        public ScheduleRecord(DateTime day, DietPhaseId phase, int weight = 0)
        {
            this.m_date = day;
            switch (phase)
            {
            case (DietPhaseId.DP_Attack):
                this.m_phase = 1;
                break;

            case (DietPhaseId.DP_Cruise):
                this.m_phase = 2;
                break;

            case (DietPhaseId.DP_Consolidation):
                this.m_phase = 3;
                break;

            case (DietPhaseId.DP_Stabilization):
                this.m_phase = 4;
                break;

            case (DietPhaseId.DP_Default):
                this.m_phase = 0;
                break;
            }
            this.m_weight = weight;
        }
Example #3
0
 public void addTable(DietPhaseId phase)
 {
     m_data_source = new RecipTableSrc(phase, this);
     setTitleImage(RecipeSrcType.All);
     m_table                = new UITableView(View.ViewWithTag(4).Frame);
     m_table.Source         = m_data_source;
     m_table.SeparatorStyle = UITableViewCellSeparatorStyle.None;
     Add(m_table);
 }
Example #4
0
        public DietPhase(DietPhaseId phase)
        {
            m_phase_id = phase;
            // [ToDo] add internacionalization
            switch (phase)
            {
            case DietPhaseId.DP_Default:
            {
                m_phase_name = "Метод Пьера Дюкана";
                m_db_name    = "";
                break;
            }

            case DietPhaseId.DP_Attack:
            {
                m_phase_name = "Фаза \"Атака\"";
                m_db_name    = "Attack";
                break;
            }

            case DietPhaseId.DP_Cruise:
            {
                m_phase_name = "Фаза \"Круиз\"";
                m_db_name    = "Cruise";
                break;
            }

            case DietPhaseId.DP_Consolidation:
            {
                m_phase_name = "Фаза \"Консолидация\"";
                m_db_name    = "Consolidation";
                break;
            }

            case DietPhaseId.DP_Stabilization:
            {
                m_phase_name = "Фаза \"Стабилизация\"";
                m_db_name    = "Stabilization";
                break;
            }

            default:
            {
                m_phase_name = "All";
                m_db_name    = "";
                break;
            }
            }
        }