From: Owen Leonard <owen.leonard@hp.com> Date: Fri, 8 Oct 2010 17:19:59 +0000 (-0600) Subject: updated MLSFileTrimmer gui, added exit button, updated msi file X-Git-Tag: release_1_1_0~12 X-Git-Url: http://git.pippins.net/%27%20.%20%24this-%3Ephpgw_js_url%20.%20%27/jscalendar/static/%7Bediturl%7D?a=commitdiff_plain;h=1a6502e9a30c2fa28a6d251718bbe386b1700c7c;p=eq%2F.git updated MLSFileTrimmer gui, added exit button, updated msi file --- diff --git a/mls/MLSFileTrimmerInstaller.msi b/mls/MLSFileTrimmerInstaller.msi index 5d63238..848eabf 100644 Binary files a/mls/MLSFileTrimmerInstaller.msi and b/mls/MLSFileTrimmerInstaller.msi differ diff --git a/mls/windowsGUI/MLSFileTrimmer/CSVTrimmer.cs b/mls/windowsGUI/MLSFileTrimmer/CSVTrimmer.cs index 9b39874..97b25c5 100644 --- a/mls/windowsGUI/MLSFileTrimmer/CSVTrimmer.cs +++ b/mls/windowsGUI/MLSFileTrimmer/CSVTrimmer.cs @@ -1,9 +1,7 @@ using System; using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.IO; +using System.Text; namespace MLSFileTrimmer { diff --git a/mls/windowsGUI/MLSFileTrimmer/Window1.xaml b/mls/windowsGUI/MLSFileTrimmer/Window1.xaml index 074a27e..13b01b0 100644 --- a/mls/windowsGUI/MLSFileTrimmer/Window1.xaml +++ b/mls/windowsGUI/MLSFileTrimmer/Window1.xaml @@ -1,13 +1,25 @@ <Window x:Class="MLSFileTrimmer.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - Title="MLS File Trimmer" Height="200" Width="600" MaxHeight="Infinity" MaxWidth="Infinity" MinHeight="0" MinWidth="0" ResizeMode="CanMinimize"> + Title="MLS File Trimmer" Height="200" Width="600" MaxHeight="Infinity" MaxWidth="Infinity" MinHeight="0" MinWidth="0" ResizeMode="CanResize"> <Grid Background="Silver"> - <Label Margin="20,30,30,0" Name="label4" VerticalAlignment="Top" Height="30">Please specify the directory where the MLS csv files are.</Label> - <TextBox Margin="20,70,130,60" Name="outputDirtextBox" FlowDirection="LeftToRight" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" TextWrapping="NoWrap" Height="30" /> - <Button Margin="0,70,20,61" Name="outDirButton" HorizontalAlignment="Right" Width="100" Height="30" Click="outDirButton_Click">Browse</Button> - <Button Margin="0,0,20,20" Name="parseButton" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="100" Height="30" Click="parseButton_Click">OK</Button> - <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> - <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> + <Grid.RowDefinitions> + <RowDefinition Height="1*"/> + <RowDefinition Height="1*"/> + <RowDefinition Height="1*"/> + <RowDefinition Height="1*"/> + </Grid.RowDefinitions> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="80*"/> + <ColumnDefinition Width="20*"/> + </Grid.ColumnDefinitions> + + <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> + <TextBox Grid.Row="1" Grid.Column="0" Margin="5,5" Name="outputDirTextBox" FlowDirection="LeftToRight" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" TextWrapping="NoWrap"/> + <Button Grid.Row="1" Grid.Column="1" Margin="5,5" Name="outDirButton" Click="outDirButton_Click">Browse</Button> + <Button Grid.Row="2" Grid.Column="1" Margin="5,5" Name="parseButton" Click="parseButton_Click">OK</Button> + <Button Grid.Row="3" Grid.Column="1" Margin="5,5" Name="exitButton" Click="exitButton_Click">Exit</Button> + <Label Grid.Row="0" Grid.Column="1" Margin="5,5" Name="finishedLabel" FontSize="16" Foreground="Red" Visibility="Hidden">Finished!</Label> + <Label Grid.Row="0" Grid.Column="1" Margin="5,5" Name="trimmingLabel" FontSize="16" Foreground="Green" Visibility="Hidden" >Trimming...</Label> </Grid> </Window> diff --git a/mls/windowsGUI/MLSFileTrimmer/Window1.xaml.cs b/mls/windowsGUI/MLSFileTrimmer/Window1.xaml.cs index 098aa47..9ababe2 100644 --- a/mls/windowsGUI/MLSFileTrimmer/Window1.xaml.cs +++ b/mls/windowsGUI/MLSFileTrimmer/Window1.xaml.cs @@ -1,24 +1,13 @@ using System; -using System.Collections.Generic; -using System.Linq; +using System.ComponentModel; +using System.IO; using System.Text; +using System.Threading; using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; -using Microsoft.Win32; -using System.IO; -using FolderBrowserDialog = System.Windows.Forms.FolderBrowserDialog; -using System.Xml.Serialization; using System.Xml; +using System.Xml.Serialization; using Ionic.Zip; -using System.ComponentModel; -using System.Threading; +using FolderBrowserDialog = System.Windows.Forms.FolderBrowserDialog; namespace MLSFileTrimmer { @@ -62,7 +51,7 @@ namespace MLSFileTrimmer openFolderDialog.RootFolder = Environment.SpecialFolder.MyDocuments; if (openFolderDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { - outputDirtextBox.Text = openFolderDialog.SelectedPath; + outputDirTextBox.Text = openFolderDialog.SelectedPath; currentDirectory = openFolderDialog.SelectedPath; } } @@ -70,14 +59,14 @@ namespace MLSFileTrimmer private void parseButton_Click(object sender, RoutedEventArgs e) { // make sure the directory exists - if (outputDirtextBox.Text.Equals(String.Empty)) + if (outputDirTextBox.Text.Equals(String.Empty)) { MessageBox.Show("Please select the correct output directory."); return; } - else if (!Directory.Exists(outputDirtextBox.Text)) + else if (!Directory.Exists(outputDirTextBox.Text)) { - MessageBox.Show(outputDirtextBox.Text + " does not exist. Please select the correct output directory."); + MessageBox.Show(outputDirTextBox.Text + " does not exist. Please select the correct output directory."); } // make sure the original files exist @@ -147,5 +136,10 @@ namespace MLSFileTrimmer this.trimmingLabel.Visibility = Visibility.Hidden; this.finishedLabel.Visibility = Visibility.Visible; } + + private void exitButton_Click(object sender, RoutedEventArgs e) + { + this.Close(); + } } }