updated MLSFileTrimmer gui, added exit button, updated msi file
authorOwen Leonard <owen.leonard@hp.com>
Fri, 8 Oct 2010 17:19:59 +0000 (11:19 -0600)
committerOwen Leonard <owen.leonard@hp.com>
Fri, 8 Oct 2010 17:22:38 +0000 (11:22 -0600)
mls/MLSFileTrimmerInstaller.msi
mls/windowsGUI/MLSFileTrimmer/CSVTrimmer.cs
mls/windowsGUI/MLSFileTrimmer/Window1.xaml
mls/windowsGUI/MLSFileTrimmer/Window1.xaml.cs

index 5d63238bb79e331a1e39c96aa9b05fd9d559c858..848eabf48624db645e3f84379633addac3ba5311 100644 (file)
Binary files a/mls/MLSFileTrimmerInstaller.msi and b/mls/MLSFileTrimmerInstaller.msi differ
index 9b39874ddda26b0229a475a2e611478b895a6528..97b25c52c3b085f14456b23b16584e123311500c 100644 (file)
@@ -1,9 +1,7 @@
 using System;\r
 using System.Collections;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
-using System.Text;\r
 using System.IO;\r
+using System.Text;\r
 \r
 namespace MLSFileTrimmer\r
 {\r
index 074a27eb1f10214c572d1c9bb47e6784209004c8..13b01b0dc462470deb7a597b9cefe8e48d271953 100644 (file)
@@ -1,13 +1,25 @@
 <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
+    Title="MLS File Trimmer" Height="200" Width="600" MaxHeight="Infinity" MaxWidth="Infinity" MinHeight="0" MinWidth="0" ResizeMode="CanResize">\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.RowDefinitions>\r
+            <RowDefinition Height="1*"/>\r
+            <RowDefinition Height="1*"/>\r
+            <RowDefinition Height="1*"/>\r
+            <RowDefinition Height="1*"/>\r
+        </Grid.RowDefinitions> \r
+        <Grid.ColumnDefinitions>\r
+            <ColumnDefinition Width="80*"/>\r
+            <ColumnDefinition Width="20*"/>\r
+        </Grid.ColumnDefinitions>\r
+        \r
+        <Label Grid.Row="0" Grid.Column="0" Margin="5,5" Name="label4" VerticalAlignment="Center" >Please specify the directory where the MLS csv files are.</Label>\r
+        <TextBox Grid.Row="1" Grid.Column="0" Margin="5,5" Name="outputDirTextBox" FlowDirection="LeftToRight" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" TextWrapping="NoWrap"/>\r
+        <Button Grid.Row="1" Grid.Column="1" Margin="5,5" Name="outDirButton" Click="outDirButton_Click">Browse</Button>\r
+        <Button Grid.Row="2" Grid.Column="1" Margin="5,5" Name="parseButton" Click="parseButton_Click">OK</Button>\r
+        <Button Grid.Row="3" Grid.Column="1" Margin="5,5" Name="exitButton" Click="exitButton_Click">Exit</Button>\r
+        <Label Grid.Row="0" Grid.Column="1" Margin="5,5" Name="finishedLabel" FontSize="16" Foreground="Red" Visibility="Hidden">Finished!</Label>\r
+        <Label Grid.Row="0" Grid.Column="1" Margin="5,5" Name="trimmingLabel" FontSize="16" Foreground="Green" Visibility="Hidden" >Trimming...</Label>\r
     </Grid>\r
 </Window>\r
index 098aa47ccffcab94bc4bb75f41cb6cade824348f..9ababe2165d57d745186243a9938c8a3e7211ecb 100644 (file)
@@ -1,24 +1,13 @@
 using System;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
+using System.ComponentModel;\r
+using System.IO;\r
 using System.Text;\r
+using System.Threading;\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 System.Xml.Serialization;\r
 using Ionic.Zip;\r
-using System.ComponentModel;\r
-using System.Threading;\r
+using FolderBrowserDialog = System.Windows.Forms.FolderBrowserDialog;\r
 \r
 namespace MLSFileTrimmer\r
 {\r
@@ -62,7 +51,7 @@ namespace MLSFileTrimmer
             openFolderDialog.RootFolder = Environment.SpecialFolder.MyDocuments;\r
             if (openFolderDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)\r
             {\r
-                outputDirtextBox.Text = openFolderDialog.SelectedPath;\r
+                outputDirTextBox.Text = openFolderDialog.SelectedPath;\r
                 currentDirectory = openFolderDialog.SelectedPath;\r
             }\r
         }\r
@@ -70,14 +59,14 @@ namespace MLSFileTrimmer
         private void parseButton_Click(object sender, RoutedEventArgs e)\r
         {\r
             // make sure the directory exists\r
-            if (outputDirtextBox.Text.Equals(String.Empty))\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
+            else if (!Directory.Exists(outputDirTextBox.Text))\r
             {\r
-                MessageBox.Show(outputDirtextBox.Text + " does not exist. Please select the correct output directory.");\r
+                MessageBox.Show(outputDirTextBox.Text + " does not exist. Please select the correct output directory.");\r
             }\r
 \r
             // make sure the original files exist\r
@@ -147,5 +136,10 @@ namespace MLSFileTrimmer
             this.trimmingLabel.Visibility = Visibility.Hidden;\r
             this.finishedLabel.Visibility = Visibility.Visible;\r
         }\r
+\r
+        private void exitButton_Click(object sender, RoutedEventArgs e)\r
+        {\r
+            this.Close();\r
+        }\r
     }\r
 }\r