Add selectable image library option and refactor processing
Introduce UI option to choose between System.Graphics and ImageSharp for image processing. Update DataModel and MainForm for robust binding and synchronization. Rewrite ImageCreatorAlternate to use ImageSharp for core operations and GDI+ for overlays. Remove test buttons, add radio group for library selection. Update project dependencies to support new features and modernize image handling.
This commit is contained in:
parent
e48c0d266b
commit
63751af18d
7 changed files with 474 additions and 62 deletions
75
imagecatalog/MainForm.Designer.cs
generated
75
imagecatalog/MainForm.Designer.cs
generated
|
|
@ -45,8 +45,6 @@ namespace ImageCatalog
|
|||
Label43 = new Label();
|
||||
TabControl1 = new TabControl();
|
||||
TabPage5 = new TabPage();
|
||||
button1 = new Button();
|
||||
btnTest = new Button();
|
||||
GroupBox11 = new GroupBox();
|
||||
numericUpDown2 = new NumericUpDown();
|
||||
numericUpDown1 = new NumericUpDown();
|
||||
|
|
@ -183,6 +181,9 @@ namespace ImageCatalog
|
|||
_btnCreaCatalogoAsync = new Button();
|
||||
timer1 = new System.Windows.Forms.Timer(components);
|
||||
dataModelBindingSource1 = new BindingSource(components);
|
||||
groupBox12 = new GroupBox();
|
||||
rdbLibrary1 = new RadioButton();
|
||||
rdbLibrary2 = new RadioButton();
|
||||
((System.ComponentModel.ISupportInitialize)bindingSource1).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataModelBindingSource).BeginInit();
|
||||
TabControl1.SuspendLayout();
|
||||
|
|
@ -211,6 +212,7 @@ namespace ImageCatalog
|
|||
((System.ComponentModel.ISupportInitialize)_PictureBox1).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)PictureBox3).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataModelBindingSource1).BeginInit();
|
||||
groupBox12.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// ProgressBar1
|
||||
|
|
@ -270,8 +272,7 @@ namespace ImageCatalog
|
|||
//
|
||||
// TabPage5
|
||||
//
|
||||
TabPage5.Controls.Add(button1);
|
||||
TabPage5.Controls.Add(btnTest);
|
||||
TabPage5.Controls.Add(groupBox12);
|
||||
TabPage5.Controls.Add(GroupBox11);
|
||||
TabPage5.Controls.Add(GroupBox3);
|
||||
TabPage5.Controls.Add(GroupBox8);
|
||||
|
|
@ -285,28 +286,6 @@ namespace ImageCatalog
|
|||
TabPage5.Text = "Generale";
|
||||
TabPage5.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
button1.DataBindings.Add(new Binding("Command", bindingSource1, "AsyncTestCommand", true));
|
||||
button1.Location = new Point(751, 720);
|
||||
button1.Margin = new Padding(5);
|
||||
button1.Name = "button1";
|
||||
button1.Size = new Size(141, 43);
|
||||
button1.TabIndex = 50;
|
||||
button1.Text = "Test Async";
|
||||
button1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnTest
|
||||
//
|
||||
btnTest.DataBindings.Add(new Binding("Command", bindingSource1, "TestCommand", true));
|
||||
btnTest.Location = new Point(487, 708);
|
||||
btnTest.Margin = new Padding(5);
|
||||
btnTest.Name = "btnTest";
|
||||
btnTest.Size = new Size(141, 43);
|
||||
btnTest.TabIndex = 49;
|
||||
btnTest.Text = "Test";
|
||||
btnTest.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// GroupBox11
|
||||
//
|
||||
GroupBox11.Controls.Add(numericUpDown2);
|
||||
|
|
@ -1750,6 +1729,7 @@ namespace ImageCatalog
|
|||
//
|
||||
// versionLabel
|
||||
//
|
||||
versionLabel.DataBindings.Add(new Binding("Text", bindingSource1, "AppVersion", true));
|
||||
versionLabel.Location = new Point(1182, 873);
|
||||
versionLabel.Margin = new Padding(6, 0, 6, 0);
|
||||
versionLabel.Name = "versionLabel";
|
||||
|
|
@ -1757,7 +1737,6 @@ namespace ImageCatalog
|
|||
versionLabel.TabIndex = 62;
|
||||
versionLabel.Text = "Versione 2.2 2021";
|
||||
versionLabel.TextAlign = ContentAlignment.MiddleRight;
|
||||
versionLabel.DataBindings.Add(new Binding("Text", bindingSource1, "AppVersion", true));
|
||||
//
|
||||
// _Button7
|
||||
//
|
||||
|
|
@ -1863,6 +1842,41 @@ namespace ImageCatalog
|
|||
//
|
||||
dataModelBindingSource1.DataSource = typeof(ImageCatalog_2.DataModel);
|
||||
//
|
||||
// groupBox12
|
||||
//
|
||||
groupBox12.Controls.Add(rdbLibrary2);
|
||||
groupBox12.Controls.Add(rdbLibrary1);
|
||||
groupBox12.Location = new Point(405, 625);
|
||||
groupBox12.Name = "groupBox12";
|
||||
groupBox12.Size = new Size(350, 175);
|
||||
groupBox12.TabIndex = 49;
|
||||
groupBox12.TabStop = false;
|
||||
groupBox12.Text = "Libreria Manipolazione Grafica";
|
||||
//
|
||||
// rdbLibrary1
|
||||
//
|
||||
rdbLibrary1.AutoSize = true;
|
||||
rdbLibrary1.Location = new Point(12, 37);
|
||||
rdbLibrary1.Name = "rdbLibrary1";
|
||||
rdbLibrary1.Size = new Size(188, 34);
|
||||
rdbLibrary1.TabIndex = 0;
|
||||
rdbLibrary1.TabStop = true;
|
||||
rdbLibrary1.Text = "System.Graphics";
|
||||
rdbLibrary1.DataBindings.Add(new Binding("Checked", bindingSource1, "UseSystemGraphics", true, DataSourceUpdateMode.OnPropertyChanged));
|
||||
rdbLibrary1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// rdbLibrary2
|
||||
//
|
||||
rdbLibrary2.AutoSize = true;
|
||||
rdbLibrary2.Location = new Point(12, 77);
|
||||
rdbLibrary2.Name = "rdbLibrary2";
|
||||
rdbLibrary2.Size = new Size(149, 34);
|
||||
rdbLibrary2.TabIndex = 1;
|
||||
rdbLibrary2.TabStop = true;
|
||||
rdbLibrary2.Text = "ImageSharp";
|
||||
rdbLibrary2.DataBindings.Add(new Binding("Checked", bindingSource1, "UseImageSharp", true, DataSourceUpdateMode.OnPropertyChanged));
|
||||
rdbLibrary2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(12F, 30F);
|
||||
|
|
@ -1929,6 +1943,8 @@ namespace ImageCatalog
|
|||
((System.ComponentModel.ISupportInitialize)_PictureBox1).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)PictureBox3).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataModelBindingSource1).EndInit();
|
||||
groupBox12.ResumeLayout(false);
|
||||
groupBox12.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
|
@ -2275,12 +2291,13 @@ namespace ImageCatalog
|
|||
private BindingSource dataModelBindingSource;
|
||||
private BindingSource dataModelBindingSource1;
|
||||
private BindingSource bindingSource1;
|
||||
private Button btnTest;
|
||||
private Button button1;
|
||||
private NumericUpDown numericUpDown1;
|
||||
private NumericUpDown numericUpDown2;
|
||||
private Button btnOpenDestFolder;
|
||||
private Button btnOpenSourceFolder;
|
||||
private GroupBox groupBox12;
|
||||
private RadioButton rdbLibrary2;
|
||||
private RadioButton rdbLibrary1;
|
||||
|
||||
internal Button btnCreaCatalogoAsync
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue