/// <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(); }
/// <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(); }
protected override void Edit() { this.Destroy(); EditPlantVarietyWindow.ShowWindow(Variety, Create); }