예제 #1
0
        /// <summary>
        /// Shows the window for new plants not yet added to a family
        /// </summary>
        /// <param name="family">the family the plant belongs to</param>
        public static void ShowWindow(PlantFamily family)
        {
            Plant plant = new Plant("", "");

            plant.FamilyID = family.ID;
            EditPlantWindow win = new EditPlantWindow(plant, true);

            win.ShowAll();
        }
예제 #2
0
        /// <summary>
        /// Shows the window for plants that already exist.
        /// </summary>
        public static void ShowWindow(Plant plant, bool create = false)
        {
            EditPlantWindow win = new EditPlantWindow(plant, create);

            win.ShowAll();
        }
예제 #3
0
 protected override void Edit()
 {
     this.Destroy();
     EditPlantWindow.ShowWindow(Plant, Create);
 }