コード例 #1
0
 public void EditDate(MatchingDate theDate)
 {
     DateDetailViewController dateViewer = new DateDetailViewController ();
     if (dateViewer != null) {
         this.NavigationController.PushViewController (dateViewer, true);
         dateViewer.SetCurrentDate (theDate);
     }
 }
コード例 #2
0
        public void ConformToEmpty(int section)
        {
            linkedDate = null;
            PinBtn.Hidden = true;
            SelfieView.Hidden = true;
            DateTimeLabel.Hidden = true;
            if (section == 0)
                DateTitleLabel.Text = "NoAppliedDatesCell_String".Localize();
            else if (section == 1)
                DateTitleLabel.Text = "NoPinnedDatesCell_String".Localize();
            else
                DateTitleLabel.Text = "NoMatchingDatesCell_String".Localize();

            PinBtn.TouchUpInside -= HandleClick;
        }
コード例 #3
0
        public void ConformToRecord(MatchingDate theDate, MatchingDatesTableSource theSource)
        {
            parentSource = theSource;
            PinBtn.TouchUpInside -= HandleClick;
            linkedDate = theDate;
            PinBtn.Hidden = false;
            SelfieView.Hidden = false;
            DateTimeLabel.Hidden = false;
            DateTimeLabel.Text = linkedDate.starttime.ToString ("g");
            DateTitleLabel.Text = linkedDate.title;
            if (!String.IsNullOrEmpty (linkedDate.selfie))
                SelfieView.SetImage (new NSUrl (linkedDate.selfie));
            else
                SelfieView.Image = UIImage.FromBundle ("LaunchIcon");

            if (theDate.applied) {
                PinBtn.SetTitle ("interested", UIControlState.Normal);
            } else if (theDate.pinned) {
                PinBtn.SetTitle ("unpin", UIControlState.Normal);
            } else {
                PinBtn.SetTitle ("pin", UIControlState.Normal);
            }
            PinBtn.TouchUpInside += HandleClick;
        }
コード例 #4
0
 public void SetCurrentDate(MatchingDate theDate)
 {
     this.theDate = theDate;
 }
コード例 #5
0
 public void UpdateCellStatus(MatchingDatesCell theCell, MatchingDate theDate)
 {
     if (theDate.pinned) {
         OtherDates.Remove (theDate);
         PinnedDates.Add (theDate);
     } else {
         // unpinned
         PinnedDates.Remove (theDate);
         OtherDates.Add (theDate);
     }
     myTable.ReloadData ();
 }