Quellcode durchsuchen

### 1.2.3 (2025-04-28)

- Editace hodnot Minimum/Maximum na Produktu a Variantě
- Editace RAW hodnot pro Kategorie produktu ,variant a mapování Batch CSV sloupců + delimiter
- Kontrola duplicit source souborů v importu Batch CSV
Dalibor Votruba vor 1 Jahr
Ursprung
Commit
096e57be01

+ 19 - 0
Extensions/StringExt.cs

@@ -22,5 +22,24 @@
                 return string.Empty;
             return ToDecoratedString(str, bothDecoration, bothDecoration);
         }
+
+
+        /// <summary>
+        /// Returns a list of all duplicate string items in a collection.
+        /// </summary>
+        /// <param name="source">The source collection to check for duplicates.</param>
+        /// <returns>An IEnumerable containing only the duplicate items.</returns>
+        public static IEnumerable<string> GetDuplicates(this IEnumerable<string> source)
+        {
+            if (source == null)
+                throw new ArgumentNullException(nameof(source));
+
+            return source
+                .GroupBy(x => x)
+                .Where(g => g.Count() > 1)
+                .Select(g => g.Key);
+        }
+
+
     }
 }

+ 14 - 1
FormBatch.cs

@@ -297,7 +297,20 @@ namespace qdr.app.studiou.orders2printpack
                 foreach (var file in files)
                     if (!_sourcePathCache.Any(x => x == file))
                         _sourcePathCache.Add(file);
-
+                Log ("Kontrola duplicit...");
+                var checkDuplicities = _sourcePathCache.Select(x => _fs.Path.GetFileName(x)).GetDuplicates();
+                if (checkDuplicities.Count() > 0)
+                { 
+                    Log ("Duplicity nalezeny pro následující soubory:");
+                    foreach (var dup in checkDuplicities)
+                    {
+                        Log(dup);
+                    }
+                }
+                else
+                {
+                    Log("Žádné duplicity nenalezeny.");
+                }
                 tsbFiles.Text = "Souborů: " + _sourcePathCache.Count.ToString();
                 Log($"Nalezeno {files.Length} souborů.");
 

+ 13 - 0
FormLauncher.Designer.cs

@@ -35,6 +35,7 @@
             butResetCfg = new Button();
             butLabalPrint = new Button();
             lVersion = new Label();
+            butEditCfg = new Button();
             ((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
             SuspendLayout();
             // 
@@ -98,11 +99,22 @@
             lVersion.TabIndex = 6;
             lVersion.Text = "App.Version";
             // 
+            // butEditCfg
+            // 
+            butEditCfg.Location = new Point(312, 116);
+            butEditCfg.Name = "butEditCfg";
+            butEditCfg.Size = new Size(72, 25);
+            butEditCfg.TabIndex = 7;
+            butEditCfg.Text = "Edit CFG";
+            butEditCfg.UseVisualStyleBackColor = true;
+            butEditCfg.Click += butEditCfg_Click;
+            // 
             // FormLauncher
             // 
             AutoScaleDimensions = new SizeF(7F, 15F);
             AutoScaleMode = AutoScaleMode.Font;
             ClientSize = new Size(477, 154);
+            Controls.Add(butEditCfg);
             Controls.Add(lVersion);
             Controls.Add(butLabalPrint);
             Controls.Add(butResetCfg);
@@ -130,5 +142,6 @@
         private Button butResetCfg;
         private Button butLabalPrint;
         private Label lVersion;
+        private Button butEditCfg;
     }
 }

+ 7 - 1
FormLauncher.cs

@@ -23,7 +23,7 @@ namespace qdr.app.studiou.orders2printpack
         {
             Text = $"{Application.ProductName} v{Application.ProductVersion}";
             lVersion.Text = $"Verze: {Application.ProductVersion}";
-           
+
         }
 
         private void butFormBatch_Click(object sender, EventArgs e)
@@ -51,5 +51,11 @@ namespace qdr.app.studiou.orders2printpack
             var form = new FormLabelPrint();
             form.Show(this);
         }
+
+        private void butEditCfg_Click(object sender, EventArgs e)
+        {
+            var dlg = new dlgEditCfg();
+            dlg.ShowDialog(this);
+        }
     }
 }

+ 75 - 17
FormProductEdit.Designer.cs

@@ -52,6 +52,8 @@
             colprdPrice = new ColumnHeader();
             colprdUri = new ColumnHeader();
             colprdDescription = new ColumnHeader();
+            colprdMinQty = new ColumnHeader();
+            colprdMaxQty = new ColumnHeader();
             tsProducts = new ToolStrip();
             toolStripLabel4 = new ToolStripLabel();
             toolStripSeparator10 = new ToolStripSeparator();
@@ -69,6 +71,8 @@
             lvVariants = new ListView();
             colvarName = new ColumnHeader();
             colvarPrice = new ColumnHeader();
