123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter;
- using System.Windows.Controls;
- namespace PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter
- {
- /// <summary>
- /// Interaction logic for HomePagePrinterModSizeContent
- /// </summary>
- public partial class HomePagePrinterModSizeContent : UserControl
- {
- public HomePagePrinterModSizeContent()
- {
- InitializeComponent();
- }
- private void CustomRatioUpDown_Loaded(object sender, System.Windows.RoutedEventArgs e)
- {
- CustomRatioUpDown.TextBox_Num.Text = ((HomePagePrinterModSizeContentViewModel)this.DataContext).DisplayRatio;
- CustomRatioUpDown.TextBox_Num.KeyDown += TextBox_Num_KeyDown;
- CustomRatioUpDown.Button_Add.Click += Button_Add_Click;
- CustomRatioUpDown.Button_Sub.Click += Button_Sub_Click;
- }
- private void Button_Sub_Click(object sender, System.Windows.RoutedEventArgs e)
- {
- ((HomePagePrinterModSizeContentViewModel)this.DataContext).SetDisplayRatioCommand.Execute();
- }
- private void Button_Add_Click(object sender, System.Windows.RoutedEventArgs e)
- {
- ((HomePagePrinterModSizeContentViewModel)this.DataContext).SetDisplayRatioCommand.Execute();
- }
- private void TextBox_Num_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
- {
- if(e.Key == System.Windows.Input.Key.Enter)
- {
- ((HomePagePrinterModSizeContentViewModel)this.DataContext).SetDisplayRatioCommand.Execute();
- }
- }
- }
- }
|