Ejemplo n.º 1
0
        public ChatBubbleCell(bool isLeft)
            : base(UITableViewCellStyle.Default, isLeft ? KeyLeft : KeyRight)
        {
            var rect = new RectangleF(0, 0, 1, 1);

            this.isLeft = isLeft;
            view        = new UIView(rect);
            imageView   = new UIImageView(isLeft ? left : right);
            view.AddSubview(imageView);
            lblMessage = new UILabel(rect)
            {
                LineBreakMode   = UILineBreakMode.WordWrap,
                Lines           = 0,
                Font            = font,
                BackgroundColor = UIColor.Clear
            };
            view.AddSubview(lblMessage);
            lblTime = new UILabel(rect)
            {
                LineBreakMode   = UILineBreakMode.WordWrap,
                Lines           = 0,
                Font            = fontDateStamp,
                TextColor       = UIColor.LightGray,
                BackgroundColor = UIColor.Clear,
                TextAlignment   = UITextAlignment.Right
            };
            view.AddSubview(lblTime);
            if (!this.isLeft)
            {
                StatusTick = new UIImageView(doubleBlue);
                view.AddSubview(StatusTick);
            }

            ContentView.Add(view);
        }
Ejemplo n.º 2
0
 public TaskCell(IntPtr handle) : base(handle)
 {
     this.Apply(Style.Screen);
     ContentView.Add(nameLabel     = new UILabel().Apply(Style.ProjectList.TaskLabel));
     ContentView.Add(separatorView = new UIView().Apply(Style.ProjectList.TaskSeparator));
     BackgroundView = new UIView().Apply(Style.ProjectList.TaskBackground);
 }
Ejemplo n.º 3
0
        public CategoryListCell(string cellId, CategoriesController parent) : base(UITableViewCellStyle.Default, cellId)
        {
            SelectionStyle = UITableViewCellSelectionStyle.Default;
            this.parent    = parent;

            categoryNameLabel = new UILabel()
            {
                Font            = UIFont.FromName("Cochin-BoldItalic", 18f),
                TextColor       = UIColor.Black,
                BackgroundColor = UIColor.Clear
            };

            totalExpenses = new UILabel()
            {
                Font            = UIFont.FromName("Cochin-BoldItalic", 12f),
                TextColor       = UIColor.LightGray,
                BackgroundColor = UIColor.Clear
            };

            totalExpensesLabel = new UILabel()
            {
                Font            = UIFont.FromName("Cochin-BoldItalic", 12f),
                TextColor       = UIColor.LightGray,
                BackgroundColor = UIColor.Clear,
                Text            = "Total Expenses:"
            };

            SetEvents();

            ContentView.Add(categoryNameLabel);
            ContentView.Add(totalExpenses);
            ContentView.Add(totalExpensesLabel);
        }
Ejemplo n.º 4
0
        public void SetView(View view, bool shouldDispose)
        {
            if (_currentView != null && !_currentView.IsDisposed)
            {
                view = view.Diff(_currentView);
            }
            if (shouldDispose)
            {
                _currentView?.Dispose();
            }
            _currentView = view;
            var newView = view.ToView();

            if (_currentContent != newView)
            {
                _currentContent?.RemoveFromSuperview();
            }
            _currentContent = newView;
            if (_currentContent != null && _currentContent.Superview != ContentView)
            {
                ContentView.Add(_currentContent);
            }
            else if (_currentContent == null)
            {
                Logger.Debug("xxx");
            }
        }
Ejemplo n.º 5
0
        public HotDogListCell(NSString cellId) : base(UITableViewCellStyle.Default, cellId)
        {
            SelectionStyle = UITableViewCellSelectionStyle.Gray;

            ContentView.BackgroundColor = UIColor.FromRGB(254, 199, 101);

            imageView = new UIImageView();

            nameLabel = new UILabel()
            {
                Font            = UIFont.FromName("Cochin-BoldItalic", 18f),
                TextColor       = UIColor.FromRGB(255, 255, 255),
                BackgroundColor = UIColor.Clear
            };

            priceLabel = new UILabel()
            {
                Font            = UIFont.FromName("AmericanTypewriter", 12f),
                TextColor       = UIColor.FromRGB(228, 79, 61),
                TextAlignment   = UITextAlignment.Center,
                BackgroundColor = UIColor.Clear
            };

            ContentView.Add(nameLabel);
            ContentView.Add(priceLabel);
            ContentView.Add(imageView);
        }
