123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- using InABox.Configuration;
- using InABox.Wpf;
- using PRSClasses;
- 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
- {
- /// <summary>
- /// Interaction logic for GenerateStickers.xaml
- /// </summary>
- public partial class GenerateStickers : ThemableWindow
- {
- WebStickerSettings _settings { get; set; }
- public GenerateStickers()
- {
- InitializeComponent();
- _settings = new UserConfiguration<WebStickerSettings>().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();
- }
- }
- }
|