+            colvarMinQty = new ColumnHeader();
+            colvarMaxQty = new ColumnHeader();
             tsVariants = new ToolStrip();
             toolStripLabel2 = new ToolStripLabel();
             toolStripSeparator6 = new ToolStripSeparator();
@@ -99,6 +103,10 @@
             tbdetDescription = new TextBox();
             ltbdetPrice = new Label();
             tbdetPrice = new NumericUpDown();
+            ldetMinimal = new Label();
+            tbdetMinimal = new TextBox();
+            ldetMaximal = new Label();
+            tbdetMaximal = new TextBox();
             lcbdetCategories = new Label();
             cbdetCategories = new ComboBox();
             ltbdetUri = new Label();
@@ -114,8 +122,6 @@
             dlgOpenDir = new FolderBrowserDialog();
             dlgSaveFile = new SaveFileDialog();
             dlgDirSelect = new FolderBrowserDialog();
-            colprdMinQty = new ColumnHeader();
-            colprdMaxQty = new ColumnHeader();
             ssMain.SuspendLayout();
             tsMain.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)splitContainer1).BeginInit();
@@ -315,6 +321,16 @@
             colprdDescription.Tag = "ShortDescription";
             colprdDescription.Text = "Popis";
             // 
+            // colprdMinQty
+            // 
+            colprdMinQty.Tag = "QuantityMinimum";
+            colprdMinQty.Text = "Počet Min.";
+            // 
+            // colprdMaxQty
+            // 
+            colprdMaxQty.Tag = "QuantityMaximum";
+            colprdMaxQty.Text = "Počet Max.";
+            // 
             // tsProducts
             // 
             tsProducts.Items.AddRange(new ToolStripItem[] { toolStripLabel4, toolStripSeparator10, tbbutProdNew, tbbutProdVarNew, tbbutProdDelete, toolStripSeparator2, tbbutProdClone, toolStripSeparator3, toolStripLabel1, tbbutProduct, tbbutVariant });
@@ -457,7 +473,7 @@
             // lvVariants
             // 
             lvVariants.AllowColumnReorder = true;
-            lvVariants.Columns.AddRange(new ColumnHeader[] { colvarName, colvarPrice });
+            lvVariants.Columns.AddRange(new ColumnHeader[] { colvarName, colvarPrice, colvarMinQty, colvarMaxQty });
             lvVariants.Dock = DockStyle.Fill;
             lvVariants.FullRowSelect = true;
             lvVariants.GridLines = true;
@@ -480,6 +496,16 @@
             colvarPrice.Tag = "Price";
             colvarPrice.Text = "Cena";
             // 
+            // colvarMinQty
+            // 
+            colvarMinQty.Tag = "QuantityMinimum";
+            colvarMinQty.Text = "Min. Počet";
+            // 
+            // colvarMaxQty
+            // 
+            colvarMaxQty.Tag = "QuantityMaximum";
+            colvarMaxQty.Text = "Max. Počet";
+            // 
             // tsVariants
             // 
             tsVariants.Items.AddRange(new ToolStripItem[] { toolStripLabel2, toolStripSeparator6, tbbutVarNew, tbbutVarDelete, toolStripSeparator7, tbbutVarApply });
@@ -620,6 +646,10 @@
             detProduct.Controls.Add(tbdetDescription);
             detProduct.Controls.Add(ltbdetPrice);
             detProduct.Controls.Add(tbdetPrice);
+            detProduct.Controls.Add(ldetMinimal);
+            detProduct.Controls.Add(tbdetMinimal);
+            detProduct.Controls.Add(ldetMaximal);
+            detProduct.Controls.Add(tbdetMaximal);
             detProduct.Controls.Add(lcbdetCategories);
             detProduct.Controls.Add(cbdetCategories);
             detProduct.Controls.Add(ltbdetUri);
@@ -751,10 +781,42 @@
             tbdetPrice.TabIndex = 16;
             tbdetPrice.ThousandsSeparator = true;
             // 
+            // ldetMinimal
+            // 
+            ldetMinimal.AutoSize = true;
+            ldetMinimal.Location = new Point(421, 0);
+            ldetMinimal.Name = "ldetMinimal";
+            ldetMinimal.Size = new Size(94, 15);
+            ldetMinimal.TabIndex = 21;
+            ldetMinimal.Text = "Minimální počet";
+            // 
+            // tbdetMinimal
+            // 
+            tbdetMinimal.Location = new Point(421, 18);
+            tbdetMinimal.Name = "tbdetMinimal";
+            tbdetMinimal.Size = new Size(203, 23);
+            tbdetMinimal.TabIndex = 22;
+            // 
+            // ldetMaximal
+            // 
+            ldetMaximal.AutoSize = true;
+            ldetMaximal.Location = new Point(421, 44);
+            ldetMaximal.Name = "ldetMaximal";
+            ldetMaximal.Size = new Size(96, 15);
+            ldetMaximal.TabIndex = 23;
+            ldetMaximal.Text = "Maximální počet";
+            // 
+            // tbdetMaximal
+            // 
+            tbdetMaximal.Location = new Point(421, 62);
+            tbdetMaximal.Name = "tbdetMaximal";
+            tbdetMaximal.Size = new Size(203, 23);
+            tbdetMaximal.TabIndex = 24;
+            // 
             // lcbdetCategories
             // 
             lcbdetCategories.AutoSize = true;
