/// <summary> /// Handles the Click event of the Button control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param> private void Button_Click(object sender, RoutedEventArgs e) { RectGray.Visibility = Visibility.Visible; NewComposant wind = new NewComposant(-1); wind.Owner = Window.GetWindow(this); wind.Show(); wind.Closing += new System.ComponentModel.CancelEventHandler(wind_Closing); }
private void EditComposant(object sender, System.Windows.RoutedEventArgs e) { int idComposant = int.Parse(((Button)sender).Tag.ToString()); RectGray.Visibility = Visibility.Visible; NewComposant wind = new NewComposant(idComposant); wind.Owner = Window.GetWindow(this); wind.Show(); wind.Closing += new System.ComponentModel.CancelEventHandler(wind_Closing); }