Ejemplo n.º 6
0
        public eventItem(string cellId, bool isIpad) : base(UITableViewCellStyle.Default, cellId)
        {
            SelectionStyle = UITableViewCellSelectionStyle.None;
            ContentView.BackgroundColor = UIColor.Clear;// .FromRGB (171,201,213);


            //imageView.Layer.BorderColor = UIColor.LightGray.CGColor;
            //imageView.Layer.BorderWidth = 1.0f;

            //float heightText = 12.5f;
            float heightText = 16f;

            if (!isIpad)
            {
                heightText = 18f;
            }

            headingLabel = new UILabel()
            {
                Font            = UIFont.FromName("TrebuchetMS-Bold", heightText),
                TextColor       = UIColor.FromRGB(174, 65, 61),
                BackgroundColor = UIColor.Clear
            };

            ContentView.Add(headingLabel);
        }
        protected GroupsTableViewCell(IntPtr handle) : base(handle)
        {
            profileImageView                     = new UIImageView();
            profileImageView.ContentMode         = UIViewContentMode.ScaleAspectFill;
            profileImageView.Layer.CornerRadius  = 18;
            profileImageView.Layer.MasksToBounds = true;
            profileImageView.TranslatesAutoresizingMaskIntoConstraints = false;

            nameLabel      = new UILabel();
            nameLabel.Font = UIFont.SystemFontOfSize(14);
            nameLabel.TranslatesAutoresizingMaskIntoConstraints = false;
            nameLabel.TextColor = UIColor.FromRGB(90, 89, 89);

            groupRelationshipButton = new UIButton();
            groupRelationshipButton.Layer.CornerRadius = 5;
            groupRelationshipButton.Font           = UIFont.SystemFontOfSize(15, UIFontWeight.Regular);
            groupRelationshipButton.TouchUpInside += GroupRelationshipButton_TouchUpInside;
            groupRelationshipButton.TranslatesAutoresizingMaskIntoConstraints = false;

            ContentView.Add(profileImageView);
            ContentView.Add(nameLabel);
            ContentView.Add(groupRelationshipButton);

            AddConstraints(NSLayoutConstraint.FromVisualFormat("H:|-12-[v0(36)]-8-[v1]-8-[v2(74)]-4-|", new NSLayoutFormatOptions(), "v0", profileImageView, "v1", nameLabel, "v2", groupRelationshipButton));

            AddConstraints(NSLayoutConstraint.FromVisualFormat("V:|-4-[v0(36)]", new NSLayoutFormatOptions(), "v0", profileImageView));
            AddConstraints(NSLayoutConstraint.FromVisualFormat("V:|-12-[v0(20)]", new NSLayoutFormatOptions(), "v0", nameLabel));
            AddConstraints(NSLayoutConstraint.FromVisualFormat("V:|-8-[v0]", new NSLayoutFormatOptions(), "v0", groupRelationshipButton));
        }
Ejemplo n.º 8
0
        public TripViewCell(NSString cellId)
            : base(UITableViewCellStyle.Default, cellId)
        {
            _tripHeading = new UILabel()
            {
                Font            = UIFont.FromName("AvenirNext-Medium", 16f),
                TextAlignment   = UITextAlignment.Left,
                BackgroundColor = UIColor.Clear,
                TextColor       = UIColor.White
                ,
            };

            _tripDescription = new UILabel()
            {
                Font            = UIFont.FromName("AvenirNext-Italic", 10f),
                TextAlignment   = UITextAlignment.Left,
                BackgroundColor = UIColor.Clear,
                TextColor       = UIColor.White
            };

            _tripPrice = new UILabel()
            {
                Font            = UIFont.FromName("AvenirNext-Regular", 16f),
                TextAlignment   = UITextAlignment.Right,
                BackgroundColor = UIColor.Clear,
                TextColor       = UIColor.White
            };

            ContentView.Add(_tripHeading);
            ContentView.Add(_tripDescription);
            ContentView.Add(_tripPrice);
        }
