ayy lmao
This commit is contained in:
parent
abbe94a72c
commit
3b1afdf2c0
92 changed files with 23248 additions and 0 deletions
101
ImageCatalogCS/AboutForm.Designer.cs
generated
Normal file
101
ImageCatalogCS/AboutForm.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
namespace ImageCatalogCS
|
||||
{
|
||||
partial class AboutForm
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutForm));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(12, 213);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(75, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Image Catalog";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(350, 213);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(66, 13);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "Versione 3.0";
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(176, 239);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(75, 23);
|
||||
this.button1.TabIndex = 2;
|
||||
this.button1.Text = "Chiudi";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
|
||||
this.pictureBox1.InitialImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.InitialImage")));
|
||||
this.pictureBox1.Location = new System.Drawing.Point(15, 13);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(401, 197);
|
||||
this.pictureBox1.TabIndex = 3;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// AboutForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(433, 274);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "AboutForm";
|
||||
this.Text = "AboutForm";
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
}
|
||||
}
|
||||
25
ImageCatalogCS/AboutForm.cs
Normal file
25
ImageCatalogCS/AboutForm.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
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 ImageCatalogCS
|
||||
{
|
||||
public partial class AboutForm : Form
|
||||
{
|
||||
public AboutForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
229
ImageCatalogCS/AboutForm.resx
Normal file
229
ImageCatalogCS/AboutForm.resx
Normal file
|
|
@ -0,0 +1,229 @@
|
|||
<?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>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAZ4AAADQCAIAAAC4O5DwAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAS
|
||||
cwAAEnMBjCK5BwAAC05JREFUeF7t2sGBG0cORmEn4PPmooCUxO7FGTgaJ+NgtE0OKZMeTTdQDVQBf7/v
|
||||
4svuDLsK9boo6bcfACCHtAEQRNoACCJtAASRNgCCSBsAQaQNgCDSBkAQaQMgiLQBEETaAAgibQAEkTYA
|
||||
gkgbAEGkDYAg0gZAEGkDIIi0ARBE2gAIIm0ABJE2AIJIGwBBpA2AINIGQBBpAyCItAEQRNoACCJtAASR
|
||||
NgCCSBsAQaQNgCDSBkAQaQMgiLQBEETaAAgibQAEkTYAgkgbAEGkDYAg0pbqr++/Dfn259+PnwBhjEci
|
||||
0hZndFBtvv/1+DXoifGYi7SdkzuvX+Gt3QTjsQ5pG/H3n98eU7QaL+uCGI8KSJtHnZn9NxJXAONRCWkz
|
||||
qTu0b/gmsgbjUdDKtB0PRIG9aDK1r1asmvsPlUSO2cXGo8WRfViXNsNQLL5GNxzbF3MX74Jpu+Z4HG90
|
||||
lZ1dlTbLXCwsW+7YHm5+2F+sTVvCa6UtvWr7q7N0PAy/vMberkmbZTSWrU/Y4OxyTtWJDzUlb9dJ25zx
|
||||
2Hj2beZ4lD68L1akzfTOm3IgP5k2tzeD+z9yZUgftWukbep4bEYWacJ4WJZh/f7OT5tt6ReUbfbc3px6
|
||||
TOcQpy6pftpWjMdmfNcSx8O0Fqt3eHbabOs9fVVGXnUxAh7Vfujy1lU7bevGY3N2pTLGo+gxfjM5bbZl
|
||||
nrwkSwd3E3Odsk5wzu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ABJE2AIJIGwBBpA2AINIGQBBp
|
||||
AyCItAEQRNoACCJtAASRNgCCSBsAQaQNgCDSBkAQaQMgiLQBEETaAAgibQAEkTYAgkgbAEGkDYAg0gZA
|
||||
EGkDIIi0ARBE2gAIIm0ABJE2AIJIGwA5P378HyuEmb0husDDAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="pictureBox1.InitialImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAZ4AAADQCAIAAAC4O5DwAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAS
|
||||
cwAAEnMBjCK5BwAAC05JREFUeF7t2sGBG0cORmEn4PPmooCUxO7FGTgaJ+NgtE0OKZMeTTdQDVQBf7/v
|
||||
4svuDLsK9boo6bcfACCHtAEQRNoACCJtAASRNgCCSBsAQaQNgCDSBkAQaQMgiLQBEETaAAgibQAEkTYA
|
||||
gkgbAEGkDYAg0gZAEGkDIIi0ARBE2gAIIm0ABJE2AIJIGwBBpA2AINIGQBBpAyCItAEQRNoACCJtAASR
|
||||
NgCCSBsAQaQNgCDSBkAQaQMgiLQBEETaAAgibQAEkTYAgkgbAEGkDYAg0pbqr++/Dfn259+PnwBhjEci
|
||||
0hZndFBtvv/1+DXoifGYi7SdkzuvX+Gt3QTjsQ5pG/H3n98eU7QaL+uCGI8KSJtHnZn9NxJXAONRCWkz
|
||||
qTu0b/gmsgbjUdDKtB0PRIG9aDK1r1asmvsPlUSO2cXGo8WRfViXNsNQLL5GNxzbF3MX74Jpu+Z4HG90
|
||||
lZ1dlTbLXCwsW+7YHm5+2F+sTVvCa6UtvWr7q7N0PAy/vMberkmbZTSWrU/Y4OxyTtWJDzUlb9dJ25zx
|
||||
2Hj2beZ4lD68L1akzfTOm3IgP5k2tzeD+z9yZUgftWukbep4bEYWacJ4WJZh/f7OT5tt6ReUbfbc3px6
|
||||
TOcQpy6p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QRNoACCJtAASRNgCCSBsAQaQNgCDSBkAQaQMg
|
||||
iLQBEETaAAgibQAEkTYAgkgbAEGkDYAg0gZAEGkDIIi0ARBE2gAIIm0ABJE2AIJIGwBBpA2AINIGQBBp
|
||||
AyCItAEQRNoACCJtAASRNgCCSBsAQaQNgCDSBkAQaQMgiLQBEETaAAgibQAEkTYAgkgbAEGkDYAg0gZA
|
||||
EGkDIIi0ARBE2gAIIm0ABJE2AIJIGwA5P378HyuEmb0husDDAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
6
ImageCatalogCS/App.config
Normal file
6
ImageCatalogCS/App.config
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
</configuration>
|
||||
12
ImageCatalogCS/CreaImmagineSeparateThread.cs
Normal file
12
ImageCatalogCS/CreaImmagineSeparateThread.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ImageCatalogCS
|
||||
{
|
||||
class CreaImmagineSeparateThread
|
||||
{
|
||||
}
|
||||
}
|
||||
1166
ImageCatalogCS/ExifReader.cs
Normal file
1166
ImageCatalogCS/ExifReader.cs
Normal file
File diff suppressed because it is too large
Load diff
173
ImageCatalogCS/FileHelper.cs
Normal file
173
ImageCatalogCS/FileHelper.cs
Normal file
|
|
@ -0,0 +1,173 @@
|
|||
using Microsoft.VisualBasic;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
|
||||
public class FileHelper
|
||||
{
|
||||
//Private dirSourceDest As Dictionary(Of FileInfo, DirectoryInfo)
|
||||
private int filesPerFolder;
|
||||
private string suffix;
|
||||
private int counterSize;
|
||||
private int numerationType;
|
||||
private string filter;
|
||||
private bool separateFiles;
|
||||
|
||||
private string extensions = "*.jpg,*.png,*.gif";
|
||||
|
||||
public enum numerazione
|
||||
{
|
||||
Progressiva,
|
||||
Files
|
||||
}
|
||||
/// <summary>
|
||||
/// Preparazione per la separazione
|
||||
/// </summary>
|
||||
/// <param name="filesPerFolder"></param>
|
||||
/// <param name="suffix"></param>
|
||||
/// <param name="counterSize"></param>
|
||||
/// <param name="numerationType"></param>
|
||||
/// <remarks></remarks>
|
||||
public FileHelper(int filesPerFolder, string suffix, int counterSize, int numerationType)
|
||||
{
|
||||
this.filesPerFolder = filesPerFolder;
|
||||
this.suffix = suffix;
|
||||
this.counterSize = counterSize;
|
||||
this.numerationType = numerationType;
|
||||
this.separateFiles = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// nessuna separazione
|
||||
/// </summary>
|
||||
/// <remarks></remarks>
|
||||
public FileHelper()
|
||||
{
|
||||
this.separateFiles = false;
|
||||
}
|
||||
|
||||
|
||||
public Dictionary<FileInfo, DirectoryInfo> GetFilesRecursive(DirectoryInfo root, DirectoryInfo destRoot, string filter)
|
||||
{
|
||||
Dictionary<FileInfo, DirectoryInfo> dirSourceDest = new Dictionary<FileInfo, DirectoryInfo>();
|
||||
List<FileInfo> result = new List<FileInfo>();
|
||||
|
||||
//Dim stack As New Stack(Of DirectoryInfo)
|
||||
Stack<KeyValuePair<DirectoryInfo, DirectoryInfo>> stack = new Stack<KeyValuePair<DirectoryInfo, DirectoryInfo>>();
|
||||
|
||||
|
||||
this.filter = filter;
|
||||
KeyValuePair<DirectoryInfo, DirectoryInfo> pair = new KeyValuePair<DirectoryInfo, DirectoryInfo>();
|
||||
|
||||
|
||||
//stack.Push(root)
|
||||
stack.Push(new KeyValuePair<DirectoryInfo, DirectoryInfo>(root, destRoot));
|
||||
|
||||
while ((stack.Count > 0))
|
||||
{
|
||||
KeyValuePair<DirectoryInfo, DirectoryInfo> curDirKV = stack.Pop();
|
||||
//curDirKP = stack.Pop()
|
||||
DirectoryInfo dir = curDirKV.Key;
|
||||
DirectoryInfo dDir = curDirKV.Value;
|
||||
try
|
||||
{
|
||||
//result.AddRange(dir.GetFiles(filter, SearchOption.TopDirectoryOnly))
|
||||
// dividere file qui
|
||||
if (filesPerFolder > 0 & separateFiles)
|
||||
{
|
||||
appendDictionary(dirSourceDest, dividiFilesInDir(dir, dDir));
|
||||
}
|
||||
else
|
||||
{
|
||||
appendDictionary(dirSourceDest, getAllFilesInDir(dir, dDir));
|
||||
}
|
||||
|
||||
|
||||
|
||||
foreach (DirectoryInfo subDirectory in dir.GetDirectories())
|
||||
{
|
||||
stack.Push(new KeyValuePair<DirectoryInfo, DirectoryInfo>(subDirectory, new DirectoryInfo(Path.Combine(dDir.FullName, subDirectory.Name))));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
return dirSourceDest;
|
||||
}
|
||||
|
||||
public Dictionary<FileInfo, DirectoryInfo> appendDictionary(Dictionary<FileInfo, DirectoryInfo> dictA, Dictionary<FileInfo, DirectoryInfo> dictB)
|
||||
{
|
||||
foreach (KeyValuePair<FileInfo, DirectoryInfo> pair in dictB)
|
||||
{
|
||||
dictA.Add(pair.Key, pair.Value);
|
||||
}
|
||||
return dictA;
|
||||
}
|
||||
|
||||
public Dictionary<FileInfo, DirectoryInfo> getAllFilesInDir(DirectoryInfo dir, DirectoryInfo dirDest)
|
||||
{
|
||||
Dictionary<FileInfo, DirectoryInfo> dict = new Dictionary<FileInfo, DirectoryInfo>();
|
||||
foreach (FileInfo File in dir.GetFiles(filter))
|
||||
{
|
||||
dict.Add(File, new DirectoryInfo(Path.Combine(dirDest.FullName, File.Name)));
|
||||
|
||||
}
|
||||
return dict;
|
||||
}
|
||||
|
||||
private Dictionary<FileInfo, DirectoryInfo> dividiFilesInDir(DirectoryInfo dir, DirectoryInfo dirDest)
|
||||
{
|
||||
int filesCount = dir.GetFiles(filter).Length;
|
||||
int contaFilePerDir = 0;
|
||||
int contaDirPerDir = 0;
|
||||
string tempText = string.Empty;
|
||||
Dictionary<FileInfo, DirectoryInfo> foldersDict = new Dictionary<FileInfo, DirectoryInfo>();
|
||||
|
||||
DirectoryInfo destDir = null;
|
||||
destDir = new DirectoryInfo(Path.Combine(dirDest.FullName));
|
||||
|
||||
foreach (FileInfo file in dir.GetFiles(filter))
|
||||
{
|
||||
contaFilePerDir += 1;
|
||||
|
||||
if (contaFilePerDir == (contaDirPerDir * filesPerFolder) + 1)
|
||||
{
|
||||
contaDirPerDir += 1;
|
||||
|
||||
if (numerazione.Progressiva.Equals(numerationType))
|
||||
{
|
||||
tempText = contaDirPerDir.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
tempText = (contaDirPerDir * filesPerFolder).ToString();
|
||||
}
|
||||
int i = 0;
|
||||
for (i = 1; i <= (counterSize - tempText.Length); i++)
|
||||
{
|
||||
tempText = "0" + tempText;
|
||||
}
|
||||
destDir = new DirectoryInfo(Path.Combine(dirDest.FullName, suffix + tempText));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (!destDir.Exists)
|
||||
{
|
||||
destDir.Create();
|
||||
}
|
||||
|
||||
foldersDict.Add(file, destDir);
|
||||
}
|
||||
|
||||
return foldersDict;
|
||||
}
|
||||
}
|
||||
110
ImageCatalogCS/ImageCatalog 3.csproj
Normal file
110
ImageCatalogCS/ImageCatalog 3.csproj
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ImageCatalogCS</RootNamespace>
|
||||
<AssemblyName>ImageCatalogCS</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AboutForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="AboutForm.Designer.cs">
|
||||
<DependentUpon>AboutForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CreaImmagineSeparateThread.cs" />
|
||||
<Compile Include="ExifReader.cs" />
|
||||
<Compile Include="FileHelper.cs" />
|
||||
<Compile Include="ImageCreator.cs" />
|
||||
<Compile Include="MainForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainForm.Designer.cs">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="PicSettings.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Temperature.cs" />
|
||||
<Compile Include="XMLSettings.cs" />
|
||||
<Compile Include="XYThreadPool.cs" />
|
||||
<EmbeddedResource Include="AboutForm.resx">
|
||||
<DependentUpon>AboutForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="MainForm.resx">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
1057
ImageCatalogCS/ImageCreator.cs
Normal file
1057
ImageCatalogCS/ImageCreator.cs
Normal file
File diff suppressed because it is too large
Load diff
1794
ImageCatalogCS/MainForm.Designer.cs
generated
Normal file
1794
ImageCatalogCS/MainForm.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
548
ImageCatalogCS/MainForm.cs
Normal file
548
ImageCatalogCS/MainForm.cs
Normal file
|
|
@ -0,0 +1,548 @@
|
|||
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;
|
||||
using System.IO;
|
||||
using System.Drawing.Text;
|
||||
using System.Threading;
|
||||
|
||||
public delegate void XyThreadAdd(string Info);
|
||||
|
||||
namespace ImageCatalogCS
|
||||
{
|
||||
public partial class MainForm : Form
|
||||
{
|
||||
private bool stopAttivo;
|
||||
private bool waterSelectColor = false;
|
||||
|
||||
//pool
|
||||
private XYThreadPool myPool = new XYThreadPool();
|
||||
|
||||
private int contaImmaginiThread;
|
||||
|
||||
private int maxThreads = 15;
|
||||
private int minThreads = 5;
|
||||
|
||||
public MainForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void setDefaults()
|
||||
{
|
||||
txtSorgente.Text = "";
|
||||
txtDestinazione.Text = "";
|
||||
TextBox3.Text = "tn_";
|
||||
TextBox4.Text = "";
|
||||
TextBox5.Text = "350";
|
||||
TextBox6.Text = "350";
|
||||
TextBox27.Text = "2240";
|
||||
TextBox28.Text = "2240";
|
||||
TextBox9.Text = "0";
|
||||
TextBox11.Text = "20";
|
||||
TextBox12.Text = "8";
|
||||
//TextBox13.Text = ""
|
||||
TextBox10.Text = "";
|
||||
TextBox14.Text = "430";
|
||||
TextBox15.Text = "430";
|
||||
TextBox16.Text = "290";
|
||||
txtFilePerCartella.Text = "99";
|
||||
TextBox19.Text = "100";
|
||||
txtSuffissoCartelle.Text = "";
|
||||
txtCifreContatore.Text = "2";
|
||||
TextBox25.Text = "50";
|
||||
TextBox26.Text = "";
|
||||
TextBox7.Text = Convert.ToString(15);
|
||||
TextBox8.Text = Convert.ToString(5);
|
||||
TextBox34.Text = "Yellow";
|
||||
TextBox30.Text = "20";
|
||||
TextBox31.Text = "6";
|
||||
TextBox32.Text = "85";
|
||||
TextBox33.Text = "30";
|
||||
|
||||
|
||||
ComboBox1.Items.Add("Alto");
|
||||
ComboBox1.Items.Add("Basso");
|
||||
ComboBox1.SelectedIndex = 1;
|
||||
|
||||
ComboBox2.Items.Add("Sinistra");
|
||||
ComboBox2.Items.Add("Centro");
|
||||
ComboBox2.Items.Add("Destra");
|
||||
ComboBox2.SelectedIndex = 1;
|
||||
|
||||
// Create a obejct of InstalledFontCollection
|
||||
InstalledFontCollection InstalledFonts = new InstalledFontCollection();
|
||||
// Gets the array of FontFamily objects associated with this FontCollection.
|
||||
FontFamily[] fontfamilies = InstalledFonts.Families;
|
||||
|
||||
// Populates font combobox with the font name
|
||||
|
||||
foreach (FontFamily fontFamily in fontfamilies)
|
||||
{
|
||||
ComboBox3.Items.Add(fontFamily.Name);
|
||||
}
|
||||
|
||||
ComboBox3.Text = ComboBox3.Items[0].ToString();
|
||||
|
||||
ComboBox4.Items.Add("Sinistra");
|
||||
ComboBox4.Items.Add("Centro");
|
||||
ComboBox4.Items.Add("Destra");
|
||||
ComboBox4.SelectedIndex = 2;
|
||||
|
||||
ComboBox5.Items.Add("Alto");
|
||||
ComboBox5.Items.Add("Centro");
|
||||
ComboBox5.Items.Add("Basso");
|
||||
ComboBox5.SelectedIndex = 2;
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
setDefaults();
|
||||
}
|
||||
|
||||
private void btnCreaCatalogo_Click(object sender, EventArgs e)
|
||||
{
|
||||
DateTime timestart;
|
||||
DateTime timeStop;
|
||||
|
||||
timestart = DateTime.Now;
|
||||
|
||||
txtFileInfo.Text = string.Empty;
|
||||
lblFotoTotaliNum.Text = "0";
|
||||
Label18.Text = "0";
|
||||
Label43.Text = "-s";
|
||||
|
||||
maxThreads = Convert.ToInt32(TextBox7.Text);
|
||||
minThreads = Convert.ToInt32(TextBox18.Text);
|
||||
|
||||
//setPicSettings(txtSorgente.Text, txtDestinazione.Text);
|
||||
makeSettingsFromForm();
|
||||
ProgressBar1.Minimum = 0;
|
||||
ProgressBar1.Step = 1;
|
||||
ProgressBar1.Value = 0;
|
||||
|
||||
System.Threading.Thread t1 = new System.Threading.Thread(creaCatalogoThread);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void creaCatalogoThread()
|
||||
{
|
||||
System.DateTime timeStart = DateTime.Now;
|
||||
myPool.StopThreadPool();
|
||||
myPool.StartThreadPool(minThreads, maxThreads);
|
||||
contaImmaginiThread = 0;
|
||||
|
||||
//creaImmaginiWithThreadMod(txtSorgente.Text, txtDestinazione.Text)
|
||||
//creaimmaginiWithThreadDict(txtSorgente.Text, txtDestinazione.Text);
|
||||
ThreadPoolWorkItem ThAttivo = null;
|
||||
//int i = 0;
|
||||
|
||||
// fine
|
||||
|
||||
|
||||
}
|
||||
|
||||
private int getNumerazione()
|
||||
{
|
||||
int numerazione = 0;
|
||||
if (rdbNumProgressiva.Checked)
|
||||
{
|
||||
numerazione = (int)FileHelper.numerazione.Progressiva;
|
||||
}
|
||||
else
|
||||
{
|
||||
numerazione = (int)FileHelper.numerazione.Files;
|
||||
}
|
||||
return numerazione;
|
||||
}
|
||||
|
||||
private void creaimmaginiWithThreadDict(string SourcePath, string DestPath)
|
||||
{
|
||||
Dictionary<FileInfo, DirectoryInfo> dirSourceDest = new Dictionary<FileInfo, DirectoryInfo>();
|
||||
|
||||
if (chkAggiornaSottodirectory.Checked & chkCreaSottocartelle.Checked) {
|
||||
FileHelper helper = new FileHelper(Convert.ToInt32(txtFilePerCartella.Text), txtSuffissoCartelle.Text, Convert.ToInt32(txtCifreContatore.Text), getNumerazione());
|
||||
//getfilesrecursive
|
||||
dirSourceDest = helper.GetFilesRecursive(new DirectoryInfo(SourcePath), new DirectoryInfo(DestPath), "*.jpg");
|
||||
|
||||
} else if (chkAggiornaSottodirectory.Checked & !chkCreaSottocartelle.Checked) {
|
||||
|
||||
}
|
||||
//else if ()
|
||||
|
||||
//= getDirsDict(SourcePath, DestPath)
|
||||
|
||||
KeyValuePair<FileInfo, DirectoryInfo> pair = default(KeyValuePair<FileInfo, DirectoryInfo>);
|
||||
|
||||
foreach (KeyValuePair<FileInfo, DirectoryInfo> pair_loopVariable in dirSourceDest) {
|
||||
pair = pair_loopVariable;
|
||||
//setLabel10Text("File: " + pair.Key.Name);
|
||||
string b = (Convert.ToInt32(Label18.Text) + 1).ToString();
|
||||
|
||||
ImageCreator ClsCreaImmagine = new ImageCreator(pair.Key, pair.Value);
|
||||
contaImmaginiThread += 1;
|
||||
myPool.InsertWorkItem(pair.Key.Name, new XyThreadAdd(ClsCreaImmagine.CreaImmagineThread), new object[1] { pair.Key.Name }, true);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private Dictionary<string, object> makeSettingsFromForm()
|
||||
{
|
||||
Dictionary<string, object> settingsDict = new Dictionary<string, object>();
|
||||
settingsDict.Add("sourceDirRoot", new DirectoryInfo(txtSorgente.Text));
|
||||
settingsDict.Add("destDirRoot", new DirectoryInfo(txtDestinazione.Text));
|
||||
|
||||
settingsDict.Add("DirDividiDestinazione", chkCreaSottocartelle.Checked);
|
||||
settingsDict.Add("DirDividiNumFile", txtFilePerCartella.Text);
|
||||
settingsDict.Add("DirDividiSuffisso", txtSuffissoCartelle.Text);
|
||||
settingsDict.Add("DirDividiNumCifre", txtCifreContatore.Text);
|
||||
|
||||
settingsDict.Add("DirDividiTipoNumerazione", rdbNumProgressiva.Checked ? "Progressiva" : "Files");
|
||||
|
||||
// if (rdbNumProgressiva.Checked)
|
||||
// settingsDict.Add("DirDividiTipoNumerazione", "Progressiva");
|
||||
//else
|
||||
// settingsDict.Add("DirDividiTipoNumerazione", "Files");
|
||||
|
||||
// Checkbox
|
||||
settingsDict.Add("creaMiniature", CheckBox1.Checked);
|
||||
settingsDict.Add("aggiungiTesto", CheckBox2.Checked);
|
||||
settingsDict.Add("grassetto", CheckBox3.Checked);
|
||||
settingsDict.Add("logoAggiungi", CheckBox5.Checked);
|
||||
settingsDict.Add("usaOrarioTestoApplicare", CheckBox8.Checked);
|
||||
//settingsDict.Add("usaOrarioMiniatura", CheckBox12.Checked);
|
||||
settingsDict.Add("fotoGrandeDimOrigina", CheckBox15.Checked);
|
||||
|
||||
settingsDict.Add("dimStandard", Convert.ToInt32(TextBox11.Text));
|
||||
settingsDict.Add("dimStandardMiniatura", Convert.ToInt32(TextBox25.Text));
|
||||
|
||||
|
||||
|
||||
|
||||
settingsDict.Add("usaRotazioneAutomatica", chkRotazioneAutomatica.Checked);
|
||||
settingsDict.Add("usaForzaJpg", chkForzaJpg.Checked);
|
||||
|
||||
settingsDict.Add("testoNome", CheckBox17.Checked);
|
||||
settingsDict.Add("nomeData", CheckBox16.Checked);
|
||||
|
||||
settingsDict.Add("testoFirmaStart", TextBox4.Text);
|
||||
settingsDict.Add("testoFirmaStartV", TextBox29.Text);
|
||||
|
||||
settingsDict.Add("dataPartenza", DateTimePicker1.Value);
|
||||
settingsDict.Add("testoOrario", TextBox18.Text);
|
||||
|
||||
settingsDict.Add("altezzaSmall", Convert.ToInt32(TextBox6.Text));
|
||||
settingsDict.Add("larghezzaSmall", Convert.ToInt32(TextBox5.Text));
|
||||
|
||||
|
||||
settingsDict.Add("aggiungiScritteMiniature", RadioButton3.Checked);
|
||||
settingsDict.Add("aggTempoGaraMin", RadioButton5.Checked);
|
||||
settingsDict.Add("aggNumTempMin", RadioButton7.Checked);
|
||||
|
||||
settingsDict.Add("dimVert", Convert.ToUInt32(TextBox30.Text));
|
||||
settingsDict.Add("margVert", Convert.ToInt32(TextBox31.Text));
|
||||
|
||||
settingsDict.Add("suffisso", TextBox3.Text);
|
||||
settingsDict.Add("trasparenza", Convert.ToInt32(TextBox9.Text));
|
||||
settingsDict.Add("ilFont", ComboBox3.SelectedItem.ToString());
|
||||
|
||||
|
||||
settingsDict.Add("posizione", ComboBox1.SelectedItem.ToString());
|
||||
settingsDict.Add("allineamento", ComboBox2.SelectedItem.ToString());
|
||||
settingsDict.Add("margine", Convert.ToInt32(TextBox12.Text));
|
||||
|
||||
settingsDict.Add("logoAltezza", Convert.ToInt32(TextBox14.Text));
|
||||
settingsDict.Add("logoLarghezza", Convert.ToInt32(TextBox15.Text));
|
||||
|
||||
settingsDict.Add("fontColoreRGB", ColorTranslator.FromHtml(TextBox34.Text));
|
||||
|
||||
|
||||
settingsDict.Add("logoNomeFile", TextBox10.Text);
|
||||
settingsDict.Add("logoTrasparenza", TextBox19.Text);
|
||||
settingsDict.Add("logoMargine", TextBox16.Text);
|
||||
settingsDict.Add("logoPosizioneH", ComboBox4.Text);
|
||||
settingsDict.Add("logoPosizioneV", ComboBox5.Text);
|
||||
|
||||
|
||||
settingsDict.Add("altezzaBig", Convert.ToInt32(TextBox27.Text));
|
||||
settingsDict.Add("larghezzaBig", Convert.ToInt32(TextBox28.Text));
|
||||
settingsDict.Add("dimMin", Convert.ToInt32(TextBox25.Text));
|
||||
|
||||
settingsDict.Add("testoMin", RadioButton6.Checked);
|
||||
|
||||
settingsDict.Add("jpegQuality", Convert.ToInt32(TextBox32.Text));
|
||||
settingsDict.Add("jpegQualityMin", Convert.ToInt32(TextBox33.Text));
|
||||
|
||||
return settingsDict;
|
||||
}
|
||||
|
||||
private void setPicSettings(string SourcePath, string DestPath)
|
||||
{
|
||||
DirectoryInfo SourceDir = new DirectoryInfo(SourcePath);
|
||||
DirectoryInfo DestDirStart = new DirectoryInfo(DestPath);
|
||||
DirectoryInfo DestDir = null;
|
||||
|
||||
PicSettings.directorySorgente = txtSorgente.Text;
|
||||
PicSettings.directoryDestinazione = txtDestinazione.Text;
|
||||
|
||||
|
||||
PicSettings.dimStandard = Convert.ToInt32(TextBox11.Text);
|
||||
PicSettings.dimStandardMiniatura = Convert.ToInt32(TextBox25.Text);
|
||||
|
||||
//PicSettings.UsaOrarioMiniatura = CheckBox12.Checked;
|
||||
PicSettings.UsaOrarioTestoApplicare = CheckBox8.Checked;
|
||||
PicSettings.UsaTempoGaraTestoApplicare = CheckBox7.Checked;
|
||||
|
||||
PicSettings.UsaRotazioneAutomatica = chkRotazioneAutomatica.Checked;
|
||||
PicSettings.UsaForzaJpg = chkForzaJpg.Checked;
|
||||
|
||||
if (CheckBox17.Checked)
|
||||
{
|
||||
PicSettings.TestoNome = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
PicSettings.TestoNome = false;
|
||||
|
||||
}
|
||||
|
||||
if (CheckBox16.Checked)
|
||||
{
|
||||
PicSettings.NomeData = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
PicSettings.NomeData = false;
|
||||
}
|
||||
PicSettings.TestoFirmaStart = TextBox4.Text;
|
||||
PicSettings.TestoFirmaStartV = TextBox29.Text;
|
||||
|
||||
PicSettings.DataPartenza = DateTimePicker1.Value;
|
||||
PicSettings.TestoOrario = TextBox18.Text;
|
||||
|
||||
PicSettings.AltezzaSmall = Convert.ToInt32(TextBox6.Text);
|
||||
PicSettings.LarghezzaSmall = Convert.ToInt32(TextBox5.Text);
|
||||
|
||||
PicSettings.CreaMiniature = CheckBox1.Checked;
|
||||
PicSettings.AggiungiScritteMiniature = RadioButton3.Checked;
|
||||
PicSettings.AggTempoGaraMin = RadioButton5.Checked;
|
||||
PicSettings.AggNumTempMin = RadioButton7.Checked;
|
||||
|
||||
|
||||
PicSettings.dimVert = Convert.ToInt32(TextBox30.Text);
|
||||
PicSettings.margVert = Convert.ToInt32(TextBox31.Text);
|
||||
|
||||
//PicSettings.NomeFileChild = childFile.Name
|
||||
PicSettings.Suffisso = TextBox3.Text;
|
||||
//PicSettings.Codice = TextBox13.Text
|
||||
|
||||
PicSettings.Trasparenza = Convert.ToInt32(TextBox9.Text);
|
||||
PicSettings.IlFont = ComboBox3.SelectedItem.ToString();
|
||||
PicSettings.Grassetto = CheckBox3.Checked;
|
||||
|
||||
PicSettings.Posizione = ComboBox1.SelectedItem.ToString();
|
||||
PicSettings.Allineamento = ComboBox2.SelectedItem.ToString();
|
||||
PicSettings.Margine = Convert.ToInt32(TextBox12.Text);
|
||||
|
||||
PicSettings.LogoAltezza = Convert.ToInt32(TextBox14.Text);
|
||||
PicSettings.LogoLarghezza = Convert.ToInt32(TextBox15.Text);
|
||||
|
||||
PicSettings.fontColoreRGB = ColorTranslator.FromHtml(TextBox34.Text);
|
||||
|
||||
PicSettings.LogoAggiungi = CheckBox5.Checked;
|
||||
PicSettings.LogoNomeFile = TextBox10.Text;
|
||||
PicSettings.LogoTrasparenza = TextBox19.Text;
|
||||
PicSettings.LogoMargine = TextBox16.Text;
|
||||
PicSettings.LogoPosizioneH = ComboBox4.Text;
|
||||
PicSettings.LogoPosizioneV = ComboBox5.Text;
|
||||
|
||||
PicSettings.FotoGrandeDimOrigina = CheckBox15.Checked;
|
||||
PicSettings.AltezzaBig = Convert.ToInt32(TextBox27.Text);
|
||||
PicSettings.LarghezzaBig = Convert.ToInt32(TextBox28.Text);
|
||||
PicSettings.DimMin = Convert.ToInt32(TextBox25.Text);
|
||||
|
||||
PicSettings.TestoMin = RadioButton6.Checked;
|
||||
|
||||
PicSettings.jpegQuality = Convert.ToInt64(TextBox32.Text);
|
||||
PicSettings.jpegQualityMin = Convert.ToInt64(TextBox33.Text);
|
||||
|
||||
PicSettings.mainForm = this;
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void makeSettingsFromFile()
|
||||
{
|
||||
OpenFileDialog openFileDialog = new OpenFileDialog();
|
||||
openFileDialog.Filter = "Setup (*.xml)|*.xml|All valid files (*.*)|*.*";
|
||||
openFileDialog.FilterIndex = 0;
|
||||
openFileDialog.RestoreDirectory = true;
|
||||
|
||||
Dictionary<string, object> settingsDict = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
if (DialogResult.OK == openFileDialog.ShowDialog())
|
||||
{
|
||||
XMLSettings xmlSettings = new XMLSettings(openFileDialog.FileName);
|
||||
settingsDict = xmlSettings.getParametriDict();
|
||||
|
||||
|
||||
settingsDict = bindSettings(settingsDict);
|
||||
setLogoMiniature();
|
||||
this.Text = string.Format("Image Catalog - {0}", openFileDialog.FileName);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void setLogoMiniature()
|
||||
{
|
||||
if (File.Exists(TextBox10.Text))
|
||||
{
|
||||
|
||||
PictureBox1.Image = Image.FromFile(TextBox10.Text);
|
||||
if (PictureBox1.Image.Height >= PictureBox1.Image.Width)
|
||||
{
|
||||
PictureBox1.Height = 160;
|
||||
PictureBox1.Width = Convert.ToInt32(160 * PictureBox1.Image.Width / PictureBox1.Image.Height);
|
||||
}
|
||||
else
|
||||
{
|
||||
PictureBox1.Width = 224;
|
||||
PictureBox1.Height = Convert.ToInt32(224 * PictureBox1.Image.Height / PictureBox1.Image.Width);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Dictionary<string, object> bindSettings(Dictionary<string, object> dict)
|
||||
{
|
||||
|
||||
txtSorgente.Text = dict["dirSorgente"].ToString();
|
||||
txtDestinazione.Text = dict["dirDestinazione"].ToString();
|
||||
chkAggiornaSottodirectory.Checked = Convert.ToBoolean(dict["DirSottoDirectory"]);
|
||||
|
||||
chkCreaSottocartelle.Checked = Convert.ToBoolean(dict["dirDividiDestinazione"]);
|
||||
txtFilePerCartella.Text = dict["dirDividiNumFile"].ToString();
|
||||
txtSuffissoCartelle.Text = dict["dirDividiSuffisso"].ToString();
|
||||
txtCifreContatore.Text = dict["dirDividiNumCifre"].ToString();
|
||||
|
||||
if (dict["dirDividiTipoNumerazione"].ToString().ToUpper() == "PROGRESSIVA")
|
||||
rdbNumProgressiva.Checked = true;
|
||||
else
|
||||
rdbNumFiles.Checked = true;
|
||||
|
||||
CheckBox1.Checked = Convert.ToBoolean(dict["miniatureCrea"]);
|
||||
TextBox3.Text = dict["miniatureSuffisso"].ToString();
|
||||
TextBox5.Text = dict["miniatureAltezza"].ToString();
|
||||
TextBox6.Text = dict["miniatureLarghezza"].ToString();
|
||||
RadioButton3.Checked = Convert.ToBoolean(dict["miniatureAddScritta"]);
|
||||
RadioButton4.Checked = Convert.ToBoolean(dict["miniatureAddOrario"]);
|
||||
|
||||
TextBox27.Text = dict["fotoAltezza"].ToString();
|
||||
TextBox28.Text = dict["fotoLarghezza"].ToString();
|
||||
|
||||
TextBox11.Text = dict["fontDimensione"].ToString();
|
||||
TextBox25.Text = dict["fontDimensioneMiniatura"].ToString();
|
||||
CheckBox3.Checked = Convert.ToBoolean(dict["fontBold"]);
|
||||
ComboBox3.Text = dict["fontNome"].ToString();
|
||||
|
||||
TextBox4.Text = dict["testoTesto"].ToString();
|
||||
TextBox9.Text = dict["testoTrasparente"].ToString();
|
||||
TextBox12.Text = dict["testoMargine"].ToString();
|
||||
ComboBox1.Text = dict["testoPosizione"].ToString();
|
||||
ComboBox2.Text = dict["testoAllineamento"].ToString();
|
||||
|
||||
TextBox10.Text = dict["marchioFile"].ToString();
|
||||
TextBox14.Text = dict["marchioAltezza"].ToString();
|
||||
TextBox15.Text = dict["marchioLarghezza"].ToString();
|
||||
TextBox16.Text = dict["marchioMargine"].ToString();
|
||||
ComboBox4.Text = dict["marchioAllOrizzontale"].ToString();
|
||||
ComboBox5.Text = dict["marchioAllVerticale"].ToString();
|
||||
TextBox19.Text = dict["marchioTrasparenza"].ToString();
|
||||
CheckBox5.Checked = Convert.ToBoolean(dict["MarchioAggiungi"]);
|
||||
|
||||
CheckBox7.Checked = Convert.ToBoolean(dict["tempoGara"]);
|
||||
CheckBox8.Checked = Convert.ToBoolean(dict["orario"]);
|
||||
TextBox18.Text = dict["etichettaOrario"].ToString();
|
||||
|
||||
chkForzaJpg.Checked = Convert.ToBoolean(dict["generaleForzaJpg"]);
|
||||
chkRotazioneAutomatica.Checked = Convert.ToBoolean(dict["generaleRotazioneAutomatica"]);
|
||||
|
||||
TextBox30.Text = dict["grandezzaVerticale"].ToString();
|
||||
TextBox31.Text = dict["margineVerticale"].ToString();
|
||||
CheckBox15.Checked = Convert.ToBoolean(dict["dimensioniOriginali"]);
|
||||
TextBox29.Text = dict["testoVerticale"].ToString();
|
||||
RadioButton6.Checked = Convert.ToBoolean(dict["nomeMiniatura"]);
|
||||
CheckBox16.Checked = Convert.ToBoolean(dict["dataFoto"]);
|
||||
CheckBox17.Checked = Convert.ToBoolean(dict["numeroFoto"]);
|
||||
|
||||
|
||||
RadioButton5.Checked = Convert.ToBoolean(dict["tempoSmall"]);
|
||||
RadioButton7.Checked = Convert.ToBoolean(dict["numTempoSmall"]);
|
||||
|
||||
TextBox32.Text = dict["compressioneJpeg"].ToString();
|
||||
TextBox33.Text = dict["compressioneJpegMiniatura"].ToString();
|
||||
|
||||
TextBox34.Text = dict["coloreTestoRGB"].ToString();
|
||||
|
||||
|
||||
|
||||
return dict;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void caricaImpostazioniToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
makeSettingsFromFile();
|
||||
}
|
||||
|
||||
private void btnStopCreazione_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void informazioniToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
AboutForm about = new AboutForm();
|
||||
about.Show();
|
||||
}
|
||||
|
||||
private void CheckBox2_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (CheckBox2.Checked)
|
||||
panelTesto.Enabled = true;
|
||||
else
|
||||
panelTesto.Enabled = false;
|
||||
}
|
||||
|
||||
private void CheckBox1_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (CheckBox1.Checked)
|
||||
panelMiniature.Enabled = true;
|
||||
else
|
||||
panelMiniature.Enabled = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
123
ImageCatalogCS/MainForm.resx
Normal file
123
ImageCatalogCS/MainForm.resx
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
<?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>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
92
ImageCatalogCS/PicSettings.cs
Normal file
92
ImageCatalogCS/PicSettings.cs
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ImageCatalogCS
|
||||
{
|
||||
static class PicSettings
|
||||
{
|
||||
// Root
|
||||
public static string directorySorgente { get; set; }
|
||||
public static string directoryDestinazione { get; set; }
|
||||
|
||||
public static int dimVert { get; set; }
|
||||
public static int margVert { get; set; }
|
||||
|
||||
public static int dimStandard { get; set; }
|
||||
public static int dimStandardMiniatura { get; set; }
|
||||
|
||||
public static bool NomeData { get; set; }
|
||||
public static bool TestoNome { get; set; }
|
||||
public static bool UsaOrarioMiniatura { get; set; }
|
||||
public static bool UsaOrarioTestoApplicare { get; set; }
|
||||
public static bool UsaTempoGaraTestoApplicare { get; set; }
|
||||
public static string TestoFirmaStart { get; set; }
|
||||
public static string TestoFirmaStartV { get; set; }
|
||||
public static DateTime DataPartenza { get; set; }
|
||||
|
||||
public static string TestoOrario { get; set; }
|
||||
public static bool UsaRotazioneAutomatica { get; set; }
|
||||
|
||||
public static bool UsaForzaJpg { get; set; }
|
||||
public static int LarghezzaSmall { get; set; }
|
||||
|
||||
public static int AltezzaSmall { get; set; }
|
||||
public static bool CreaMiniature { get; set; }
|
||||
public static bool AggiungiScritteMiniature { get; set; }
|
||||
public static bool AggTempoGaraMin { get; set; }
|
||||
|
||||
public static bool AggNumTempMin { get; set; }
|
||||
public static string Suffisso { get; set; }
|
||||
|
||||
public static string Codice { get; set; }
|
||||
public static int Trasparenza { get; set; }
|
||||
public static string IlFont { get; set; }
|
||||
|
||||
public static bool Grassetto { get; set; }
|
||||
public static string Posizione { get; set; }
|
||||
public static string Allineamento { get; set; }
|
||||
|
||||
public static int Margine { get; set; }
|
||||
public static int LogoAltezza { get; set; }
|
||||
|
||||
public static int LogoLarghezza { get; set; }
|
||||
|
||||
public static Color fontColoreRGB { get; set; }
|
||||
public static bool LogoAggiungi { get; set; }
|
||||
public static string LogoNomeFile { get; set; }
|
||||
public static string LogoTrasparenza { get; set; }
|
||||
public static string LogoMargine { get; set; }
|
||||
public static string LogoPosizioneH { get; set; }
|
||||
|
||||
public static string LogoPosizioneV { get; set; }
|
||||
public static bool FotoGrandeDimOrigina { get; set; }
|
||||
public static int AltezzaBig { get; set; }
|
||||
public static int LarghezzaBig { get; set; }
|
||||
public static DirectoryInfo DestDir { get; set; }
|
||||
|
||||
public static int DimMin { get; set; }
|
||||
|
||||
public static bool TestoMin { get; set; }
|
||||
public static bool SecretDefault { get; set; }
|
||||
public static bool SecretBig { get; set; }
|
||||
|
||||
public static bool SecretSmall { get; set; }
|
||||
public static string SecretPathSmall { get; set; }
|
||||
|
||||
public static string SecretPathBig { get; set; }
|
||||
public static long jpegQuality { get; set; }
|
||||
|
||||
public static long jpegQualityMin { get; set; }
|
||||
public static bool FotoRuotaADestra { get; set; } // Default False
|
||||
|
||||
public static bool FotoRuotaASinistra { get; set; } // Default False
|
||||
|
||||
public static string TempMinText { get; set; } // Default ""
|
||||
public static MainForm mainForm { get; set; }
|
||||
}
|
||||
}
|
||||
22
ImageCatalogCS/Program.cs
Normal file
22
ImageCatalogCS/Program.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ImageCatalogCS
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new MainForm());
|
||||
}
|
||||
}
|
||||
}
|
||||
36
ImageCatalogCS/Properties/AssemblyInfo.cs
Normal file
36
ImageCatalogCS/Properties/AssemblyInfo.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("ImageCatalogCS")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("ImageCatalogCS")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2012")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("00b0a7a5-0de0-48e6-b0c9-ec214aa338dd")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
71
ImageCatalogCS/Properties/Resources.Designer.cs
generated
Normal file
71
ImageCatalogCS/Properties/Resources.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18010
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ImageCatalogCS.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ImageCatalogCS.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
117
ImageCatalogCS/Properties/Resources.resx
Normal file
117
ImageCatalogCS/Properties/Resources.resx
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
<?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.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: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" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
30
ImageCatalogCS/Properties/Settings.Designer.cs
generated
Normal file
30
ImageCatalogCS/Properties/Settings.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18010
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ImageCatalogCS.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7
ImageCatalogCS/Properties/Settings.settings
Normal file
7
ImageCatalogCS/Properties/Settings.settings
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
32
ImageCatalogCS/Temperature.cs
Normal file
32
ImageCatalogCS/Temperature.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Management;
|
||||
|
||||
|
||||
|
||||
namespace ImageCatalogCS
|
||||
{
|
||||
public class Temperature
|
||||
{
|
||||
public double CurrentValue { get; set; }
|
||||
public string InstanceName { get; set; }
|
||||
public static List<Temperature> Temperatures
|
||||
{
|
||||
get
|
||||
{
|
||||
List<Temperature> result = new List<Temperature>();
|
||||
ManagementObjectSearcher searcher = new ManagementObjectSearcher(@"root\WMI", "SELECT * FROM MSAcpi_ThermalZoneTemperature");
|
||||
foreach (ManagementObject obj in searcher.Get())
|
||||
{
|
||||
Double temp = Convert.ToDouble(obj["CurrentTemperature"].ToString());
|
||||
temp = (temp - 2732) / 10.0;
|
||||
result.Add(new Temperature { CurrentValue = temp, InstanceName = obj["InstanceName"].ToString() });
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
208
ImageCatalogCS/XMLSettings.cs
Normal file
208
ImageCatalogCS/XMLSettings.cs
Normal file
|
|
@ -0,0 +1,208 @@
|
|||
using Microsoft.VisualBasic;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
|
||||
public class XMLSettings
|
||||
{
|
||||
|
||||
|
||||
private DataSet _ElencoParametri;
|
||||
|
||||
private string _NomeFileSetup;
|
||||
public XMLSettings(string FileSetup)
|
||||
{
|
||||
_ElencoParametri = new DataSet();
|
||||
_NomeFileSetup = FileSetup;
|
||||
|
||||
if (!string.IsNullOrEmpty(FileSetup))
|
||||
{
|
||||
CaricaParametriSetup();
|
||||
}
|
||||
}
|
||||
|
||||
public XMLSettings()
|
||||
{
|
||||
_ElencoParametri = new DataSet();
|
||||
_NomeFileSetup = "";
|
||||
}
|
||||
|
||||
public void CaricaParametriSetup()
|
||||
{
|
||||
_ElencoParametri = LeggiXmlDataSet("Setup", _NomeFileSetup, "Nome");
|
||||
}
|
||||
|
||||
public void SalvaParametriSetup()
|
||||
{
|
||||
if (System.IO.File.Exists(_NomeFileSetup) == true)
|
||||
{
|
||||
File.Delete(_NomeFileSetup);
|
||||
}
|
||||
_ElencoParametri.WriteXml(_NomeFileSetup);
|
||||
}
|
||||
|
||||
public Dictionary<string, object> getParametriDict()
|
||||
{
|
||||
CaricaParametriSetup();
|
||||
Dictionary<string, object> dictParam = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
//DataRow[] LElenco = _ElencoParametri.Tables["Setup"].Select("Nome='" + NomeParametro + "'");
|
||||
//DataTable table = _ElencoParametri.Tables["Setup"];
|
||||
|
||||
foreach (DataRow row in _ElencoParametri.Tables["Setup"].Rows)
|
||||
{
|
||||
dictParam.Add(row["Nome"].ToString(), row["Valore"]);
|
||||
}
|
||||
|
||||
return dictParam;
|
||||
}
|
||||
|
||||
public string LeggiParametroString(string NomeParametro)
|
||||
{
|
||||
string Risposta = "";
|
||||
|
||||
try
|
||||
{
|
||||
DataRow[] LElenco = _ElencoParametri.Tables["Setup"].Select("Nome='" + NomeParametro + "'");
|
||||
|
||||
DataRow LaRiga = null;
|
||||
foreach (DataRow LaRiga_loopVariable in LElenco)
|
||||
{
|
||||
LaRiga = LaRiga_loopVariable;
|
||||
Risposta = LaRiga["Valore"].ToString();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
Risposta = "";
|
||||
}
|
||||
|
||||
return Risposta;
|
||||
}
|
||||
|
||||
public bool LeggiParametroBoolean(string NomeParametro)
|
||||
{
|
||||
string Risposta = "";
|
||||
|
||||
try
|
||||
{
|
||||
DataRow[] LElenco = _ElencoParametri.Tables["Setup"].Select("Nome='" + NomeParametro + "'");
|
||||
|
||||
DataRow LaRiga = null;
|
||||
foreach (DataRow LaRiga_loopVariable in LElenco)
|
||||
{
|
||||
LaRiga = LaRiga_loopVariable;
|
||||
Risposta = LaRiga["Valore"].ToString();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
Risposta = "";
|
||||
}
|
||||
|
||||
switch (Risposta.ToUpper())
|
||||
{
|
||||
case "TRUE":
|
||||
case "OK":
|
||||
case "SI":
|
||||
case "1":
|
||||
case "YES":
|
||||
case "VERO":
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void AggiornaParametro(string NomeParametro, object ValoreParametro)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (_ElencoParametri.Tables["Setup"] == null)
|
||||
{
|
||||
DataTable TabellaTmp = new DataTable("Setup");
|
||||
DataRow RigaTmp = null;
|
||||
|
||||
DataColumn LaColonna = null;
|
||||
LaColonna = TabellaTmp.Columns.Add("Nome", System.Type.GetType("System.String"));
|
||||
LaColonna = TabellaTmp.Columns.Add("Valore", System.Type.GetType("System.String"));
|
||||
|
||||
//* Aggiunge alla tabella tutte le righe
|
||||
RigaTmp = TabellaTmp.NewRow();
|
||||
RigaTmp["Nome"] = NomeParametro;
|
||||
RigaTmp["Valore"] = ValoreParametro;
|
||||
TabellaTmp.Rows.Add(RigaTmp);
|
||||
|
||||
_ElencoParametri.Tables.Add(TabellaTmp);
|
||||
}
|
||||
else
|
||||
{
|
||||
DataRow[] LElenco = _ElencoParametri.Tables["Setup"].Select("Nome='" + NomeParametro + "'");
|
||||
|
||||
if (LElenco.Length == 0)
|
||||
{
|
||||
DataRow LaRiga = null;
|
||||
LaRiga = _ElencoParametri.Tables["Setup"].NewRow();
|
||||
LaRiga["Nome"] = NomeParametro;
|
||||
LaRiga["Valore"] = ValoreParametro;
|
||||
_ElencoParametri.Tables["Setup"].Rows.Add(LaRiga);
|
||||
}
|
||||
else
|
||||
{
|
||||
LElenco[0]["Valore"] = ValoreParametro;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private DataTable LeggiXmlDataTable(string NomeTabella, string NomeFileXml, string NomeColonnaChiave = "")
|
||||
{
|
||||
//* Crea e Legge il dataset dal file xml
|
||||
System.Data.DataSet DataSetXml = new System.Data.DataSet();
|
||||
DataSetXml.ReadXml(NomeFileXml);
|
||||
|
||||
//* Aggiunge il campo chiave
|
||||
if (!string.IsNullOrEmpty(NomeColonnaChiave))
|
||||
{
|
||||
DataSetXml.Tables[NomeTabella].Constraints.Add(NomeColonnaChiave, DataSetXml.Tables[NomeTabella].Columns[NomeColonnaChiave], true);
|
||||
}
|
||||
|
||||
//* Restituisce la risposta
|
||||
return DataSetXml.Tables[NomeTabella];
|
||||
}
|
||||
|
||||
private static DataSet LeggiXmlDataSet(string NomeTabella, string NomeFileXml, string NomeColonnaChiave = "")
|
||||
{
|
||||
//* Crea e Legge il dataset dal file xml
|
||||
DataSet DataSetXml = new DataSet();
|
||||
DataSetXml.ReadXml(NomeFileXml);
|
||||
|
||||
//* Aggiunge il campo chiave
|
||||
if (!string.IsNullOrEmpty(NomeColonnaChiave))
|
||||
{
|
||||
DataSetXml.Tables[NomeTabella].Constraints.Add(NomeColonnaChiave, DataSetXml.Tables[NomeTabella].Columns[NomeColonnaChiave], true);
|
||||
}
|
||||
|
||||
//* Restituisce la risposta
|
||||
return DataSetXml;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public string NomeFileSetup
|
||||
{
|
||||
get { return _NomeFileSetup; }
|
||||
set { _NomeFileSetup = value; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
251
ImageCatalogCS/XYThreadPool.cs
Normal file
251
ImageCatalogCS/XYThreadPool.cs
Normal file
|
|
@ -0,0 +1,251 @@
|
|||
using Microsoft.VisualBasic;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
|
||||
using System.Threading;
|
||||
|
||||
public delegate void ThreadErrorHandlerDelegate(ThreadPoolWorkItem oWorkItem, Exception oError);
|
||||
|
||||
public class ThreadPoolWorkItem
|
||||
{
|
||||
public bool m_bStoreOutput = false;
|
||||
public string m_sName = "";
|
||||
public Delegate m_pMethod = null;
|
||||
public object[] m_pInput = null;
|
||||
public object m_oOutput = null;
|
||||
public Exception m_oException = null;
|
||||
public ThreadPoolWorkItem()
|
||||
{
|
||||
}
|
||||
public ThreadPoolWorkItem(string sName, Delegate pMethod, object[] pInput, bool bStoreOutput)
|
||||
{
|
||||
m_sName = sName;
|
||||
m_pMethod = pMethod;
|
||||
m_pInput = pInput;
|
||||
m_bStoreOutput = bStoreOutput;
|
||||
}
|
||||
}
|
||||
|
||||
public class XYThreadPool
|
||||
{
|
||||
private Hashtable m_htThreads = new Hashtable(256);
|
||||
private int m_nMinThreadCount = 5;
|
||||
private int m_nMaxThreadCount = 10;
|
||||
private int m_nShutdownPause = 200;
|
||||
private int m_nServerPause = 25;
|
||||
private bool m_bContinue = false;
|
||||
private static Exception m_oException = null;
|
||||
private Queue m_qInput = new Queue(1024);
|
||||
private Queue m_qOutput = new Queue(1024);
|
||||
private Delegate m_delegateThreadErrorHandler = new ThreadErrorHandlerDelegate(OnThreadError);
|
||||
private void ThreadProc()
|
||||
{
|
||||
while (m_bContinue)
|
||||
{
|
||||
object obj = null;
|
||||
Monitor.Enter(this);
|
||||
if (m_qInput.Count > 0)
|
||||
obj = m_qInput.Dequeue();
|
||||
Monitor.Exit(this);
|
||||
if (obj == null)
|
||||
{
|
||||
bool bQuit = false;
|
||||
Monitor.Enter(this);
|
||||
if (m_htThreads.Count > m_nMinThreadCount)
|
||||
{
|
||||
m_htThreads.Remove(Thread.CurrentThread.Name);
|
||||
bQuit = true;
|
||||
}
|
||||
Monitor.Exit(this);
|
||||
if (bQuit)
|
||||
return;
|
||||
Thread.Sleep(10 * m_nServerPause);
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolWorkItem oWorkItem = (ThreadPoolWorkItem)obj;
|
||||
//oWorkItem.m_oOutput = oWorkItem.m_pMethod.DynamicInvoke(oWorkItem.m_pInput)
|
||||
try
|
||||
{
|
||||
oWorkItem.m_oOutput = oWorkItem.m_pMethod.DynamicInvoke(oWorkItem.m_pInput);
|
||||
}
|
||||
catch (Exception oBug)
|
||||
{
|
||||
if ((m_delegateThreadErrorHandler != null))
|
||||
{
|
||||
try
|
||||
{
|
||||
object[] pInput = {
|
||||
oWorkItem,
|
||||
oBug
|
||||
};
|
||||
m_delegateThreadErrorHandler.DynamicInvoke(pInput);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
if (oWorkItem.m_bStoreOutput)
|
||||
{
|
||||
Monitor.Enter(m_qOutput);
|
||||
m_qOutput.Enqueue(oWorkItem);
|
||||
Monitor.Exit(m_qOutput);
|
||||
}
|
||||
Thread.Sleep(m_nServerPause);
|
||||
}
|
||||
}
|
||||
}
|
||||
private static void OnThreadError(ThreadPoolWorkItem oWorkItem, Exception oError)
|
||||
{
|
||||
if (oWorkItem == null)
|
||||
{
|
||||
m_oException = oError;
|
||||
}
|
||||
else
|
||||
{
|
||||
oWorkItem.m_oException = oError;
|
||||
}
|
||||
}
|
||||
public void SetThreadErrorHandler(ThreadErrorHandlerDelegate pMethod)
|
||||
{
|
||||
Monitor.Enter(this);
|
||||
m_delegateThreadErrorHandler = pMethod;
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
public void SetServerPause(int nMilliseconds)
|
||||
{
|
||||
Monitor.Enter(this);
|
||||
if (nMilliseconds > 9 & nMilliseconds < 101)
|
||||
m_nServerPause = nMilliseconds;
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
public void SetShutdownPause(int nMilliseconds)
|
||||
{
|
||||
Monitor.Enter(this);
|
||||
m_nShutdownPause = nMilliseconds;
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
public Exception GetException()
|
||||
{
|
||||
return m_oException;
|
||||
}
|
||||
public void InsertWorkItem(ThreadPoolWorkItem oWorkItem)
|
||||
{
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this);
|
||||
m_qInput.Enqueue(oWorkItem);
|
||||
if (m_bContinue && m_qInput.Count > m_htThreads.Count && m_htThreads.Count < m_nMaxThreadCount)
|
||||
{
|
||||
Thread th = new Thread(ThreadProc);
|
||||
th.Name = Guid.NewGuid().ToString();
|
||||
m_htThreads.Add(th.Name, th);
|
||||
th.Start();
|
||||
}
|
||||
}
|
||||
catch (Exception oBug)
|
||||
{
|
||||
m_oException = oBug;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
public void InsertWorkItem(string sName, Delegate pMethod, object[] pArgs, bool bStoreOutput)
|
||||
{
|
||||
InsertWorkItem(new ThreadPoolWorkItem(sName, pMethod, pArgs, bStoreOutput));
|
||||
}
|
||||
public ThreadPoolWorkItem ExtractWorkItem()
|
||||
{
|
||||
object oWorkItem = null;
|
||||
Monitor.Enter(m_qOutput);
|
||||
if (m_qOutput.Count > 0)
|
||||
oWorkItem = m_qOutput.Dequeue();
|
||||
Monitor.Exit(m_qOutput);
|
||||
if (oWorkItem == null)
|
||||
return null;
|
||||
return (ThreadPoolWorkItem)oWorkItem;
|
||||
}
|
||||
public bool StartThreadPool(int nMinThreadCount = 5, int nMaxThreadCount = 10)
|
||||
{
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this);
|
||||
if (m_bContinue == false)
|
||||
{
|
||||
m_bContinue = true;
|
||||
if (nMinThreadCount > 0)
|
||||
{
|
||||
m_nMinThreadCount = nMinThreadCount;
|
||||
}
|
||||
if (nMaxThreadCount > m_nMinThreadCount)
|
||||
{
|
||||
m_nMaxThreadCount = nMaxThreadCount;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_nMaxThreadCount = 2 * m_nMinThreadCount;
|
||||
}
|
||||
int i = 0;
|
||||
for (i = 1; i <= m_nMinThreadCount; i++)
|
||||
{
|
||||
Thread th = new Thread(ThreadProc);
|
||||
th.Name = Guid.NewGuid().ToString();
|
||||
m_htThreads.Add(th.Name, th);
|
||||
th.Start();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (Exception oBug)
|
||||
{
|
||||
m_bContinue = false;
|
||||
m_oException = oBug;
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
public void StopThreadPool()
|
||||
{
|
||||
Monitor.Enter(this);
|
||||
m_bContinue = false;
|
||||
Thread.Sleep(Math.Max(200, m_nShutdownPause));
|
||||
if ((m_nShutdownPause > 0))
|
||||
{
|
||||
IDictionaryEnumerator dict = m_htThreads.GetEnumerator();
|
||||
while (dict.MoveNext())
|
||||
{
|
||||
Thread th = (Thread)dict.Value;
|
||||
if (th.IsAlive)
|
||||
{
|
||||
try
|
||||
{
|
||||
th.Abort();
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
m_htThreads.Clear();
|
||||
m_qInput.Clear();
|
||||
// m_qOutput.Clear()
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
public int GetThreadCount()
|
||||
{
|
||||
Monitor.Enter(this);
|
||||
int nCount = m_htThreads.Count;
|
||||
Monitor.Exit(this);
|
||||
return nCount;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue