Esempio n. 1
0
        /// <summary>
        /// Initialize instance
        /// </summary>
        public void Init()
        {
            this.FavoriteModelController             = new UPFavoriteModelController();
            this.FavoriteModelController.TheDelegate = this;

            // For the current release the default behavior disregard OrganizerRefresh value is
            // RefreshOrganizer set to true, to restore the original functionality uncoment the
            // following line and remove this.RefreshOrganizer = true;
            // this.RefreshOrganizer = this.ViewReference.ContextValueIsSet("OrganizerRefresh");
            this.RefreshOrganizer = true;
            this.BuildDetailOrganizerPages();
        }
Esempio n. 2
0
        /// <summary>
        /// The favorite model controller favorite record identification.
        /// </summary>
        /// <param name="favoriteModelController">The favorite model controller.</param>
        /// <param name="favoriteRecordIdentification">The favorite record identification.</param>
        public void FavoriteModelControllerFavoriteRecordIdentification(UPFavoriteModelController favoriteModelController, string favoriteRecordIdentification)
        {
            ((UPMOrganizer)this.TopLevelElement).FavoriteRecordIdentification = favoriteRecordIdentification;
            UPMOrganizerAction action = this.ActionItem(StringIdentifier.IdentifierWithStringId(Core.Constants.ActionIdToggleFavorite));

            if (action != null)
            {
                action.Aktive    = string.IsNullOrEmpty(favoriteRecordIdentification);
                action.LabelText = !action.Aktive ? LocalizedString.TextProcessDeleteFromFavorites : LocalizedString.TextProcessAddToFavorites;
                this.ModelControllerDelegate?.ModelControllerDidChange(this, this.TopLevelElement, this.TopLevelElement,
                                                                       new List <IIdentifier> {
                    action.Identifier
                }, UPChangeHints.ChangeHintsWithHint("ActionItemStatusChanged"));
            }
        }
Esempio n. 3
0
 /// <summary>
 /// The favorite model controller did fail with error.
 /// </summary>
 /// <param name="favoriteModelController">The favorite model controller.</param>
 /// <param name="error">The error.</param>
 public void FavoriteModelControllerDidFailWithError(UPFavoriteModelController favoriteModelController, Exception error)
 {
     //UPStatusHandler.ShowErrorMessage(upTextErrorCouldNotBeSaved);
 }