Ejemplo n.º 9
0
        public ElementTableItem(string CellId)
            : base(UITableViewCellStyle.Default, CellId)
        {
            SelectionStyle = UITableViewCellSelectionStyle.Gray;

            headinglbl = new UILabel()
            {
                Font            = UIFont.SystemFontOfSize(12f),
                TextColor       = UIColor.Brown,
                TextAlignment   = UITextAlignment.Justified,
                BackgroundColor = UIColor.Clear,
            };
            subheadinglbl = new UILabel()
            {
                Font            = UIFont.SystemFontOfSize(12f),
                TextColor       = UIColor.Black,
                TextAlignment   = UITextAlignment.Justified,
                BackgroundColor = UIColor.Clear
            };
            allsubfooter = new UILabel()
            {
                Font            = UIFont.SystemFontOfSize(12f),
                TextColor       = UIColor.Black,
                TextAlignment   = UITextAlignment.Justified,
                BackgroundColor = UIColor.Clear
            };
            ContentView.Add(headinglbl);

            ContentView.AddSubviews(subheadinglbl, allsubfooter);
        }
Ejemplo n.º 10
0
        public AccountTableViewCell(IntPtr handle)
            : base(handle)
        {
            ImageView             = new UIImageView();
            ImageView.ContentMode = UIViewContentMode.ScaleAspectFit;
            ImageView.Layer.MinificationFilter = CoreAnimation.CALayer.FilterTrilinear;
            ImageView.Layer.MasksToBounds      = true;

            TitleLabel           = new UILabel();
            TitleLabel.TextColor = UIColor.FromWhiteAlpha(0.0f, 1f);
            TitleLabel.Font      = UIFont.FromName("HelveticaNeue", 17f);

            SubtitleLabel           = new UILabel();
            SubtitleLabel.TextColor = UIColor.FromWhiteAlpha(0.1f, 1f);
            SubtitleLabel.Font      = UIFont.FromName("HelveticaNeue-Thin", 14f);

            ContentView.Add(ImageView);
            ContentView.Add(TitleLabel);
            ContentView.Add(SubtitleLabel);

            this.WhenActivated(d =>
            {
                d(this.WhenAnyValue(x => x.ViewModel)
                  .Subscribe(x =>
                {
                    TitleLabel.Text    = x?.Username;
                    SubtitleLabel.Text = x?.Domain;
                    ImageView.SetAvatar(new Core.Utils.Avatar(x?.AvatarUrl));
                }));

                d(this.WhenAnyValue(x => x.ViewModel.IsSelected)
                  .Subscribe(x => Accessory = x ? UITableViewCellAccessory.Checkmark : UITableViewCellAccessory.None));
            });
        }
Ejemplo n.º 11
0
        public AgendaViewController()
        {
            Title = GetTitle();
            HideBackButton();

            NavItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Add)
            {
                Title = "Add item"
            };
            NavItem.RightBarButtonItem.Clicked += new WeakEventHandler <EventArgs>(ButtonAddItem_Clicked).Handler;

            _tableView = new UITableView()
            {
                TranslatesAutoresizingMaskIntoConstraints = false,
                SeparatorInset = UIEdgeInsets.Zero
            };
            if (UIDevice.CurrentDevice.CheckSystemVersion(9, 0))
            {
                // Stretch to full width even on iPad
                _tableView.CellLayoutMarginsFollowReadableWidth = false;
            }
            _tableView.TableFooterView = new UIView(); // Eliminate extra separators on bottom of view
            ContentView.Add(_tableView);
            _tableView.StretchWidthAndHeight(ContentView);

            MainScreenViewController.ListenToTabBarHeightChanged(ref _tabBarHeightListener, delegate
            {
                _tableView.ContentInset = new UIEdgeInsets(0, 0, MainScreenViewController.TAB_BAR_HEIGHT, 0);
            });
        }
Ejemplo n.º 12
0
        public CircledTextiOSCell(NSString cellId, CircledTextCell nativeCell) : base(UITableViewCellStyle.Default, cellId)
        {
            NativeCell     = nativeCell;
            SelectionStyle = UITableViewCellSelectionStyle.Gray;

            CircledTextLabel = new UILabel()
            {
                BackgroundColor = UIColor.Clear,
                TextColor       = UIColor.Black,
            };

            CircledTextLabel.ClipsToBounds = true;
            CircledTextLabel.TextAlignment = UITextAlignment.Center;


            HeadingLabel = new UILabel()
            {
                BackgroundColor = UIColor.Clear,
                TextColor       = UIColor.Black,
            };

            DetailLabel = new UILabel()
            {
                BackgroundColor = UIColor.Clear,
                TextColor       = UIColor.Black,
            };

            ContentView.Add(CircledTextLabel);
            ContentView.Add(HeadingLabel);
            ContentView.Add(DetailLabel);
        }
