Files
orderPRO/clients/windows/OrderPROPrint/Forms/SettingsForm.Designer.cs
Jacek Pyziak 5fef42ba12 feat(20-windows-client): aplikacja C# WinForms do zdalnego druku etykiet
- System tray app z NotifyIcon + ContextMenuStrip
- Polling API orderPRO (GET /api/print/jobs/pending)
- Pobieranie etykiet PDF i druk przez PdfiumViewer
- Formularz ustawień: URL API, klucz, drukarka, interwał
- Okno logów z historią (ciemny motyw, Consolas)
- Self-contained .NET 8 publish (win-x64)
- Milestone v0.7 Zdalne drukowanie etykiet — COMPLETE

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 22:49:28 +01:00

70 lines
2.8 KiB
C#

namespace OrderPROPrint.Forms;
partial class SettingsForm
{
private System.ComponentModel.IContainer components = null;
private TextBox txtApiUrl;
private TextBox txtApiKey;
private ComboBox cmbPrinter;
private NumericUpDown nudPollInterval;
private Button btnTestConnection;
private Button btnSave;
private Button btnCancel;
private Label lblStatus;
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.Text = "OrderPRO Print — Ustawienia";
this.Size = new Size(450, 340);
this.FormBorderStyle = FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.StartPosition = FormStartPosition.CenterScreen;
var lblApiUrl = new Label { Text = "URL API:", Location = new Point(15, 20), AutoSize = true };
txtApiUrl = new TextBox { Location = new Point(15, 40), Size = new Size(400, 23) };
txtApiUrl.PlaceholderText = "https://orderpro.projectpro.pl";
var lblApiKey = new Label { Text = "Klucz API:", Location = new Point(15, 75), AutoSize = true };
txtApiKey = new TextBox { Location = new Point(15, 95), Size = new Size(310, 23), UseSystemPasswordChar = true };
btnTestConnection = new Button { Text = "Testuj", Location = new Point(335, 94), Size = new Size(80, 25) };
btnTestConnection.Click += BtnTestConnection_Click;
lblStatus = new Label { Location = new Point(15, 123), Size = new Size(400, 18), ForeColor = Color.Gray, Text = "" };
var lblPrinter = new Label { Text = "Drukarka:", Location = new Point(15, 150), AutoSize = true };
cmbPrinter = new ComboBox { Location = new Point(15, 170), Size = new Size(400, 23), DropDownStyle = ComboBoxStyle.DropDownList };
var lblInterval = new Label { Text = "Interwał odpytywania (sekundy):", Location = new Point(15, 205), AutoSize = true };
nudPollInterval = new NumericUpDown { Location = new Point(15, 225), Size = new Size(80, 23), Minimum = 5, Maximum = 300, Value = 10 };
btnSave = new Button { Text = "Zapisz", Location = new Point(230, 265), Size = new Size(90, 30) };
btnSave.Click += BtnSave_Click;
btnCancel = new Button { Text = "Anuluj", Location = new Point(325, 265), Size = new Size(90, 30) };
btnCancel.Click += BtnCancel_Click;
this.Controls.AddRange(new Control[] {
lblApiUrl, txtApiUrl,
lblApiKey, txtApiKey, btnTestConnection,
lblStatus,
lblPrinter, cmbPrinter,
lblInterval, nudPollInterval,
btnSave, btnCancel
});
this.AcceptButton = btnSave;
this.CancelButton = btnCancel;
}
}