Skip to content

Commit 7fa8251

Browse files
committed
New feature in filter window: use existing or set new tag.
1 parent 3d6ca7c commit 7fa8251

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+3965
-1645
lines changed

ObjectsMembers.xlsx

25.8 KB
Binary file not shown.

TrClient.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1010
.editorconfig = .editorconfig
1111
EndProjectSection
1212
EndProject
13+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrClient2", "TrClient2\TrClient2.csproj", "{206719EA-0DB1-4C4A-A3A3-22F5D1DB6B1A}"
14+
EndProject
1315
Global
1416
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1517
Debug|Any CPU = Debug|Any CPU
@@ -20,6 +22,10 @@ Global
2022
{F0C0954C-7A6D-4B0A-B159-0399B83A789F}.Debug|Any CPU.Build.0 = Debug|Any CPU
2123
{F0C0954C-7A6D-4B0A-B159-0399B83A789F}.Release|Any CPU.ActiveCfg = Release|Any CPU
2224
{F0C0954C-7A6D-4B0A-B159-0399B83A789F}.Release|Any CPU.Build.0 = Release|Any CPU
25+
{206719EA-0DB1-4C4A-A3A3-22F5D1DB6B1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
26+
{206719EA-0DB1-4C4A-A3A3-22F5D1DB6B1A}.Debug|Any CPU.Build.0 = Debug|Any CPU
27+
{206719EA-0DB1-4C4A-A3A3-22F5D1DB6B1A}.Release|Any CPU.ActiveCfg = Release|Any CPU
28+
{206719EA-0DB1-4C4A-A3A3-22F5D1DB6B1A}.Release|Any CPU.Build.0 = Release|Any CPU
2329
EndGlobalSection
2430
GlobalSection(SolutionProperties) = preSolution
2531
HideSolutionNode = FALSE

TrClient/ClassDiagram.cd

Lines changed: 0 additions & 81 deletions
This file was deleted.

TrClient/Core/TrCollection.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ namespace TrClient.Core
1717

1818
public class TrCollection : IComparable, INotifyPropertyChanged
1919
{
20-
public string TrpDocuments = "https://transkribus.eu/TrpServer/rest/collections/_ColID_/list.xml";
20+
public string TrpDocuments = Properties.Resources.TrpServerBaseAddress + Properties.Resources.TrpServerPathDocumentsList;
21+
// "https://transkribus.eu/TrpServer/rest/collections/_ColID_/list.xml";
2122

2223
private string name = string.Empty;
2324

@@ -365,7 +366,7 @@ public void Upload(HttpClient currentClient)
365366
//{
366367
// XDocument xAccessionsDoc = new XDocument(
367368
// new XDeclaration("1.0", "UTF-8", "yes"),
368-
// new XComment("Created by Transkribus Client - The Royal Danish Library"));
369+
// new XComment("Created by Transkribus httpClient - The Royal Danish Library"));
369370

370371
// XElement xRoot = new XElement("Root");
371372

TrClient/Core/TrDocument.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ namespace TrClient.Core
2323

2424
public class TrDocument : IComparable, INotifyPropertyChanged
2525
{
26-
public string TrpPages = "https://transkribus.eu/TrpServer/rest/collections/_ColID_/_DocID_/fulldoc.xml";
26+
public string TrpPages = Properties.Resources.TrpServerBaseAddress + Properties.Resources.TrpServerPathPagesList;
27+
// "https://transkribus.eu/TrpServer/rest/collections/_ColID_/_DocID_/fulldoc.xml";
2728

2829
public string Folder { get; set; }
2930

@@ -342,7 +343,7 @@ public string KOBACC_GetYear()
342343
//{
343344
// XDocument xAccessionsDoc = new XDocument(
344345
// new XDeclaration("1.0", "UTF-8", "yes"),
345-
// new XComment("Created by Transkribus Client - The Royal Danish Library"));
346+
// new XComment("Created by Transkribus httpClient - The Royal Danish Library"));
346347

347348
// XElement xRoot = new XElement("Root");
348349

TrClient/Core/TrPage.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,15 @@ public TrPage(string pageID, int iPageNr, string pageFileName, string imageFileU
369369

370370
Transcripts.ParentPage = this;
371371
IsLoaded = false;
372+
//Transcripts[0].TestEventHandler += TrPage_TestEventHandler;
372373
}
373374

375+
//private void TrPage_TestEventHandler(object sender, EventArgs e)
376+
//{
377+
// Debug.Print("Page: Not Implemented");
378+
// throw new NotImplementedException();
379+
//}
380+
374381
// constructor OFFLINE
375382
//public TrPage(string pageID, int iPageNr, string pageFileName, string imageFileURL, int pageW, int pageH, string pageFile)
376383
//{

TrClient/Core/TrRegion2.cs

Lines changed: 0 additions & 30 deletions
This file was deleted.

TrClient/Core/TrTextRegion.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -292,13 +292,13 @@ public TrParagraphs GetParagraphs()
292292
{
293293
TrParagraphs temp = new TrParagraphs();
294294
temp.ParentRegion = this;
295-
Debug.WriteLine($"TextRegion:GetP - parentregion {temp.ParentRegion.Number}");
295+
//Debug.WriteLine($"TextRegion:GetP - parentregion {temp.ParentRegion.Number}");
296296

297297
int max = TextLines.Count - 1;
298-
Debug.WriteLine($"TextRegion:GetP - max = {max}");
298+
//Debug.WriteLine($"TextRegion:GetP - max = {max}");
299299
for (int i = 0; i < max; i++)
300300
{
301-
Debug.WriteLine($"TextRegion:GetP - i = {i}");
301+
//Debug.WriteLine($"TextRegion:GetP - i = {i}");
302302

303303
TrTextLine currentLine = TextLines[i];
304304
TrTextLine nextLine = TextLines[i + 1];
@@ -312,19 +312,19 @@ public TrParagraphs GetParagraphs()
312312
}
313313
}
314314

315-
Debug.WriteLine($"TextRegion:GetP - next/previous OK");
315+
//Debug.WriteLine($"TextRegion:GetP - next/previous OK");
316316

317317
int n = 0;
318318
foreach (TrTextLine textLine in TextLines)
319319
{
320-
Debug.WriteLine($"TextRegion:GetP - foreach TL, linenumber = {textLine.Number}");
320+
//Debug.WriteLine($"TextRegion:GetP - foreach TL, linenumber = {textLine.Number}");
321321

322322
if (textLine.Previous == null && textLine.HasStructuralTag)
323323
{
324-
Debug.WriteLine($"TextRegion:GetP - TL.previous = {textLine.Previous}, TL.hasstruct = {textLine.HasStructuralTag}");
324+
//Debug.WriteLine($"TextRegion:GetP - TL.previous = {textLine.Previous}, TL.hasstruct = {textLine.HasStructuralTag}");
325325

326326
n++;
327-
Debug.WriteLine($"TextRegion:GetP - n = {n}");
327+
//Debug.WriteLine($"TextRegion:GetP - n = {n}");
328328
TrParagraph newParagraph = new TrParagraph(n, textLine);
329329
temp.Add(newParagraph);
330330
newParagraph.ParentRegion = this;
@@ -333,11 +333,11 @@ public TrParagraphs GetParagraphs()
333333

334334
if (temp == null)
335335
{
336-
Debug.WriteLine($"TextRegion:GetP - temp = null!");
336+
//Debug.WriteLine($"TextRegion:GetP - temp = null!");
337337
}
338338
else
339339
{
340-
Debug.WriteLine($"TextRegion:GetP - temp != null!");
340+
//Debug.WriteLine($"TextRegion:GetP - temp != null!");
341341
}
342342

343343
return temp;

TrClient/Core/TrTranscript.cs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,16 @@ namespace TrClient.Core
1515
using System.Xml.Linq;
1616
using TrClient.Core.Tags;
1717
using TrClient.Libraries;
18+
using System.Resources;
1819

1920
public class TrTranscript : IComparable, INotifyPropertyChanged
2021
{
22+
2123
//public string BaseURL = "https://dbis-thure.uibk.ac.at/f/Get?id=";
22-
public string BaseURL = "https://files.transkribus.eu/Get?id=";
23-
public string UploadURL = "https://transkribus.eu/TrpServer/rest/collections/_ColID_/_DocID_/_PageNr_/text?overwrite=true";
24+
public string BaseURL = Properties.Resources.TrpServerTranscriptURL; // "https://files.transkribus.eu/Get?id=";
25+
26+
//public string UploadURL = "https://transkribus.eu/TrpServer/rest/collections/_ColID_/_DocID_/_PageNr_/text?overwrite=true";
27+
public string UploadURL = Properties.Resources.TrpServerBaseAddress + Properties.Resources.TrpServerPathUpload;
2428

2529
public string PageFileName { get; set; } // bruges offline
2630

@@ -76,6 +80,13 @@ public bool IsLoaded
7680
}
7781
}
7882

83+
//public event EventHandler TestEventHandler;
84+
85+
//static void Transcripts_TestEventHandler(object sender, EventArgs e)
86+
//{
87+
// Debug.Print($"TestEventHandler: {e.ToString()}");
88+
//}
89+
7990
public XDocument TranscriptionDocument;
8091

8192
public TrRegions Regions = new TrRegions();
@@ -100,6 +111,8 @@ public bool HasChanged
100111
StatusColor = Brushes.Orange;
101112
}
102113

114+
//TestEventHandler?.Invoke(this, EventArgs.Empty);
115+
103116
NotifyPropertyChanged("HasChanged");
104117
ParentPage.HasChanged = value;
105118
if (hasChanged)
@@ -785,7 +798,7 @@ public XDocument ToXML()
785798
Regions.OrderedGroupID = "ro_" + TrLibrary.GetNewTimeStamp();
786799
}
787800

788-
// new XComment("Created by Transkribus Client - The Royal Danish Library"),
801+
// new XComment("Created by Transkribus httpClient - The Royal Danish Library"),
789802
XDocument xTranscript = new XDocument(
790803
new XDeclaration("1.0", "UTF-8", "yes"),
791804
new XElement(

0 commit comments

Comments
 (0)