Esempio n. 1
0
		public VisitView()
		{
			image = new UIImageView(new RectangleF(0, 0, imageWidth, imageWidth))
			{
				ContentMode = UIViewContentMode.ScaleAspectFill,
				Image = DefaultImage,
				BackgroundColor = UIColor.Clear,
				Layer = { MasksToBounds = true, CornerRadius = imageWidth/2}
			};
			AddSubview(image);

			timeDescription = new UILabel {Text = "Next Visit".ToUpper(), Font = UIFont.FromName(font1, 13)};
			timeDescription.SizeToFit();
			AddSubview(timeDescription);

			topBadge = new BadgeView {Text = "10", Font = UIFont.FromName(font1, 8)};
			AddSubview(topBadge);

			timeBadge = new BadgeView {Text = "10", Font = topBadge.Font};
			AddSubview(timeBadge);

			name = new UILabel {Text = "Name", Font = UIFont.FromName(font2, 30), AdjustsFontSizeToFitWidth = true};
			name.SizeToFit();
			AddSubview(name);

			company = new UILabel {Text = "Company", Font = UIFont.FromName(font1, 12)};
			company.SizeToFit();
			AddSubview(company);

			visitLabel = new UILabel {Text = "Visit To:".ToUpper(), Font = UIFont.FromName(font1, 8)};
			visitLabel.SizeToFit();
			AddSubview(visitLabel);

			reasonLabel = new UILabel {Text = "Reason:".ToUpper(), Font = UIFont.FromName(font1, 8)};
			reasonLabel.SizeToFit();
			AddSubview(reasonLabel);

			employee = new UILabel {Text = "Employee", Font = UIFont.FromName(font1, 12)};
			employee.SizeToFit();
			AddSubview(employee);

			reason = new UILabel {Text = "Reason", Font = UIFont.FromName(font1, 12)};
			reason.SizeToFit();
			AddSubview(reason);


			//topLine = new UIView(new RectangleF(0,0,1,1));
			//this.AddSubview(topLine);

			bottomLine = new UIView(new RectangleF(0, 0, 1, 1));
			AddSubview(bottomLine);
			clearData();
		}
Esempio n. 2
0
		public VisitsViewController()
			: base(new UICollectionViewFlowLayout())
		{
			CollectionView.RegisterClassForCell(typeof (Source.VisitCell), Source.VisitCell.Identifier);
			CollectionView.Source = source = new Source();
			CollectionView.BackgroundColor = View.BackgroundColor = UIColor.Clear;
			titleLabel = new UILabel { Text = "Next Visit".ToUpper(), Font = UIFont.FromName("HelveticaNeue", 13) };
			titleLabel.SizeToFit();
			View.AddSubview(titleLabel);

			topBadge = new BadgeView {Font = UIFont.FromName("HelveticaNeue", 8) };

			topBadge.TextColor = UIColor.White;
			topBadge.BackgroundColor = UIColor.FromRGB(196, 48, 81);

			View.AddSubview(topBadge);
		}
        public VisitView()
        {
            image = new UIImageView(new RectangleF(0, 0, imageWidth, imageWidth))
            {
                ContentMode     = UIViewContentMode.ScaleAspectFill,
                Image           = DefaultImage,
                BackgroundColor = UIColor.Clear,
                Layer           = { MasksToBounds = true, CornerRadius = imageWidth / 2 }
            };
            AddSubview(image);

            timeDescription = new UILabel {
                Text = "Next Visit".ToUpper(), Font = UIFont.FromName(font1, 13)
            };
            timeDescription.SizeToFit();
            AddSubview(timeDescription);

            topBadge = new BadgeView {
                Text = "10", Font = UIFont.FromName(font1, 8)
            };
            AddSubview(topBadge);

            timeBadge = new BadgeView {
                Text = "10", Font = topBadge.Font
            };
            AddSubview(timeBadge);

            name = new UILabel {
                Text = "Name", Font = UIFont.FromName(font2, 30), AdjustsFontSizeToFitWidth = true
            };
            name.SizeToFit();
            AddSubview(name);

            company = new UILabel {
                Text = "Company", Font = UIFont.FromName(font1, 12)
            };
            company.SizeToFit();
            AddSubview(company);

            visitLabel = new UILabel {
                Text = "Visit To:".ToUpper(), Font = UIFont.FromName(font1, 8)
            };
            visitLabel.SizeToFit();
            AddSubview(visitLabel);

            reasonLabel = new UILabel {
                Text = "Reason:".ToUpper(), Font = UIFont.FromName(font1, 8)
            };
            reasonLabel.SizeToFit();
            AddSubview(reasonLabel);

            employee = new UILabel {
                Text = "Employee", Font = UIFont.FromName(font1, 12)
            };
            employee.SizeToFit();
            AddSubview(employee);

            reason = new UILabel {
                Text = "Reason", Font = UIFont.FromName(font1, 12)
            };
            reason.SizeToFit();
            AddSubview(reason);

            bottomLine = new UIView(new RectangleF(0, 0, 1, 1));
            AddSubview(bottomLine);
            clearData();
        }