コード例 #1
0
ファイル: TableView.cs プロジェクト: dolani/CodeTorch
        private void ProcessCell(TableSection tableSection, TableSectionControl section, BaseCell baseCell)
        {
            ICell cell = CellHelper.GetCell(this.Page, Me, section, baseCell);



            cell.Init();

            tableSection.Add(cell.GetCell());
        }
コード例 #2
0
ファイル: TableView.cs プロジェクト: dolani/CodeTorch
        private void ProcessSection(TableSection sectionControl, BaseSection section)
        {
            if (section is TableSectionControl)
            {
                TableSectionControl tableSection = section as TableSectionControl;

                string sectionTitle = String.Empty;

                Device.OnPlatform(
                    Android: () =>
                {
                    sectionTitle = OnPlatformString.GetAndroidValue(tableSection.Title);
                },
                    iOS: () =>
                {
                    sectionTitle = OnPlatformString.GetiOSValue(tableSection.Title);
                },
                    WinPhone: () =>
                {
                    sectionTitle = OnPlatformString.GetWinPhoneValue(tableSection.Title);
                }
                    );

                if (!String.IsNullOrEmpty(sectionTitle))
                {
                    sectionControl.Title = sectionTitle;
                }


                if (tableSection.Cells.Count > 0)
                {
                    foreach (BaseCell cell in tableSection.Cells)
                    {
                        ProcessCell(sectionControl, tableSection, cell);
                    }
                }
            }
        }