public AssignmentCell (IntPtr handle) : base (handle)
		{
			assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();

			if (!Theme.IsiOS7)
				SelectedBackgroundView = new UIImageView { Image = Theme.AssignmentBlue };
		}
        public void SetUp ()
        {
            ServiceContainer.Register<ISynchronizeInvoke> (() => new Mocks.MockSynchronizeInvoke ());
            ServiceContainer.Register<IAssignmentService> (() => new Mocks.MockAssignmentService ());

            viewModel = new AssignmentViewModel ();
        }
			public ContentController (SignatureController controller)
			{
				this.controller = controller;
				assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();

				Title = "Add Signature";
			}
		public AssignmentsController (IntPtr handle) : base (handle)
		{
			assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();

			assignmentViewModel.HoursChanged += OnHoursChanged;;
			assignmentViewModel.RecordingChanged += OnRecordingChanged;
		}
		public MainMapController (IntPtr handle) : base (handle)
		{
			assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();

			//Hook up viewModel events
			assignmentViewModel.HoursChanged += OnHoursChanged;
			assignmentViewModel.RecordingChanged += OnRecordingChanged;
		}
        public override void OnCreate (Bundle savedInstanceState)
        {
            base.OnCreate (savedInstanceState);

            assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel> ();
            photoViewModel = ServiceContainer.Resolve<PhotoViewModel> ();
            mediaPicker = new MediaPicker (Activity);
        }
		public ConfirmationController (IntPtr handle) : base (handle)
		{
			assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();
			photoViewModel = ServiceContainer.Resolve<PhotoViewModel>();

			//Update photoSize for screen scale
			var scale = UIScreen.MainScreen.Scale;
			photoSize.Width *= scale;
			photoSize.Height *= scale;
		}
		public MenuController (IntPtr handle) : base (handle)
		{
			menuViewModel = ServiceContainer.Resolve<MenuViewModel>();
			assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();

			//Subscribe to ViewModel events
			assignmentViewModel.HoursChanged += OnHoursChanged;
			assignmentViewModel.RecordingChanged += OnRecordingChanged;
			menuViewModel.MenuIndexChanged += OnMenuIndexChanged;
		}
		public AssignmentDetailsController (IntPtr handle) : base (handle)
		{
			menuViewModel = ServiceContainer.Resolve<MenuViewModel> ();
			assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();

			mapController = new Lazy<UIViewController>(() => new MapController());
			itemsController = new Lazy<UIViewController>(() => Storyboard.InstantiateViewController<ItemsViewController>());
			laborController = new Lazy<UIViewController>(() => Storyboard.InstantiateViewController<LaborController>());
			expenseController = new Lazy<UIViewController>(() => Storyboard.InstantiateViewController<ExpenseController>());
			documentController = new Lazy<UIViewController>(() => Storyboard.InstantiateViewController<DocumentController>());
			confirmationController = new Lazy<UIViewController>(() => Storyboard.InstantiateViewController<ConfirmationController>());
			historyController = new Lazy<UIViewController>(() => Storyboard.InstantiateViewController<HistoryController>());
		}
Пример #10
0
        public MapOverlayItem (Context context, Drawable overlayDrawable, OverlayItem overlay, MapView mapView, bool canGetDirection = false)
            : base (overlayDrawable)
        {
            item = overlay;
            this.context = context;
            this.mapView = mapView;
            getDirections = canGetDirection;

            BoundCenterBottom (overlayDrawable);
            Populate ();

            assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel> ();
        }
Пример #11
0
        public SummaryActivity ()
        {
            assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel> ();
            itemViewModel = ServiceContainer.Resolve<ItemViewModel> ();
            laborViewModel = ServiceContainer.Resolve<LaborViewModel> ();
            photoViewModel = ServiceContainer.Resolve<PhotoViewModel> ();
            expenseViewModel = ServiceContainer.Resolve<ExpenseViewModel> ();
            documentViewModel = ServiceContainer.Resolve<DocumentViewModel> ();
            historyViewModel = ServiceContainer.Resolve<HistoryViewModel> ();
            menuViewModel = ServiceContainer.Resolve<MenuViewModel> ();

            assignment = assignmentViewModel.SelectedAssignment;
        }
		public AssignmentStatusSheet ()
		{
			assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();

			//Loop through the list of statuses you can change an assignment to
			foreach (AssignmentStatus status in assignmentViewModel.AvailableStatuses) {
				AddButton (status.ToString ());
			}

			Dismissed += (sender, e) => {
				if (e.ButtonIndex != -1)
					Status = assignmentViewModel.AvailableStatuses[e.ButtonIndex];
			};
		}
Пример #13
0
        public override void OnCreate (Bundle savedInstanceState)
        {
            base.OnCreate (savedInstanceState);

            menuViewModel = ServiceContainer.Resolve<MenuViewModel> ();

            assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel> ();
            assignmentViewModel.HoursChanged += (sender, e) => {
                if (timerHours != null && Activity != null) {
                    Activity.RunOnUiThread (() => {
                        timerHours.Text = assignmentViewModel.Hours.ToString (@"hh\:mm\:ss");
                    });
                }
            };

            navigationSelector = new NavigationItemSelectorListener (this);
        }
			public SignatureTableSource (ConfirmationController controller)
			{
				this.controller = controller;
				assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();
			}
