/// <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); } }
/// <summary> /// Hide the edit/create fragment. /// </summary> public void End() { FlavorActivity fa = Activity as FlavorActivity; if (fa != null) { fa.StopEditFlavor(); } }
/// <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); } }