123456789101112131415161718192021222324252627282930313233343536 |
- using IronBarCode;
- 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.Navigation;
- using System.Windows.Shapes;
- namespace WpfApp2
- {
- /// <summary>
- /// Логика взаимодействия для MainWindow.xaml
- /// </summary>
- public partial class MainWindow : Window
- {
- public MainWindow()
- {
- InitializeComponent();
- QRCode();
- }
- private static void QRCode()
- {
- var myBarcode = BarcodeWriter.CreateBarcode("https://yandex.ru/search/?text=%D0%BC%D0%B0%D1%81%D0%BA%D0%B0+%D0%B4%D0%BB%D1%8F+%D1%82%D0%B5%D0%BB%D0%B5%D1%84%D0%BE%D0%BD%D0%B0+%D0%B2+1%D1%81+%D0%BA%D0%BE%D0%BD%D1%84%D0%B8%D0%B3%D1%83%D1%80%D0%B0%D1%86%D0%B8%D1%8F&lr=47&clid=2598007-830&win=622", BarcodeWriterEncoding.QRCode);
- myBarcode.SaveAsImage("qr.png");
- }
- }
- }
|