//private Binding<string, string> _nameBinding;
        //private Binding<string, string> _descriptionBinding;
        //private Binding<DateTime?, string> _startDateBinding;
        //private Binding<DateTime?, string> _endDateBinding;

        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);

            this.NavigationController.NavigationBar.BarTintColor = UIColorExtensions.FromHex(Vm.Conference.HighlightColor);

            Insights.Track("ViewedScreen",
                           new Dictionary <string, string> {
                { "Screen", "ConferenceDetail" },
                { "Slug", Vm.Conference.Slug },
            });
        }
Esempio n. 2
0
 public override void ViewDidLoad()
 {
     base.ViewDidLoad();
     searchController = new UISearchController((UITableViewController)null);
     searchController.DimsBackgroundDuringPresentation = false;
     this.TableView.TableHeaderView = searchController.SearchBar;
     searchController.SearchBar.SizeToFit();
     DefinesPresentationContext            = true;
     searchController.SearchResultsUpdater = this;
     this.TableView.SetContentOffset(new CoreGraphics.CGPoint(0, searchController.SearchBar.Frame.Size.Height), animated: false);
     searchController.SearchBar.BarTintColor = UIColorExtensions.FromHex(Vm.Conference.HighlightColor);
 }
Esempio n. 3
0
        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);

            this.NavigationController.NavigationBar.BarTintColor = UIColorExtensions.FromHex(Application.Locator.Conference.Conference.HighlightColor);
            this.Title       = Vm.Speaker.FirstName + " " + Vm.Speaker.LastName;
            speakerName.Text = Vm.Speaker.FirstName + " " + Vm.Speaker.LastName;
            speakerBio.Text  = Vm.Speaker.Bio;
            speakerTwitterHandle.SetTitle(Vm.Speaker.TwitterHandle, UIControlState.Normal);
            speakerTwitterHandle.TouchUpInside += ShowSpeakerTwitterProfile;
            speakerCompany.Text = Vm.Speaker.CompanyName;

            SetImage();
        }
Esempio n. 4
0
        public async Task SetConference(Conference conference)
        {
            conferenceContentView.Layer.BorderColor = UIColor.LightGray.CGColor;
            conferenceContentView.Layer.BorderWidth = 0.5f;

            this.conferenceName.Text     = conference.Name;
            this.AccessibilityIdentifier = conference.Slug;

            highlightColorBar.BackgroundColor      = UIColorExtensions.FromHex(conference.HighlightColor);
            conferenceFavoriteView.BackgroundColor = UIColorExtensions.FromHex(conference.HighlightColor);

            if (conference.StartDate.HasValue)
            {
                this.conferenceDate.Text = conference.StartDate.Value.ToShortDateString();
            }
            this.conferenceDescription.Text = conference.Description;

            this.conferenceLocation.Text = conference.Address.AddressShortDisplay();

            this.addedToScheduleStatus.Font = UIFont.FromName("FontAwesome", 17f);
            this.addedToScheduleStatus.Text = conference.IsAddedToSchedule ? "\xf274" : "\xf273"; //
            //this.addedToScheduleStatus.Text = "\xf273";

            if (!string.IsNullOrWhiteSpace(conference.ImageUrl))
            {
                try {
                    var imageService = ServiceLocator.Current.GetInstance <IImageService>();
                    var localPath    = await imageService.GetConferenceImagePath(conference);

                    //Resizing image is time costing, using async to avoid blocking the UI thread
                    UIImage image         = null;
                    CGSize  imageViewSize = conferenceImage.Frame.Size;

                    await Task.Run(() => {
                        var uiImage = UIImage.FromFile(localPath);
                        image       = uiImage?.Scale(imageViewSize);
                    });


                    conferenceImage.Image = image;
                } catch (Exception e) {
                    Insights.Report(e);
                }
            }
        }
Esempio n. 5
0
        public void SetSession(Session session, string highlightColor)
        {
            _session = session;

            sessionContentView.Layer.BorderColor = UIColor.LightGray.CGColor;
            sessionContentView.Layer.BorderWidth = 0.5f;

            highlightColorBar.BackgroundColor  = UIColorExtensions.FromHex(highlightColor);
            sessionSpeakerView.BackgroundColor = UIColorExtensions.FromHex(highlightColor);

            sessionTitle.Text = _session.Title ?? string.Empty;
            sessionDate.Text  = _session.StartDate.HasValue ?
                                _session.StartDate.Value.ToShortTimeString() : string.Empty;

            sessionRoom.Text        = _session.Room ?? string.Empty;
            sessionSpeaker.Text     = _session.SpeakerName();
            sessionDescription.Text = _session.Description ?? string.Empty;
        }
Esempio n. 6
0
 public override void ViewWillAppear(bool animated)
 {
     base.ViewWillAppear(animated);
     this.NavigationController.NavigationBar.BarTintColor = UIColorExtensions.FromHex(Application.Locator.Conference.Conference.HighlightColor);
 }