コード例 #1
0
 /// <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="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
 private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     RectGray.Visibility = Visibility.Visible;
     NewProject wind = new NewProject(-1);
     wind.Owner = Window.GetWindow(this);
     wind.Show();
     wind.Closing += new System.ComponentModel.CancelEventHandler(wind_Closing);
 }
コード例 #2
0
        /// <summary>
        /// Edits the projet.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void EditProjet(object sender, System.Windows.RoutedEventArgs e)
        {
            int idProjet = int.Parse(((Button)sender).Tag.ToString());

            RectGray.Visibility = Visibility.Visible;
            NewProject wind = new NewProject(idProjet);
            wind.Owner = Window.GetWindow(this);
            wind.Show();
            wind.Closing += new System.ComponentModel.CancelEventHandler(wind_Closing);
        }