Ejemplo n.º 13
0
            public ButtonCell()
            {
                SelectionStyle = UITableViewCellSelectionStyle.None;
                ContentView.BackgroundColor = UIColor.Clear;
                BackgroundColor             = UIColor.Clear;

                var buttonHeight = 44;

                button = UIButton.FromType(UIButtonType.System);
                button.TranslatesAutoresizingMaskIntoConstraints = false;
                button.SetTitle("Done", UIControlState.Normal);
                button.SetTitleColor(UIColor.White.ColorWithAlpha(0.8f), UIControlState.Normal);
                button.Font = UIFont.FromName(button.Font.Name, 20);
                //button.Layer.CornerRadius = buttonHeight / 2;
                //button.Layer.BorderColor = UIColor.Clear.CGColor;

                var views   = new NSDictionary("button", button);
                var metrics = new NSDictionary(new NSString("bh"), buttonHeight);

                ContentView.Add(button);

                ContentView.AddConstraints(NSLayoutConstraint.FromVisualFormat("H:|-35-[button]-35-|", 0, metrics, views));
                ContentView.AddConstraints(NSLayoutConstraint.FromVisualFormat("V:|-10-[button(bh)]-10-|", 0, metrics, views));

                ActionStream = button.RXTouchUpInside();
            }
Ejemplo n.º 14
0
            public TextFieldCell(IntPtr handle) : base(handle)
            {
                SelectionStyle = UITableViewCellSelectionStyle.None;
                ContentView.BackgroundColor = UIColor.Clear;
                BackgroundColor             = UIColor.Clear;

                var textFieldHeight = 44;

                textField = new UITextField {
                    TranslatesAutoresizingMaskIntoConstraints = false,
                    BackgroundColor = UIColor.White,
                    LeftView        = new UIView(new CGRect(0, 0, 25, 20)),
                    LeftViewMode    = UITextFieldViewMode.Always
                };
                textField.Layer.CornerRadius = textFieldHeight / 2;
                textField.Layer.BorderColor  = UIColor.Clear.CGColor;

                var views   = new NSDictionary(new NSString("textField"), textField);
                var metrics = new NSDictionary(new NSString("tfh"), textFieldHeight);

                ContentView.Add(textField);

                ContentView.AddConstraints(NSLayoutConstraint.FromVisualFormat("H:|-20-[textField]-20-|", 0, metrics, views));
                ContentView.AddConstraints(NSLayoutConstraint.FromVisualFormat("V:|-10-[textField(tfh)]-10-|", 0, metrics, views));
            }
Ejemplo n.º 15
0
        public CompaniesTableCell(string cellId) : base(UITableViewCellStyle.Default, cellId)
        {
            SelectionStyle         = UITableViewCellSelectionStyle.Gray;
            UserInteractionEnabled = true;

            ContentView.BackgroundColor = UIColor.Clear;

            leftLabel = new UILabel()
            {
                Font            = UIFont.FromName("HelveticaNeue-Bold", 18f),
                TextAlignment   = UITextAlignment.Center,
                TextColor       = UIColor.Gray,
                BackgroundColor = UIColor.LightGray
            };
            mainLabel = new UILabel()
            {
                Font            = UIFont.FromName("HelveticaNeue-Light", 18f),
                TextColor       = UIColor.DarkGray,
                TextAlignment   = UITextAlignment.Left,
                BackgroundColor = UIColor.Clear
            };

            ContentView.Add(leftLabel);
            ContentView.Add(mainLabel);
        }
Ejemplo n.º 16
0
        public HistoryBookingDetailTableCell(NSString cellId) : base(UITableViewCellStyle.Default, cellId)
        {
            SelectionStyle = UITableViewCellSelectionStyle.None;
            Accessory      = UITableViewCellAccessory.None;

            //ContentView.BackgroundColor = UIColor.FromRGB (218, 255, 127);

            titleLabel = new UILabel()
            {
                Font            = UIFont.FromName("Helvetica-Bold", 12f),
                TextAlignment   = UITextAlignment.Left,
                TextColor       = UIColor.Black,
                BackgroundColor = UIColor.Clear
            };

            valueLabel = new UILabel()
            {
                Font            = UIFont.FromName("Helvetica Neue", 12f),
                TextColor       = UIColor.Black,
                TextAlignment   = UITextAlignment.Right,
                BackgroundColor = UIColor.Clear
            };


            ContentView.Add(titleLabel);
            ContentView.Add(valueLabel);
        }
