private void rbn_Sale_Buon_Click(object sender, RoutedEventArgs e) { try { FrmCreateSale_Ban_Buon_Header _FrmCreateSale_Header = new FrmCreateSale_Ban_Buon_Header(); _FrmCreateSale_Header.Owner = Window.GetWindow(this); _FrmCreateSale_Header.ShowDialog(); } catch (Exception ex) { CommonData.log.Error(ex.ToString()); } }
private void HandleKeyDownEvent(object sender, KeyEventArgs e) { try { if (e.Key == Key.L && (Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control) { LockSystem(); } else if (e.Key == Key.System && e.SystemKey == Key.F4) { Application.Current.Shutdown(); } else if (e.Key == Key.F2) { frmSuggest _frmSuggest = new frmSuggest(); _frmSuggest.Owner = Window.GetWindow(this); _frmSuggest.ShowDialog(); } else if (e.Key == Key.S && (Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control) { FrmCreateSale_Header _FrmCreateSale_Header = new FrmCreateSale_Header(); _FrmCreateSale_Header.Owner = Window.GetWindow(this); _FrmCreateSale_Header.ShowDialog(); } else if (e.Key == Key.D && (Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control) { FrmCreateSale_Ban_Buon_Header _FrmCreateSale_Header = new FrmCreateSale_Ban_Buon_Header(); _FrmCreateSale_Header.Owner = Window.GetWindow(this); _FrmCreateSale_Header.ShowDialog(); } else if (e.Key == Key.F && (Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control) { frmSearchProduct _frmSearchProduct = new frmSearchProduct(); _frmSearchProduct.Owner = Window.GetWindow(this); _frmSearchProduct.c_is_QuickSearch = true; _frmSearchProduct.ShowDialog(); } } catch (Exception ex) { CommonData.log.Error(ex.ToString()); } }