Updated "Phone 1" field to be "Household Phone" to match MLS
authorOwen Leonard <owen@balawis.leonard.fam>
Mon, 6 Sep 2010 23:34:35 +0000 (17:34 -0600)
committerOwen Leonard <owen@balawis.leonard.fam>
Fri, 10 Sep 2010 05:07:32 +0000 (23:07 -0600)
updated install instructions
added mls report file to create the home teaching stats csv file
adding C# windows program and python script for parsing mls data (c#-.net 3.5, python-2.6)

21 files changed:
bin/import_ward_data
doc/install.txt
mls/Home Teacher per Companionship.mls [new file with mode: 0644]
mls/mlstrimmer.py [new file with mode: 0755]
mls/windowsGUI/MLSFileTrimmer.sln [new file with mode: 0644]
mls/windowsGUI/MLSFileTrimmer/App.xaml [new file with mode: 0644]
mls/windowsGUI/MLSFileTrimmer/App.xaml.cs [new file with mode: 0644]
mls/windowsGUI/MLSFileTrimmer/CSVTrimmer.cs [new file with mode: 0644]
mls/windowsGUI/MLSFileTrimmer/Ionic.Zip.dll [new file with mode: 0644]
mls/windowsGUI/MLSFileTrimmer/MLSFileTrimmer.csproj [new file with mode: 0644]
mls/windowsGUI/MLSFileTrimmer/MLSRequiredFields.cs [new file with mode: 0644]
mls/windowsGUI/MLSFileTrimmer/MLSRequiredFields.xml [new file with mode: 0644]
mls/windowsGUI/MLSFileTrimmer/MLSRequiredFields.xsd [new file with mode: 0644]
mls/windowsGUI/MLSFileTrimmer/Properties/AssemblyInfo.cs [new file with mode: 0644]
mls/windowsGUI/MLSFileTrimmer/Properties/Resources.Designer.cs [new file with mode: 0644]
mls/windowsGUI/MLSFileTrimmer/Properties/Resources.resx [new file with mode: 0644]
mls/windowsGUI/MLSFileTrimmer/Properties/Settings.Designer.cs [new file with mode: 0644]
mls/windowsGUI/MLSFileTrimmer/Properties/Settings.settings [new file with mode: 0644]
mls/windowsGUI/MLSFileTrimmer/Window1.xaml [new file with mode: 0644]
mls/windowsGUI/MLSFileTrimmer/Window1.xaml.cs [new file with mode: 0644]
mls/windowsGUI/MLSFileTrimmerInstaller/MLSFileTrimmerInstaller.vdproj [new file with mode: 0644]

index ef7eac4a6cb403645fe1692e92cfb50bb80af0bd..b3696616902b888348a922fb2d6067058a5a78cf 100755 (executable)
@@ -54,6 +54,38 @@ sub csv_to_hash
     close(FILE);
 }
 
