summaryrefslogtreecommitdiff
path: root/Aktywator/Common.cs
diff options
context:
space:
mode:
authorMichal Zimniewicz <mzimniew@man.poznan.pl>2015-01-28 10:49:16 +0100
committerMichal Zimniewicz <mzimniew@man.poznan.pl>2015-01-28 10:58:38 +0100
commit29d9771333f9f996208b0e3dbce95dd80cddf8e9 (patch)
tree7160accad1184eabc2dbfadf4175aeeb6abf82dc /Aktywator/Common.cs
parenta331533373a95820a89aa93fead351ceb9a30046 (diff)
initial commit with unreleased version 1.0.4
Diffstat (limited to 'Aktywator/Common.cs')
-rw-r--r--Aktywator/Common.cs43
1 files changed, 43 insertions, 0 deletions
diff --git a/Aktywator/Common.cs b/Aktywator/Common.cs
new file mode 100644
index 0000000..d00649d
--- /dev/null
+++ b/Aktywator/Common.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Aktywator
+{
+ static class Common
+ {
+ public static string ProgramFilesx86()
+ {
+ if (8 == IntPtr.Size
+ || (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432"))))
+ {
+ return Environment.GetEnvironmentVariable("ProgramFiles(x86)");
+ }
+
+ return Environment.GetEnvironmentVariable("ProgramFiles");
+ }
+
+ public static string bezOgonkow(string str)
+ {
+ str = str.Replace('ą', 'a');
+ str = str.Replace('ć', 'c');
+ str = str.Replace('ę', 'e');
+ str = str.Replace('ł', 'l');
+ str = str.Replace('ń', 'n');
+ str = str.Replace('ó', 'o');
+ str = str.Replace('ś', 's');
+ str = str.Replace('ź', 'z');
+ str = str.Replace('ż', 'z');
+ str = str.Replace('Ą', 'A');
+ str = str.Replace('Ć', 'C');
+ str = str.Replace('Ę', 'E');
+ str = str.Replace('Ł', 'L');
+ str = str.Replace('Ń', 'N');
+ str = str.Replace('Ó', 'O');
+ str = str.Replace('Ś', 'S');
+ str = str.Replace('Ź', 'Z');
+ str = str.Replace('Ż', 'Z');
+ return str;
+ }
+ }
+}