private void Btn_Click(object sender, RoutedEventArgs e) { Button btn = sender as Button; switch (btn.Name) { case "Btn_New": Frm frm = new Frm(); frm.BindNew(); break; case "Btn_Edit": break; case "Btn_Delete": break; case "Btn_Fields": break; case "Btn_Preview": break; default: break; } }
private void Row_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { TimeSpan t = DateTime.Now.TimeOfDay; DataGridRow dgr = sender as DataGridRow; if (dgr.Tag != null) { TimeSpan oldT = (TimeSpan)dgr.Tag; if ((t - oldT) < TimeSpan.FromMilliseconds(300)) { FlowForm ff = this.Grid1.SelectedItem as FlowForm; if (ff == null) { return; } Frm frm = new Frm(); frm.BindFrm(ff.No); frm.Show(); } } dgr.Tag = t; }