using InABox.Configuration; using InABox.Wpf; using PRSClasses; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; namespace PRSDesktop.Forms { /// /// Interaction logic for GenerateStickers.xaml /// public partial class GenerateStickers : ThemableWindow { WebStickerSettings _settings { get; set; } public GenerateStickers() { InitializeComponent(); _settings = new UserConfiguration().Load(); } private void OK_Click(object sender, RoutedEventArgs e) { var num = NumberOfStickers.Value; if(num < 0) { MessageBox.Show("Number of Stickers cannot be negative!"); } else if(num > _settings.MaximumGenerate) { MessageBox.Show($"Cannot generate more than {_settings.MaximumGenerate} stickers at a time!"); } else { DialogResult = true; Close(); } } private void Cancel_Click(object sender, RoutedEventArgs e) { DialogResult = false; Close(); } } }