Ejemplo n.º 17
0
        public MyBookingTableCell(NSString cellId) : base(UITableViewCellStyle.Default, cellId)
        {
            SelectionStyle = UITableViewCellSelectionStyle.Default;
            Accessory      = UITableViewCellAccessory.DisclosureIndicator;

            //ContentView.BackgroundColor = UIColor.FromRGB (218, 255, 127);

            topicLabel = new UILabel()
            {
                Font = UIFont.FromName("Helvetica-Bold", 13f),

                TextColor       = UIColor.Black,
                BackgroundColor = UIColor.Clear
            };

            startingDateLabel = new UILabel()
            {
                Font            = UIFont.FromName("Helvetica Neue", 12f),
                TextColor       = UIColor.Black,
                TextAlignment   = UITextAlignment.Left,
                BackgroundColor = UIColor.Clear
            };

            ContentView.Add(topicLabel);
            ContentView.Add(startingDateLabel);
        }
Ejemplo n.º 18
0
        public SessionCell(UITableViewCellStyle style, NSString ident, MonkeySpace.Core.Session session, string big, string small) : base(style, ident)
        {
            SelectionStyle = UITableViewCellSelectionStyle.Blue;

            bigLabel = new UILabel()
            {
                TextAlignment   = UITextAlignment.Left,
                BackgroundColor = UIColor.Clear
            };
            smallLabel = new UILabel()
            {
                TextAlignment   = UITextAlignment.Left,
                Font            = smallFont,
                TextColor       = UIColor.DarkGray,
                BackgroundColor = UIColor.Clear
            };
            button            = UIButton.FromType(UIButtonType.Custom);
            button.TouchDown += delegate {
                UpdateImage(ToggleFavorite());
            };
            UpdateCell(session, big, small);

            ContentView.Add(bigLabel);
            ContentView.Add(smallLabel);
            ContentView.Add(button);
        }
Ejemplo n.º 19
0
        public GameListCell(NSString cellId) : base(UITableViewCellStyle.Default, cellId)
        {
            SelectionStyle = UITableViewCellSelectionStyle.Gray;
            ContentView.BackgroundColor = UIColor.FromRGB(188, 219, 247);

            imageView = new UIImageView();

            nameLabel = new UILabel
            {
                Font            = UIFont.FromName("Cochin-BoldItalic", 18f),
                TextColor       = UIColor.FromRGB(0, 0x78, 0xD7),
                BackgroundColor = UIColor.Clear
            };

            //descriptionLabel = new UILabel
            //{
            //    Font = UIFont.FromName("AmericanTypewriter", 12f),
            //    TextColor = UIColor.FromRGB(0, 0x78, 0xD7),
            //    //TextAlignment = UITextAlignment.Center,
            //    BackgroundColor = UIColor.Clear
            //};
            ContentView.Add(imageView);
            ContentView.Add(nameLabel);
            //ContentView.Add(descriptionLabel);
        }
Ejemplo n.º 20
0
        public AccountCellView(IntPtr handle)
            : base(handle)
        {
            ImageView             = new UIImageView();
            ImageView.ContentMode = UIViewContentMode.ScaleAspectFit;
            ImageView.Layer.MinificationFilter = CoreAnimation.CALayer.FilterTrilinear;
            ImageView.Layer.MasksToBounds      = true;

            TitleLabel           = new UILabel();
            TitleLabel.TextColor = UIColor.FromWhiteAlpha(0.0f, 1f);
            TitleLabel.Font      = UIFont.FromName("HelveticaNeue", 17f);

            SubtitleLabel           = new UILabel();
            SubtitleLabel.TextColor = UIColor.FromWhiteAlpha(0.1f, 1f);
            SubtitleLabel.Font      = UIFont.FromName("HelveticaNeue-Thin", 14f);

            ContentView.Add(ImageView);
            ContentView.Add(TitleLabel);
            ContentView.Add(SubtitleLabel);

            this.WhenActivated(d => {
                d(this.OneWayBind(ViewModel, x => x.Username, x => x.TitleLabel.Text));
                d(this.OneWayBind(ViewModel, x => x.Domain, x => x.SubtitleLabel.Text));
                d(this.WhenAnyValue(x => x.ViewModel.AvatarUrl).Where(x => !string.IsNullOrEmpty(x)).Subscribe(x => ImageView.SetImage(new NSUrl(x), Images.UnknownUser)));
                d(this.WhenAnyValue(x => x.ViewModel.AvatarUrl).Where(x => string.IsNullOrEmpty(x)).Subscribe(_ => ImageView.Image = Images.UnknownUser));
                d(this.WhenAnyValue(x => x.ViewModel.Selected).Subscribe(x => Accessory = x ? UITableViewCellAccessory.Checkmark : UITableViewCellAccessory.None));
            });
        }