-            lcbdetCategories.Location = new Point(421, 0);
+            lcbdetCategories.Location = new Point(421, 88);
             lcbdetCategories.Name = "lcbdetCategories";
             lcbdetCategories.Size = new Size(57, 15);
             lcbdetCategories.TabIndex = 17;
@@ -764,7 +826,7 @@
             // 
             cbdetCategories.DropDownStyle = ComboBoxStyle.DropDownList;
             cbdetCategories.FormattingEnabled = true;
-            cbdetCategories.Location = new Point(421, 18);
+            cbdetCategories.Location = new Point(421, 106);
             cbdetCategories.Name = "cbdetCategories";
             cbdetCategories.Size = new Size(203, 23);
             cbdetCategories.TabIndex = 18;
@@ -772,7 +834,7 @@
             // ltbdetUri
             // 
             ltbdetUri.AutoSize = true;
-            ltbdetUri.Location = new Point(421, 44);
+            ltbdetUri.Location = new Point(421, 132);
             ltbdetUri.Name = "ltbdetUri";
             ltbdetUri.Size = new Size(68, 15);
             ltbdetUri.TabIndex = 19;
@@ -780,7 +842,7 @@
             // 
             // tbdetUri
             // 
-            tbdetUri.Location = new Point(421, 62);
+            tbdetUri.Location = new Point(421, 150);
             tbdetUri.Name = "tbdetUri";
             tbdetUri.Size = new Size(203, 23);
             tbdetUri.TabIndex = 20;
@@ -856,16 +918,6 @@
             // 
             dlgDirSelect.Description = "Vyberte adresář do kterého se vygeneruje struktura repository";
             // 
-            // colprdMinQty
-            // 
-            colprdMinQty.Tag = "QuantityMinimum";
-            colprdMinQty.Text = "Počet Min.";
-            // 
-            // colprdMaxQty
-            // 
-            colprdMaxQty.Tag = "QuantityMaximum";
-            colprdMaxQty.Text = "Počet Max.";
-            // 
             // FormProductEdit
             // 
             AutoScaleDimensions = new SizeF(7F, 15F);
@@ -1001,5 +1053,11 @@
         private FolderBrowserDialog dlgDirSelect;
         private ColumnHeader colprdMinQty;
         private ColumnHeader colprdMaxQty;
+        private Label ldetMinimal;
+        private TextBox tbdetMinimal;
+        private Label ldetMaximal;
+        private TextBox tbdetMaximal;
+        private ColumnHeader colvarMinQty;
+        private ColumnHeader colvarMaxQty;
     }
 }

+ 26 - 1
FormProductEdit.cs

@@ -404,6 +404,8 @@ namespace qdr.app.studiou.orders2printpack
 
                 tbdetPrice.Value = 0;
                 tbdetUri.Text = string.Empty;
+                tbdetMaximal.Text = string.Empty;
+                tbdetMinimal.Text = string.Empty;
 
                 cbdetParent.BeginUpdate();
                 cbdetParent.Items.Clear();
@@ -435,6 +437,10 @@ namespace qdr.app.studiou.orders2printpack
                 lcbdetCategories.Visible = visible;
                 cbdetParent.Visible = visible;
                 lcbdetParent.Visible = visible;
+                tbdetMinimal.Visible = visible;
+                ldetMinimal.Visible = visible;
+                tbdetMaximal.Visible = visible;
+                ldetMaximal.Visible = visible;
             });
         }
 
@@ -468,6 +474,10 @@ namespace qdr.app.studiou.orders2printpack
                     tbdetPrice.Visible = false;
                     ltbdetPrice.Visible = false;
                     cbdetCategories.SelectedIndex = cbdetCategories.FindStringExact(data.Category);
+                    tbdetMaximal.Visible = false;
+                    tbdetMinimal.Visible = false;
+                    ldetMaximal.Visible = false;
+                    ldetMinimal.Visible = false;
                 }
 
 
@@ -480,6 +490,9 @@ namespace qdr.app.studiou.orders2printpack
                 tbdetPrice.Value = data.Price;
                 tbdetUri.Text = data.Uri;
 
+                tbdetMaximal.Text = data.QuantityMaximum.ToString();
+                tbdetMinimal.Text = data.QuantityMinimum.ToString();
+
                 cbdetParent.SelectedIndex = cbdetParent.FindStringExact(data.ParentName);
                 detProduct.Visible = true;
             });