+sub optional_csv_to_hash
+{
+    my ($filename, $hashref) = @_;
+
+    my $opened = open(FILE,$filename);
+
+    if ($opened) {
+        my $found_header = 0; my $index = 0;
+        while(<FILE>)
+        {
+           $line = $_;
+           @data = split /\",/, $line;
+           if(!$found_header) { @header = @data; $found_header = 1; }
+           else {
+               foreach $i (0..$#data-1) {
+                   $data[$i] =~ s/\"//g;
+                   $header[$i] =~ s/\"//g;
+                   $hashref->{$index}{$header[$i]} = $data[$i];
+                   #print "$index: $i: $header[$i]: $data[$i]\n";
+               }
+               $index++;
+           }
+        }
+    
+    close(FILE);
+    }
+    else
+    {
+        print "-W- could not open optional csv file $filename\n";
+    }
+}
+
 ######################################################################
 sub print_hash
 {
@@ -96,7 +128,7 @@ sub update_eq_aaronic_table
                $membership_data{$index}{$key} =~ /^Teacher\s*$/i ||
                $membership_data{$index}{$key} =~ /^Priest\s*$/i)) {
                $aaronic_name = $membership_data{$index}{'Preferred Name'};
-               $phone = $membership_data{$index}{'Phone 1'};
+               $phone = $membership_data{$index}{'Household Phone'};
                if($phone =~ /(\d\d\d-\d\d\d\d)/) { $phone = "$areacode-$1"; }
                if($phone =~ /^\(\d\d\d\) (\d\d\d-\d\d\d\d)/) { $phone = "$1-$2"; }
                $sth = $dbh->prepare("select * from eq_aaronic where name='$aaronic_name'");
@@ -157,7 +189,7 @@ sub update_eq_elder_table
            if($key =~ /Priesthood/i && $membership_data{$index}{$key} =~ /Elder/i) {
                $id = $membership_data{$index}{'Indiv ID'};
                $elder_name = $membership_data{$index}{'Preferred Name'};
-               $phone = $membership_data{$index}{'Phone 1'};
+               $phone = $membership_data{$index}{'Household Phone'};
                $organization = $organization_by_id{$id};
                $attending = 0;
                if(($organization =~ /Elders/) ||
@@ -496,7 +528,7 @@ sub update_eq_parent_table
                $birthday =~ /(\d+) (\S+) (\d+)/; $day=$1; $month=$monthname2num{$2}; $year=$3;
                $hofh_id = $membership_data{$index}{'HofH ID'};
                $id = $membership_data{$index}{'Indiv ID'};
-               $phone = $membership_data{$index}{'Phone 1'};
+               $phone = $membership_data{$index}{'Household Phone'};
                if($phone =~ /(\d\d\d-\d\d\d\d)/) { $phone = "$areacode-$1"; }
                if($phone =~ /^\(\d\d\d\) (\d\d\d-\d\d\d\d)/) { $phone = "$1-$2"; }
                $address = $membership_data{$index}{'Street 1'};
@@ -625,6 +657,113 @@ sub update_eq_child_table
     }
 }
 
+# EQ_VISIT
+#+----------------+------------------+------+-----+---------+-------+
+#| Field          | Type             | Null | Key | Default | Extra |
+#+----------------+------------------+------+-----+---------+-------+
+#| visit          | int(16) unsigned |      | PRI | 0       |   A   |
+#| family         | int(16) unsigned | YES  | UNI | NULL    |       |
+#| companionship  | int(16) unsigned | YES  |     | NULL    |       |
+#| date           | date             | YES  |     | NULL    |       |
+#| notes          | varchar(128)     | YES  |     | NULL    |       |
+#| visited        | varchar(1)       | YES  |     | NULL    |       |
+#+----------------+------------------+------+-----+---------+-------+
+sub update_eq_visit_table
+{
+       print "\n-> updating eq_visit table\n";
+       
+       my $month_header_retrieved = 0;
+       my $month_header;
+       my @data_months;
+       my %months = ('Jan', 1, 'Feb', 2, 'Mar', 3, 'Apr', 4, 'May', 5, 'Jun', 6, 'Jul', 7, 'Aug', 8, 'Sep', 9, 'Oct', 10, 'Nov', 11, 'Dec', 12);
+       ($second, $minute, $hour, $dayOfMonth, $month, $yearOffset, $dayOfWeek, $dayOfYear, $daylightSavings) = localtime();
+       my %visit_status = ('X', 'y', '-', 'n', '', '');
+       
+       foreach $index (keys %hometeaching_stats_data)
+       {
+               $hashref = $hometeaching_stats_data{$index};
+               #foreach $key (keys %$hashref) {print "$key\n";}
+               
+               $family_name = $hometeaching_stats_data{$index}{"Preferred Name"};
+               print "   Updating visit data: $family_name\n";
+
+               # get family id from eq_family
+               $sth = $dbh->prepare("select * from eq_family where name=\"$family_name\" and valid=1");
+               $sth->execute or die "-E- DB error: $DBI::errstr\n";
+               my @family_data = ();
+               while($sqlhashref = $sth->fetchrow_hashref) { push(@family_data, $sqlhashref); }
+               my $family_rows = scalar @family_data;
+               if($family_rows > 0) { 
+                       $family_id = $family_data[0]->{'family'}; 
+                       $comp_id = $family_data[0]->{'companionship'};
+               }
+               else { next; }
+               #print "family_id = $family_id\n";
+               #print "comp_id = $comp_id\n";
+               
+               # ignore visits that weren't done by the EQ
+               if ($comp_id == 0) { next; }
+               
+               # retrieve the month header if not already done
+               if ($month_header_retrieved == 0)
+               {
+                       foreach $key (keys %$hashref) 
+                       {
+                               if (($key ne "Preferred Name") && ($key ne "Home Teachers"))
+                               {
+                                       $month_header = $key;
+                                       @data_months = split /\t/, $key;
+                               }
+                       }
+                       $month_header_retrieved = 1;
+               }
+               
+               # loop through history data
+               @history = split /\t/, $hometeaching_stats_data{$index}{$month_header};
+               my $data_year = 1900 + $yearOffset;
+               my $data_month = $months{$data_months[-1]};
+               #print "$month_header\n";
+               #print $hometeaching_stats_data{$index}{$month_header};
+               #print "\n";
+               foreach $i (reverse(0..$#history)) {
+                       # went back a calendar year, decrement $data_year
+                       if ($months{$data_months[$i]} > $data_month)
+                       {
+                               $data_year -= 1;
+                       }
+                       $data_month = $months{$data_months[$i]};
+                       my $visit_date = sprintf("%4d-%02d-01\n", $data_year, $data_month);
+                       #print "$visit_date\n";
+                       my $importing_status = $visit_status{$history[$i]};
+                       #print "importing_status = $importing_status\n";
+                       #print "select * from eq_visit where family=$family_id and companionship=$comp_id and date='$visit_date'\n";
+                       $sth = $dbh->prepare("select * from eq_visit where family=$family_id and companionship=$comp_id and date='$visit_date'");
+                       $sth->execute or die "-E- DB error: $DBI::errstr\n";
+                       my @visit_data = ();
+                       while($sqlhashref = $sth->fetchrow_hashref) { push(@visit_data, $sqlhashref); }
+                       my $visit_rows = scalar @visit_data;
+                       if($visit_rows > 0) { 
+                               my $visited = $visit_data[0]->{'visited'}; 
+                               #print "visited = $visited\n";
+                               # update visit if data is different in eq_visit
+                               if ($visited ne $importing_status)
+                               {
+                                       #print "importing_status = $importing_status\n";
+                                       $sth = $dbh->prepare("update eq_visit set visited='$importing_status' where family='$family_id' and date='$visit_date' and companionship='$comp_id'");
+                                       $sth->execute or die "-E- DB error: $DBI::errstr\n";
+                               }
+                       } else {
+                               if ($importing_status ne '')
+                               {
+                                       # add visit if it doesn't exist in eq_visit
+                                       $sth = $dbh->prepare("insert into eq_visit values (NULL, '$family_id', '$comp_id', '$visit_date', '', '$importing_status')");
+                                       $sth->execute or die "-E- DB error: $DBI::errstr\n";
+                               }
+                       }
+               }
+       }
+}
+
 ######################################################################
 sub check_for_changed_ids
 {
@@ -705,6 +844,7 @@ print "\n-> Processing all ward data files in $datadir\n";
 &csv_to_hash("$datadir/Membership.csv",\%membership_data);
 &csv_to_hash("$datadir/HomeTeaching.csv",\%hometeaching_data);
 &csv_to_hash("$datadir/Organization.csv",\%organization_data);
+&optional_csv_to_hash("$datadir/Home\ Teacher\ per\ Companionship.csv", \%hometeaching_stats_data);
 %organization_by_name = ();
 %organization_by_id = ();
 
@@ -715,6 +855,8 @@ if($opt_v) {
     &print_hash(\%hometeaching_data);
     print "-> Organization Data Dump\n\n";
     &print_hash(\%organization_data);
+    print "-> HomeTeaching Stats Data Dump\n\n";
+    &print_hash(\%hometeaching_stats_data);
 }
 
 if($opt_s) { $dbh->disconnect(); exit; }
@@ -728,6 +870,7 @@ if($opt_s) { $dbh->disconnect(); exit; }
 &update_eq_family_table();
 &update_eq_parent_table();
 &update_eq_child_table();
+&update_eq_visit_table();
 
 print "\n-> Import Successful! DONE...\n";
 
index 4ae8d9c7cf45a12d12ab2832877201e485a955a2..114ebaa99135ee72374e7ed0fc5c83ba79752fec 100644 (file)
@@ -64,13 +64,15 @@ Requirements
 
    Membership.csv:
      Preferred Name
-     Phone 1
+     Household Phone
      Indiv ID
      HofH ID
      Street 1
      Street 2
      Birth
      Full Name
+     Priesthood
+     HH Position
     
    Hometeaching.csv:
      Home Teacher 1
@@ -78,6 +80,8 @@ Requirements
      Comp ID
      HT District
      Household
+     Quorum
+     Supervisor
        
    Organization.csv:
      Indiv ID
@@ -87,3 +91,5 @@ Requirements
      Org Seq
      Sustained
    
+   Home Teacher per Companionship.csv  (optional file that lists home teaching stats - use all fields)
+     import mls/Home\ Teacher\ per\ Companionship.mls as a new report into MLS to create the csv file.
diff --git a/mls/Home Teacher per Companionship.mls b/mls/Home Teacher per Companionship.mls
new file mode 100644 (file)
index 0000000..007037c
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<customReport name="Home Teacher per Companionship" description="Bishop folder 12 month HT stats" isPortrait="false" groupOption="NONE" splitGroups="false">\r
+  <query string="28,0,0,true,-1" />\r
+  <query string="4,0,0,true,-1" />\r
+  <column typeID="31" width="19" />\r
+  <column typeID="49" width="33" />\r
+  <column typeID="55" width="40" />\r
+</customReport>\r
+\r
diff --git a/mls/mlstrimmer.py b/mls/mlstrimmer.py
new file mode 100755 (executable)
index 0000000..ccd55e3
--- /dev/null
@@ -0,0 +1,116 @@
+#! /usr/bin/env python
+
+import os
+import sys
+import csv
+import zipfile
+import tempfile
+from optparse import OptionParser
+from xml.dom.minidom import parse, parseString
+
+def ParseFile(xmlNode, zipfile):
+       
+       filename = os.path.join(options.directory, xmlNode.getAttribute("Name"))
+       if options.verbose: print "Trimming %s" % (filename)
+       
+       #create dictionary of header locations
+       headers = xmlNode.getElementsByTagName("MLSField")
+       allColumns = False
+       headerMap = {}
+       for header in headers:
+               if header.firstChild.data == "*":
+                       allColumns = True
+               else:
+                       headerMap[header.firstChild.data] = -1
+       if options.verbose: print "xml file says to save: %s" % (headerMap)
+       
+       try:
+               f = csv.reader(open(filename))
+               firstLineRead = False
+               
+               tf = tempfile.NamedTemporaryFile()
+               
+               headersToSave = []
+               for line in f:
+                       if not firstLineRead:
+                               s1 = set(item for item in line if item != '')
+                               s2 = set(headerMap.keys())
+                               if allColumns:
+                                       s2 = s1
+                               
+                               s3 = s1.intersection(s2)
+                               
+                               headerMap.clear()
+                               for i in s3:
+                                       headerMap[i] = line.index(i)
+                               headersToSave = headerMap.keys()
+                               if options.verbose: print "The columns that exist in both the xml and csv files are:" % (headersToSave)
+                               firstLineRead = True
+                       
+                       lineToWrite = ""
+                       for h in headersToSave:
+                               lineToWrite = "%s\"%s\"," % (lineToWrite, line[headerMap[h]])
+                       if options.verbose: print lineToWrite
+                       tf.write(lineToWrite + "\n")
+                       #if options.verbose: print line
+               zipfile.write(tf.name, xmlNode.getAttribute("Name"))
+               tf.close()
+               
+       except IOError, e:
+               print e
+               sys.exit()
+
+
+
+if __name__ == '__main__':
+       # read in command line arguments and parse them
+       parser = OptionParser()
+       parser.add_option("-c", dest="configFile", default="MLSRequiredFields.xml",
+               help="xml config file name")
+       parser.add_option("-d", "--directory", dest="directory", default=os.environ["PWD"],
+               help="directory where csv files are located")
+       parser.add_option("-v", "--verbose", dest="verbose", action="store_true",
+               help="show verbose messaging")
+       (options, args) = parser.parse_args()
+
+       # make sure xml file exists and we can read it
+       if not os.access(options.configFile, os.R_OK):
+               print "%s is not accessible" % (options.configFile)
+               sys.exit()
+       # make sure we have write perms on the directory
+       if not os.access(options.directory, os.W_OK):
+               print "%s is not accessible" % (options.directory)
+               sys.exit()
+       
+       # read in the xml
+       dom1 = parse(options.configFile)
+       mlsFiles = dom1.firstChild.childNodes[1].getElementsByTagName("MLSFile")
+       
+       # make sure all files are accessible (if they are not optional)
+       for csvFile in mlsFiles:
+               fullname = os.path.join(options.directory, csvFile.getAttribute("Name"))
+               if not os.access(fullname, os.W_OK):
+                       print "%s does not exist, or has the wrong permissions" % (fullname)
+                       sys.exit()
+               
+       
+       # create zip file
+       try:
+               zfile = zipfile.ZipFile(os.path.join(options.directory, "EQZipFile.zip"), "w")
+               for csvFile in mlsFiles:
+                       ParseFile(csvFile, zfile)
+               zfile.close()
+       except IOError, e:
+               print e
+               sys.exit()
+       
+       # delete original files
+       for csvFile in mlsFiles:
+               fullname = os.path.join(options.directory, csvFile.getAttribute("Name"))
+               try:
+                       os.remove(fullname)
+               except OSError, e:
+                       print "could not delete %s, please delete it manually" % (fullname)
+       
+
+       if options.verbose: print "Finished!"
diff --git a/mls/windowsGUI/MLSFileTrimmer.sln b/mls/windowsGUI/MLSFileTrimmer.sln
new file mode 100644 (file)
index 0000000..6c54695
--- /dev/null
@@ -0,0 +1,24 @@
+\r
+Microsoft Visual Studio Solution File, Format Version 10.00\r
+# Visual Studio 2008\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MLSFileTrimmer", "MLSFileTrimmer\MLSFileTrimmer.csproj", "{FB8A0153-84AA-402E-A5F4-E790AFF2B261}"\r
+EndProject\r
+Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "MLSFileTrimmerInstaller", "MLSFileTrimmerInstaller\MLSFileTrimmerInstaller.vdproj", "{BB14AFD8-EE0B-4094-B69A-DBC2AA4F6554}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Any CPU = Debug|Any CPU\r
+               Release|Any CPU = Release|Any CPU\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {FB8A0153-84AA-402E-A5F4-E790AFF2B261}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {FB8A0153-84AA-402E-A5F4-E790AFF2B261}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {FB8A0153-84AA-402E-A5F4-E790AFF2B261}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {FB8A0153-84AA-402E-A5F4-E790AFF2B261}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {BB14AFD8-EE0B-4094-B69A-DBC2AA4F6554}.Debug|Any CPU.ActiveCfg = Debug\r
+               {BB14AFD8-EE0B-4094-B69A-DBC2AA4F6554}.Release|Any CPU.ActiveCfg = Release\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/mls/windowsGUI/MLSFileTrimmer/App.xaml b/mls/windowsGUI/MLSFileTrimmer/App.xaml
new file mode 100644 (file)
index 0000000..9220222
--- /dev/null
@@ -0,0 +1,8 @@
+<Application x:Class="MLSFileTrimmer.App"\r
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"\r
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"\r
+    StartupUri="Window1.xaml">\r
+    <Application.Resources>\r
+         \r
+    </Application.Resources>\r
+</Application>\r
diff --git a/mls/windowsGUI/MLSFileTrimmer/App.xaml.cs b/mls/windowsGUI/MLSFileTrimmer/App.xaml.cs
new file mode 100644 (file)
index 0000000..62de0bb
--- /dev/null
@@ -0,0 +1,16 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Configuration;\r
+using System.Data;\r
+using System.Linq;\r
+using System.Windows;\r
+\r
+namespace MLSFileTrimmer\r
+{\r
+    /// <summary>\r
+    /// Interaction logic for App.xaml\r
+    /// </summary>\r
+    public partial class App : Application\r
+    {\r
+    }\r
+}\r
diff --git a/mls/windowsGUI/MLSFileTrimmer/CSVTrimmer.cs b/mls/windowsGUI/MLSFileTrimmer/CSVTrimmer.cs
new file mode 100644 (file)
index 0000000..9b39874
--- /dev/null
@@ -0,0 +1,82 @@
+using System;\r
+using System.Collections;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Text;\r
+using System.IO;\r
+\r
+namespace MLSFileTrimmer\r
+{\r
+    public class CSVTrimmer\r
+    {\r
+        private String filename = String.Empty;\r
+        private Hashtable mlsFields = new Hashtable();\r
+\r
+        public CSVTrimmer(ThirdCouncelorMLSFilesMLSFile xmlData)\r
+        {\r
+            this.filename = xmlData.Name;\r
+\r
+            foreach (String s in xmlData.MLSField)\r
+            {\r
+                this.mlsFields.Add(s, -1);\r
+            }\r
+        }\r
+\r
+        public void ExtractData(StreamReader readFile, StreamWriter outFile)\r
+        {\r
+            string line;\r
+            string[] row;\r
+\r
+            // get headers and create mapping\r
+            if ((line = readFile.ReadLine()) != null)\r
+            {\r
+                row = line.Split('"');\r
+                for (int x = 0; x < row.Length; x++)\r
+                {\r
+                    if (!(row[x].Equals(",")) && !(row[x].Equals("")))\r
+                    {\r
+                        if (this.mlsFields.ContainsKey(row[x]) || this.mlsFields.ContainsKey("*"))\r
+                        {\r
+                            this.mlsFields[row[x]] = x;\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+\r
+            // write headers in new file\r
+            ICollection headers = this.mlsFields.Keys;\r
+            StringBuilder sb = new StringBuilder();\r
+            foreach (string s in headers)\r
+            {\r
+                int index = Convert.ToInt32(this.mlsFields[s]);\r
+                if (index >= 0)\r
+                {\r
+                    sb.Append("\"");\r
+                    sb.Append(s);\r
+                    sb.Append("\",");\r
+                }\r
+            }\r
+            //sb.Remove(sb.Length - 1, 1);   // remove trailing comma\r
+            outFile.WriteLine(sb.ToString());\r
+\r
+            // only write specified fields in new file\r
+            while ((line = readFile.ReadLine()) != null)\r
+            {\r
+                sb.Remove(0, sb.Length);\r
+                row = line.Split('"');\r
+                foreach (string s in headers)\r
+                {\r
+                    int index = Convert.ToInt32(this.mlsFields[s]);\r
+                    if (index >= 0)\r
+                    {\r
+                        sb.Append("\"");\r
+                        sb.Append(row[index]);\r
+                        sb.Append("\",");\r
+                    }\r
+                }\r
+                //sb.Remove(sb.Length - 1, 1);   // remove trailing comma\r
+                outFile.WriteLine(sb.ToString());\r
+            }\r
+        }\r
+    }\r
+}\r
diff --git a/mls/windowsGUI/MLSFileTrimmer/Ionic.Zip.dll b/mls/windowsGUI/MLSFileTrimmer/Ionic.Zip.dll
new file mode 100644 (file)
index 0000000..7b11577
Binary files /dev/null and b/mls/windowsGUI/MLSFileTrimmer/Ionic.Zip.dll differ
diff --git a/mls/windowsGUI/MLSFileTrimmer/MLSFileTrimmer.csproj b/mls/windowsGUI/MLSFileTrimmer/MLSFileTrimmer.csproj
new file mode 100644 (file)
index 0000000..24b3d04
--- /dev/null
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <PropertyGroup>\r
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+    <ProductVersion>9.0.30729</ProductVersion>\r
+    <SchemaVersion>2.0</SchemaVersion>\r
+    <ProjectGuid>{FB8A0153-84AA-402E-A5F4-E790AFF2B261}</ProjectGuid>\r
+    <OutputType>WinExe</OutputType>\r
+    <AppDesignerFolder>Properties</AppDesignerFolder>\r
+    <RootNamespace>MLSFileTrimmer</RootNamespace>\r
+    <AssemblyName>MLSFileTrimmer</AssemblyName>\r
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>\r
+    <FileAlignment>512</FileAlignment>\r
+    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>\r
+    <WarningLevel>4</WarningLevel>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <DebugType>full</DebugType>\r
+    <Optimize>false</Optimize>\r
+    <OutputPath>bin\Debug\</OutputPath>\r
+    <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <WarningLevel>4</WarningLevel>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+    <DebugType>pdbonly</DebugType>\r
+    <Optimize>true</Optimize>\r
+    <OutputPath>bin\Release\</OutputPath>\r
+    <DefineConstants>TRACE</DefineConstants>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <WarningLevel>4</WarningLevel>\r
+  </PropertyGroup>\r
+  <ItemGroup>\r
+    <Reference Include="Ionic.Zip, Version=1.9.1.5, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">\r
+      <SpecificVersion>False</SpecificVersion>\r
+      <HintPath>.\Ionic.Zip.dll</HintPath>\r
+    </Reference>\r
+    <Reference Include="System" />\r
+    <Reference Include="System.Core">\r
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>\r
+    </Reference>\r
+    <Reference Include="System.Windows.Forms" />\r
+    <Reference Include="System.Xml.Linq">\r
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>\r
+    </Reference>\r
+    <Reference Include="System.Data.DataSetExtensions">\r
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>\r
+    </Reference>\r
+    <Reference Include="System.Data" />\r
+    <Reference Include="System.Xml" />\r
+    <Reference Include="WindowsBase" />\r
+    <Reference Include="PresentationCore" />\r
+    <Reference Include="PresentationFramework" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ApplicationDefinition Include="App.xaml">\r
+      <Generator>MSBuild:Compile</Generator>\r
+      <SubType>Designer</SubType>\r
+    </ApplicationDefinition>\r
+    <Page Include="Window1.xaml">\r
+      <Generator>MSBuild:Compile</Generator>\r
+      <SubType>Designer</SubType>\r
+    </Page>\r
+    <Compile Include="App.xaml.cs">\r
+      <DependentUpon>App.xaml</DependentUpon>\r
+      <SubType>Code</SubType>\r
+    </Compile>\r
+    <Compile Include="Window1.xaml.cs">\r
+      <DependentUpon>Window1.xaml</DependentUpon>\r
+      <SubType>Code</SubType>\r
+    </Compile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Compile Include="CSVTrimmer.cs" />\r
+    <Compile Include="MLSRequiredFields.cs" />\r
+    <Compile Include="Properties\AssemblyInfo.cs">\r
+      <SubType>Code</SubType>\r
+    </Compile>\r
+    <Compile Include="Properties\Resources.Designer.cs">\r
+      <AutoGen>True</AutoGen>\r
+      <DesignTime>True</DesignTime>\r
+      <DependentUpon>Resources.resx</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="Properties\Settings.Designer.cs">\r
+      <AutoGen>True</AutoGen>\r
+      <DependentUpon>Settings.settings</DependentUpon>\r
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>\r
+    </Compile>\r
+    <EmbeddedResource Include="Properties\Resources.resx">\r
+      <Generator>ResXFileCodeGenerator</Generator>\r
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>\r
+    </EmbeddedResource>\r
+    <None Include="Properties\Settings.settings">\r
+      <Generator>SettingsSingleFileGenerator</Generator>\r
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>\r
+    </None>\r
+    <AppDesigner Include="Properties\" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="MLSRequiredFields.xml">\r
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\r
+    </None>\r
+  </ItemGroup>\r
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+       Other similar extension points exist, see Microsoft.Common.targets.\r
+  <Target Name="BeforeBuild">\r
+  </Target>\r
+  <Target Name="AfterBuild">\r
+  </Target>\r
+  -->\r
+</Project>
\ No newline at end of file
diff --git a/mls/windowsGUI/MLSFileTrimmer/MLSRequiredFields.cs b/mls/windowsGUI/MLSFileTrimmer/MLSRequiredFields.cs
new file mode 100644 (file)
index 0000000..0f00757
--- /dev/null
@@ -0,0 +1,118 @@
+//------------------------------------------------------------------------------\r
+// <auto-generated>\r
+//     This code was generated by a tool.\r
+//     Runtime Version:2.0.50727.4005\r
+//\r
+//     Changes to this file may cause incorrect behavior and will be lost if\r
+//     the code is regenerated.\r
+// </auto-generated>\r
+//------------------------------------------------------------------------------\r
+\r
+using System.Xml.Serialization;\r
+\r
+// \r
+// This source code was auto-generated by xsd, Version=2.0.50727.3038.\r
+// \r
+\r
+namespace MLSFileTrimmer\r
+{\r
+\r
+    /// <remarks/>\r
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]\r
+    [System.SerializableAttribute()]\r
+    [System.Diagnostics.DebuggerStepThroughAttribute()]\r
+    [System.ComponentModel.DesignerCategoryAttribute("code")]\r
+    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]\r
+    [System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable = false)]\r
+    public partial class ThirdCouncelorMLSFiles\r
+    {\r
+\r
+        private ThirdCouncelorMLSFilesMLSFile[] cSVFilesField;\r
+\r
+        /// <remarks/>\r
+        [System.Xml.Serialization.XmlArrayItemAttribute("MLSFile", IsNullable = false)]\r
+        public ThirdCouncelorMLSFilesMLSFile[] CSVFiles\r
+        {\r
+            get\r
+            {\r
+                return this.cSVFilesField;\r
+            }\r
+            set\r
+            {\r
+                this.cSVFilesField = value;\r
+            }\r
+        }\r
+    }\r
+\r
+    /// <remarks/>\r
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]\r
+    [System.SerializableAttribute()]\r
+    [System.Diagnostics.DebuggerStepThroughAttribute()]\r
+    [System.ComponentModel.DesignerCategoryAttribute("code")]\r
+    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]\r
+    public partial class ThirdCouncelorMLSFilesMLSFile\r
+    {\r
+\r
+        private string descriptionField;\r
+\r
+        private string extensionField;\r
+\r
+        private string[] mLSFieldField;\r
+\r
+        private string nameField;\r
+\r
+        /// <remarks/>\r
+        public string Description\r
+        {\r
+            get\r
+            {\r
+                return this.descriptionField;\r
+            }\r
+            set\r
+            {\r
+                this.descriptionField = value;\r
+            }\r
+        }\r
+\r
+        /// <remarks/>\r
+        public string Extension\r
+        {\r
+            get\r
+            {\r
+                return this.extensionField;\r
+            }\r
+            set\r
+            {\r
+                this.extensionField = value;\r
+            }\r
+        }\r
+\r
+        /// <remarks/>\r
+        [System.Xml.Serialization.XmlElementAttribute("MLSField")]\r
+        public string[] MLSField\r
+        {\r
+            get\r
+            {\r
+                return this.mLSFieldField;\r
+            }\r
+            set\r
+            {\r
+                this.mLSFieldField = value;\r
+            }\r
+        }\r
+\r
+        /// <remarks/>\r
+        [System.Xml.Serialization.XmlAttributeAttribute()]\r
+        public string Name\r
+        {\r
+            get\r
+            {\r
+                return this.nameField;\r
+            }\r
+            set\r
+            {\r
+                this.nameField = value;\r
+            }\r
+        }\r
+    }\r
+}
\ No newline at end of file
diff --git a/mls/windowsGUI/MLSFileTrimmer/MLSRequiredFields.xml b/mls/windowsGUI/MLSFileTrimmer/MLSRequiredFields.xml
new file mode 100644 (file)
index 0000000..1c2ea73
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8" ?>\r
+<ThirdCouncelorMLSFiles xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\r
+  <CSVFiles>\r
+    <MLSFile Name="Membership.csv">\r
+      <Description>Membership file</Description>\r
+      <Extension>csv</Extension>\r
+      <MLSField>Preferred Name</MLSField>\r
+      <MLSField>Household Phone</MLSField>\r
+      <MLSField>Indiv ID</MLSField>\r
+      <MLSField>HofH ID</MLSField>\r
+      <MLSField>Street 1</MLSField>\r
+      <MLSField>Street 2</MLSField>\r
+      <MLSField>Birth</MLSField>\r
+      <MLSField>Full Name</MLSField>\r
+      <MLSField>Priesthood</MLSField>\r
+      <MLSField>HH Position</MLSField>\r
+    </MLSFile>\r
+\r
+    <MLSFile Name="HomeTeaching.csv">\r
+      <Description>Home Teaching file</Description>\r
+      <Extension>csv</Extension>\r
+      <MLSField>Home Teacher 1</MLSField>\r
+      <MLSField>Home Teacher 2</MLSField>\r
+      <MLSField>Comp ID</MLSField>\r
+      <MLSField>HT District</MLSField>\r
+      <MLSField>Household</MLSField>\r
+      <MLSField>Quorum</MLSField>\r
+      <MLSField>Supervisor</MLSField>\r
+    </MLSFile>\r
+\r
+    <MLSFile Name="Organization.csv">\r
+      <Description>Organization file</Description>\r
+      <Extension>csv</Extension>\r
+      <MLSField>Indiv ID</MLSField>\r
+      <MLSField>Indiv Name</MLSField>\r
+      <MLSField>Organization</MLSField>\r
+      <MLSField>Position</MLSField>\r
+      <MLSField>Org Seq</MLSField>\r
+      <MLSField>Sustained</MLSField>\r
+    </MLSFile>\r
+\r
+    <MLSFile Name="Home Teacher per Companionship.csv">\r
+      <Description>Home Teaching Statistics file</Description>\r
+      <Extension>csv</Extension>\r
+      <MLSField>*</MLSField>\r
+    </MLSFile>\r
+  </CSVFiles>\r
+</ThirdCouncelorMLSFiles>\r
diff --git a/mls/windowsGUI/MLSFileTrimmer/MLSRequiredFields.xsd b/mls/windowsGUI/MLSFileTrimmer/MLSRequiredFields.xsd
new file mode 100644 (file)
index 0000000..3e3a2f1
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">\r
+  <xs:element name="ThirdCouncelorMLSFiles">\r
+    <xs:complexType>\r
+      <xs:sequence>\r
+        <xs:element name="CSVFiles">\r
+          <xs:complexType>\r
+            <xs:sequence>\r
+              <xs:element maxOccurs="unbounded" name="MLSFile">\r
+                <xs:complexType>\r
+                  <xs:sequence>\r
+                    <xs:element name="Description" type="xs:string" />\r
+                    <xs:element name="Extension" type="xs:string" />\r
+                    <xs:element maxOccurs="unbounded" name="MLSField" type="xs:string" />\r
+                  </xs:sequence>\r
+                  <xs:attribute name="Name" type="xs:string" use="required" />\r
+                </xs:complexType>\r
+              </xs:element>\r
+            </xs:sequence>\r
+          </xs:complexType>\r
+        </xs:element>\r
+      </xs:sequence>\r
+    </xs:complexType>\r
+  </xs:element>\r
+</xs:schema>
\ No newline at end of file
diff --git a/mls/windowsGUI/MLSFileTrimmer/Properties/AssemblyInfo.cs b/mls/windowsGUI/MLSFileTrimmer/Properties/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..bcedbd1
--- /dev/null
@@ -0,0 +1,55 @@
+using System.Reflection;\r
+using System.Resources;\r
+using System.Runtime.CompilerServices;\r
+using System.Runtime.InteropServices;\r
+using System.Windows;\r
+\r
+// General Information about an assembly is controlled through the following \r
+// set of attributes. Change these attribute values to modify the information\r
+// associated with an assembly.\r
+[assembly: AssemblyTitle("MLSFileTrimmer")]\r
+[assembly: AssemblyDescription("")]\r
+[assembly: AssemblyConfiguration("")]\r
+[assembly: AssemblyCompany("HP")]\r
+[assembly: AssemblyProduct("MLSFileTrimmer")]\r
+[assembly: AssemblyCopyright("Copyright Â© HP 2010")]\r
+[assembly: AssemblyTrademark("")]\r
+[assembly: AssemblyCulture("")]\r
+\r
+// Setting ComVisible to false makes the types in this assembly not visible \r
+// to COM components.  If you need to access a type in this assembly from \r
+// COM, set the ComVisible attribute to true on that type.\r
+[assembly: ComVisible(false)]\r
+\r
+//In order to begin building localizable applications, set \r
+//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file\r
+//inside a <PropertyGroup>.  For example, if you are using US english\r
+//in your source files, set the <UICulture> to en-US.  Then uncomment\r
+//the NeutralResourceLanguage attribute below.  Update the "en-US" in\r
+//the line below to match the UICulture setting in the project file.\r
+\r
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]\r
+\r
+\r
+[assembly: ThemeInfo(\r
+    ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located\r
+    //(used if a resource is not found in the page, \r
+    // or application resource dictionaries)\r
+    ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located\r
+    //(used if a resource is not found in the page, \r
+    // app, or any theme specific resource dictionaries)\r
+)]\r
+\r
+\r
+// Version information for an assembly consists of the following four values:\r
+//\r
+//      Major Version\r
+//      Minor Version \r
+//      Build Number\r
+//      Revision\r
+//\r
+// You can specify all the values or you can default the Build and Revision Numbers \r
+// by using the '*' as shown below:\r
+// [assembly: AssemblyVersion("1.0.*")]\r
+[assembly: AssemblyVersion("1.0.0.0")]\r
+[assembly: AssemblyFileVersion("1.0.0.0")]\r
diff --git a/mls/windowsGUI/MLSFileTrimmer/Properties/Resources.Designer.cs b/mls/windowsGUI/MLSFileTrimmer/Properties/Resources.Designer.cs
new file mode 100644 (file)
index 0000000..00d8a15
--- /dev/null
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------\r
+// <auto-generated>\r
+//     This code was generated by a tool.\r
+//     Runtime Version:2.0.50727.4005\r
+//\r
+//     Changes to this file may cause incorrect behavior and will be lost if\r
+//     the code is regenerated.\r
+// </auto-generated>\r
+//------------------------------------------------------------------------------\r
+\r
+namespace MLSFileTrimmer.Properties\r
+{\r
+\r
+\r
+    /// <summary>\r
+    ///   A strongly-typed resource class, for looking up localized strings, etc.\r
+    /// </summary>\r
+    // This class was auto-generated by the StronglyTypedResourceBuilder\r
+    // class via a tool like ResGen or Visual Studio.\r
+    // To add or remove a member, edit your .ResX file then rerun ResGen\r
+    // with the /str option, or rebuild your VS project.\r
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]\r
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r
+    internal class Resources\r
+    {\r
+\r
+        private static global::System.Resources.ResourceManager resourceMan;\r
+\r
+        private static global::System.Globalization.CultureInfo resourceCulture;\r
+\r
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]\r
+        internal Resources()\r
+        {\r
+        }\r
+\r
+        /// <summary>\r
+        ///   Returns the cached ResourceManager instance used by this class.\r
+        /// </summary>\r
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r
+        internal static global::System.Resources.ResourceManager ResourceManager\r
+        {\r
+            get\r
+            {\r
+                if ((resourceMan == null))\r
+                {\r
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MLSFileTrimmer.Properties.Resources", typeof(Resources).Assembly);\r
+                    resourceMan = temp;\r
+                }\r
+                return resourceMan;\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        ///   Overrides the current thread's CurrentUICulture property for all\r
+        ///   resource lookups using this strongly typed resource class.\r
+        /// </summary>\r
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r
+        internal static global::System.Globalization.CultureInfo Culture\r
+        {\r
+            get\r
+            {\r
+                return resourceCulture;\r
+            }\r
+            set\r
+            {\r
+                resourceCulture = value;\r
+            }\r
+        }\r
+    }\r
+}\r
diff --git a/mls/windowsGUI/MLSFileTrimmer/Properties/Resources.resx b/mls/windowsGUI/MLSFileTrimmer/Properties/Resources.resx
new file mode 100644 (file)
index 0000000..ffecec8
--- /dev/null
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+</root>
\ No newline at end of file
diff --git a/mls/windowsGUI/MLSFileTrimmer/Properties/Settings.Designer.cs b/mls/windowsGUI/MLSFileTrimmer/Properties/Settings.Designer.cs
new file mode 100644 (file)
index 0000000..2b4bf23
--- /dev/null
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------\r
+// <auto-generated>\r
+//     This code was generated by a tool.\r
+//     Runtime Version:2.0.50727.4005\r
+//\r
+//     Changes to this file may cause incorrect behavior and will be lost if\r
+//     the code is regenerated.\r
+// </auto-generated>\r
+//------------------------------------------------------------------------------\r
+\r
+namespace MLSFileTrimmer.Properties\r
+{\r
+\r
+\r
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]\r
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase\r
+    {\r
+\r
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));\r
+\r
+        public static Settings Default\r
+        {\r
+            get\r
+            {\r
+                return defaultInstance;\r
+            }\r
+        }\r
+    }\r
+}\r
diff --git a/mls/windowsGUI/MLSFileTrimmer/Properties/Settings.settings b/mls/windowsGUI/MLSFileTrimmer/Properties/Settings.settings
new file mode 100644 (file)
index 0000000..8f2fd95
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>\r
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">\r
+  <Profiles>\r
+    <Profile Name="(Default)" />\r
+  </Profiles>\r
+  <Settings />\r
+</SettingsFile>
\ No newline at end of file
diff --git a/mls/windowsGUI/MLSFileTrimmer/Window1.xaml b/mls/windowsGUI/MLSFileTrimmer/Window1.xaml
new file mode 100644 (file)
index 0000000..074a27e
--- /dev/null
@@ -0,0 +1,13 @@
+<Window x:Class="MLSFileTrimmer.Window1"\r
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"\r
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"\r
+    Title="MLS File Trimmer" Height="200" Width="600" MaxHeight="Infinity" MaxWidth="Infinity" MinHeight="0" MinWidth="0" ResizeMode="CanMinimize">\r
+    <Grid Background="Silver">\r
+        <Label Margin="20,30,30,0" Name="label4" VerticalAlignment="Top" Height="30">Please specify the directory where the MLS csv files are.</Label>\r
+        <TextBox Margin="20,70,130,60" Name="outputDirtextBox" FlowDirection="LeftToRight" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" TextWrapping="NoWrap" Height="30" />\r
+        <Button Margin="0,70,20,61" Name="outDirButton" HorizontalAlignment="Right" Width="100" Height="30" Click="outDirButton_Click">Browse</Button>\r
+        <Button Margin="0,0,20,20" Name="parseButton" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="100" Height="30" Click="parseButton_Click">OK</Button>\r
+        <Label Height="28" HorizontalAlignment="Right" Margin="0,27.233,20,0" Name="finishedLabel" VerticalAlignment="Top" Width="100" FontSize="16" Foreground="Red" HorizontalContentAlignment="Center" Visibility="Hidden">Finished!</Label>\r
+        <Label Height="28" HorizontalAlignment="Right" Margin="0,27.233,20,0" Name="trimmingLabel" VerticalAlignment="Top" Width="100" FontSize="16" Foreground="Green" HorizontalContentAlignment="Center" Visibility="Hidden" >Trimming...</Label>\r
+    </Grid>\r
+</Window>\r
diff --git a/mls/windowsGUI/MLSFileTrimmer/Window1.xaml.cs b/mls/windowsGUI/MLSFileTrimmer/Window1.xaml.cs
new file mode 100644 (file)
index 0000000..098aa47
--- /dev/null
@@ -0,0 +1,151 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Text;\r
+using System.Windows;\r
+using System.Windows.Controls;\r
+using System.Windows.Data;\r
+using System.Windows.Documents;\r
+using System.Windows.Input;\r
+using System.Windows.Media;\r
+using System.Windows.Media.Imaging;\r
+using System.Windows.Navigation;\r
+using System.Windows.Shapes;\r
+using Microsoft.Win32;\r
+using System.IO;\r
+using FolderBrowserDialog = System.Windows.Forms.FolderBrowserDialog;\r
+using System.Xml.Serialization;\r
+using System.Xml;\r
+using Ionic.Zip;\r
+using System.ComponentModel;\r
+using System.Threading;\r
+\r
+namespace MLSFileTrimmer\r
+{\r
+    /// <summary>\r
+    /// Interaction logic for Window1.xaml\r
+    /// </summary>\r
+    public partial class Window1 : Window\r
+    {\r
+        // default to My Documents\r
+        private String currentDirectory = String.Empty;\r
+        private ThirdCouncelorMLSFiles thirdCouncelorXml;\r
+        private BackgroundWorker worker;\r
+\r
+        public Window1()\r
+        {\r
+            InitializeComponent();\r
+            \r
+            // read in xml file\r
+            try\r
+            {\r
+                TextReader reader = new StreamReader("MLSRequiredFields.xml");\r
+                XmlSerializer serializer = new XmlSerializer(typeof(ThirdCouncelorMLSFiles));\r
+                this.thirdCouncelorXml = (ThirdCouncelorMLSFiles)serializer.Deserialize(reader);\r
+                reader.Close();\r
+            }\r
+            catch (XmlException ex)\r
+            {\r
+                MessageBox.Show(ex.Message, "XML Parse Error", MessageBoxButton.OK, MessageBoxImage.Error);\r
+            }\r
+            catch (InvalidOperationException ioe)\r
+            {\r
+                MessageBox.Show(ioe.InnerException.Message, "XML Serialization Error", MessageBoxButton.OK, MessageBoxImage.Error);\r
+            }\r
+        }\r
+\r
+\r
+        private void outDirButton_Click(object sender, RoutedEventArgs e)\r
+        {\r
+            FolderBrowserDialog openFolderDialog = new FolderBrowserDialog();\r
+\r
+            openFolderDialog.RootFolder = Environment.SpecialFolder.MyDocuments;\r
+            if (openFolderDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)\r
+            {\r
+                outputDirtextBox.Text = openFolderDialog.SelectedPath;\r
+                currentDirectory = openFolderDialog.SelectedPath;\r
+            }\r
+        }\r
+\r
+        private void parseButton_Click(object sender, RoutedEventArgs e)\r
+        {\r
+            // make sure the directory exists\r
+            if (outputDirtextBox.Text.Equals(String.Empty))\r
+            {\r
+                MessageBox.Show("Please select the correct output directory.");\r
+                return;\r
+            }\r
+            else if (!Directory.Exists(outputDirtextBox.Text))\r
+            {\r
+                MessageBox.Show(outputDirtextBox.Text + " does not exist. Please select the correct output directory.");\r
+            }\r
+\r
+            // make sure the original files exist\r
+            foreach (ThirdCouncelorMLSFilesMLSFile csvFile in this.thirdCouncelorXml.CSVFiles)\r
+            {\r
+                if (!File.Exists(this.currentDirectory + "\\" + csvFile.Name))\r
+                {\r
+                    MessageBox.Show(csvFile.Name + " does not exist.  Are you sure you have the right directory?");\r
+                    return;\r
+                }\r
+            }\r
+\r
+            // TODO: move to new background thread, post progress dialog\r
+            this.worker = new BackgroundWorker();\r
+            this.worker.DoWork +=new DoWorkEventHandler(worker_DoWork);\r
+            this.worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted);\r
+            this.worker.RunWorkerAsync();\r
+\r
+            this.trimmingLabel.Visibility = Visibility.Visible;\r
+        }\r
+\r
+        private void worker_DoWork(object sender, DoWorkEventArgs e)\r
+        {\r
+            // create new zip file\r
+            using (ZipFile zip = new ZipFile())\r
+            {\r
+\r
+                // trim each csv file\r
+                foreach (ThirdCouncelorMLSFilesMLSFile csvFile in this.thirdCouncelorXml.CSVFiles)\r
+                {\r
+                    string newFilename = this.currentDirectory + "\\" + csvFile.Name;\r
+                    string origFilename = newFilename + ".orig";\r
+                    File.Move(newFilename, origFilename);\r
+\r
+                    using (StreamReader origFile = new StreamReader(origFilename))\r
+                    {\r
+                        using (StreamWriter newFile = new StreamWriter(newFilename))\r
+                        {\r
+                            CSVTrimmer csvTrimmer = new CSVTrimmer(csvFile);\r
+                            csvTrimmer.ExtractData(origFile, newFile);\r
+                        }\r
+                    }\r
+                    // add new to zip file\r
+                    zip.AddItem(newFilename, "");\r
+                }\r
+                zip.Save(this.currentDirectory + "\\" + "EQZipFile.zip");\r
+            }\r
+\r
+            Thread.Sleep(1000);\r
+\r
+            // delete csv files\r
+            StringBuilder sb = new StringBuilder();\r
+            foreach (ThirdCouncelorMLSFilesMLSFile csvFile in this.thirdCouncelorXml.CSVFiles)\r
+            {\r
+                sb.Remove(0, sb.Length);\r
+                sb.Append(this.currentDirectory);\r
+                sb.Append("\\");\r
+                sb.Append(csvFile.Name);\r
+                File.Delete(sb.ToString());\r
+                sb.Append(".orig");\r
+                File.Delete(sb.ToString());\r
+            }\r
+        }\r
+\r
+        private void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)\r
+        {\r
+            this.trimmingLabel.Visibility = Visibility.Hidden;\r
+            this.finishedLabel.Visibility = Visibility.Visible;\r
+        }\r
+    }\r
+}\r
diff --git a/mls/windowsGUI/MLSFileTrimmerInstaller/MLSFileTrimmerInstaller.vdproj b/mls/windowsGUI/MLSFileTrimmerInstaller/MLSFileTrimmerInstaller.vdproj
new file mode 100644 (file)
index 0000000..e45f9bb
--- /dev/null
@@ -0,0 +1,811 @@
+"DeployProject"\r
+{\r
+"VSVersion" = "3:800"\r
+"ProjectType" = "8:{978C614F-708E-4E1A-B201-565925725DBA}"\r
+"IsWebType" = "8:FALSE"\r
+"ProjectName" = "8:MLSFileTrimmerInstaller"\r
+"LanguageId" = "3:1033"\r
+"CodePage" = "3:1252"\r
+"UILanguageId" = "3:1033"\r
+"SccProjectName" = "8:"\r
+"SccLocalPath" = "8:"\r
+"SccAuxPath" = "8:"\r
+"SccProvider" = "8:"\r
+    "Hierarchy"\r
+    {\r
+        "Entry"\r
+        {\r
+        "MsmKey" = "8:_23F1FB896E824A679B37949346C05547"\r
+        "OwnerKey" = "8:_UNDEFINED"\r
+        "MsmSig" = "8:_UNDEFINED"\r
+        }\r
+        "Entry"\r
+        {\r
+        "MsmKey" = "8:_5642279778584C4AB08E32A595FB6C82"\r
+        "OwnerKey" = "8:_UNDEFINED"\r
+        "MsmSig" = "8:_UNDEFINED"\r
+        }\r
+        "Entry"\r
+        {\r
+        "MsmKey" = "8:_AC035A5C33626ACA61BCD2318245A97A"\r
+        "OwnerKey" = "8:_5642279778584C4AB08E32A595FB6C82"\r
+        "MsmSig" = "8:_UNDEFINED"\r
+        }\r
+        "Entry"\r
+        {\r
+        "MsmKey" = "8:_UNDEFINED"\r
+        "OwnerKey" = "8:_5642279778584C4AB08E32A595FB6C82"\r
+        "MsmSig" = "8:_UNDEFINED"\r
+        }\r
+        "Entry"\r
+        {\r
+        "MsmKey" = "8:_UNDEFINED"\r
+        "OwnerKey" = "8:_AC035A5C33626ACA61BCD2318245A97A"\r
+        "MsmSig" = "8:_UNDEFINED"\r
+        }\r
+    }\r
+    "Configurations"\r
+    {\r
+        "Debug"\r
+        {\r
+        "DisplayName" = "8:Debug"\r
+        "IsDebugOnly" = "11:TRUE"\r
+        "IsReleaseOnly" = "11:FALSE"\r
+        "OutputFilename" = "8:Debug\\MLSFileTrimmerInstaller.msi"\r
+        "PackageFilesAs" = "3:2"\r
+        "PackageFileSize" = "3:-2147483648"\r
+        "CabType" = "3:1"\r
+        "Compression" = "3:2"\r
+        "SignOutput" = "11:FALSE"\r
+        "CertificateFile" = "8:"\r
+        "PrivateKeyFile" = "8:"\r
+        "TimeStampServer" = "8:"\r
+        "InstallerBootstrapper" = "3:2"\r
+            "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"\r
+            {\r
+            "Enabled" = "11:TRUE"\r
+            "PromptEnabled" = "11:TRUE"\r
+            "PrerequisitesLocation" = "2:1"\r
+            "Url" = "8:"\r
+            "ComponentsUrl" = "8:"\r
+            }\r
+        }\r
+        "Release"\r
+        {\r
+        "DisplayName" = "8:Release"\r
+        "IsDebugOnly" = "11:FALSE"\r
+        "IsReleaseOnly" = "11:TRUE"\r
+        "OutputFilename" = "8:Release\\MLSFileTrimmerInstaller.msi"\r
+        "PackageFilesAs" = "3:2"\r
+        "PackageFileSize" = "3:-2147483648"\r
+        "CabType" = "3:1"\r
+        "Compression" = "3:2"\r
+        "SignOutput" = "11:FALSE"\r
+        "CertificateFile" = "8:"\r
+        "PrivateKeyFile" = "8:"\r
+        "TimeStampServer" = "8:"\r
+        "InstallerBootstrapper" = "3:2"\r
+            "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"\r
+            {\r
+            "Enabled" = "11:TRUE"\r
+            "PromptEnabled" = "11:TRUE"\r
+            "PrerequisitesLocation" = "2:1"\r
+            "Url" = "8:"\r
+            "ComponentsUrl" = "8:"\r
+                "Items"\r
+                {\r
+                    "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Net.Framework.3.5.SP1"\r
+                    {\r
+                    "Name" = "8:.NET Framework 3.5 SP1"\r
+                    "ProductCode" = "8:Microsoft.Net.Framework.3.5.SP1"\r
+                    }\r
+                    "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.3.1"\r
+                    {\r
+                    "Name" = "8:Windows Installer 3.1"\r
+                    "ProductCode" = "8:Microsoft.Windows.Installer.3.1"\r
+                    }\r
+                }\r
+            }\r
+        }\r
+    }\r
+    "Deployable"\r
+    {\r
+        "CustomAction"\r
+        {\r
+        }\r
+        "DefaultFeature"\r
+        {\r
+        "Name" = "8:DefaultFeature"\r
+        "Title" = "8:"\r
+        "Description" = "8:"\r
+        }\r
+        "ExternalPersistence"\r
+        {\r
+            "LaunchCondition"\r
+            {\r
+                "{A06ECF26-33A3-4562-8140-9B0E340D4F24}:_393CAD7244BD468193F0F118269A7C27"\r
+                {\r
+                "Name" = "8:.NET Framework"\r
+                "Message" = "8:[VSDNETMSG]"\r
+                "Version" = "8:3.5.30729"\r
+                "AllowLaterVersions" = "11:FALSE"\r
+                "InstallUrl" = "8:http://go.microsoft.com/fwlink/?LinkId=76617"\r
+                }\r
+            }\r
+        }\r
+        "File"\r
+        {\r
+            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_23F1FB896E824A679B37949346C05547"\r
+            {\r
+            "SourcePath" = "8:..\\MLSFileTrimmer\\bin\\Release\\MLSRequiredFields.xml"\r
+            "TargetName" = "8:MLSRequiredFields.xml"\r
+            "Tag" = "8:"\r
+            "Folder" = "8:_2B5E9E5E32C84619823E502184B2A72C"\r
+            "Condition" = "8:"\r
+            "Transitive" = "11:FALSE"\r
+            "Vital" = "11:TRUE"\r
+            "ReadOnly" = "11:FALSE"\r
+            "Hidden" = "11:FALSE"\r
+            "System" = "11:FALSE"\r
+            "Permanent" = "11:FALSE"\r
+            "SharedLegacy" = "11:FALSE"\r
+            "PackageAs" = "3:1"\r
+            "Register" = "3:1"\r
+            "Exclude" = "11:FALSE"\r
+            "IsDependency" = "11:FALSE"\r
+            "IsolateTo" = "8:"\r
+            }\r
+            "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_5642279778584C4AB08E32A595FB6C82"\r
+            {\r
+            "AssemblyRegister" = "3:1"\r
+            "AssemblyIsInGAC" = "11:FALSE"\r
+            "AssemblyAsmDisplayName" = "8:MLSFileTrimmer, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"\r
+                "ScatterAssemblies"\r
+                {\r
+                    "_5642279778584C4AB08E32A595FB6C82"\r
+                    {\r
+                    "Name" = "8:MLSFileTrimmer.exe"\r
+                    "Attributes" = "3:512"\r
+                    }\r
+                }\r
+            "SourcePath" = "8:..\\MLSFileTrimmer\\bin\\Release\\MLSFileTrimmer.exe"\r
+            "TargetName" = "8:"\r
+            "Tag" = "8:"\r
+            "Folder" = "8:_2B5E9E5E32C84619823E502184B2A72C"\r
+            "Condition" = "8:"\r
+            "Transitive" = "11:FALSE"\r
+            "Vital" = "11:TRUE"\r
+            "ReadOnly" = "11:FALSE"\r
+            "Hidden" = "11:FALSE"\r
+            "System" = "11:FALSE"\r
+            "Permanent" = "11:FALSE"\r
+            "SharedLegacy" = "11:FALSE"\r
+            "PackageAs" = "3:1"\r
+            "Register" = "3:1"\r
+            "Exclude" = "11:FALSE"\r
+            "IsDependency" = "11:FALSE"\r
+            "IsolateTo" = "8:"\r
+            }\r
+            "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_AC035A5C33626ACA61BCD2318245A97A"\r
+            {\r
+            "AssemblyRegister" = "3:1"\r
+            "AssemblyIsInGAC" = "11:FALSE"\r
+            "AssemblyAsmDisplayName" = "8:Ionic.Zip, Version=1.9.1.5, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL"\r
+                "ScatterAssemblies"\r
+                {\r
+                    "_AC035A5C33626ACA61BCD2318245A97A"\r
+                    {\r
+                    "Name" = "8:Ionic.Zip.DLL"\r
+                    "Attributes" = "3:512"\r
+                    }\r
+                }\r
+            "SourcePath" = "8:Ionic.Zip.DLL"\r
+            "TargetName" = "8:"\r
+            "Tag" = "8:"\r
+            "Folder" = "8:_2B5E9E5E32C84619823E502184B2A72C"\r
+            "Condition" = "8:"\r
+            "Transitive" = "11:FALSE"\r
+            "Vital" = "11:TRUE"\r
+            "ReadOnly" = "11:FALSE"\r
+            "Hidden" = "11:FALSE"\r
+            "System" = "11:FALSE"\r
+            "Permanent" = "11:FALSE"\r
+            "SharedLegacy" = "11:FALSE"\r
+            "PackageAs" = "3:1"\r
+            "Register" = "3:1"\r
+            "Exclude" = "11:FALSE"\r
+            "IsDependency" = "11:TRUE"\r
+            "IsolateTo" = "8:"\r
+            }\r
+        }\r
+        "FileType"\r
+        {\r
+        }\r
+        "Folder"\r
+        {\r
+            "{1525181F-901A-416C-8A58-119130FE478E}:_1277279AD8B443BCB64D19D1729C9E9D"\r
+            {\r
+            "Name" = "8:#1916"\r
+            "AlwaysCreate" = "11:FALSE"\r
+            "Condition" = "8:"\r
+            "Transitive" = "11:FALSE"\r
+            "Property" = "8:DesktopFolder"\r
+                "Folders"\r
+                {\r
+                }\r
+            }\r
+            "{3C67513D-01DD-4637-8A68-80971EB9504F}:_2B5E9E5E32C84619823E502184B2A72C"\r
+            {\r
+            "DefaultLocation" = "8:[ProgramFilesFolder]\\[ProductName]"\r
+            "Name" = "8:#1925"\r
+            "AlwaysCreate" = "11:FALSE"\r
+            "Condition" = "8:"\r
+            "Transitive" = "11:FALSE"\r
+            "Property" = "8:TARGETDIR"\r
+                "Folders"\r
+                {\r
+                }\r
+            }\r
+            "{1525181F-901A-416C-8A58-119130FE478E}:_A73814472A784ED28E52A258A1870893"\r
+            {\r
+            "Name" = "8:#1919"\r
+            "AlwaysCreate" = "11:TRUE"\r
+            "Condition" = "8:"\r
+            "Transitive" = "11:FALSE"\r
+            "Property" = "8:ProgramMenuFolder"\r
+                "Folders"\r
+                {\r
+                }\r
+            }\r
+        }\r
+        "LaunchCondition"\r
+        {\r
+        }\r
+        "Locator"\r
+        {\r
+        }\r
+        "MsiBootstrapper"\r
+        {\r
+        "LangId" = "3:1033"\r
+        "RequiresElevation" = "11:FALSE"\r
+        }\r
+        "Product"\r
+        {\r
+        "Name" = "8:Microsoft Visual Studio"\r
+        "ProductName" = "8:MLSFileTrimmer"\r
+        "ProductCode" = "8:{0207BA73-A23A-44DE-BFA8-E26EAD156468}"\r
+        "PackageCode" = "8:{7C3340C5-60EE-44E5-B6C0-E7D5B03C1F3C}"\r
+        "UpgradeCode" = "8:{493247E6-F4BC-4B0F-B241-951C27338FCF}"\r
+        "RestartWWWService" = "11:FALSE"\r
+        "RemovePreviousVersions" = "11:TRUE"\r
+        "DetectNewerInstalledVersion" = "11:TRUE"\r
+        "InstallAllUsers" = "11:FALSE"\r
+        "ProductVersion" = "8:1.0.0"\r
+        "Manufacturer" = "8:Owen Leonard"\r
+        "ARPHELPTELEPHONE" = "8:"\r
+        "ARPHELPLINK" = "8:"\r
+        "Title" = "8:MLSFileTrimmer"\r
+        "Subject" = "8:"\r
+        "ARPCONTACT" = "8:Owen Leonard"\r
+        "Keywords" = "8:"\r
+        "ARPCOMMENTS" = "8:"\r
+        "ARPURLINFOABOUT" = "8:"\r
+        "ARPPRODUCTICON" = "8:"\r
+        "ARPIconIndex" = "3:0"\r
+        "SearchPath" = "8:"\r
+        "UseSystemSearchPath" = "11:TRUE"\r
+        "TargetPlatform" = "3:0"\r
+        "PreBuildEvent" = "8:"\r
+        "PostBuildEvent" = "8:"\r
+        "RunPostBuildEvent" = "3:0"\r
+        }\r
+        "Registry"\r
+        {\r
+            "HKLM"\r
+            {\r
+                "Keys"\r
+                {\r
+                    "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_ACD8007A816B4D4C91918EE14CA9B8F7"\r
+                    {\r
+                    "Name" = "8:Software"\r
+                    "Condition" = "8:"\r
+                    "AlwaysCreate" = "11:FALSE"\r
+                    "DeleteAtUninstall" = "11:FALSE"\r
+                    "Transitive" = "11:FALSE"\r
+                        "Keys"\r
+                        {\r
+                            "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_45E06D48AA0A44D293EFBDF770570DEF"\r
+                            {\r
+                            "Name" = "8:[Manufacturer]"\r
+                            "Condition" = "8:"\r
+                            "AlwaysCreate" = "11:FALSE"\r
+                            "DeleteAtUninstall" = "11:FALSE"\r
+                            "Transitive" = "11:FALSE"\r
+                                "Keys"\r
+                                {\r
+                                }\r
+                                "Values"\r
+                                {\r
+                                }\r
+                            }\r
+                        }\r
+                        "Values"\r
+                        {\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+            "HKCU"\r
+            {\r
+                "Keys"\r
+                {\r
+                    "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_007AC28067D54F69809DFCBC8131B338"\r
+                    {\r
+                    "Name" = "8:Software"\r
+                    "Condition" = "8:"\r
+                    "AlwaysCreate" = "11:FALSE"\r
+                    "DeleteAtUninstall" = "11:FALSE"\r
+                    "Transitive" = "11:FALSE"\r
+                        "Keys"\r
+                        {\r
+                            "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_CCA6900298CC4784ABCD44D1F2277D83"\r
+                            {\r
+                            "Name" = "8:[Manufacturer]"\r
+                            "Condition" = "8:"\r
+                            "AlwaysCreate" = "11:FALSE"\r
+                            "DeleteAtUninstall" = "11:FALSE"\r
+                            "Transitive" = "11:FALSE"\r
+                                "Keys"\r
+                                {\r
+                                }\r
+                                "Values"\r
+                                {\r
+                                }\r
+                            }\r
+                        }\r
+                        "Values"\r
+                        {\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+            "HKCR"\r
+            {\r
+                "Keys"\r
+                {\r
+                }\r
+            }\r
+            "HKU"\r
+            {\r
+                "Keys"\r
+                {\r
+                }\r
+            }\r
+            "HKPU"\r
+            {\r
+                "Keys"\r
+                {\r
+                }\r
+            }\r
+        }\r
+        "Sequences"\r
+        {\r
+        }\r
+        "Shortcut"\r
+        {\r
+            "{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_A775FA7558924A68983D469E818904C5"\r
+            {\r
+            "Name" = "8:MLSFileTrimmer"\r
+            "Arguments" = "8:"\r
+            "Description" = "8:"\r
+            "ShowCmd" = "3:1"\r
+            "IconIndex" = "3:0"\r
+            "Transitive" = "11:FALSE"\r
+            "Target" = "8:_5642279778584C4AB08E32A595FB6C82"\r
+            "Folder" = "8:_A73814472A784ED28E52A258A1870893"\r
+            "WorkingFolder" = "8:_2B5E9E5E32C84619823E502184B2A72C"\r
+            "Icon" = "8:"\r
+            "Feature" = "8:"\r
+            }\r
+        }\r
+        "UserInterface"\r
+        {\r
+            "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_7275E1CC95234C428154441D4D82CE6B"\r
+            {\r
+            "Name" = "8:#1900"\r
+            "Sequence" = "3:2"\r
+            "Attributes" = "3:1"\r
+                "Dialogs"\r
+                {\r
+                    "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_C21B4F018FA548C681ABFDDAD0047CE5"\r
+                    {\r
+                    "Sequence" = "3:300"\r
+                    "DisplayName" = "8:Confirm Installation"\r
+                    "UseDynamicProperties" = "11:TRUE"\r
+                    "IsDependency" = "11:FALSE"\r
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdAdminConfirmDlg.wid"\r
+                        "Properties"\r
+                        {\r
+                            "BannerBitmap"\r
+                            {\r
+                            "Name" = "8:BannerBitmap"\r
+                            "DisplayName" = "8:#1001"\r
+                            "Description" = "8:#1101"\r
+                            "Type" = "3:8"\r
+                            "ContextData" = "8:Bitmap"\r
+                            "Attributes" = "3:4"\r
+                            "Setting" = "3:1"\r
+                            "UsePlugInResources" = "11:TRUE"\r
+                            }\r
+                        }\r
+                    }\r
+                    "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_DF8FBE40590F403CAB07FBAA539E298C"\r
+                    {\r
+                    "Sequence" = "3:100"\r
+                    "DisplayName" = "8:Welcome"\r
+                    "UseDynamicProperties" = "11:TRUE"\r
+                    "IsDependency" = "11:FALSE"\r
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdAdminWelcomeDlg.wid"\r
+                        "Properties"\r
+                        {\r
+                            "BannerBitmap"\r
+                            {\r
+                            "Name" = "8:BannerBitmap"\r
+                            "DisplayName" = "8:#1001"\r
+                            "Description" = "8:#1101"\r
+                            "Type" = "3:8"\r
+                            "ContextData" = "8:Bitmap"\r
+                            "Attributes" = "3:4"\r
+                            "Setting" = "3:1"\r
+                            "UsePlugInResources" = "11:TRUE"\r
+                            }\r
+                            "CopyrightWarning"\r
+                            {\r
+                            "Name" = "8:CopyrightWarning"\r
+                            "DisplayName" = "8:#1002"\r
+                            "Description" = "8:#1102"\r
+                            "Type" = "3:3"\r
+                            "ContextData" = "8:"\r
+                            "Attributes" = "3:0"\r
+                            "Setting" = "3:1"\r
+                            "Value" = "8:#1202"\r
+                            "DefaultValue" = "8:#1202"\r
+                            "UsePlugInResources" = "11:TRUE"\r
+                            }\r
+                            "Welcome"\r
+                            {\r
+                            "Name" = "8:Welcome"\r
+                            "DisplayName" = "8:#1003"\r
+                            "Description" = "8:#1103"\r
+                            "Type" = "3:3"\r
+                            "ContextData" = "8:"\r
+                            "Attributes" = "3:0"\r
+                            "Setting" = "3:1"\r
+                            "Value" = "8:#1203"\r
+                            "DefaultValue" = "8:#1203"\r
+                            "UsePlugInResources" = "11:TRUE"\r
+                            }\r
+                        }\r
+                    }\r
+                    "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_E54F333D647C4D0F96FB6D9AAB074BE7"\r
+                    {\r
+                    "Sequence" = "3:200"\r
+                    "DisplayName" = "8:Installation Folder"\r
+                    "UseDynamicProperties" = "11:TRUE"\r
+                    "IsDependency" = "11:FALSE"\r
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdAdminFolderDlg.wid"\r
+                        "Properties"\r
+                        {\r
+                            "BannerBitmap"\r
+                            {\r
+                            "Name" = "8:BannerBitmap"\r
+                            "DisplayName" = "8:#1001"\r
+                            "Description" = "8:#1101"\r
+                            "Type" = "3:8"\r
+                            "ContextData" = "8:Bitmap"\r
+                            "Attributes" = "3:4"\r
+                            "Setting" = "3:1"\r
+                            "UsePlugInResources" = "11:TRUE"\r
+                            }\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+            "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_8B27D79640844A679A724DB98E5536F6"\r
+            {\r
+            "Name" = "8:#1902"\r
+            "Sequence" = "3:1"\r
+            "Attributes" = "3:3"\r
+                "Dialogs"\r
+                {\r
+                    "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_653754B9A9C94196B3F025527677F7FA"\r
+                    {\r
+                    "Sequence" = "3:100"\r
+                    "DisplayName" = "8:Finished"\r
+                    "UseDynamicProperties" = "11:TRUE"\r
+                    "IsDependency" = "11:FALSE"\r
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdFinishedDlg.wid"\r
+                        "Properties"\r
+                        {\r
+                            "BannerBitmap"\r
+                            {\r
+                            "Name" = "8:BannerBitmap"\r
+                            "DisplayName" = "8:#1001"\r
+                            "Description" = "8:#1101"\r
+                            "Type" = "3:8"\r
+                            "ContextData" = "8:Bitmap"\r
+                            "Attributes" = "3:4"\r
+                            "Setting" = "3:1"\r
+                            "UsePlugInResources" = "11:TRUE"\r
+                            }\r
+                            "UpdateText"\r
+                            {\r
+                            "Name" = "8:UpdateText"\r
+                            "DisplayName" = "8:#1058"\r
+                            "Description" = "8:#1158"\r
+                            "Type" = "3:15"\r
+                            "ContextData" = "8:"\r
+                            "Attributes" = "3:0"\r
+                            "Setting" = "3:1"\r
+                            "Value" = "8:#1258"\r
+                            "DefaultValue" = "8:#1258"\r
+                            "UsePlugInResources" = "11:TRUE"\r
+                            }\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+            "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_8B4BB69D9D7944EB966ED65EDA4E2238"\r
+            {\r
+            "Name" = "8:#1901"\r
+            "Sequence" = "3:1"\r
+            "Attributes" = "3:2"\r
+                "Dialogs"\r
+                {\r
+                    "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_F35596B57DAD42AE9C4E862A0BEB6DE8"\r
+                    {\r
+                    "Sequence" = "3:100"\r
+                    "DisplayName" = "8:Progress"\r
+                    "UseDynamicProperties" = "11:TRUE"\r
+                    "IsDependency" = "11:FALSE"\r
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdProgressDlg.wid"\r
+                        "Properties"\r
+                        {\r
+                            "BannerBitmap"\r
+                            {\r
+                            "Name" = "8:BannerBitmap"\r
+                            "DisplayName" = "8:#1001"\r
+                            "Description" = "8:#1101"\r
+                            "Type" = "3:8"\r
+                            "ContextData" = "8:Bitmap"\r
+                            "Attributes" = "3:4"\r
+                            "Setting" = "3:1"\r
+                            "UsePlugInResources" = "11:TRUE"\r
+                            }\r
+                            "ShowProgress"\r
+                            {\r
+                            "Name" = "8:ShowProgress"\r
+                            "DisplayName" = "8:#1009"\r
+                            "Description" = "8:#1109"\r
+                            "Type" = "3:5"\r
+                            "ContextData" = "8:1;True=1;False=0"\r
+                            "Attributes" = "3:0"\r
+                            "Setting" = "3:0"\r
+                            "Value" = "3:1"\r
+                            "DefaultValue" = "3:1"\r
+                            "UsePlugInResources" = "11:TRUE"\r
+                            }\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+            "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_9F7B1005A1B84C43816B9A27A9752AA7"\r
+            {\r
+            "Name" = "8:#1900"\r
+            "Sequence" = "3:1"\r
+            "Attributes" = "3:1"\r
+                "Dialogs"\r
+                {\r
+                    "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_142F34D5A2D848EAB951813A2A3209AB"\r
+                    {\r
+                    "Sequence" = "3:100"\r
+                    "DisplayName" = "8:Welcome"\r
+                    "UseDynamicProperties" = "11:TRUE"\r
+                    "IsDependency" = "11:FALSE"\r
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdWelcomeDlg.wid"\r
+                        "Properties"\r
+                        {\r
+                            "BannerBitmap"\r
+                            {\r
+                            "Name" = "8:BannerBitmap"\r
+                            "DisplayName" = "8:#1001"\r
+                            "Description" = "8:#1101"\r
+                            "Type" = "3:8"\r
+                            "ContextData" = "8:Bitmap"\r
+                            "Attributes" = "3:4"\r
+                            "Setting" = "3:1"\r
+                            "UsePlugInResources" = "11:TRUE"\r
+                            }\r
+                            "CopyrightWarning"\r
+                            {\r
+                            "Name" = "8:CopyrightWarning"\r
+                            "DisplayName" = "8:#1002"\r
+                            "Description" = "8:#1102"\r
+                            "Type" = "3:3"\r
+                            "ContextData" = "8:"\r
+                            "Attributes" = "3:0"\r
+                            "Setting" = "3:1"\r
+                            "Value" = "8:#1202"\r
+                            "DefaultValue" = "8:#1202"\r
+                            "UsePlugInResources" = "11:TRUE"\r
+                            }\r
+                            "Welcome"\r
+                            {\r
+                            "Name" = "8:Welcome"\r
+                            "DisplayName" = "8:#1003"\r
+                            "Description" = "8:#1103"\r
+                            "Type" = "3:3"\r
+                            "ContextData" = "8:"\r
+                            "Attributes" = "3:0"\r
+                            "Setting" = "3:1"\r
+                            "Value" = "8:#1203"\r
+                            "DefaultValue" = "8:#1203"\r
+                            "UsePlugInResources" = "11:TRUE"\r
+                            }\r
+                        }\r
+                    }\r
+                    "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_83DE0F88871F454DB09CE854148D44CD"\r
+                    {\r
+                    "Sequence" = "3:200"\r
+                    "DisplayName" = "8:Installation Folder"\r
+                    "UseDynamicProperties" = "11:TRUE"\r
+                    "IsDependency" = "11:FALSE"\r
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdFolderDlg.wid"\r
+                        "Properties"\r
+                        {\r
+                            "BannerBitmap"\r
+                            {\r
+                            "Name" = "8:BannerBitmap"\r
+                            "DisplayName" = "8:#1001"\r
+                            "Description" = "8:#1101"\r
+                            "Type" = "3:8"\r
+                            "ContextData" = "8:Bitmap"\r
+                            "Attributes" = "3:4"\r
+                            "Setting" = "3:1"\r
+                            "UsePlugInResources" = "11:TRUE"\r
+                            }\r
+                            "InstallAllUsersVisible"\r
+                            {\r
+                            "Name" = "8:InstallAllUsersVisible"\r
+                            "DisplayName" = "8:#1059"\r
+                            "Description" = "8:#1159"\r
+                            "Type" = "3:5"\r
+                            "ContextData" = "8:1;True=1;False=0"\r
+                            "Attributes" = "3:0"\r
+                            "Setting" = "3:0"\r
+                            "Value" = "3:1"\r
+                            "DefaultValue" = "3:1"\r
+                            "UsePlugInResources" = "11:TRUE"\r
+                            }\r
+                        }\r
+                    }\r
+                    "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_EFE7D61C687B461F83931BD482452DFE"\r
+                    {\r
+                    "Sequence" = "3:300"\r
+                    "DisplayName" = "8:Confirm Installation"\r
+                    "UseDynamicProperties" = "11:TRUE"\r
+                    "IsDependency" = "11:FALSE"\r
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdConfirmDlg.wid"\r
+                        "Properties"\r
+                        {\r
+                            "BannerBitmap"\r
+                            {\r
+                            "Name" = "8:BannerBitmap"\r
+                            "DisplayName" = "8:#1001"\r
+                            "Description" = "8:#1101"\r
+                            "Type" = "3:8"\r
+                            "ContextData" = "8:Bitmap"\r
+                            "Attributes" = "3:4"\r
+                            "Setting" = "3:1"\r
+                            "UsePlugInResources" = "11:TRUE"\r
+                            }\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+            "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_A0398A9F28B045A5BD77D8E47C92155A"\r
+            {\r
+            "UseDynamicProperties" = "11:FALSE"\r
+            "IsDependency" = "11:FALSE"\r
+            "SourcePath" = "8:<VsdDialogDir>\\VsdUserInterface.wim"\r
+            }\r
+            "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_B1884FE6070E459F9DAD5D8C512B2EA2"\r
+            {\r
+            "Name" = "8:#1902"\r
+            "Sequence" = "3:2"\r
+            "Attributes" = "3:3"\r
+                "Dialogs"\r
+                {\r
+                    "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_5E2A8698AC7D4706B2213230F6BE7E75"\r
+                    {\r
+                    "Sequence" = "3:100"\r
+                    "DisplayName" = "8:Finished"\r
+                    "UseDynamicProperties" = "11:TRUE"\r
+                    "IsDependency" = "11:FALSE"\r
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdAdminFinishedDlg.wid"\r
+                        "Properties"\r
+                        {\r
+                            "BannerBitmap"\r
+                            {\r
+                            "Name" = "8:BannerBitmap"\r
+                            "DisplayName" = "8:#1001"\r
+                            "Description" = "8:#1101"\r
+                            "Type" = "3:8"\r
+                            "ContextData" = "8:Bitmap"\r
+                            "Attributes" = "3:4"\r
+                            "Setting" = "3:1"\r
+                            "UsePlugInResources" = "11:TRUE"\r
+                            }\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+            "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_D1F6D2A3B6BE4420B82B9E029943450A"\r
+            {\r
+            "UseDynamicProperties" = "11:FALSE"\r
+            "IsDependency" = "11:FALSE"\r
+            "SourcePath" = "8:<VsdDialogDir>\\VsdBasicDialogs.wim"\r
+            }\r
+            "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_E58BCA2EAA1240B9B7E88354732AFBA4"\r
+            {\r
+            "Name" = "8:#1901"\r
+            "Sequence" = "3:2"\r
+            "Attributes" = "3:2"\r
+                "Dialogs"\r
+                {\r
+                    "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_6D6BC735065C4888BFAECC0D007494D7"\r
+                    {\r
+                    "Sequence" = "3:100"\r
+                    "DisplayName" = "8:Progress"\r
+                    "UseDynamicProperties" = "11:TRUE"\r
+                    "IsDependency" = "11:FALSE"\r
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdAdminProgressDlg.wid"\r
+                        "Properties"\r
+                        {\r
+                            "BannerBitmap"\r
+                            {\r
+                            "Name" = "8:BannerBitmap"\r
+                            "DisplayName" = "8:#1001"\r
+                            "Description" = "8:#1101"\r
+                            "Type" = "3:8"\r
+                            "ContextData" = "8:Bitmap"\r
+                            "Attributes" = "3:4"\r
+                            "Setting" = "3:1"\r
+                            "UsePlugInResources" = "11:TRUE"\r
+                            }\r
+                            "ShowProgress"\r
+                            {\r
+                            "Name" = "8:ShowProgress"\r
+                            "DisplayName" = "8:#1009"\r
+                            "Description" = "8:#1109"\r
+                            "Type" = "3:5"\r
+                            "ContextData" = "8:1;True=1;False=0"\r
+                            "Attributes" = "3:0"\r
+                            "Setting" = "3:0"\r
+                            "Value" = "3:1"\r
+                            "DefaultValue" = "3:1"\r
+                            "UsePlugInResources" = "11:TRUE"\r
+                            }\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+        }\r
+        "MergeModule"\r
+        {\r
+        }\r
+        "ProjectOutput"\r
+        {\r
+        }\r
+    }\r
+}\r