protected override void Arrange()
        {
            var agendaMock = new Mock<IManageAnAgenda>();
            _ioc.RegisterServiceInstance(agendaMock.Object);

            _sut = new SessionListItemViewModel();
            _sut.SessionId = session_id;
        }
        protected override void Arrange()
        {
            var agendaMock = new Mock <IManageAnAgenda>();

            _ioc.RegisterServiceInstance(agendaMock.Object);

            _sut           = new SessionListItemViewModel();
            _sut.SessionId = session_id;
        }
Ejemplo n.º 3
0
        public void UpdateCell(SessionListItemViewModel showSession, string big, string small)
		{
			session = showSession;
			UpdateImage (FavoritesManager.IsFavorite (session.SessionKey));
			
			titleLabel.Font = bigFont;
			titleLabel.Text = big;
			
			speakerLabel.Text = small;
		}
Ejemplo n.º 4
0
		/// <summary>for iPhone</summary>
		public SessionElement (SessionListItemViewModel showSession) : base (showSession.Title)
		{
			this.session = showSession;
			if (String.IsNullOrEmpty(session.Room))
				subtitle = String.Format ("{0}", session.SpeakerNames);
            else if (String.IsNullOrEmpty(session.SpeakerNames))
                subtitle = String.Format("{0} room", session.Room);
            else
				subtitle = String.Format ("{0} room; {1}", session.Room, session.SpeakerNames);

		}
        /// <summary>
        ///		Añade los datos de una sesión
        /// </summary>
        public SessionListItemViewModel Add(NewSessionEventArgs e)
        {
            var item = new SessionListItemViewModel();

            // Añade la sesión al diccionario
            _sessions.Add(e.Session.Id, item);
            // Asigna los valores al elemento
            item.InitViewModel(++_sessionsNumber, e);
            // Añade la sesión
            Items.Add(item);
            // Y lo devuelve
            return(item);
        }
Ejemplo n.º 6
0
		const int buttonSpace = 45; //24;

        public SessionCell(UITableViewCellStyle style, NSString ident, SessionListItemViewModel showSession, string big, string small)
            : base(style, ident)
		{
			SelectionStyle = UITableViewCellSelectionStyle.Blue;
			
			titleLabel = new UILabel () {
				TextAlignment = UITextAlignment.Left,
				BackgroundColor = UIColor.FromWhiteAlpha (0f, 0f)
			};
			speakerLabel = new UILabel () {
				TextAlignment = UITextAlignment.Left,
				Font = smallFont,
				TextColor = UIColor.DarkGray,
				BackgroundColor = UIColor.FromWhiteAlpha (0f, 0f)
			};
			locationImageView = new UIImageView();
			locationImageView.Image = building;

			button = UIButton.FromType (UIButtonType.Custom);
			button.TouchDown += delegate {
				UpdateImage (ToggleFavorite ());
				if (AppDelegate.IsPad) {
					NSObject o = new NSObject();
					NSDictionary progInfo = NSDictionary.FromObjectAndKey(o, new NSString("FavUpdate"));

					NSNotificationCenter.DefaultCenter.PostNotificationName(
						"NotificationFavoriteUpdated", o, progInfo);
				}
			};
			UpdateCell (showSession, big, small);
			
			ContentView.Add (titleLabel);
			ContentView.Add (speakerLabel);
			ContentView.Add (button);
			ContentView.Add (locationImageView);
		}