Skip to content

Commit

Permalink
Merge branch 'release-7.0.0-alpha.18'
Browse files Browse the repository at this point in the history
  • Loading branch information
bovender committed Nov 9, 2015
2 parents f7f9313 + 42157d3 commit 98c8c0d
Show file tree
Hide file tree
Showing 23 changed files with 140 additions and 64 deletions.
4 changes: 2 additions & 2 deletions Tests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.0.0.17")]
[assembly: AssemblyFileVersion("7.0.0.17")]
[assembly: AssemblyVersion("7.0.0.18")]
[assembly: AssemblyFileVersion("7.0.0.18")]
8 changes: 4 additions & 4 deletions Tests/Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@
</ProjectReference>
</ItemGroup>
<ItemGroup Condition="'$(Configuration)' == 'Debug %28Bovender via NuGet%29'">
<Reference Include="Bovender, Version=0.4.0.0, Culture=neutral, PublicKeyToken=df1c15557d8b6df8, processorArchitecture=MSIL">
<Reference Include="Bovender, Version=0.5.0.0, Culture=neutral, PublicKeyToken=df1c15557d8b6df8, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Bovender.0.4.0.0\lib\net40\Bovender.dll</HintPath>
<HintPath>..\packages\Bovender.0.5.0.0\lib\net40\Bovender.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup Condition="'$(Configuration)' == 'Release'">
<Reference Include="Bovender, Version=0.4.0.0, Culture=neutral, PublicKeyToken=df1c15557d8b6df8, processorArchitecture=MSIL">
<Reference Include="Bovender, Version=0.5.0.0, Culture=neutral, PublicKeyToken=df1c15557d8b6df8, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Bovender.0.4.0.0\lib\net40\Bovender.dll</HintPath>
<HintPath>..\packages\Bovender.0.5.0.0\lib\net40\Bovender.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Tests/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
limitations under the License.
-->
<packages>
<package id="Bovender" version="0.4.0.0" targetFramework="net40" />
<package id="Bovender" version="0.5.0.0" targetFramework="net40" />
<package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net40" />
<package id="NUnitTestAdapter" version="2.0.0" targetFramework="net40" />
</packages>
4 changes: 2 additions & 2 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
7.0.0-alpha.17
7.0.0.17
7.0.0-alpha.18
7.0.0.18
4 changes: 2 additions & 2 deletions XLToolbox/About/AboutView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
xmlns:vs="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender"
xmlns:mvvm="clr-namespace:XLToolbox.Mvvm.Actions"
SizeToContent="WidthAndHeight" ResizeMode="NoResize"
Title="{x:Static l:Strings.AboutXLToolbox}"
vs:WindowState.Save="True" vs:WindowState.CenterScreen="True"
Title="{x:Static l:Strings.AboutXLToolbox}" WindowStyle="None"
vs:WindowState.CenterScreen="True"
>
<Window.Resources>
<ResourceDictionary Source="/Bovender;component/style.xaml" />
Expand Down
14 changes: 10 additions & 4 deletions XLToolbox/Csv/CsvExportViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,11 @@ private void ConfirmChooseFileName(FileNameMessageContent messageContent)

private void DoExport()
{
WorkbookStorage.Store store = new WorkbookStorage.Store();
store.Put("csv_path", System.IO.Path.GetDirectoryName(FileName));
using (WorkbookStorage.Store store = new WorkbookStorage.Store())
{
store.Put("csv_path", System.IO.Path.GetDirectoryName(FileName));

};
_progressTimer = new Timer(UpdateProgress, null, 1000, 300);
if (Range != null)
{
Expand All @@ -227,7 +230,10 @@ void CsvFile_ExportProgressCompleted(object sender, EventArgs e)

void CsvFile_ExportFailed(object sender, System.IO.ErrorEventArgs e)
{
ExportFailedMessage.Send(new StringMessageContent(e.GetException().Message));
ExportFailedMessage.Send(
new StringMessageContent(
String.Format(Strings.CsvExportFailed,
e.GetException().Message)));
}

void UpdateProgress(object state)
Expand All @@ -243,7 +249,7 @@ void UpdateProgress(object state)
if (_csvFile.IsProcessing)
{
ExportProcessMessageContent.PercentCompleted =
Convert.ToInt32(_csvFile.CellsProcessed * 100 / _csvFile.CellsTotal);
Convert.ToInt32(100d * _csvFile.CellsProcessed / _csvFile.CellsTotal);
}
else
{
Expand Down
26 changes: 23 additions & 3 deletions XLToolbox/Csv/CsvFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,12 @@ public void Export(Range range)
IsProcessing = true;
Task t = new Task(() =>
{
StreamWriter sw = null;
try
{
// StreamWriter buffers the output; using a StringBuilder
// doesn't speed up things (tried it)
StreamWriter sw = File.CreateText(FileName);
sw = File.CreateText(FileName);
CellsTotal = range.CellsCount();
CellsProcessed = 0;
_cancelExport = false;
Expand Down Expand Up @@ -222,7 +223,7 @@ public void Export(Range range)
}
else
{
double d = (double)value;
double d = Convert.ToDouble(value);
sw.Write(d.ToString(NumberFormatInfo));
}
}
Expand All @@ -231,7 +232,8 @@ public void Export(Range range)
sw.WriteLine();
if (_cancelExport)
{
sw.WriteLine("*** UNFINISHED EXPORT ***");
sw.WriteLine(UNFINISHED_EXPORT);
sw.WriteLine("Cancelled by user.");
}
}
}
Expand All @@ -240,8 +242,20 @@ public void Export(Range range)
}
catch (IOException e)
{
IsProcessing = false;
OnExportFailed(e);
}
catch (Exception e1)
{
IsProcessing = false;
if (sw != null)
{
sw.WriteLine(UNFINISHED_EXPORT);
sw.WriteLine(e1.ToString());
sw.Close();
}
OnExportFailed(e1);
}
finally
{
IsProcessing = false;
Expand Down Expand Up @@ -301,6 +315,7 @@ protected virtual void OnExportFailed(Exception e)
handler(this, new ErrorEventArgs(e));
}
}

