예제 #1
0
		/// <summary>
		/// Sets the assignment for this cell
		/// </summary>
		public void SetAssignment(ConfirmationController controller, Assignment assignment, UITableView tableView)
		{
			this.controller = controller;
			this.assignment = assignment;
			this.tableView = tableView;

			completeButton.Enabled = assignment.CanComplete;
		}
예제 #2
0
        /// <summary>
        /// Sets the assignment for this cell
        /// </summary>
        public void SetAssignment(ConfirmationController controller, Assignment assignment, UITableView tableView)
        {
            this.controller = controller;
            this.assignment = assignment;
            this.tableView  = tableView;

            completeButton.Enabled = assignment.CanComplete;
        }
예제 #3
0
        /// <summary>
        /// Sets the assignment for this cell
        /// </summary>
        public void SetAssignment(ConfirmationController controller, Assignment assignment, UITableView tableView)
        {
            this.controller = controller;
            this.assignment = assignment;
            this.tableView  = tableView;

            completeButton.Enabled = assignment.CanComplete;
            completeButton.SetBackgroundImage(Theme.Complete, UIControlState.Normal);
            completeButton.SetBackgroundImage(Theme.CompleteInactive, UIControlState.Disabled);
            completeButton.SetTitleColor(UIColor.White, UIControlState.Normal);
            completeButton.SetTitle("Complete", UIControlState.Normal);
            completeButton.SetTitle("Completed", UIControlState.Disabled);
        }
		/// <summary>
		/// Sets the assignment for this cell
		/// </summary>
		public void SetAssignment(ConfirmationController controller, Assignment assignment, UITableView tableView)
		{
			this.controller = controller;
			this.assignment = assignment;
			this.tableView = tableView;

			completeButton.Enabled = assignment.CanComplete;
			completeButton.SetBackgroundImage (Theme.Complete, UIControlState.Normal);
			completeButton.SetBackgroundImage (Theme.CompleteInactive, UIControlState.Disabled);
			completeButton.SetTitleColor (UIColor.White, UIControlState.Normal);
			completeButton.SetTitle ("Complete", UIControlState.Normal);
			completeButton.SetTitle ("Completed", UIControlState.Disabled);
		}
예제 #5
0
        /// <summary>
        /// Set the signature for this cell
        /// </summary>
        public void SetSignature(ConfirmationController controller, Assignment assignment, Data.Signature signature)
        {
            this.controller = controller;

            //Dispose the previous image if there was one
            if (image != null)
            {
                image.Dispose();
                image = null;
            }

            if (signature == null)
            {
                this.signature.Hidden = true;
                this.signature.SetBackgroundImage(null, UIControlState.Normal);

                addSignature.Hidden = false;
                addSignature.SetTitleColor(UIColor.White, UIControlState.Normal);

                if (assignment.Status != AssignmentStatus.Complete && !assignment.IsHistory)
                {
                    addSignature.Enabled = true;
                    addSignature.SetBackgroundImage(Theme.ButtonDark, UIControlState.Normal);
                    addSignature.SetTitle("Add Signature", UIControlState.Normal);
                }
                else
                {
                    addSignature.Enabled = false;
                    addSignature.SetBackgroundImage(null, UIControlState.Normal);
                    addSignature.SetTitle("No Signature", UIControlState.Normal);
                }
            }
            else
            {
                image = signature.Image.ToUIImage();
                this.signature.Hidden = false;
                this.signature.SetBackgroundImage(image, UIControlState.Normal);
                this.signature.Layer.CornerRadius = 7;
                this.signature.ClipsToBounds      = true;
                this.signature.Enabled            = !assignment.IsReadonly;

                addSignature.Hidden = true;
            }
        }
		/// <summary>
		/// Set the signature for this cell
		/// </summary>
		public void SetSignature (ConfirmationController controller, Assignment assignment, Data.Signature signature)
		{
			this.controller = controller;

			//Dispose the previous image if there was one
			if (image != null) {
				image.Dispose ();
				image = null;
			}

			if (signature == null) {
				this.signature.Hidden = true;
				this.signature.SetBackgroundImage (null, UIControlState.Normal);

				addSignature.Hidden = false;
				addSignature.SetTitleColor (UIColor.White, UIControlState.Normal);

				if (assignment.Status != AssignmentStatus.Complete && !assignment.IsHistory) {
					addSignature.Enabled = true;
					addSignature.SetBackgroundImage (Theme.ButtonDark, UIControlState.Normal);
					addSignature.SetTitle ("Add Signature", UIControlState.Normal);
				} else {
					addSignature.Enabled = false;
					addSignature.SetBackgroundImage (null, UIControlState.Normal);
					addSignature.SetTitle ("No Signature", UIControlState.Normal);
				}
			} else {
				image = signature.Image.ToUIImage ();
				this.signature.Hidden = false;
				this.signature.SetBackgroundImage (image, UIControlState.Normal);
				this.signature.Layer.CornerRadius = 7;
				this.signature.ClipsToBounds = true;
				this.signature.Enabled = !assignment.IsReadonly;

				addSignature.Hidden = true;
			}
		}
			public SignatureTableSource (ConfirmationController controller)
			{
				this.controller = controller;
				assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();
			}
			public PhotoTableSource (ConfirmationController controller)
			{
				this.controller = controller;
				photoViewModel = ServiceContainer.Resolve<PhotoViewModel>();
			}
 public SignatureTableSource(ConfirmationController controller)
 {
     this.controller     = controller;
     assignmentViewModel = ServiceContainer.Resolve <AssignmentViewModel>();
 }
예제 #10
0
 public PhotoTableSource(ConfirmationController controller)
 {
     this.controller = controller;
     photoViewModel  = ServiceContainer.Resolve <PhotoViewModel>();
 }