//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(); }
private void Button_Click_6(object sender, RoutedEventArgs e) { NewRosette = new Petal(); if (RosetteChosen != null) { RosetteChosen(this, NewRosette); } }
private void Button_Click_5(object sender, RoutedEventArgs e) { NewRosette = new SquareWave(); if (RosetteChosen != null) { RosetteChosen(this, NewRosette); } }
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 })); }
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 })); }
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(); } }
private void Button_Click_6(object sender, RoutedEventArgs e) { NewRosette = new Petal(); }
private void Button_Click_4(object sender, RoutedEventArgs e) { NewRosette = new SpurGear(); }
private void Button_Click_5(object sender, RoutedEventArgs e) { NewRosette = new SquareWave(); }
private void Button_Click_1(object sender, RoutedEventArgs e) { NewRosette = new Ellipse(); }