@@ -505,11 +518,16 @@ namespace qdr.app.studiou.orders2printpack
                 tbdetName.Visible = true;
                 ltbdetPrice.Visible = true;
                 tbdetPrice.Visible = true;
-
+                ldetMinimal.Visible = true;
+                ldetMaximal.Visible = true;
+                tbdetMaximal.Visible = true;
+                tbdetMinimal.Visible = true;
 
 
                 tbdetName.Text = data.Name;
                 tbdetPrice.Value = data.Price;
+                tbdetMaximal.Text = data.QuantityMaximum.ToString();
+                tbdetMinimal.Text = data.QuantityMinimum.ToString();
 
                 detProduct.Visible = true;
             });
@@ -570,6 +588,8 @@ namespace qdr.app.studiou.orders2printpack
                 data.Uri = tbdetUri.Text;
                 data.ParentName = cbdetParent.SelectedItem?.ToString() ?? string.Empty;
                 data.Category = cbdetCategories.SelectedItem?.ToString() ?? string.Empty;
+                data.QuantityMinimum = int.TryParse(tbdetMinimal.Text, out var resmin) ? resmin : 0;
+                data.QuantityMaximum = int.TryParse(tbdetMaximal.Text, out var resmax) ? resmax : 0;
                 _storage.CheckProductVariantValidity();
             });
         }
@@ -587,9 +607,14 @@ namespace qdr.app.studiou.orders2printpack
                 {
                     product.VariantName = tbdetName.Text;
                     product.Price = tbdetPrice.Value;
+                    product.QuantityMinimum = int.TryParse(tbdetMinimal.Text, out var resmina) ? resmina : 0;
+                    product.QuantityMaximum = int.TryParse(tbdetMaximal.Text, out var resmaxa) ? resmaxa : 0;
                 }
                 data.Name = tbdetName.Text;
                 data.Price = tbdetPrice.Value;
+
+                data.QuantityMinimum = int.TryParse(tbdetMinimal.Text, out var resmin) ? resmin : 0;
+                data.QuantityMaximum = int.TryParse(tbdetMaximal.Text, out var resmax) ? resmax : 0;
             });
         }
 

+ 26 - 15
ProductStorage/ProductStorage.cs

@@ -22,7 +22,7 @@ namespace qdr.app.studiou.orders2printpack.ProductStorage
 
         public void Save(string filePath, string separator)
         {
-            CsvParser.Save<ProductDto>(_rawCollection.OrderBy(x=>x.IsVariant).ToArray(), filePath, delimiter:separator);
+            CsvParser.Save<ProductDto>(_rawCollection.OrderBy(x => x.IsVariant).ToArray(), filePath, delimiter: separator);
         }
 
         public void CheckProductVariantValidity()
@@ -40,7 +40,7 @@ namespace qdr.app.studiou.orders2printpack.ProductStorage
             return _rawCollection.FirstOrDefault(x => string.Equals(x.GetIdentifier(), identifier, StringComparison.InvariantCultureIgnoreCase));
         }
 
-         public ProductDto? GetProductBySku(string sku)
+        public ProductDto? GetProductBySku(string sku)
         {
             if (string.IsNullOrWhiteSpace(sku))
                 return null;
@@ -56,14 +56,14 @@ namespace qdr.app.studiou.orders2printpack.ProductStorage
 
         public VariantDto? GetVariantByIdentifier(string? identifier)
         {
-            if (identifier==null)
+            if (identifier == null)
                 return null;
             return Variants.FirstOrDefault(x => string.Equals(x.GetIdentifier(), identifier, StringComparison.InvariantCultureIgnoreCase));
         }
 
         public CategoryDto? GetCategoryByIdentifier(string? identifier)
         {
-            if (identifier==null)
+            if (identifier == null)
                 return null;
             return Categories.FirstOrDefault(x => string.Equals(x.GetIdentifier(), identifier, StringComparison.InvariantCultureIgnoreCase));
         }
@@ -78,15 +78,26 @@ namespace qdr.app.studiou.orders2printpack.ProductStorage
                     continue;
 
                 var variantName = variantParts[0];
-                var variantPrice = decimal.Parse(variantParts[1]);
+                var variantValues = variantParts[1].Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
 
-                if (_variants.Any(x => string.Equals(x.Name,variantName, StringComparison.InvariantCultureIgnoreCase)))
+                var variantPrice = decimal.Parse(variantValues[0]);
+                var variantMinimal = 0;
+                var variantMaximal = 0;
+
+                if (variantValues.Length >= 3)
+                {
+                    variantMinimal = int.Parse(variantValues[1]);
+                    variantMaximal = int.Parse(variantValues[2]);
+                }
+                if (_variants.Any(x => string.Equals(x.Name, variantName, StringComparison.InvariantCultureIgnoreCase)))
                     continue;
 
                 _variants.Add(new VariantDto()
                 {
                     Name = variantName,
-                    Price = variantPrice
+                    Price = variantPrice,
+                    QuantityMinimum = variantMinimal,
+                    QuantityMaximum = variantMaximal
                 });
             }
         }