Пример #15
0
 public AddExpenseController(IntPtr handle)
     : base(handle)
 {
     assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();
     expenseViewModel = ServiceContainer.Resolve<ExpenseViewModel>();
 }
Пример #16
0
		public MapViewActivity ()
		{
			assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel> ();
			assignmentViewModel.HoursChanged += HoursChanged;
			menuViewModel = ServiceContainer.Resolve<MenuViewModel> ();
		}
		public AddLaborController (IntPtr handle) : base (handle)
		{
			assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();
			laborViewModel = ServiceContainer.Resolve<LaborViewModel>();
		}
			public TableSource (LaborController controller)
			{
				this.controller = controller;
				laborViewModel = ServiceContainer.Resolve<LaborViewModel>();
				assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();
			}
Пример #19
0
            public TableSource(MenuController controller)
            {
                this.controller = controller;
                assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();

                summaryCell = new UITableViewCell (UITableViewCellStyle.Default, null);
                summaryCell.TextLabel.Text = "Summary";
                SetupCell (summaryCell, start: true);

                mapCell = new UITableViewCell (UITableViewCellStyle.Default, null);
                mapCell.TextLabel.Text = "Map";
                SetupCell (mapCell);

                itemsCell = new UITableViewCell (UITableViewCellStyle.Default, null);
                itemsCell.TextLabel.Text = "Items";
                SetupCell (itemsCell);

                laborCell = new UITableViewCell (UITableViewCellStyle.Default, null);
                laborCell.TextLabel.Text = "Labor Hours";
                SetupCell (laborCell);

                expensesCell = new UITableViewCell (UITableViewCellStyle.Default, null);
                expensesCell.TextLabel.Text = "Expenses";
                SetupCell (expensesCell);

                documentsCell = new UITableViewCell (UITableViewCellStyle.Default, null);
                documentsCell.TextLabel.Text = "Documents";
                SetupCell (documentsCell);

                confirmationCell = new UITableViewCell (UITableViewCellStyle.Default, null);
                confirmationCell.TextLabel.Text = "Confirmations";
                SetupCell (confirmationCell);

                historyCell = new UITableViewCell (UITableViewCellStyle.Default, null);
                // TODO: phone call functiality should be implemented first
                // user can't make calls and history page have no sence
                // that's why this section of menu is disabled
                historyCell.UserInteractionEnabled = false;
                historyCell.TextLabel.Text = "History(Coming soon!)";
                SetupCell (historyCell, end: true);
            }
			public MapViewDelegate (MainMapController controller)
			{
				this.controller = controller;
				assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();
			}
			public TableSource (MenuController controller)
			{
				this.controller = controller;
				assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();

				summaryCell = new UITableViewCell (UITableViewCellStyle.Default, null);
				summaryCell.TextLabel.Text = "Summary";
				SetupCell (summaryCell, start: true);

				mapCell = new UITableViewCell (UITableViewCellStyle.Default, null);
				mapCell.TextLabel.Text = "Map";
				SetupCell (mapCell);

				itemsCell = new UITableViewCell (UITableViewCellStyle.Default, null);
				itemsCell.TextLabel.Text = "Items";
				SetupCell (itemsCell);

				laborCell = new UITableViewCell (UITableViewCellStyle.Default, null);
				laborCell.TextLabel.Text = "Labor Hours";
				SetupCell (laborCell);

				expensesCell = new UITableViewCell (UITableViewCellStyle.Default, null);
				expensesCell.TextLabel.Text = "Expenses";
				SetupCell (expensesCell);

				documentsCell = new UITableViewCell (UITableViewCellStyle.Default, null);
				documentsCell.TextLabel.Text = "Documents";
				SetupCell (documentsCell);

				confirmationCell = new UITableViewCell (UITableViewCellStyle.Default, null);
				confirmationCell.TextLabel.Text = "Confirmations";
				SetupCell (confirmationCell);

				historyCell = new UITableViewCell (UITableViewCellStyle.Default, null);
				historyCell.TextLabel.Text = "History";
				SetupCell (historyCell, end: true);
			}
Пример #22
0
 public SignatureDialog (Activity activity)
     : base (activity)
 {
     this.activity = activity;
     assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel> ();
 }
Пример #23
0
 public TableSource(ItemsViewController controller)
 {
     this.controller = controller;
     assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();
     itemViewModel = ServiceContainer.Resolve<ItemViewModel>();
 }
Пример #24
0
 public MapFragmentActivity()
 {
     assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel> ();
     assignment = assignmentViewModel.SelectedAssignment;
 }
Пример #25
0
		public SplitController (IntPtr handle) : base(handle)
		{
			assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();
		}
Пример #26
0
			public TableSource (ExpenseController controller)
			{
				this.controller = controller;
				expenseViewModel = ServiceContainer.Resolve<ExpenseViewModel>();
				assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();
			}
Пример #27
0
		public CompleteCell (IntPtr handle) : base (handle)
		{
			assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();
		}
Пример #28
0
 public MapController()
 {
     assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();
 }
Пример #29
0
 public ItemsViewController(IntPtr handle)
     : base(handle)
 {
     assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();
     itemViewModel = ServiceContainer.Resolve<ItemViewModel>();
 }
		public DocumentController (IntPtr handle) : base (handle)
		{
			documentViewModel = ServiceContainer.Resolve<DocumentViewModel>();
			assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel>();
		}