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

            variety.PlantID  = plant.ID;
            variety.FamilyID = plant.FamilyID;
            EditPlantVarietyWindow win = new EditPlantVarietyWindow(variety, true);

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

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