コード例 #1
0
        private void ChooseSize(object currentlySelectedItem)
        {
            MenuItem         item             = (MenuItem)currentlySelectedItem;
            ChooseSizeWindow chooseSizeWindow = new ChooseSizeWindow(new MenuItem(item.Name, item.BasePrice));

            chooseSizeWindow.Owner = this;
            bool?chooseResult = chooseSizeWindow.ShowDialog();
        }
コード例 #2
0
        private void CreatePizza()
        {
            MenuItem         customPizza      = new Pizza("Custom Pizza", new List <Ingredient>(selectedIngredients));
            ChooseSizeWindow chooseSizeWindow = new ChooseSizeWindow(new MenuItem(customPizza.Name, customPizza.BasePrice));

            chooseSizeWindow.Owner = this;
            Nullable <bool> chooseResult = chooseSizeWindow.ShowDialog();
        }