private void Button_Click(object sender, RoutedEventArgs e) { Button b = (Button)sender; switch (b.Name) { case "Add": InputProjectTitle(); break; case "btn_close": this.Close(); break; case "btn_minimize": this.WindowState = WindowState.Minimized; break; default: int id = Int32.Parse(b.Name.Substring(4).ToString()); ProjectWindow projectWindow = new ProjectWindow(id); projectWindow.Show(); this.Close(); break; } }
static void FormatChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args) { ProjectWindow thisStopWatch = (ProjectWindow)sender; }