#endregion

#region Fields
Expand All @@ -309,5 +324,10 @@ protected virtual void OnExportFailed(Exception e)
bool _cancelExport;

#endregion

#region Private constant

const string UNFINISHED_EXPORT = "*** UNFINISHED EXPORT ***";
#endregion
}
}
6 changes: 4 additions & 2 deletions XLToolbox/Csv/CsvImportViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,10 @@ private void ConfirmChooseFileName(FileNameMessageContent messageContent)

private void DoImport()
{
WorkbookStorage.Store store = new WorkbookStorage.Store();
store.Put("csv_path", System.IO.Path.GetDirectoryName(FileName));
using (WorkbookStorage.Store store = new WorkbookStorage.Store())
{
store.Put("csv_path", System.IO.Path.GetDirectoryName(FileName));
}
_csvFile.Import();
CloseViewCommand.Execute(null);
}
Expand Down
10 changes: 6 additions & 4 deletions XLToolbox/Export/Models/BatchExportSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,12 @@ public void Store()
public void Store(Workbook workbookContext)
{
Store();
Store store = new Store(workbookContext);
store.Put<BatchExportSettings>(
typeof(BatchExportSettings).ToString(),
this);
using (Store store = new Store(workbookContext))
{
store.Put<BatchExportSettings>(
typeof(BatchExportSettings).ToString(),
this);
}
}

