123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using PDF_Master.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter;
- using System.Windows.Controls;
- namespace PDF_Master.Views.Dialog.HomePageToolsDialogs.HomePagePrinter
- {
- /// <summary>
- /// Interaction logic for HomePagePrinterModPosterContent
- /// </summary>
- public partial class HomePagePrinterModPosterContent : UserControl
- {
- public HomePagePrinterModPosterContent()
- {
- InitializeComponent();
- }
- private void CustomRatioUpDown_Loaded(object sender, System.Windows.RoutedEventArgs e)
- {
- CustomRatioUpDown.TextBox_Num.Text = ((HomePagePrinterModPosterContentViewModel)this.DataContext).TileRatio;
- 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)
- {
- ((HomePagePrinterModPosterContentViewModel)this.DataContext).SetTileRatioCommand.Execute();
- }
- private void Button_Add_Click(object sender, System.Windows.RoutedEventArgs e)
- {
- ((HomePagePrinterModPosterContentViewModel)this.DataContext).SetTileRatioCommand.Execute();
- }
- private void TextBox_Num_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
- {
- if (e.Key == System.Windows.Input.Key.Enter)
- {
- ((HomePagePrinterModPosterContentViewModel)this.DataContext).SetTileRatioCommand.Execute();
- }
- }
- }
- }
|