コード例 #1
0
 public UserMilestonePage(RootPage root, ProfileEnhancedViewModel profileViewModel)
 {
     try
     {
         InitializeComponent();
         App.Configuration.InitialAsync(this);
         NavigationPage.SetHasNavigationBar(this, false);
         _media = DependencyService.Get <IMedia>();
         _devicePermissionServices = DependencyService.Get <IDevicePermissionServices>();
         _model = new UserMilestoneViewModel(App.CurrentApp.MainPage.Navigation)
         {
             Root             = root,
             ProfileViewModel = profileViewModel,
             // CHANGED
             SliderCurrentWeight = sliderCurrentWeight,
             WeightLossGoal      = profileViewModel.YourGoal,
             UserTrackers        = profileViewModel.UserTrackers.OrderBy(t => t.ModifyDate).ToList(),
             UserMetas           = profileViewModel.UserDetail.MetaPivot
         };
         BindingContext = _model;
         _model.GetUserTracker();
         _model.ChangeSliderValue(0);
         Init();
     }
     catch (Exception ex)
     {
         ClientService.WriteLog(null, ex, true).GetAwaiter();
     }
 }
コード例 #2
0
 public TrackerLogPage(ProfileEnhancedViewModel model)
 {
     try
     {
         InitializeComponent();
         _model = model;
         Init();
     }
     catch (Exception ex)
     {
         _ = ex;
     }
 }
コード例 #3
0
 public ProfileEnhanced(RootPage root)
 {
     try
     {
         InitializeComponent();
         _model = new ProfileEnhancedViewModel(App.CurrentApp.MainPage.Navigation)
         {
             Root              = root,
             PopupAction       = OpenPopupWindow,
             SliderGaugeModel  = SliderGauge,
             UserSettingAction = AnimatePanel
         };
         BindingContext = _model;
         Init();
     }
     catch (Exception ex)
     {
         var exceptionHandler = new ExceptionHandler(TAG, ex);
     }
 }