#endregion
Expand Down
6 changes: 4 additions & 2 deletions XLToolbox/Export/ViewModels/ScreenshotExporterViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,10 @@ private void DoExportSelection(FileNameMessageContent messageContent)
{
if (CanExportSelection() && messageContent.Confirmed)
{
WorkbookStorage.Store store = new WorkbookStorage.Store();
store.Put(Properties.StoreNames.Default.ExportPath, messageContent.Value);
using (WorkbookStorage.Store store = new WorkbookStorage.Store())
{
store.Put(Properties.StoreNames.Default.ExportPath, messageContent.Value);
}
Properties.Settings.Default.ExportPath =
Bovender.PathHelpers.GetDirectoryPart(messageContent.Value);
ScreenshotExporter exporter = new ScreenshotExporter();
Expand Down
4 changes: 2 additions & 2 deletions XLToolbox/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.0.0.17")]
[assembly: AssemblyFileVersion("7.0.0.17")]
[assembly: AssemblyVersion("7.0.0.18")]
[assembly: AssemblyFileVersion("7.0.0.18")]
12 changes: 6 additions & 6 deletions XLToolbox/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions XLToolbox/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
<Profiles />
<Settings>
<Setting Name="WebsiteUrl" Type="System.String" Scope="Application">
<Value Profile="(Default)">http://xltoolbox.net</Value>
<Value Profile="(Default)">http://www.xltoolbox.net</Value>
</Setting>
<Setting Name="VersionInfoUrl" Type="System.String" Scope="Application">
<Value Profile="(Default)">http://xltoolbox.net/version-ng.txt</Value>
<Value Profile="(Default)">http://www.xltoolbox.net/version-ng.txt</Value>
</Setting>
<Setting Name="HelpUrl" Type="System.String" Scope="Application">
<Value Profile="(Default)">http://xltoolbox.net/</Value>
<Value Profile="(Default)">http://www.xltoolbox.net/</Value>
</Setting>
<Setting Name="ExceptionPostUrl" Type="System.String" Scope="Application">
<Value Profile="(Default)">http://xltoolbox.net/receive.php</Value>
<Value Profile="(Default)">http://www.xltoolbox.net/receive.php</Value>
</Setting>
<Setting Name="DownloadPath" Type="System.String" Scope="User">
<Value Profile="(Default)" />
Expand All @@ -33,10 +33,10 @@
<Value Profile="(Default)" />
</Setting>
<Setting Name="DonateUrl" Type="System.String" Scope="Application">
<Value Profile="(Default)">http://xltoolbox.net/donate</Value>
<Value Profile="(Default)">http://www.xltoolbox.net/donate</Value>
</Setting>
<Setting Name="WhatsNewUrl" Type="System.String" Scope="Application">
<Value Profile="(Default)">http://xltoolbox.net/blog/tags/alpha</Value>
<Value Profile="(Default)">http://www.xltoolbox.net/blog/tags/alpha</Value>
</Setting>
<Setting Name="WindowManagerAlwaysOnTop" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
Expand Down
10 changes: 10 additions & 0 deletions XLToolbox/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion XLToolbox/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -620,4 +620,8 @@ You may want to try again.</value>
<data name="BovenderFramework" xml:space="preserve">
<value>Bovender framework</value>
</data>
</root>
<data name="CsvExportFailed" xml:space="preserve">
<value>CSV export failed:
{0}</value>
</data>
</root>
8 changes: 4 additions & 4 deletions XLToolbox/XLToolbox.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@
</ProjectReference>
</ItemGroup>
<ItemGroup Condition="'$(Configuration)' == 'Debug %28Bovender via NuGet%29|AnyCPU'">
<Reference Include="Bovender, Version=0.4.0.0, Culture=neutral, PublicKeyToken=df1c15557d8b6df8, processorArchitecture=MSIL">
<Reference Include="Bovender, Version=0.5.0.0, Culture=neutral, PublicKeyToken=df1c15557d8b6df8, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Bovender.0.4.0.0\lib\net40\Bovender.dll</HintPath>
<HintPath>..\packages\Bovender.0.5.0.0\lib\net40\Bovender.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup Condition="'$(Configuration)' == 'Release'">
<Reference Include="Bovender, Version=0.4.0.0, Culture=neutral, PublicKeyToken=df1c15557d8b6df8, processorArchitecture=MSIL">
<Reference Include="Bovender, Version=0.5.0.0, Culture=neutral, PublicKeyToken=df1c15557d8b6df8, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Bovender.0.4.0.0\lib\net40\Bovender.dll</HintPath>
<HintPath>..\packages\Bovender.0.5.0.0\lib\net40\Bovender.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
12 changes: 6 additions & 6 deletions XLToolbox/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,25 @@
</XLToolbox.StoreNames>
<XLToolbox.Properties.Settings>
<setting name="WebsiteUrl" serializeAs="String">
<value>http://xltoolbox.net</value>
<value>http://www.xltoolbox.net</value>
</setting>
<setting name="VersionInfoUrl" serializeAs="String">
<value>http://xltoolbox.net/version-ng.txt</value>
<value>http://www.xltoolbox.net/version-ng.txt</value>
</setting>
<setting name="HelpUrl" serializeAs="String">
<value>http://xltoolbox.net/</value>
<value>http://www.xltoolbox.net/</value>
</setting>
<setting name="ExceptionPostUrl" serializeAs="String">
<value>http://xltoolbox.net/receive.php</value>
<value>http://www.xltoolbox.net/receive.php</value>
</setting>
<setting name="AddinName" serializeAs="String">
<value>Daniel's XL Toolbox</value>
</setting>
<setting name="DonateUrl" serializeAs="String">
<value>http://xltoolbox.net/donate</value>
<value>http://www.xltoolbox.net/donate</value>
</setting>
<setting name="WhatsNewUrl" serializeAs="String">
<value>http://xltoolbox.net/blog/tags/alpha</value>
<value>http://www.xltoolbox.net/blog/tags/alpha</value>
</setting>
</XLToolbox.Properties.Settings>
</applicationSettings>
Expand Down
2 changes: 1 addition & 1 deletion XLToolbox/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
limitations under the License.
-->
<packages>
<package id="Bovender" version="0.4.0.0" targetFramework="net40" />
<package id="Bovender" version="0.5.0.0" targetFramework="net40" />
<package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net40" />
<package id="NUnit" version="2.6.4" targetFramework="net40" />
</packages>
4 changes: 2 additions & 2 deletions XLToolboxForExcel/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.0.0.17")]
[assembly: AssemblyFileVersion("7.0.0.17")]
[assembly: AssemblyVersion("7.0.0.18")]
[assembly: AssemblyFileVersion("7.0.0.18")]

[assembly: NeutralResourcesLanguageAttribute("en-US")]
Loading

0 comments on commit 98c8c0d

Please sign in to comment.