@@ -96,9 +107,9 @@ namespace qdr.app.studiou.orders2printpack.ProductStorage
             var categories = categoriesString.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
             foreach (var category in categories)
             {
-                if (_categories.Any(x=>string.Equals(x.Name ,categoriesString, StringComparison.InvariantCultureIgnoreCase)))
+                if (_categories.Any(x => string.Equals(x.Name, categoriesString, StringComparison.InvariantCultureIgnoreCase)))
 
-                _categories.Add(new CategoryDto() { Name = category });
+                    _categories.Add(new CategoryDto() { Name = category });
             }
         }
 
@@ -115,7 +126,7 @@ namespace qdr.app.studiou.orders2printpack.ProductStorage
                 if (!_rawCollection.Any(x => string.Equals(x.Sku, parentSku, StringComparison.InvariantCultureIgnoreCase)))
                     throw new Exception($"Parent Product SKU '{parentSku}' not found!");
 
-            var item = new ProductDto() {Type = ProductDto.CS_ITEM_TYPE_VARIANT, ParentName = parentSku == null ? string.Empty : parentSku};
+            var item = new ProductDto() { Type = ProductDto.CS_ITEM_TYPE_VARIANT, ParentName = parentSku == null ? string.Empty : parentSku };
 
             _rawCollection.Add(item);
             return item;