Ejemplo n.º 21
0
        public NativeiOSCell(NSString cellId) : base(UITableViewCellStyle.Default, cellId)
        {
            SelectionStyle = UITableViewCellSelectionStyle.Gray;

            ContentView.BackgroundColor = UIColor.FromRGB(255, 255, 224);

            imageView = new UIImageView();

            headingLabel = new UILabel()
            {
                Font            = UIFont.FromName("Cochin-BoldItalic", 22f),
                TextColor       = UIColor.FromRGB(127, 51, 0),
                BackgroundColor = UIColor.Clear
            };

            subheadingLabel = new UILabel()
            {
                Font            = UIFont.FromName("AmericanTypewriter", 12f),
                TextColor       = UIColor.FromRGB(38, 127, 0),
                TextAlignment   = UITextAlignment.Center,
                BackgroundColor = UIColor.Clear
            };

            ContentView.Add(headingLabel);
            ContentView.Add(subheadingLabel);
            ContentView.Add(imageView);
        }
Ejemplo n.º 22
0
        public ExpenseViewCell(NSString cellId)
            : base(UITableViewCellStyle.Default, cellId)
        {
            date = new UILabel()
            {
                Font            = UIFont.FromName("AvenirNext-Medium", 10f),
                TextAlignment   = UITextAlignment.Left,
                BackgroundColor = UIColor.Clear,
                TextColor       = UIColor.White
                ,
            };

            name = new UILabel()
            {
                Font            = UIFont.FromName("AvenirNext-Italic", 8f),
                TextAlignment   = UITextAlignment.Left,
                BackgroundColor = UIColor.Clear,
                TextColor       = UIColor.White
            };

            amount = new UILabel()
            {
                Font            = UIFont.FromName("AvenirNext-Regular", 8f),
                TextAlignment   = UITextAlignment.Right,
                BackgroundColor = UIColor.Clear,
                TextColor       = UIColor.White
            };

            ContentView.Add(date);
            ContentView.Add(name);
            ContentView.Add(amount);
        }
Ejemplo n.º 23
0
            public MonthEventCellView(MonthEventElement parent)
                : base(UITableViewCellStyle.Value1, key)
            {
                this.parent = parent;

                circleView = new Circle {
                    Color = parent.TheEvent.color, BackgroundColor = UIColor.Clear
                };
                setupTimeLabels();

                BackgroundColor = UIColor.Clear;
                label           = new UILabel {
                    TextAlignment = UITextAlignment.Left, Text = parent.TheEvent.Title, Font = font, TextColor = parent.TheEvent.IsBooking ? UIColor.Red : UIColor.Gray, Lines = 1, LineBreakMode = UILineBreakMode.TailTruncation, BackgroundColor = UIColor.Clear
                };
                lblSub = new UILabel {
                    TextAlignment = UITextAlignment.Left, Text = parent.TheEvent.location, Font = subFont, TextColor = UIColor.Gray, BackgroundColor = UIColor.Clear
                };
                btnDelete = new UIButton(UIButtonType.Custom);
                btnDelete.SetTitleColor(UIColor.Black, UIControlState.Normal);
                btnDelete.SetBackgroundImage(UIImage.FromFile("Images/black_icon_delete.png"), UIControlState.Normal);


                //btnEdit = new UIButton (UIButtonType.Custom);
                //btnEdit.SetTitleColor(UIColor.Black, UIControlState.Normal);
                //btnEdit.SetBackgroundImage(UIImage.FromFile("Images/black_icon_edit_64.png"), UIControlState.Normal);


                ContentView.Add(circleView);
                ContentView.Add(timeSubLabel);
                ContentView.Add(timeLabel);
                ContentView.Add(label);
                ContentView.Add(lblSub);
                ContentView.Add(btnDelete);
                //ContentView.Add(btnEdit);
            }
