public CreateActivityPage(ActivityModel activityModel)
        {
            InitializeComponent();

            if (activityModel != null)
            {
                Title = "Edit";
            }

            BindingContext = new CreateActivityViewModel(Navigation, activityModel);
        }
예제 #2
0
        public CreateActivityViewModel(INavigation navigation, ActivityModel activityModel)
        {
            this.navigation = navigation;
            SaveCommand     = new Command(Save);

            if (activityModel != null)
            {
                this.activityModel = activityModel;

                Name        = activityModel.Name;
                Description = activityModel.Description;
                DueDate     = activityModel.Name;
                Lattitude   = activityModel.Lattitude.ToString();
                Longitude   = activityModel.Longitude.ToString();
                Status      = activityModel.Completed.ToString();
            }
        }
예제 #3
0
        public ActivityDetailViewModel(INavigation navigation, ActivityModel activityModel)
        {
            this.navigation = navigation;

            if (activityModel != null)
            {
                this.activityModel = activityModel;
                Name        = activityModel.Name;
                Description = activityModel.Description;
                DueDate     = activityModel.Name;
                Lattitude   = activityModel.Lattitude.ToString();
                Longitude   = activityModel.Longitude.ToString();
                Status      = activityModel.Completed.ToString();
            }

            EditCommand = new Command(Edit);
        }