示例#1
0
        /// <summary>
        /// Edit an existing flavor.
        /// </summary>
        /// <param name="toEdit">The flavor to edit.</param>
        public override void EditElement(Flavor toEdit)
        {
            FlavorActivity parent = Activity as FlavorActivity;

            if (parent != null)
            {
                parent.StartEditFlavor(toEdit);
            }
        }
示例#2
0
        /// <summary>
        /// Hide the edit/create fragment.
        /// </summary>
        public void End()
        {
            FlavorActivity fa = Activity as FlavorActivity;

            if (fa != null)
            {
                fa.StopEditFlavor();
            }
        }
示例#3
0
        /// <summary>
        /// Create a new flavor.
        /// </summary>
        public override void CreateElement()
        {
            Flavor newFlavor = new Flavor();

            newFlavor.ID = -1;
//      newFlavor.Name = GetString(Resource.String.DefaultFlavorName);
            FlavorActivity parent = Activity as FlavorActivity;

            if (parent != null)
            {
                parent.StartEditFlavor(newFlavor);
            }
        }