using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace StekloMaster
{
    public partial class Form16 : Form
    {
        public Form16()
        {
            InitializeComponent();
        }

        private void Form16_Shown(object sender, EventArgs e)
        {
            foreach (string strPrinter in System.Drawing.Printing.PrinterSettings.InstalledPrinters)
            {
                listBox1.Items.AddRange(new object[] { strPrinter });
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            System.IO.File.WriteAllText(Application.StartupPath + "\\printpdf.akv", listBox1.SelectedItem.ToString(), Encoding.UTF8);
            MessageBox.Show("Сохранение настроек успешно выполнено!\r\nТеперь Вы можете вызвать печать на pdf принтер!");
            this.Close();
        }
    }
}
