Exemplo n.º 1
0
        private void OnAddPortion(string value)
        {
            var portion = MenuItem.AddDefaultMenuPortion(Model);

            Portions.Add(new PortionViewModel(portion));
            Workspace.Add(portion);
        }
Exemplo n.º 2
0
        public MenuItemPortion AddPortion(string portionName, decimal price, string currencyCode)
        {
            var mip = new MenuItemPortion
            {
                Name       = portionName,
                Price      = price,
                MenuItemId = Id
            };

            Portions.Add(mip);
            return(mip);
        }
Exemplo n.º 3
0
        private void RefreshView()
        {
            var tempPoint = new List <PointT>(Points);

            tempPoint.Add(Points[0]);
            var   path  = new LinearPath(tempPoint.ToArray());
            var   reg   = new Region(path);
            Solid plate = reg.ExtrudeAsSolid <Solid>(_thickness, 0.1);

            this.Portions.Clear();

            foreach (var port in plate.Portions)
            {
                Portions.Add(port);
            }
            Regen(0);
            this.UpdateBoundingBox(new devDept.Eyeshot.TraversalParams());
        }