コード例 #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);
 }