Merge branch 'release-2.0.0'

This commit is contained in:
Daniel Kraus 2015-08-30 20:58:12 +02:00
commit 617961c79a
16 changed files with 141 additions and 92 deletions

View File

@ -1,3 +1,12 @@
Version 2.0.0 (2015-08-30)
========================================================================
- FEHLERBEHEBUNG: Kein Absturz mehr, wenn zwei Spalten formatiert werden.
- VERBESSERT: Kein Crash mehr, falls sich ein Komma in den Lauris-Block einschleicht.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Version 2.0.0-beta.5 (2015-08-25)
========================================================================

View File

@ -30,6 +30,7 @@ namespace Tests.Importer.ZaaImporter
{
[Test]
[TestCase("BE: 5.2 [-2 - 2] mmol/l", "BE", 5.2, "mmol/l", -2, 2, false)]
[TestCase("Comma: 5,2 [-2,1 - 2,3] mmol/l", "Comma", 5.2, "mmol/l", -2.1, 2.3, false)]
[TestCase("Natrium: 139 [135 - 145] mmol/l", "Natrium", 139, "mmol/l", 135, 145, true)]
[TestCase("Kalium: 5.2 [3.5 - 5] mmol/l", "Kalium", 5.2, "mmol/l", 3.5, 5, false)]
public void ParseLaurisWithBothLimits(

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -21,6 +21,7 @@
<meta name="descrption" content="Add-in für Microsoft Word 2010-2013,
das die Zentrale Arztbriefablage um Funktionen für das Formatieren von
Laborwerten erweitert.">
<link rel="icon" type="image/png" href="img/icon.png">
</head>
<body>
<div class="container">

View File

@ -1,4 +1,4 @@
2.0.0-beta.5
http://zaa.nephrowiki.de/downloads/zaaReloaded-2.0.0-beta.5.exe
df50175424dfbd651f6799a8561a11d02c66aa78 publish/release/zaaReloaded-2.0.0-beta.5.exe
2.0.0
http://zaa.nephrowiki.de/downloads/zaaReloaded-2.0.0.exe
6aef8b27f82c864acde1139fea2313486c3b22c1 publish/release/zaaReloaded-2.0.0.exe

View File

@ -3,17 +3,17 @@
<a1:Settings id="ref-1" xmlns:a1="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Uid xsi:type="a2:Guid" xmlns:a2="http://schemas.microsoft.com/clr/ns/System">
<_a>-1778735783</_a>
<_b>3723</_b>
<_c>18224</_c>
<_d>191</_d>
<_e>50</_e>
<_f>238</_f>
<_g>43</_g>
<_h>44</_h>
<_i>3</_i>
<_j>227</_j>
<_k>42</_k>
<_a>233768554</_a>
<_b>-10539</_b>
<_c>19865</_c>
<_d>131</_d>
<_e>252</_e>
<_f>97</_f>
<_g>190</_g>
<_h>116</_h>
<_i>107</_i>
<_j>28</_j>
<_k>144</_k>
</Uid>
<Name id="ref-3">Kopie von Standard für NepA</Name>
<ReferenceStyle xsi:type="a3:ReferenceStyle" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Formatter/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">IfSpecialItem</ReferenceStyle>
@ -29,7 +29,7 @@
</a2:UnitySerializationHolder>
<a4:SelectEachDay id="ref-5" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<ChildrenCount>19</ChildrenCount>
<ChildrenCount>21</ChildrenCount>
<Child0Type href="#ref-8"/>
<Child0Object href="#ref-9"/>
<Child1Type href="#ref-8"/>
@ -62,98 +62,110 @@
<Child14Object href="#ref-23"/>
<Child15Type href="#ref-8"/>
<Child15Object href="#ref-24"/>
<Child16Type href="#ref-25"/>
<Child16Object href="#ref-26"/>
<Child17Type href="#ref-25"/>
<Child16Type href="#ref-8"/>
<Child16Object href="#ref-25"/>
<Child17Type href="#ref-26"/>
<Child17Object href="#ref-27"/>
<Child18Type href="#ref-25"/>
<Child18Type href="#ref-26"/>
<Child18Object href="#ref-28"/>
<Child19Type href="#ref-26"/>
<Child19Object href="#ref-29"/>
<Child20Type href="#ref-8"/>
<Child20Object href="#ref-30"/>
</a4:SelectEachDay>
<a2:UnitySerializationHolder id="ref-8" xmlns:a2="http://schemas.microsoft.com/clr/ns/System">
<Data id="ref-29">zaaReloaded2.Controller.Elements.Items</Data>
<Data id="ref-31">zaaReloaded2.Controller.Elements.Items</Data>
<UnityType>4</UnityType>
<AssemblyName href="#ref-7"/>
</a2:UnitySerializationHolder>
<a4:Items id="ref-9" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Content id="ref-30">Klinische Chemie: Na, K, Cl, Mg, Ca, P, CaxP, Alb, Prot, Haptoglobin, LDH, Glukose, Harnsäure</Content>
<Content id="ref-32">Klinische Chemie: Na, K, Cl, Mg, Ca, P, CaxP, Alb, Prot, Haptoglobin, LDH, Glukose, Harnsäure</Content>
</a4:Items>
<a4:Items id="ref-10" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Content id="ref-31">Entzündung/Immunsystem: CRP, Pct, C3c, C4, Anti-DNAse B, ASL</Content>
<Content id="ref-33">Entzündung/Immunsystem: CRP, Pct, C3c, C4, Anti-DNAse B, ASL</Content>
</a4:Items>
<a4:Items id="ref-11" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Content id="ref-32">Kardiale Marker: CK, CKMB, Trop, NTproBNP</Content>
<Content id="ref-34">Kardiale Marker: CK, CKMB, Trop, NTproBNP</Content>
</a4:Items>
<a4:Items id="ref-12" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Content id="ref-33">Niere: Krea, Hst, eGFR (CKD-EPI), Cystatin C</Content>
<Content id="ref-35">Niere: Krea, Hst, eGFR (CKD-EPI)</Content>
</a4:Items>
<a4:Items id="ref-13" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Content id="ref-34">Sammelurin: SU-Proteinurie, SU-Alb, SU-CrCl, SU-HstCl, SU-GFR, SU-Natrium, SU-Zeit, SU-Volumen</Content>
<Content id="ref-36">Sammelurin: SU-Proteinurie, SU-Alb, SU-CrCl, SU-HstCl, SU-GFR, SU-Natrium, SU-Zeit, SU-Volumen</Content>
</a4:Items>
<a4:Items id="ref-14" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Content id="ref-35">Spot-Urin: TPCR, ACR, U-Ery, U-Leu, U-Bakt</Content>
<Content id="ref-37">Spot-Urin: U-TPCR, U-ACR, U-Ery, U-Leu, U-Bakt</Content>
</a4:Items>
<a4:Items id="ref-15" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Content id="ref-36">Leber: GOT, GGT, GPT, AP, Bilirubin, CHE</Content>
<Content id="ref-38">Leber: GOT, GGT, GPT, AP, Bilirubin, CHE</Content>
</a4:Items>
<a4:Items id="ref-16" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Content id="ref-37">Blutfette: TG, Chol, LDL, HDL, Lp(a)</Content>
<Content id="ref-39">Blutfette: TG, Chol, LDL, HDL, Lp(a)</Content>
</a4:Items>
<a4:Items id="ref-17" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Content id="ref-38">Hämatologie: Hb, Hkt, Reti, Leu, Thr, MCV, HbA1c, Retikulozyten, Fragmentozyten</Content>
<Content id="ref-40">Hämatologie: Hb, Hkt, Reti, Leu, Thr, MCV, HbA1c, Retikulozyten, Fragmentozyten</Content>
</a4:Items>
<a4:Items id="ref-18" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Content id="ref-39">Gerinnung: Quick, INR, PTT, Fibrinogen, ATIII, Anti-Xa</Content>
<Content id="ref-41">Diff.-BB: Neu, Lym, Mon, Baso, Eos</Content>
</a4:Items>
<a4:Items id="ref-19" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Content id="ref-40">Diff.-BB: Neu, Lym, Mon, Baso, Eos</Content>
<Content id="ref-42">Gerinnung: Quick, INR, PTT, Fibrinogen, ATIII, Anti-Xa</Content>
</a4:Items>
<a4:Items id="ref-20" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Content id="ref-41">Hormone: iPTH, TSH, fT3, fT4</Content>
<Content id="ref-43">Serum-Elektrophorese: Albumin-Fraktion, a1-Globulin, a2-Globulin, b-Globulin, g-Globulin</Content>
</a4:Items>
<a4:Items id="ref-21" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Content id="ref-42">Eisenhaushalt: Eisen, Ferritin, Transferrin, Tf.-Sätt.</Content>
<Content id="ref-44">Hormone: iPTH, TSH, fT3, fT4</Content>
</a4:Items>
<a4:Items id="ref-22" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Content id="ref-43">BGA: pH, Std.-Bic., BE</Content>
<Content id="ref-45">Eisenhaushalt: Eisen, Ferritin, Transferrin, Tf.-Sätt.</Content>
</a4:Items>
<a4:Items id="ref-23" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Content id="ref-44">Hepatitis-Serologie: Anti-HBs, Anti-HBc</Content>
<Content id="ref-46">BGA: pH, Std.-Bic., BE</Content>
</a4:Items>
<a4:Items id="ref-24" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Content id="ref-45">Medikamente: TAC, CSA (C0), SIR, Vancomycin, Gentamicin, Tobramicin</Content>
<Content id="ref-47">Hepatitis-Serologie: Anti-HBs, Anti-HBc</Content>
</a4:Items>
<a2:UnitySerializationHolder id="ref-25" xmlns:a2="http://schemas.microsoft.com/clr/ns/System">
<Data id="ref-46">zaaReloaded2.Controller.Elements.CustomText</Data>
<a4:Items id="ref-25" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Content id="ref-48">Medikamente: TAC, CSA (C0), SIR, Vancomycin, Gentamicin, Tobramicin</Content>
</a4:Items>
<a2:UnitySerializationHolder id="ref-26" xmlns:a2="http://schemas.microsoft.com/clr/ns/System">
<Data id="ref-49">zaaReloaded2.Controller.Elements.CustomText</Data>
<UnityType>4</UnityType>
<AssemblyName href="#ref-7"/>
</a2:UnitySerializationHolder>
<a4:CustomText id="ref-26" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Content id="ref-47">Virologie (EDTA-Blut): CMV-PCR, BKV-PCR</Content>
</a4:CustomText>
<a4:CustomText id="ref-27" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Content id="ref-48">Autoantikörper: ANCA (IF), MPO-ANCA (ELISA), PR3-ANCA (ELISA), ANA (IF), AnDNA (ELISA), AnDNA (RIA)</Content>
<Content id="ref-50">Virologie (EDTA-Blut): CMV-PCR, BKV-PCR</Content>
</a4:CustomText>
<a4:CustomText id="ref-28" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Content id="ref-49">Nephrolog. Sediment: pH, Proteinurie, Ery /µl, Leu /µl, Plattenep. /µl, Bakt., Schleimfäden</Content>
<Content id="ref-51">Nephrolog. Sediment: pH, Proteinurie, Ery /µl, Leu /µl, Plattenep. /µl, Bakt., Schleimfäden</Content>
</a4:CustomText>
<a4:CustomText id="ref-29" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Content id="ref-52">Autoantikörper: ANCA (IF), MPO-ANCA (ELISA), PR3-ANCA (ELISA), ANA (IF), AnDNA (ELISA), AnDNA (RIA)</Content>
</a4:CustomText>
<a4:Items id="ref-30" xmlns:a4="http://schemas.microsoft.com/clr/nsassem/zaaReloaded2.Controller.Elements/zaaReloaded2%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D6ec8d075a1ab1383">
<Version>2</Version>
<Content id="ref-53">Tumormarker: PSA</Content>
</a4:Items>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

View File

@ -8,7 +8,7 @@
"Albumin (SU)" Alb SU
"Albumin (SU)/die" Alb SU
Albumin Alb S
"Albumin/Creatinin (PU)" ACR U
"Albumin/Creatinin (PU)" ACR U 0
"Alk. Phosphatase" AP S 0
Amylase Amylase S
"anorg. Phosphat" P S
@ -22,7 +22,7 @@ Basophile Baso E
Calcium Ca S
Calcium-Phosphat-Produkt CaxP S
Cholesterin Chol S
CK gesamt" CK S
CK gesamt" CK S X
"CK MB" CK-MB S
"Creatinin (PU)" Krea U 0
"Creatinin (SU)" Krea SU 0
@ -43,7 +43,7 @@ Gesamt-Bilirubin Bilirubin S
"Gesamt-Eiweiss (SU)" Protein SU
"Gesamt-Eiweiss (SU)/die" Proteinurie SU
Gesamt-Eiweiss Protein S
"Gesamt-Eiweiss/Creatinin (PU)" TPCR U
"Gesamt-Eiweiss/Creatinin (PU)" TPCR U 0
GGT GGT S 0
"glomeruläre Filtrationsrate" GFR SU
"glomerul. Filtrationsr. (MDRD)" "eGFR (MDRD)" S --- X
@ -73,10 +73,10 @@ Kalium K S
Leukozyten Leu E
Lymphozyten Lym E
Magnesium Mg S X
"MCH (HbE)" MCH E
MCHC MCHC E
MCV MCV E
"Mittleres Plättchenvolumen" MPV E
"MCH (HbE)" MCH E 0
MCHC MCHC E 0
MCV MCV E 0
"Mittleres Plättchenvolumen" MPV E 0
Monozyten Mon E
"Natrium (SU)" Na SU
"Natrium (SU)/die" Na SU
@ -90,6 +90,7 @@ pH pH BGA
"Plattenepithelien (U)" Plattenep U
"PO2 (art.)" pO2 BGA
"Protein (U)" Protein U
"PSA ges. (ECL,Elecsys,Roche)" PSA S X
"Sammelmenge (U)" Volumen SU
"Sammelzeit (U)" Zeit SU
"Sauerstoffsättigung (art.)" SO2 BGA
@ -110,11 +111,18 @@ PTT PTT Z
"Ratio int. norm." INR Z
"Komplementfaktor C3c" C3c S X
"Komplementfaktor C4" C4 S X
"Anti-DNAse B" "Anti-DNAse B" S
Anti-Streptolysin ASL S
"Anti-DNAse B" "Anti-DNAse B" S X
Anti-Streptolysin ASL S X
"PTH intakt" iPTH S
TSH TSH S
HAPTOGLOBIN Haptoglobin S
HAPTOGLOBIN Haptoglobin S X
FRAGMENTOZYTEN Fragmentozyten E
Retikulozyten Retikulozyten E X
"HBc-Antikörper (gesamt)" Anti-HBc S
HBs-Antikörper Anti-HBs S
"Albumin - Fraktion" Albumin-Fraktion S X
"Alpha1-Globulin - Fraktion" a1-Globulin S X
"Alpha2-Globulin - Fraktion" a2-Globulin S X
"Beta-Globulin - Fraktion" b-Globulin S X
"Gammaglobulin - Fraktion" g-Globulin S X
# vim: tw=160 et nowrap fo-=t

View File

@ -121,6 +121,14 @@ namespace zaaReloaded2.Formatter
{
if (!CanRun) throw new NoLaboratoryDataException("No laboratory data to format.");
// Create undo record and styles prior to iterating over the elements
// because a column switching element might trigger output to the
// document.
Globals.ThisAddIn.Application.UndoRecord.StartCustomRecord(
String.Format("Laborformatierung ({0})", Properties.Settings.Default.AddinName)
);
CreateStyles();
int current = 0;
while (current < Settings.Elements.Count)
{
@ -146,11 +154,6 @@ namespace zaaReloaded2.Formatter
}
}
// Write everything to the Word document
Globals.ThisAddIn.Application.UndoRecord.StartCustomRecord(
String.Format("Laborformatierung ({0})", Properties.Settings.Default.AddinName)
);
CreateStyles();
_secondaryBuffer.Flush();
Globals.ThisAddIn.Application.UndoRecord.EndCustomRecord();
}

View File

@ -103,25 +103,22 @@ namespace zaaReloaded2.Importer.ZaaImporter
// "HBs-Antigen: neg. ;"
// "Erythrozyten (U): + [negativ]"
Match match;
Regex numericalRegex = new Regex(
@"(?<name>[^:]+):\s*(?<value>[\d.]+)\s*(?<limits>\[[^\]]+])?\s*(?<unit>[^;]+)?");
Regex categoricalRegex = new Regex(
@"(?<name>[^:]+):\s*(?<value>[^[;]+)\s*(\[(?<normal>[^\]]+)])?");
if (numericalRegex.IsMatch(LaurisText))
if (_numericalRegex.IsMatch(LaurisText))
{
match = numericalRegex.Match(LaurisText);
match = _numericalRegex.Match(LaurisText);
ParseLimits(match);
Value = match.Groups["value"].Value.Trim().Replace(',', '.');
}
else
{
match = categoricalRegex.Match(LaurisText);
match = _categoricalRegex.Match(LaurisText);
Normal = match.Groups["normal"].Value.Trim();
Value = match.Groups["value"].Value.Trim();
}
if (match != null)
{
OriginalName = match.Groups["name"].Value.Trim();
Name = OriginalName;
Value = match.Groups["value"].Value.Trim();
Unit = match.Groups["unit"].Value.Trim();
}
}
@ -135,14 +132,14 @@ namespace zaaReloaded2.Importer.ZaaImporter
{
if (match.Groups["limits"].Success)
{
Regex limitRegex = new Regex(@"\[(?<limit1>[-\d.]+)?\s*(?<operator>\S+)\s*(?<limit2>[-\d.]+)?]");
Match limitMatch = limitRegex.Match(match.Groups["limits"].Value);
Match limitMatch = _limitRegex.Match(match.Groups["limits"].Value);
if (limitMatch.Groups["limit1"].Success && limitMatch.Groups["limit2"].Success)
{
// Use InvariantCulture because Lauris always outputs dots as decimal separator
LowerLimit = Double.Parse(limitMatch.Groups["limit1"].Value,
// Only in rare cases, a comma sneaks in...
LowerLimit = Double.Parse(limitMatch.Groups["limit1"].Value.Replace(',', '.'),
CultureInfo.InvariantCulture);
UpperLimit = Double.Parse(limitMatch.Groups["limit2"].Value,
UpperLimit = Double.Parse(limitMatch.Groups["limit2"].Value.Replace(',', '.'),
CultureInfo.InvariantCulture);
}
else
@ -150,11 +147,11 @@ namespace zaaReloaded2.Importer.ZaaImporter
switch (limitMatch.Groups["operator"].Value.Trim())
{
case "<=":
UpperLimit = Double.Parse(limitMatch.Groups["limit2"].Value,
UpperLimit = Double.Parse(limitMatch.Groups["limit2"].Value.Replace(',', '.'),
CultureInfo.InvariantCulture);
break;
case ">=":
LowerLimit = Double.Parse(limitMatch.Groups["limit2"].Value,
LowerLimit = Double.Parse(limitMatch.Groups["limit2"].Value.Replace(',', '.'),
CultureInfo.InvariantCulture);
break;
default:
@ -201,6 +198,11 @@ namespace zaaReloaded2.Importer.ZaaImporter
#region Fields
static readonly Regex _numericalRegex = new Regex(
@"(?<name>[^:]+):\s*(?<value>[\d,.]+)\s*(?<limits>\[[^\]]+])?\s*(?<unit>[^;]+)?");
static readonly Regex _categoricalRegex = new Regex(
@"(?<name>[^:]+):\s*(?<value>[^[;]+)\s*(\[(?<normal>[^\]]+)])?");
static readonly Regex _limitRegex = new Regex(@"\[(?<limit1>[-\d,.]+)?\s*(?<operator>\S+)\s*(?<limit2>[-\d,.]+)?]");
static readonly Regex _materialRegex = new Regex(@"\((?<material>(SU|PU))\)");
#endregion

View File

@ -1,2 +1,2 @@
2.0.0-beta.5
2.0.0.10
2.0.0
2.0.0.11

View File

@ -273,6 +273,10 @@ namespace zaaReloaded2.ViewModels
{
_repository = repository;
BuildSettingsList();
if (SettingsList.Count > 0)
{
SettingsList.First().IsSelected = true;
}
RequestCloseView += (sender, args) =>
{
_repository.Store();

View File

@ -222,6 +222,10 @@ namespace zaaReloaded2.ViewModels
vm.PropertyChanged += ElementViewModel_PropertyChanged;
Elements.Add(vm);
}
if (Elements.Count > 0)
{
Elements.First().IsSelected = true;
}
}
#endregion

View File

@ -25,6 +25,7 @@
WindowStyle="ToolWindow" Topmost="True"
b:WindowState.CenterScreen="True" b:WindowState.Save="True"
Title="Neues Element auswählen"
FocusManager.FocusedElement="{Binding ElementName=treeview}"
>
<Window.Resources>
<ResourceDictionary Source="/zaaReloaded2;component/Style.xaml" />
@ -35,7 +36,7 @@
<Button Content="OK" Command="{Binding ChooseElementCommand}" IsDefault="True" Margin="0 0 5 0" />
<Button Content="Abbrechen" Command="{Binding CloseViewCommand}" IsCancel="True" Margin="5 0 0 0" />
</UniformGrid>
<TreeView ItemsSource="{Binding Categories}">
<TreeView ItemsSource="{Binding Categories}" x:Name="treeview">
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="IsExpanded" Value="True" />

View File

@ -26,6 +26,7 @@
Width="280" Height="180" MinWidth="280" MinHeight="180"
b:WindowState.CenterScreen="True" b:WindowState.Save="True"
Title="Element bearbeiten"
FocusManager.FocusedElement="{Binding ElementName=ContentTextBox}"
>
<Window.Resources>
<ResourceDictionary Source="/zaaReloaded2;component/Style.xaml" />

View File

@ -28,6 +28,7 @@
ResizeMode="CanResizeWithGrip" ShowInTaskbar="False"
b:WindowState.CenterScreen="True" b:WindowState.Save="True"
Title="Stil auswählen"
FocusManager.FocusedElement="{Binding ElementName=settingsList}"
>
<Window.Resources>
<ResourceDictionary Source="/zaaReloaded2;component/style.xaml" />

View File

@ -28,6 +28,7 @@
WindowStyle="ToolWindow" Topmost="True"
b:WindowState.CenterScreen="True" b:WindowState.Save="True"
Title="Stil bearbeiten"
FocusManager.FocusedElement="{Binding ElementName=NameTextBox}"
>
<Window.Resources>
<ResourceDictionary Source="/zaaReloaded2;component/Style.xaml" />
@ -50,7 +51,8 @@
<DockPanel DockPanel.Dock="Top" IsEnabled="{Binding IsNameEnabled}">
<Label DockPanel.Dock="Left" Content="Name:" Target="{Binding ElementName=NameTextBox}"
Margin="0 0 10 0"/>
<TextBox Text="{Binding Name}" x:Name="NameTextBox" HorizontalAlignment="Stretch" />
<TextBox Text="{Binding Name,UpdateSourceTrigger=PropertyChanged}"
x:Name="NameTextBox" HorizontalAlignment="Stretch" />
</DockPanel>
<DockPanel DockPanel.Dock="Top">
<Label DockPanel.Dock="Left" Content="Referenzwerte anzeigen:" Margin="0 0 10 0"
@ -107,7 +109,7 @@
</Button>
</UniformGrid>
</StackPanel>
<TreeView ItemsSource="{Binding Elements}">
<TreeView ItemsSource="{Binding Elements}" x:Name="treeview">
<TreeView.InputBindings>
<MouseBinding Gesture="MiddleClick" Command="{Binding EditElementCommand}" />
<KeyBinding Key="Space" Command="{Binding EditElementCommand}" />