Ejemplo n.º 24
0
                public ProductCell() : base(UITableViewCellStyle.Default, Key)
                {
                    SelectionStyle = UITableViewCellSelectionStyle.None;
                    ContentView.BackgroundColor   = UIColor.Clear;
                    ImageView.Image               = Image.Value;
                    ImageView.ContentMode         = UIViewContentMode.ScaleAspectFill;
                    ImageView.Frame               = new RectangleF(PointF.Empty, ImageSize);
                    ImageView.BackgroundColor     = UIColor.Clear;
                    ImageView.Layer.CornerRadius  = 5f;
                    ImageView.Layer.MasksToBounds = true;
                    NameLabel = new UILabel()
                    {
                        Text            = "Name",
                        Font            = UIFont.BoldSystemFontOfSize(17f),
                        BackgroundColor = UIColor.Clear,
                        TextColor       = UIColor.Black,
                    };
                    NameLabel.SizeToFit();
                    ContentView.AddSubview(NameLabel);

                    SizeLabel = new UILabel()
                    {
                        Text            = "Size",
                        Font            = UIFont.BoldSystemFontOfSize(12f),
                        BackgroundColor = UIColor.Clear,
                        TextColor       = UIColor.LightGray,
                    };
                    SizeLabel.SizeToFit();
                    ContentView.Add(SizeLabel);

                    ColorLabel = new UILabel()
                    {
                        Text            = "Color",
                        Font            = UIFont.BoldSystemFontOfSize(12f),
                        BackgroundColor = UIColor.Clear,
                        TextColor       = UIColor.LightGray,
                    };
                    ColorLabel.SizeToFit();
                    ContentView.AddSubview(ColorLabel);

                    PriceLabel = new UILabel()
                    {
                        Text            = "Price",
                        Font            = UIFont.BoldSystemFontOfSize(15f),
                        BackgroundColor = UIColor.Clear,
                        TextAlignment   = UITextAlignment.Right,
                        TextColor       = Color.Blue,
                    };
                    PriceLabel.SizeToFit();
                    AccessoryView = new UIView(new RectangleF(0, 0, PriceLabel.Frame.Width + 10, 54))
                    {
                        BackgroundColor = UIColor.Clear,
                    };
                    AccessoryView.AddSubview(PriceLabel);

                    ContentView.AddSubview(LineView = new UIView()
                    {
                        BackgroundColor = UIColor.LightGray,
                    });
                }
Ejemplo n.º 25
0
            public ProjectCell(IntPtr handle) : base(handle)
            {
                this.Apply(Style.Screen);
                BackgroundView = new UIView();

                ContentView.Add(textContentView  = new UIView());
                ContentView.Add(tasksButton      = new UIButton().Apply(Style.ProjectList.TasksButtons));
                textContentView.Add(projectLabel = new UILabel().Apply(Style.ProjectList.ProjectLabel));
                textContentView.Add(clientLabel  = new UILabel().Apply(Style.ProjectList.ClientLabel));

                var maskLayer = new CAGradientLayer()
                {
                    AnchorPoint = CGPoint.Empty,
                    StartPoint  = new CGPoint(0.0f, 0.0f),
                    EndPoint    = new CGPoint(1.0f, 0.0f),
                    Colors      = new [] {
                        UIColor.FromWhiteAlpha(1, 1).CGColor,
                        UIColor.FromWhiteAlpha(1, 1).CGColor,
                        UIColor.FromWhiteAlpha(1, 0).CGColor,
                    },
                    Locations = new [] {
                        NSNumber.FromFloat(0f),
                        NSNumber.FromFloat(0.9f),
                        NSNumber.FromFloat(1f),
                    },
                };

                textContentView.Layer.Mask = maskLayer;
                tasksButton.TouchUpInside += OnTasksButtonTouchUpInside;
            }
Ejemplo n.º 26
0
        public NamesCell(NSString cellId) : base(UITableViewCellStyle.Default, cellId)
        {
            SelectionStyle = UITableViewCellSelectionStyle.Blue;
            ContentView.BackgroundColor = UIColor.FromRGB(203, 221, 244);
            imageView = new UIImageView();

            nameLabel = new UILabel()
            {
                Font            = UIFont.FromName("Cochin-BoldItalic", 24f),
                TextColor       = UIColor.Black,
                BackgroundColor = UIColor.Clear
            };

            priceLabel = new UILabel()
            {
                Font            = UIFont.FromName("AmericanTypeWriter", 18f),
                TextColor       = UIColor.Blue,
                TextAlignment   = UITextAlignment.Center,
                BackgroundColor = UIColor.Clear
            };

            ContentView.Add(nameLabel);
            ContentView.Add(priceLabel);
            ContentView.Add(imageView);
        }
Ejemplo n.º 27
0
        public SpeakerCell(UITableViewCellStyle style, NSString ident, Speaker showSpeaker) : base(style, ident)
        {
            SelectionStyle = UITableViewCellSelectionStyle.Blue;

            nameLabel = new UILabel()
            {
                TextAlignment   = UITextAlignment.Left,
                Font            = bigFont,
                BackgroundColor = UIColor.FromWhiteAlpha(0f, 0f)
            };
            companyLabel = new UILabel()
            {
                TextAlignment   = UITextAlignment.Left,
                Font            = smallFont,
                TextColor       = UIColor.DarkGray,
                BackgroundColor = UIColor.FromWhiteAlpha(0f, 0f)
            };

            image = new UIImageView();

            UpdateCell(showSpeaker);

            ContentView.Add(nameLabel);
            ContentView.Add(companyLabel);
            ContentView.Add(image);
        }
Ejemplo n.º 28
0
        public WeatherCell(IntPtr ptr) : base(ptr)
        {
            var cellFont       = UIFont.SystemFontOfSize(14);
            var cellTextColor1 = UIColor.FromRGB(59, 102, 136);
            var cellTextColor2 = UIColor.FromRGB(119, 180, 229);

            imgWeather = new UIImageView();
            lblCity    = new UILabel()
            {
                Font = cellFont, TextColor = cellTextColor1
            };
            lblHigh = new UILabel()
            {
                Font = cellFont, TextColor = cellTextColor2, TextAlignment = UITextAlignment.Right
            };
            lblLow = new UILabel()
            {
                Font = cellFont, TextColor = cellTextColor1, TextAlignment = UITextAlignment.Right
            };

            ContentView.Add(imgWeather);
            ContentView.Add(lblCity);
            ContentView.Add(lblHigh);
            ContentView.Add(lblLow);
        }
Ejemplo n.º 29
0
 public MessageCell()
     : base(UITableViewCellStyle.Default, MKey)
 {
     View = new MessageSummaryView();
     ContentView.Add(View);
     Accessory = UITableViewCellAccessory.DisclosureIndicator;
 }
Ejemplo n.º 30
0
        public BlockCell(CGRect frame) : base(frame)
        {
            ContentView.Layer.BorderColor = new CGColor(191, 222, 227);
            ContentView.Layer.BorderWidth = 2.0f;
            ContentView.BackgroundColor   = UIColor.Black;
            ContentView.Transform         = CGAffineTransform.MakeScale(0.9f, 0.9f);

            blockAction       = UIButton.FromType(UIButtonType.Custom);
            blockAction.Frame = new CGRect(0, 50, 280, 130);

            exampleLabel =
                new UILabel(new RectangleF(30, 90, 210, 50));
            exampleLabel.TextAlignment = UITextAlignment.Center;
            exampleLabel.Font          = UIFont.FromName("Orange Kid", 28f);

            nameLabel = new UILabel(new RectangleF(-30, 10, 320, 30));
            nameLabel.TextAlignment = UITextAlignment.Center;
            nameLabel.Font          = UIFont.FromName("Orange Kid", 34f);

            ContentView.Add(blockAction);
            ContentView.Add(exampleLabel);
            ContentView.Add(nameLabel);

            blockAction.TouchUpInside += (sender, e) => {
                if (introController.blocksOnView.Count == 0 ||
                    (introController.lastSelected != null &&
                     introController.lastSelected.Selected == true))
                {
                    introController.AddTextToCompilingString(blockCell.Syntax);
                }
                introController.AddBlock(blockCell.BlockView, blockCell);
            };
        }