Exemplo n.º 1
0
        //void f_OnClosing(object sender, CloseReason reason, System.ComponentModel.CancelEventArgs cancelEventArgs)
        //{
        //    if (sender is Flyout)
        //    {
        //        if (reason == CloseReason.BackButton)
        //        {
        //            if (!cancelEventArgs.Cancel)
        //            {
        //                NewRosetteControl c = (NewRosetteControl)(sender as Flyout).Content;
        //                Rosette ros = c.NewRosette;
        //                if ((viewModel.CurrentPathData != null) &&
        //                    (viewModel.CurrentPathData is Barrel))
        //                    (viewModel.CurrentPathData as Barrel).Add(ros);
        //                else
        //                {

        //                }
        //            }
        //        }
        //        ReCalculate();
        //    }
        //}

        private void Remove_Rosette_click(object sender, RoutedEventArgs e)
        {
            Rosette sd = SpindleData.CurrentRosette;

            (viewModel.CurrentPathData as Barrel).Rosettes.Remove(sd);
            ReCalculate();
        }
Exemplo n.º 2
0
 private void Button_Click_6(object sender, RoutedEventArgs e)
 {
     NewRosette = new Petal();
     if (RosetteChosen != null)
     {
         RosetteChosen(this, NewRosette);
     }
 }
Exemplo n.º 3
0
 private void Button_Click_5(object sender, RoutedEventArgs e)
 {
     NewRosette = new SquareWave();
     if (RosetteChosen != null)
     {
         RosetteChosen(this, NewRosette);
     }
 }
Exemplo n.º 4
0
        public RedirectToRouteResult RemoveFromCart(Cart cart, int rosetteId, string returnUrl)
        {
            Rosette rosette = repository.Rosettes
                              .FirstOrDefault(g => g.RosetteId == rosetteId);

            if (rosette != null)
            {
                cart.RemoveLine(rosette);
            }
            return(RedirectToAction("Index", new { returnUrl }));
        }
Exemplo n.º 5
0
        public RedirectToRouteResult AddToCart(Cart cart, int rosetteId, string returnUrl)
        {
            Rosette rosette = repository.Rosettes
                              .FirstOrDefault(g => g.RosetteId == rosetteId);

            if (rosette != null)
            {
                cart.AddItem(rosette, 1);
            }
            return(RedirectToAction("Index", new { returnUrl }));
        }
Exemplo n.º 6
0
 async void nc_RosetteChosen(object sender, Rosette e)
 {
     if ((viewModel.CurrentPathData != null) &&
         (viewModel.CurrentPathData is Barrel))
     {
         (viewModel.CurrentPathData as Barrel).Add(e);
         ReCalculate();
     }
     else
     {
         MessageDialog md = new MessageDialog("Failed to add new Rosette",
                                              "OOps");
         await md.ShowAsync();
     }
 }
Exemplo n.º 7
0
 private void Button_Click_6(object sender, RoutedEventArgs e)
 {
     NewRosette = new Petal();
 }
Exemplo n.º 8
0
 private void Button_Click_4(object sender, RoutedEventArgs e)
 {
     NewRosette = new SpurGear();
 }
Exemplo n.º 9
0
 private void Button_Click_5(object sender, RoutedEventArgs e)
 {
     NewRosette = new SquareWave();
 }
Exemplo n.º 10
0
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     NewRosette = new Ellipse();
 }
Exemplo n.º 11
0
 private void Button_Click_6(object sender, RoutedEventArgs e)
 {
     NewRosette = new Petal();
 }
Exemplo n.º 12
0
 private void Button_Click_5(object sender, RoutedEventArgs e)
 {
     NewRosette = new SquareWave();
 }
Exemplo n.º 13
0
 private void Button_Click_4(object sender, RoutedEventArgs e)
 {
     NewRosette = new SpurGear();
 }
Exemplo n.º 14
0
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     NewRosette = new Ellipse();
     
 }