Ejemplo n.º 1
0
        public static IssueCellView Create()
        {
            var cell = new IssueCellView();
            var views = NSBundle.MainBundle.LoadNib("IssueCellView", cell, null);
            cell = Runtime.GetNSObject( views.ValueAt(0) ) as IssueCellView;

            if (cell == null)
            {
                Console.WriteLine("Null cell!");
            }
            else
            {
                cell.Caption.TextColor = Theme.CurrentTheme.MainTitleColor;
                cell.Number.TextColor = Theme.CurrentTheme.MainTitleColor;
                cell.AddSubview(new SeperatorIssues {Frame = new RectangleF(65f, 5f, 1f, cell.Frame.Height - 10f)});
                cell.Image1.Image = Theme.CurrentTheme.IssueCellImage1;
                cell.Image2.Image = Theme.CurrentTheme.IssueCellImage2;
                cell.Image3.Image = Theme.CurrentTheme.IssueCellImage3;
                cell.Image4.Image = Theme.CurrentTheme.IssueCellImage4;
                cell.SeparatorInset = new UIEdgeInsets(0, 0, 0, 0);

                cell.Caption.Font = cell.Caption.Font.WithSize(cell.Caption.Font.PointSize * Theme.CurrentTheme.FontSizeRatio);
                cell.Number.Font = cell.Number.Font.WithSize(cell.Number.Font.PointSize * Theme.CurrentTheme.FontSizeRatio);
                cell.Label1.Font = cell.Label1.Font.WithSize(cell.Label1.Font.PointSize * Theme.CurrentTheme.FontSizeRatio);
                cell.Label2.Font = cell.Label2.Font.WithSize(cell.Label2.Font.PointSize * Theme.CurrentTheme.FontSizeRatio);
                cell.Label3.Font = cell.Label3.Font.WithSize(cell.Label3.Font.PointSize * Theme.CurrentTheme.FontSizeRatio);
                cell.Label4.Font = cell.Label4.Font.WithSize(cell.Label4.Font.PointSize * Theme.CurrentTheme.FontSizeRatio);
                cell.IssueType.Font = cell.IssueType.Font.WithSize(cell.IssueType.Font.PointSize * Theme.CurrentTheme.FontSizeRatio);
            }

            //Create the icons
            return cell;
        }
Ejemplo n.º 2
0
        public static IssueCellView Create()
        {
            var cell  = new IssueCellView();
            var views = NSBundle.MainBundle.LoadNib("IssueCellView", cell, null);

            cell = Runtime.GetNSObject(views.ValueAt(0)) as IssueCellView;

            if (cell == null)
            {
                Console.WriteLine("Null cell!");
            }
            else
            {
                cell.Caption.TextColor = Theme.CurrentTheme.MainTitleColor;
                cell.Number.TextColor  = Theme.CurrentTheme.MainTitleColor;
                cell.AddSubview(new SeperatorIssues {
                    Frame = new RectangleF(65f, 5f, 1f, cell.Frame.Height - 10f)
                });
                cell.Image1.Image   = Theme.CurrentTheme.IssueCellImage1;
                cell.Image2.Image   = Theme.CurrentTheme.IssueCellImage2;
                cell.Image3.Image   = Theme.CurrentTheme.IssueCellImage3;
                cell.Image4.Image   = Theme.CurrentTheme.IssueCellImage4;
                cell.SeparatorInset = new UIEdgeInsets(0, 0, 0, 0);

                cell.Caption.Font   = cell.Caption.Font.WithSize(cell.Caption.Font.PointSize * Theme.CurrentTheme.FontSizeRatio);
                cell.Number.Font    = cell.Number.Font.WithSize(cell.Number.Font.PointSize * Theme.CurrentTheme.FontSizeRatio);
                cell.Label1.Font    = cell.Label1.Font.WithSize(cell.Label1.Font.PointSize * Theme.CurrentTheme.FontSizeRatio);
                cell.Label2.Font    = cell.Label2.Font.WithSize(cell.Label2.Font.PointSize * Theme.CurrentTheme.FontSizeRatio);
                cell.Label3.Font    = cell.Label3.Font.WithSize(cell.Label3.Font.PointSize * Theme.CurrentTheme.FontSizeRatio);
                cell.Label4.Font    = cell.Label4.Font.WithSize(cell.Label4.Font.PointSize * Theme.CurrentTheme.FontSizeRatio);
                cell.IssueType.Font = cell.IssueType.Font.WithSize(cell.IssueType.Font.PointSize * Theme.CurrentTheme.FontSizeRatio);
            }

            //Create the icons
            return(cell);
        }