init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
7
Kreta.Job.Tasks/Helpers/Iktatas/AlszamosIktatasData.cs
Normal file
7
Kreta.Job.Tasks/Helpers/Iktatas/AlszamosIktatasData.cs
Normal file
|
@ -0,0 +1,7 @@
|
|||
namespace Kreta.Job.Tasks.Helpers.Iktatas
|
||||
{
|
||||
public class AlszamosIktatasData : FoszamosIktatasData
|
||||
{
|
||||
public int Foszam { get; set; }
|
||||
}
|
||||
}
|
11
Kreta.Job.Tasks/Helpers/Iktatas/FeltoltesUjVerzioData.cs
Normal file
11
Kreta.Job.Tasks/Helpers/Iktatas/FeltoltesUjVerzioData.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
namespace Kreta.Job.Tasks.Helpers.Iktatas
|
||||
{
|
||||
public class FeltoltesUjVerzioData
|
||||
{
|
||||
public string PoszeidonAzonosito { get; set; }
|
||||
public string DokumentumNev { get; set; }
|
||||
public string DokumentumTipus { get; set; }
|
||||
public byte[] Tartalom { get; set; }
|
||||
public string ElektronikusPeldanyId { get; set; }
|
||||
}
|
||||
}
|
19
Kreta.Job.Tasks/Helpers/Iktatas/FoszamosIktatasData.cs
Normal file
19
Kreta.Job.Tasks/Helpers/Iktatas/FoszamosIktatasData.cs
Normal file
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.Job.Tasks.Helpers.Iktatas
|
||||
{
|
||||
[Serializable]
|
||||
public class FoszamosIktatasData
|
||||
{
|
||||
public string PoszeidonAzonosito { get; set; }
|
||||
public string Targy { get; set; }
|
||||
public Dictionary<string, string> Kulcsszavak { get; set; }
|
||||
public string DokumentumNev { get; set; }
|
||||
public string DokumentumTipus { get; set; }
|
||||
public byte[] Tartalom { get; set; }
|
||||
public int IktatoId { get; set; }
|
||||
public int PartnerId { get; set; }
|
||||
public string ParentJobId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.Job.Tasks.Helpers.Iktatas
|
||||
{
|
||||
public class WordIktatoszamVonalkodTextReplacer : Aspose.Words.Replacing.IReplacingCallback
|
||||
{
|
||||
public List<Aspose.Words.Run> nodes = new List<Aspose.Words.Run>();
|
||||
|
||||
Aspose.Words.Replacing.ReplaceAction Aspose.Words.Replacing.IReplacingCallback.Replacing(Aspose.Words.Replacing.ReplacingArgs e)
|
||||
{
|
||||
// This is a Run node that contains either the beginning or the complete match.
|
||||
Aspose.Words.Node currentNode = e.MatchNode;
|
||||
|
||||
// The first (and may be the only) run can contain text before the match,
|
||||
// in this case it is necessary to split the run.
|
||||
if (e.MatchOffset > 0)
|
||||
currentNode = SplitRun((Aspose.Words.Run)currentNode, e.MatchOffset);
|
||||
|
||||
System.Collections.ArrayList runs = new System.Collections.ArrayList();
|
||||
|
||||
// Find all runs that contain parts of the match string.
|
||||
int remainingLength = e.Match.Value.Length;
|
||||
while (
|
||||
|
||||
(remainingLength > 0) &&
|
||||
|
||||
(currentNode != null) &&
|
||||
|
||||
(currentNode.GetText().Length <= remainingLength))
|
||||
{
|
||||
|
||||
runs.Add(currentNode);
|
||||
|
||||
remainingLength -= currentNode.GetText().Length;
|
||||
|
||||
// Select the next Run node.
|
||||
// Have to loop because there could be other nodes such as BookmarkStart etc.
|
||||
do
|
||||
{
|
||||
currentNode = currentNode.NextSibling;
|
||||
}
|
||||
while ((currentNode != null) && (currentNode.NodeType != Aspose.Words.NodeType.Run));
|
||||
}
|
||||
|
||||
// Split the last run that contains the match if there is any text left.
|
||||
if ((currentNode != null) && (remainingLength > 0))
|
||||
{
|
||||
SplitRun((Aspose.Words.Run)currentNode, remainingLength);
|
||||
runs.Add(currentNode);
|
||||
}
|
||||
|
||||
String runText = "";
|
||||
foreach (Aspose.Words.Run run in runs)
|
||||
runText += run.Text;
|
||||
|
||||
((Aspose.Words.Run)runs[0]).Text = runText;
|
||||
|
||||
for (int i = 1; i < runs.Count; i++)
|
||||
{
|
||||
((Aspose.Words.Run)runs[i]).Remove();
|
||||
}
|
||||
|
||||
((Aspose.Words.Run)runs[0]).Font.Color = System.Drawing.Color.Black;
|
||||
if (e.Match.Value == "{vonalkod}")
|
||||
{
|
||||
((Aspose.Words.Run)runs[0]).Font.Name = "Code 128";
|
||||
}
|
||||
|
||||
nodes.Add((Aspose.Words.Run)runs[0]);
|
||||
|
||||
return Aspose.Words.Replacing.ReplaceAction.Replace;
|
||||
}
|
||||
|
||||
private static Aspose.Words.Run SplitRun(Aspose.Words.Run run, int position)
|
||||
{
|
||||
Aspose.Words.Run afterRun = (Aspose.Words.Run)run.Clone(true);
|
||||
afterRun.Text = run.Text.Substring(position);
|
||||
run.Text = run.Text.Substring(0, position);
|
||||
run.ParentNode.InsertAfter(afterRun, run);
|
||||
return afterRun;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue