Ejemplo n.º 1
0
 public NSNavigationController()
 {
     View = new NSColorView();
     View.AutoresizingMask           = NSViewResizingMask.WidthSizable | NSViewResizingMask.HeightSizable;
     View.AddSubview(MainContentView = new NSColorView {
         BackgroundColor = NSColor.White
     });
     MainContentView.AutoresizingMask = NSViewResizingMask.WidthSizable | NSViewResizingMask.HeightSizable;
     View.AddSubview(Toolbar          = new TitleBar());
 }
Ejemplo n.º 2
0
 void init()
 {
     AddSubview(progressBackground = new NSColorView {
         BackgroundColor = Style.Current.AccentColorHorizontal
     });
     AddSubview(thumb = new NSColorView {
         BackgroundColor = NSColor.DarkGray
     });
     this.AcceptsTouchEvents = true;
 }
Ejemplo n.º 3
0
 public ProgressView()
 {
     BackgroundColor = NSColor.Clear;
     AddSubview(backgroundProgress = new NSColorView {
         BackgroundColor = NSColor.DarkGray,
     });
     AddSubview(downloadProgress = new NSColorView {
         BackgroundColor = NSColor.LightGray,
     });
     AddSubview(slider = new NSAnimatedSlider {
         ValueChanged = (f) => {
             PlaybackManager.Shared.Seek(f);
         }
     });
     slider.WantsLayer          = true;
     slider.Layer.MasksToBounds = false;
     this.WantsLayer            = true;
     this.Layer.MasksToBounds   = false;
 }
Ejemplo n.º 4
0
//		public AlbumDetailsSongCell (IntPtr handle) : base (handle)
//		{
//			this.Identifier = Key;
//			AddSubview(artistTextField = new NSTextField {
//				Bezeled = false,
//				DrawsBackground = false,
//				Editable = false,
//				Selectable = false,
//				TextColor = NSColor.LabelColor
//			});
//		}
        public AlbumDetailsSongCell()
        {
            this.Identifier          = Key;
            AddSubview(backgroudView = new NSColorView {
                BackgroundColor = NSColor.ControlLightHighlight,
                Hidden          = true,
            });

            AddSubview(trackField = new NSTextField().StyleAsMainText());
            AddSubview(textField  = new TwoLabelView {
                TopLabel =
                {
                    TextColor = NSColor.LabelColor,
                },
                BottomLabel =
                {
                    TextColor = NSColor.SecondaryLabelColor,
                }
            });
            this.AddGestureRecognizer(new NSClickGestureRecognizer(() => {
                var station = Song;
                if (station == null)
                {
                    return;
                }
                ViewModel?.PlayItem(Song);
            })
            {
                NumberOfClicksRequired = 2
            });
            this.AddGestureRecognizer(new NSClickGestureRecognizer(() => {
                ViewModel?.CellTapped(this);
            })
            {
                NumberOfClicksRequired = 1
            });
        }