@@ -137,7 +148,7 @@ namespace qdr.app.studiou.orders2printpack.ProductStorage
 
         public void RemoveProduct(string[]? identifiers)
         {
-            if (identifiers == null || identifiers.Length==0)
+            if (identifiers == null || identifiers.Length == 0)
                 return;
 
             foreach (var identifier in identifiers)
@@ -150,7 +161,7 @@ namespace qdr.app.studiou.orders2printpack.ProductStorage
 
         public void RemoveVariants(string[]? identifiers)
         {
-            if (identifiers == null || identifiers.Length==0)
+            if (identifiers == null || identifiers.Length == 0)
                 return;
 
             foreach (var identifier in identifiers)
@@ -163,7 +174,7 @@ namespace qdr.app.studiou.orders2printpack.ProductStorage
 
         public void RemoveCategories(string[]? identifiers)
         {
-            if (identifiers == null || identifiers.Length==0)
+            if (identifiers == null || identifiers.Length == 0)
                 return;
 
             foreach (var identifier in identifiers)
@@ -176,7 +187,7 @@ namespace qdr.app.studiou.orders2printpack.ProductStorage
 
         public string GetVariantsAsString()
         {
-            return string.Join(";", _variants.Select(x => x.Name + "=" + x.Price.ToString()));
+            return string.Join(";", _variants.Select(x => x.Name + "=" + x.Price.ToString() + "|" + x.QuantityMinimum.ToString() + "|" + x.QuantityMaximum.ToString()));
         }
 
         public string GetCategoriesAsString()
@@ -211,7 +222,7 @@ namespace qdr.app.studiou.orders2printpack.ProductStorage
 
         private IEnumerable<CategoryDto> GetCategories()
         {
-            var productCategories = _rawCollection.Where(x=>!x.IsVariant).DistinctBy(x=>x.Category).Select(x => new CategoryDto() { Name = x.Category });
+            var productCategories = _rawCollection.Where(x => !x.IsVariant).DistinctBy(x => x.Category).Select(x => new CategoryDto() { Name = x.Category });
             foreach (var category in productCategories)
             {
                 if (!_categories.Any(x => x.Name == category.Name))

+ 6 - 4
ProductStorage/VariantDto.cs

@@ -1,18 +1,20 @@
-
-using Microsoft.VisualBasic;
-
-namespace qdr.app.studiou.orders2printpack.ProductStorage
+namespace qdr.app.studiou.orders2printpack.ProductStorage
 {
     public class VariantDto : IIdentifierGetter
     {
         public string Name { get; set; } = string.Empty;
         public decimal Price { get; set; } = 0;
 
+        public int QuantityMinimum { get; set; } = 0;
+        public int QuantityMaximum { get; set; } = 0;
+
 
         public void CopyTo(VariantDto destination)
         {
             destination.Name = Name;
             destination.Price = Price;
+            destination.QuantityMaximum = QuantityMaximum;
+            destination.QuantityMinimum = QuantityMinimum;
         }
         public string GetIdentifier()
         {

+ 4 - 0
README.md

@@ -3,6 +3,10 @@
 Proprietální řešení zpracování WooCommerce objednávek pro online tiskovou službu (WinForm)
 
 ## Changelog
+### 1.2.3 (2025-04-28)
+- Editace hodnot Minimum/Maximum na Produktu a Variantě
+- Editace RAW hodnot pro Kategorie produktu ,variant a mapování Batch CSV sloupců + delimiter
+- Kontrola duplicit source souborů v importu Batch CSV
 
 ### 1.2.2 (2025-04-01)
 - Při importu produktů se nastavuje fixní ShortDescription a Descrtiption pro produkt

+ 3 - 3
Setup/Setup.vdproj

@@ -198,15 +198,15 @@
         {
         "Name" = "8:Microsoft Visual Studio"
         "ProductName" = "8:Order2PrintPack"
-        "ProductCode" = "8:{880D5664-4BB0-41A0-8A89-67D46F59152F}"
-        "PackageCode" = "8:{CA0336EF-52F7-4B80-8AE7-86E2635C269F}"
+        "ProductCode" = "8:{EA3A6D9B-7565-4383-81DF-7EDF873550A3}"
+        "PackageCode" = "8:{538CF674-9DA2-4BCB-92F3-ADD3A4DA1CA4}"
         "UpgradeCode" = "8:{38F8DC1E-8290-49ED-A3D2-32BC6DD74325}"
         "AspNetVersion" = "8:2.0.50727.0"
         "RestartWWWService" = "11:FALSE"
         "RemovePreviousVersions" = "11:TRUE"
         "DetectNewerInstalledVersion" = "11:TRUE"
         "InstallAllUsers" = "11:FALSE"
-        "ProductVersion" = "8:1.2.2"
+        "ProductVersion" = "8:1.2.3"
         "Manufacturer" = "8:Quadarax"
         "ARPHELPTELEPHONE" = "8:"
         "ARPHELPLINK" = "8:"

+ 291 - 0
dlgEditCfg.Designer.cs

@@ -0,0 +1,291 @@
+namespace qdr.app.studiou.orders2printpack
+{
+    partial class dlgEditCfg
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            butCancel = new Button();
+            butOk = new Button();
+            label1 = new Label();
+            label2 = new Label();
+            tbVariants = new TextBox();
+            tbCategories = new TextBox();
+            label3 = new Label();
+            label4 = new Label();
+            tbOrderNo = new TextBox();
+            tbProuductCat = new TextBox();
+            label5 = new Label();
+            tbUri = new TextBox();
+            label6 = new Label();
+            tbQuantity = new TextBox();
+            label7 = new Label();
+            tbProductFormat = new TextBox();
+            label8 = new Label();
+            tbProductName = new TextBox();
+            label9 = new Label();
+            tbCSVDelimiter = new TextBox();
+            label10 = new Label();
+            SuspendLayout();
+            // 
+            // butCancel
+            // 
+            butCancel.Location = new Point(392, 329);
+            butCancel.Margin = new Padding(3, 2, 3, 2);
+            butCancel.Name = "butCancel";
+            butCancel.Size = new Size(82, 22);
+            butCancel.TabIndex = 3;
+            butCancel.Text = "Zrušit";
+            butCancel.UseVisualStyleBackColor = true;
+            butCancel.Click += butCancel_Click;
+            // 
+            // butOk
+            // 
+            butOk.Location = new Point(12, 329);
+            butOk.Margin = new Padding(3, 2, 3, 2);
+            butOk.Name = "butOk";
+            butOk.Size = new Size(82, 22);
+            butOk.TabIndex = 2;
+            butOk.Text = "Ok";
+            butOk.UseVisualStyleBackColor = true;
+            butOk.Click += butOk_Click;
+            // 
+            // label1
+            // 
+            label1.AutoSize = true;
+            label1.Location = new Point(14, 9);
+            label1.Name = "label1";
+            label1.Size = new Size(119, 15);
+            label1.TabIndex = 4;
+            label1.Text = "RAW hodnoty variant";
+            // 
+            // label2
+            // 
+            label2.AutoSize = true;
+            label2.Location = new Point(14, 104);
+            label2.Name = "label2";
+            label2.Size = new Size(129, 15);
+            label2.TabIndex = 5;
+            label2.Text = "RAW hodnoty kategorií";
+            // 
+            // tbVariants
+            // 
+            tbVariants.Location = new Point(19, 27);
+            tbVariants.Multiline = true;
+            tbVariants.Name = "tbVariants";
+            tbVariants.Size = new Size(455, 70);
+            tbVariants.TabIndex = 6;
+            // 
+            // tbCategories
+            // 
+            tbCategories.Location = new Point(19, 122);
+            tbCategories.Multiline = true;
+            tbCategories.Name = "tbCategories";
+            tbCategories.Size = new Size(455, 70);
+            tbCategories.TabIndex = 7;
+            // 
+            // label3
+            // 
+            label3.AutoSize = true;
+            label3.Location = new Point(14, 195);
+            label3.Name = "label3";
+            label3.Size = new Size(120, 15);
+            label3.TabIndex = 8;
+            label3.Text = "Mapování Batch CSV:";
+            // 
+            // label4
+            // 
+            label4.AutoSize = true;
+            label4.Location = new Point(19, 210);
+            label4.Name = "label4";
+            label4.Size = new Size(53, 15);
+            label4.TabIndex = 9;
+            label4.Text = "OrderNo";
+            // 
+            // tbOrderNo
+            // 
+            tbOrderNo.Location = new Point(20, 228);
+            tbOrderNo.Name = "tbOrderNo";
+            tbOrderNo.Size = new Size(100, 23);
+            tbOrderNo.TabIndex = 10;
+            // 
+            // tbProuductCat
+            // 
+            tbProuductCat.Location = new Point(126, 228);
+            tbProuductCat.Name = "tbProuductCat";
+            tbProuductCat.Size = new Size(100, 23);
+            tbProuductCat.TabIndex = 12;
+            // 
+            // label5
+            // 
+            label5.AutoSize = true;
+            label5.Location = new Point(125, 210);
+            label5.Name = "label5";
+            label5.Size = new Size(67, 15);
+            label5.TabIndex = 11;
+            label5.Text = "ProductCat";
+            // 
+            // tbUri
+            // 
+            tbUri.Location = new Point(232, 228);
+            tbUri.Name = "tbUri";
+            tbUri.Size = new Size(100, 23);
+            tbUri.TabIndex = 14;
+            // 
+            // label6
+            // 
+            label6.AutoSize = true;
+            label6.Location = new Point(231, 210);
+            label6.Name = "label6";
+            label6.Size = new Size(22, 15);
+            label6.TabIndex = 13;
+            label6.Text = "Uri";
+            // 
+            // tbQuantity
+            // 
+            tbQuantity.Location = new Point(338, 228);
+            tbQuantity.Name = "tbQuantity";
+            tbQuantity.Size = new Size(100, 23);
+            tbQuantity.TabIndex = 16;
+            // 
+            // label7
+            // 
+            label7.AutoSize = true;
+            label7.Location = new Point(337, 210);
+            label7.Name = "label7";
+            label7.Size = new Size(53, 15);
+            label7.TabIndex = 15;
+            label7.Text = "Quantity";
+            // 
+            // tbProductFormat
+            // 
+            tbProductFormat.Location = new Point(20, 282);
+            tbProductFormat.Name = "tbProductFormat";
+            tbProductFormat.Size = new Size(100, 23);
+            tbProductFormat.TabIndex = 18;
+            // 
+            // label8
+            // 
+            label8.AutoSize = true;
+            label8.Location = new Point(19, 264);
+            label8.Name = "label8";
+            label8.Size = new Size(87, 15);
+            label8.TabIndex = 17;
+            label8.Text = "ProductFormat";
+            // 
+            // tbProductName
+            // 
+            tbProductName.Location = new Point(126, 282);
+            tbProductName.Name = "tbProductName";
+            tbProductName.Size = new Size(100, 23);
+            tbProductName.TabIndex = 20;
+            // 
+            // label9
+            // 
+            label9.AutoSize = true;
+            label9.Location = new Point(125, 264);
+            label9.Name = "label9";
+            label9.Size = new Size(81, 15);
+            label9.TabIndex = 19;
+            label9.Text = "ProductName";
+            // 
+            // tbCSVDelimiter
+            // 
+            tbCSVDelimiter.Location = new Point(232, 282);
+            tbCSVDelimiter.Name = "tbCSVDelimiter";
+            tbCSVDelimiter.Size = new Size(100, 23);
+            tbCSVDelimiter.TabIndex = 22;
+            // 
+            // label10
+            // 
+            label10.AutoSize = true;
+            label10.Location = new Point(231, 264);
+            label10.Name = "label10";
+            label10.Size = new Size(79, 15);
+            label10.TabIndex = 21;
+            label10.Text = "CSV Delimiter";
+            // 
+            // dlgEditCfg
+            // 
+            AutoScaleDimensions = new SizeF(7F, 15F);
+            AutoScaleMode = AutoScaleMode.Font;
+            ClientSize = new Size(498, 407);
+            ControlBox = false;
+            Controls.Add(tbCSVDelimiter);
+            Controls.Add(label10);
+            Controls.Add(tbProductName);
+            Controls.Add(label9);
+            Controls.Add(tbProductFormat);
+            Controls.Add(label8);
+            Controls.Add(tbQuantity);
+            Controls.Add(label7);
+            Controls.Add(tbUri);
+            Controls.Add(label6);
+            Controls.Add(tbProuductCat);
+            Controls.Add(label5);
+            Controls.Add(tbOrderNo);
+            Controls.Add(label4);
+            Controls.Add(label3);
+            Controls.Add(tbCategories);
+            Controls.Add(tbVariants);
+            Controls.Add(label2);
+            Controls.Add(label1);
+            Controls.Add(butCancel);
+            Controls.Add(butOk);
+            FormBorderStyle = FormBorderStyle.FixedDialog;
+            Name = "dlgEditCfg";
+            StartPosition = FormStartPosition.CenterScreen;
+            Text = "Editor konfigurace";
+            Load += dlgEditCfg_Load;
+            ResumeLayout(false);
+            PerformLayout();
+        }
+
+        #endregion
+
+        private Button butCancel;
+        private Button butOk;
+        private Label label1;
+        private Label label2;
+        private TextBox tbVariants;
+        private TextBox tbCategories;
+        private Label label3;
+        private Label label4;
+        private TextBox tbOrderNo;
+        private TextBox tbProuductCat;
+        private Label label5;
+        private TextBox tbUri;
+        private Label label6;
+        private TextBox tbQuantity;
+        private Label label7;
+        private TextBox tbProductFormat;
+        private Label label8;
+        private TextBox tbProductName;
+        private Label label9;
+        private TextBox tbCSVDelimiter;
+        private Label label10;
+    }
+}

+ 63 - 0
dlgEditCfg.cs

@@ -0,0 +1,63 @@
+using DocumentFormat.OpenXml.Office2021.DocumentTasks;
+using qdr.app.studiou.orders2printpack.Properties;
+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 qdr.app.studiou.orders2printpack
+{
+    public partial class dlgEditCfg : Form
+    {
+        #region *** Constructors ***
+        public dlgEditCfg()
+        {
+            InitializeComponent();
+        }
+        #endregion
+
+        #region *** Form Handlers ***
+        private void butOk_Click(object sender, EventArgs e)
+        {
+            AppSettings.Default.PredefinedVariants = tbVariants.Text;
+            AppSettings.Default.PredefinedCategories = tbCategories.Text;
+
+            AppSettings.Default.MapColOrderNo = tbOrderNo.Text;
+            AppSettings.Default.MapColProductCat = tbProuductCat.Text;
+            AppSettings.Default.MapColUri = tbUri.Text;
+            AppSettings.Default.MapColQuantity = tbQuantity.Text;
+            AppSettings.Default.MapColProductFormat = tbProductFormat.Text;
+            AppSettings.Default.MapColProductName = tbProductName.Text;
+            AppSettings.Default.CSVDelimiter = tbCSVDelimiter.Text;
+            AppSettings.Default.Save();
+            Close();
+        }
+
+        private void butCancel_Click(object sender, EventArgs e)
+        {
+            Close();
+        }
+
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "<Pending>")]
+        private void dlgEditCfg_Load(object sender, EventArgs e)
+        {
+            tbVariants.Text = AppSettings.Default.PredefinedVariants;
+            tbCategories.Text = AppSettings.Default.PredefinedCategories;
+            tbOrderNo.Text = AppSettings.Default.MapColOrderNo;
+            tbProuductCat.Text = AppSettings.Default.MapColProductCat;
+            tbUri.Text = AppSettings.Default.MapColUri;
+            tbQuantity.Text = AppSettings.Default.MapColQuantity;
+            tbProductFormat.Text = AppSettings.Default.MapColProductFormat;
+            tbProductName.Text = AppSettings.Default.MapColProductName;
+            tbCSVDelimiter.Text = AppSettings.Default.CSVDelimiter;
+        }
+        #endregion
+
+
+    }
+}

+ 120 - 0
dlgEditCfg.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!--
+    Microsoft ResX Schema
+
+    Version 2.0
+
+    The primary goals of this format is to allow a simple XML format
+    that is mostly human readable. The generation and parsing of the
+    various data types are done through the TypeConverter classes
+    associated with the data types.
+
+    Example:
+
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+
+    There are any number of "resheader" rows that contain simple
+    name/value pairs.
+
+    Each data row contains a name, and value. The row also contains a
+    type or mimetype. Type corresponds to a .NET class that support
+    text/value conversion through the TypeConverter architecture.
+    Classes that don't support this are serialized and stored with the
+    mimetype set.
+
+    The mimetype is used for serialized objects, and tells the
+    ResXResourceReader how to depersist the object. This is currently not
+    extensible. For a given mimetype the value must be set accordingly:
+
+    Note - application/x-microsoft.net.object.binary.base64 is the format
+    that the ResXResourceWriter will generate, however the reader can
+    read any of the formats listed below.
+
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 3 - 2
qdr.app.studiou.orders2printpack.csproj

@@ -18,8 +18,9 @@
     <Platforms>AnyCPU;x86;x64</Platforms>
     <AssemblyVersion>1.2.0.0</AssemblyVersion>
     <FileVersion>1.2.0.0</FileVersion>
-    <Version>1.2.2</Version>
-	<ForceDesignerDpiUnaware>true</ForceDesignerDpiUnaware>
+    <Version>1.2.3</Version>
+	<ApplicationHighDpiMode>SystemAware</ApplicationHighDpiMode>
+    <ForceDesignerDpiUnaware>true</ForceDesignerDpiUnaware>
   </PropertyGroup>
 
   <ItemGroup>