Commit ca711c1
Changed files (28)
build
product
client
presentation
Core
Views
Winforms
service
Application
build/Build.csproj
@@ -1,84 +1,77 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{B8505B10-85C7-45F4-B039-D364DD556D7D}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>MyMoney.Build</RootNamespace>
- <AssemblyName>MyMoney.Build</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Core">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Xml.Linq">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data.DataSetExtensions">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <None Include="build.bat" />
- <None Include="local_properties.ps1" />
- <None Include="project.ps1" />
- <None Include="config\AssemblyInfo.cs.template" />
- <None Include="config\bootStrap.xml.template" />
- <None Include="config\log4net.config.xml.template" />
- <None Include="local_properties.ps1.template" />
- <None Include="project.test.reports.build" />
- <None Include="local.properties.xml.template" />
- <None Include="project.build" />
- <None Include="project.ci.build" />
- <None Include="project.deploy.build" />
- <None Include="project.install.build" />
- <None Include="project.test.build" />
- <None Include="project_test.ps1" />
- <None Include="ps.bat" />
- <None Include="tools\psake\build_utilities.ps1" />
- <None Include="tools\psake\psake.ps1" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="local.properties.xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Empty.cs" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{B8505B10-85C7-45F4-B039-D364DD556D7D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>MyMoney.Build</RootNamespace>
+ <AssemblyName>MyMoney.Build</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data.DataSetExtensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="build.bat" />
+ <None Include="config\AssemblyInfo.cs.template" />
+ <None Include="config\bootStrap.xml.template" />
+ <None Include="config\log4net.config.xml.template" />
+ <None Include="local.properties.xml.template" />
+ <None Include="project.build" />
+ <None Include="project.deploy.build" />
+ <None Include="project.install.build" />
+ <None Include="project.test.build" />
+ <None Include="tools\psake\build_utilities.ps1" />
+ <None Include="tools\psake\psake.ps1" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="local.properties.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Empty.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
</Project>
\ No newline at end of file
build/local_properties.ps1.template
@@ -1,18 +0,0 @@
-$local_settings = @{
- debug = "false";
- log_level = "DEBUG";
- assembly_title = "momoney"
- assembly_description = "a sample application to tinker with"
- assembly_company = "http://mokhan.ca"
-# assembly_version = "${datetime::get-year(datetime::now())}.${datetime::get-month(datetime::now())}.${datetime::get-day(datetime::now())}.${datetime::get-hour(datetime::now())}${datetime::get-minute(datetime::now())}" />
- editor_exe = "notepad.exe"
-
- dot_net_sdk_dir = "C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin"
- framework_dir = "c:\windows\microsoft.net\framework\v3.5"
- deployment_url = "http://mokhan.ca/MoMoney/"
-
- certificate_filename = "$build_config_dir\mokhan.pfx"
- certificate_password = ""
-
- browser_exe="c:\program files\mozilla firefox\firefox.exe"
- }
\ No newline at end of file
build/project.build
@@ -1,70 +1,68 @@
-<project name="momoney">
- <property name="project.name" value="${project::get-name()}" />
- <property name="nant.settings.currentframework" value="net-3.5" />
-
- <property name="base.dir" value="${directory::get-parent-directory(project::get-base-directory())}" />
- <property name="product.dir" value="${base.dir}\product" />
-
- <property name="build.dir" value="${base.dir}\build" />
- <property name="build.tools.dir" value="${build.dir}\tools" />
- <property name="build.lib.dir" value="${build.dir}\lib" />
- <property name="build.resources.dir" value="${build.dir}\resources" />
- <property name="build.icons.dir" value="${build.resources.dir}\icons" />
- <property name="build.config.dir" value="${build.dir}\config" />
- <property name="build.compile.dir" value="${build.dir}\compile" />
-
- <property name="app.output" value="${project.name}.exe" />
-
- <include buildfile="project.test.build" />
- <include buildfile="project.test.reports.build" />
- <include buildfile="project.deploy.build" />
- <include buildfile="project.install.build" />
- <include buildfile="project.ci.build" />
- <include buildfile="local.properties.xml" />
-
- <target name="clean">
- <exec program="taskkill.exe" commandline="/f /im ${editor.exe} /FI "STATUS eq RUNNING"" />
- <delete dir="${build.compile.dir}" />
- </target>
-
- <target name="init" depends="clean">
- <mkdir dir="${build.compile.dir}" />
- </target>
-
- <target name="app.compile" depends="init">
- <csc output="${build.compile.dir}\${app.output}" debug="${debug}" target="winexe" win32icon="${build.icons.dir}\mokhan.ico" keyfile="${build.config.dir}\mokhan.snk">
- <sources>
- <include name="${product.dir}\**\*.cs" />
- <include name="${build.config.dir}\**\*.cs" />
- <exclude name="${product.dir}\**\AssemblyInfo.cs" />
- <exclude name="${product.dir}\**\*Specs.cs" />
- <exclude name="${product.dir}\commons\testing\**\*.cs" />
- </sources>
- <references>
- <include name="${build.lib.dir}\app\**\*.dll" />
- </references>
- <resources dynamicprefix="true">
- <include name="${product.dir}\**\*.resx" />
- </resources>
- <resources>
- <include name="${build.lib.dir}\app\*.licenses" />
- </resources>
- <arg value="/nowin32manifest" />
- </csc>
- </target>
-
- <target name="expand.template.file">
- <copy file="${target}.template" tofile="${target}" overwrite="true">
- <filterchain>
- <replacetokens>
- <token key="log.level" value="${log.level}" />
- <token key="assembly.title" value="${assembly.title}" />
- <token key="assembly.description" value="${assembly.description}" />
- <token key="assembly.company" value="${assembly.company}" />
- <token key="assembly.version" value="${assembly.version}" />
- </replacetokens>
- </filterchain>
- </copy>
- </target>
-
-</project>
+<project name="momoney">
+ <property name="project.name" value="${project::get-name()}" />
+ <property name="nant.settings.currentframework" value="net-3.5" />
+
+ <property name="base.dir" value="${directory::get-parent-directory(project::get-base-directory())}" />
+ <property name="product.dir" value="${base.dir}\product" />
+
+ <property name="build.dir" value="${base.dir}\build" />
+ <property name="build.tools.dir" value="${build.dir}\tools" />
+ <property name="build.lib.dir" value="${build.dir}\lib" />
+ <property name="build.resources.dir" value="${build.dir}\resources" />
+ <property name="build.icons.dir" value="${build.resources.dir}\icons" />
+ <property name="build.config.dir" value="${build.dir}\config" />
+ <property name="build.compile.dir" value="${build.dir}\compile" />
+
+ <property name="app.output" value="${project.name}.exe" />
+
+ <include buildfile="project.test.build" />
+ <include buildfile="project.deploy.build" />
+ <include buildfile="project.install.build" />
+ <include buildfile="local.properties.xml" />
+
+ <target name="clean">
+ <exec program="taskkill.exe" commandline="/f /im ${editor.exe} /FI "STATUS eq RUNNING"" />
+ <delete dir="${build.compile.dir}" />
+ </target>
+
+ <target name="init" depends="clean">
+ <mkdir dir="${build.compile.dir}" />
+ </target>
+
+ <target name="app.compile" depends="init">
+ <csc output="${build.compile.dir}\${app.output}" debug="${debug}" target="winexe" win32icon="${build.icons.dir}\mokhan.ico" keyfile="${build.config.dir}\mokhan.snk">
+ <sources>
+ <include name="${product.dir}\**\*.cs" />
+ <include name="${build.config.dir}\**\*.cs" />
+ <exclude name="${product.dir}\**\AssemblyInfo.cs" />
+ <exclude name="${product.dir}\**\*Specs.cs" />
+ <exclude name="${product.dir}\commons\testing\**\*.cs" />
+ </sources>
+ <references>
+ <include name="${build.lib.dir}\app\**\*.dll" />
+ </references>
+ <resources dynamicprefix="true">
+ <include name="${product.dir}\**\*.resx" />
+ </resources>
+ <resources>
+ <include name="${build.lib.dir}\app\*.licenses" />
+ </resources>
+ <arg value="/nowin32manifest" />
+ </csc>
+ </target>
+
+ <target name="expand.template.file">
+ <copy file="${target}.template" tofile="${target}" overwrite="true">
+ <filterchain>
+ <replacetokens>
+ <token key="log.level" value="${log.level}" />
+ <token key="assembly.title" value="${assembly.title}" />
+ <token key="assembly.description" value="${assembly.description}" />
+ <token key="assembly.company" value="${assembly.company}" />
+ <token key="assembly.version" value="${assembly.version}" />
+ </replacetokens>
+ </filterchain>
+ </copy>
+ </target>
+
+</project>
build/project.ci.build
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<project name="project.ci">
-
- <target name="run.ci.tests" depends="test.compile">
- <property name="xunit.arguments" value="${build.compile.dir}/${test.output} /rt:xml /rd:${build.compile.dir}" />
- <call target="run.test" />
- </target>
-
-</project>
build/project.deploy.build
@@ -1,51 +1,59 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<project name="project.deployment">
- <property name="assembly.config" value="${build.config.dir}\AssemblyInfo.cs" />
-
- <property name="log4net.config" value="${build.config.dir}\log4net.config.xml" />
-
- <target name="copy.app.dependencies">
- <copy todir="${build.compile.dir}" flatten="true">
- <fileset basedir="${build.lib.dir}\app">
- <include name="\**\*.dll" />
- </fileset>
- </copy>
- <copy todir="${build.compile.dir}" flatten="false">
- <fileset basedir="${build.resources.dir}">
- <include name="\**\*.*" />
- </fileset>
- </copy>
- <property name="target" value="${log4net.config}" />
- <call target="expand.template.file" />
- <copy file="${log4net.config}" tofile="${build.compile.dir}\log4net.config.xml" />
- </target>
-
- <target name="create.licenses" depends="clean">
- <copy todir="${build.compile.dir}" flatten="true">
- <fileset basedir="${build.lib.dir}\app">
- <include name="\**\*.dll" />
- <include name="${build.lib.dir}\app\licenses.licx" />
- </fileset>
- </copy>
- <exec
- basedir="${build.compile.dir}"
- workingdir="${build.compile.dir}"
- program="${dot.net.sdk.dir}\lc.exe"
- commandline="/target:${app.output} /complist:licenses.licx /i:activereports3.dll /i:componentfactory.krypton.navigator.dll /i:componentfactory.krypton.ribbon.dll /i:componentfactory.krypton.toolkit.dll /i:componentfactory.krypton.workspace.dll /i:logicnp.fileview.dll /i:logicnp.folderview.dll /i:logicnp.shcombobox.dll /i:logicnp.shellobjects.dll /nologo /outdir:${build.lib.dir}\app"
- />
- </target>
-
- <!--<target name="deploy" depends="create.licenses">-->
- <target name="deploy">
- <property name="target" value="${assembly.config}" />
- <call target="expand.template.file" />
-
- <call target="app.compile" />
- <call target="copy.app.dependencies" />
- </target>
-
- <target name="run" depends="deploy">
- <exec program="${build.compile.dir}\${app.output}" commandline="" />
- </target>
-
-</project>
+<?xml version="1.0" encoding="utf-8" ?>
+<project name="project.deployment">
+ <property name="assembly.config" value="${build.config.dir}\AssemblyInfo.cs" />
+
+ <property name="log4net.config" value="${build.config.dir}\log4net.config.xml" />
+
+ <target name="copy.app.dependencies">
+ <copy todir="${build.compile.dir}" flatten="true">
+ <fileset basedir="${build.lib.dir}\app">
+ <include name="\**\*.dll" />
+ </fileset>
+ </copy>
+ <copy todir="${build.compile.dir}" flatten="false">
+ <fileset basedir="${build.resources.dir}">
+ <include name="\**\*.*" />
+ </fileset>
+ </copy>
+ <property name="target" value="${log4net.config}" />
+ <call target="expand.template.file" />
+ <copy file="${log4net.config}" tofile="${build.compile.dir}\log4net.config.xml" />
+ </target>
+
+ <target name="create.licenses" depends="clean">
+ <copy todir="${build.compile.dir}" flatten="true">
+ <fileset basedir="${build.lib.dir}\app">
+ <include name="\**\*.dll" />
+ <include name="${build.lib.dir}\app\licenses.licx" />
+ </fileset>
+ </copy>
+ <exec
+ basedir="${build.compile.dir}"
+ workingdir="${build.compile.dir}"
+ program="${dot.net.sdk.dir}\lc.exe"
+ commandline="/target:${app.output} /complist:licenses.licx /i:activereports3.dll /i:componentfactory.krypton.navigator.dll /i:componentfactory.krypton.ribbon.dll /i:componentfactory.krypton.toolkit.dll /i:componentfactory.krypton.workspace.dll /i:logicnp.fileview.dll /i:logicnp.folderview.dll /i:logicnp.shcombobox.dll /i:logicnp.shellobjects.dll /nologo /outdir:${build.lib.dir}\app"
+ />
+ </target>
+
+ <!--<target name="deploy" depends="create.licenses">-->
+ <target name="deploy">
+ <property name="target" value="${assembly.config}" />
+ <call target="expand.template.file" />
+
+ <call target="app.compile" />
+ <call target="copy.app.dependencies" />
+ </target>
+
+ <target name="run" depends="deploy">
+ <exec program="${build.compile.dir}\${app.output}" commandline="" />
+ </target>
+
+
+ <target name="create.configs">
+ <property name="target" value="${log4net.config}" />
+ <call target="expand.template.file" />
+ <copy file="${log4net.config}" tofile="${build.compile.dir}\log4net.config.xml" />
+ <copy file="${build.compile.dir}\log4net.config.xml" tofile="${product.dir}\client\boot\log4net.config.xml" />
+ </target>
+
+</project>
build/project.ps1
@@ -1,57 +0,0 @@
-properties{#directories
- $project_name = "MoMoney"
- $base_dir = new-object System.IO.DirectoryInfo $pwd
- $base_dir = $base_dir.Parent.FullName
-
- $product_dir = "$base_dir\product"
- $build_dir = "$base_dir\build"
- $build_tools_dir = "$build_dir\tools"
- $build_lib_dir = "$build_dir\lib"
- $build_resources_dir = "$build_dir\resources"
- $build_icons_dir = "$build_resources_dir\icons"
- $build_config_dir = "$build_dir\config"
- $build_compile_dir = "$build_dir\compile"
-
- $app_output = "$project_name.exe"
-}
-
-properties {#load in the build utilities file
- . $build_tools_dir\psake\build_utilities.ps1
-}
-
-properties {
- . .\project_test.ps1
-# . .\project_test_reports.ps1
- . .\project_deploy.ps1
-# . .\project_install.ps1
-# . .\project_ci.ps1
- . .\local_properties.ps1
-}
-
-task default -depends init
-
-task clean{
- taskkill /f /im:"$($local_settings.editor)" /FI 'STATUS eq RUNNING'
- remove-item $build_compile_dir -recurse -ErrorAction SilentlyContinue
-}
-
-task init -depends clean {
- make_folder $build_compile_dir
-}
-
-task app_compile -depends init {
-# invoke-item "$build_tools_dir\nant\nant.exe -nologo -buildfile:$build_dir\project.build compile"
-
-# dir -recurse $build_lib_dir\ *.dll | copy -destination $build_compile_dir
-# csc.exe /target:library /out:"$build_compile_dir/powershell_lib.dll" /recurse:"$product_dir\*.cs" /lib:"$build_compile_dir"
-
- $result = MSBuild.exe "$base_dir\solution.sln" /t:Rebuild /p:Configuration=Debug
- $script:product_outputs = get_file_names(get-childitem -path $product_dir -recurse -filter *.dll)
- $script:product_exes = get_file_names(get-childitem -path $product_dir -recurse -filter *.exe)
- $script:product_debug_outputs = get_file_names(get-childitem -path $product_dir -recurse -filter *.pdb)
-
- $result
-}
-
-# task expand_template_file($files) { expand_all_template_files ( $files $local_settings) }
-
build/project.test.reports.build
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<project name="project.test.reports">
- <property name="bdd.doc.exe" value="${build.tools.dir}\bdd.doc\bdddoc.console.exe" />
- <property name="report.output.file" value="${build.compile.dir}\test_report.html" />
-
- <target name="bdd.doc" depends="test.compile">
- <property name="arguments" value="${build.compile.dir}\${test.output} observation ${report.output.file}" />
- <exec program="${bdd.doc.exe}" commandline="${arguments}" />
- <exec program="${browser.exe}" commandline="${report.output.file}" />
- </target>
-
-</project>
build/project_test.ps1
@@ -1,50 +0,0 @@
-properties{
- $test_output = "$project_name.exe"
- $xunit_cons_exe = "$build_tools_dir/gallio/gallio.echo.exe"
-}
-
-properties{#filesets
- $test_references_fileset = get_file_names(get-childitem -path $build_lib_dir -recurse -filter *.dll)
-}
-
-task test_copy_dependencies {
- #$test_references_fileset | foreach-object {copy-item -path $_ -destination $build_compile_dir}
- dir -recurse $build_lib_dir\ *.dll | copy -destination $build_compile_dir
-}
-
-task test_compile -depends init,test_copy_dependencies {
- $result = MSBuild.exe "$base_dir\solution.sln" /t:Rebuild /p:Configuration=Debug
- $script:product_outputs = get_file_names(get-childitem -path $product_dir -recurse -filter *.dll)
- $script:product_outputs | foreach-object {copy-item -path $_ -destination $build_compile_dir}
- $product_outputs | foreach-object { write-host "product output: $_" }
-
- $script:product_exes = get_file_names(get-childitem -path $product_dir -recurse -filter *.exe)
- $script:product_exes | foreach-object {copy-item -path $_ -destination $build_compile_dir}
- $product_exes | foreach-object { write-host "product exe: $_" }
-
- $script:product_debug_outputs = get_file_names(get-childitem -path $product_dir -recurse -filter *.pdb)
- $script:product_debug_outputs | foreach-object {copy-item -path $_ -destination $build_compile_dir}
- $product_debug_outputs | foreach-object { write-host "product debug: $_" }
-
- $result
-}
-
-task test -depends test_compile {
- $test_output = "$project_name.exe"
-
- $xunit_cons_exe = "$build_tools_dir/gallio/gallio.echo.exe"
- $result = .$xunit_cons_exe $build_compile_dir\$test_output /sr /rt:text /rd:$build_compile_dir
- $result
-}
-
-task test_html -depends test_compile {
- $test_output = "$project_name.exe"
-
- $xunit_cons_exe = "$build_tools_dir/gallio/gallio.echo.exe"
- $result = .$xunit_cons_exe $build_compile_dir\$test_output /sr /rt:html /rd:$build_compile_dir
- $result
-
- $a = new-object -type system.media.soundplayer
- $a.soundlocation = "c:\windows\media\ringin.wav"
- $a.play()
-}
build/ps.bat
@@ -1,3 +0,0 @@
-@echo off
-cls
-powershell .\tools\psake\psake.ps1 .\project.ps1 %*
product/client/presentation/Core/TabPresenter.cs
@@ -1,11 +1,14 @@
+using System;
+using developwithpassion.bdd.core.extensions;
using momoney.presentation.views;
using MoMoney.Presentation.Views;
namespace MoMoney.Presentation.Core
{
- public abstract class TabPresenter<Tab> : IContentPresenter where Tab : IDockedContentView
+ public abstract class TabPresenter<Tab> : IContentPresenter where Tab : ITab
{
protected readonly Tab view;
+ Guid id = Guid.NewGuid();
protected TabPresenter(Tab view)
{
@@ -22,7 +25,7 @@ namespace MoMoney.Presentation.Core
public override string ToString()
{
- return GetType().Name;
+ return "{0} {1}".format_using(id, GetType().Name);
}
}
}
\ No newline at end of file
product/client/presentation/Views/IAboutApplicationView.cs
@@ -2,5 +2,5 @@ using momoney.presentation.presenters;
namespace momoney.presentation.views
{
- public interface IAboutApplicationView : IDockedContentView, View<AboutTheApplicationPresenter> {}
+ public interface IAboutApplicationView : ITab, View<AboutTheApplicationPresenter> {}
}
\ No newline at end of file
product/client/presentation/Views/IAddBillPaymentView.cs
@@ -5,7 +5,7 @@ using momoney.presentation.presenters;
namespace momoney.presentation.views
{
- public interface IAddBillPaymentView : IDockedContentView,
+ public interface IAddBillPaymentView : ITab,
View<AddBillPaymentPresenter>,
Callback<IEnumerable<CompanyDTO>>,
Callback<IEnumerable<BillInformationDTO>> {}
product/client/presentation/Views/IAddCompanyView.cs
@@ -6,7 +6,7 @@ using momoney.presentation.views;
namespace MoMoney.Presentation.Views
{
- public interface IAddCompanyView : IDockedContentView,
+ public interface IAddCompanyView : ITab,
View<AddCompanyPresenter>,
Callback<IEnumerable<CompanyDTO>> {}
}
\ No newline at end of file
product/client/presentation/Views/IAddNewIncomeView.cs
@@ -6,7 +6,7 @@ using momoney.presentation.views;
namespace MoMoney.Presentation.Views
{
- public interface IAddNewIncomeView : IDockedContentView,
+ public interface IAddNewIncomeView : ITab,
View<AddNewIncomePresenter>,
Callback<IEnumerable<CompanyDTO>>,
Callback<IEnumerable<IncomeInformationDTO>> {}
product/client/presentation/Views/IApplicationDockedWindow.cs
@@ -1,14 +1,14 @@
-using momoney.presentation.views;
-using MoMoney.Presentation.Winforms.Resources;
-using WeifenLuo.WinFormsUI.Docking;
-
-namespace MoMoney.Presentation.Views
-{
- public interface IApplicationDockedWindow : IDockedContentView
- {
- IApplicationDockedWindow titled(string title, params object[] arguments);
- IApplicationDockedWindow icon(ApplicationIcon icon);
- IApplicationDockedWindow cannot_be_closed();
- IApplicationDockedWindow docked_to(DockState state);
- }
+using momoney.presentation.views;
+using MoMoney.Presentation.Winforms.Resources;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace MoMoney.Presentation.Views
+{
+ public interface IApplicationDockedWindow : ITab
+ {
+ IApplicationDockedWindow titled(string title, params object[] arguments);
+ IApplicationDockedWindow icon(ApplicationIcon icon);
+ IApplicationDockedWindow cannot_be_closed();
+ IApplicationDockedWindow docked_to(DockState state);
+ }
}
\ No newline at end of file
product/client/presentation/Views/IGettingStartedView.cs
@@ -2,7 +2,7 @@ using momoney.presentation.presenters;
namespace momoney.presentation.views
{
- public interface IGettingStartedView : IDockedContentView,
+ public interface IGettingStartedView : ITab,
View<GettingStartedPresenter>
{
}
product/client/presentation/Views/ILogFileView.cs
@@ -3,7 +3,7 @@ using momoney.presentation.presenters;
namespace momoney.presentation.views
{
- public interface ILogFileView : IDockedContentView, Callback<string>, View<LogFilePresenter>
+ public interface ILogFileView : ITab, Callback<string>, View<LogFilePresenter>
{
void display(string file_path);
}
product/client/presentation/Views/IMainMenuView.cs
@@ -4,7 +4,7 @@ using momoney.presentation.views;
namespace MoMoney.Presentation.Views
{
- public interface IMainMenuView : IDockedContentView, View<MainMenuPresenter>
+ public interface IMainMenuView : ITab, View<MainMenuPresenter>
{
void add(IActionTaskPaneFactory factory);
}
product/client/presentation/Views/IReportViewer.cs
@@ -3,7 +3,7 @@ using momoney.presentation.views;
namespace MoMoney.Presentation.Views
{
- public interface IReportViewer : IDockedContentView
+ public interface IReportViewer : ITab
{
void display(IReport report);
}
product/client/presentation/Views/IDockedContentView.cs → product/client/presentation/Views/ITab.cs
@@ -2,7 +2,7 @@ using WeifenLuo.WinFormsUI.Docking;
namespace momoney.presentation.views
{
- public interface IDockedContentView : IDockContent, View
+ public interface ITab : IDockContent, View
{
void add_to(DockPanel panel);
}
product/client/presentation/Views/IViewAllBills.cs
@@ -6,7 +6,7 @@ using momoney.presentation.views;
namespace MoMoney.Presentation.Views
{
- public interface IViewAllBills : IDockedContentView,
+ public interface IViewAllBills : ITab,
View<ViewAllBillsPresenter>,
Callback<IEnumerable<BillInformationDTO>>
{
product/client/presentation/Views/IViewIncomeHistory.cs
@@ -6,7 +6,7 @@ using momoney.presentation.views;
namespace MoMoney.Presentation.Views
{
- public interface IViewIncomeHistory : IDockedContentView,
+ public interface IViewIncomeHistory : ITab,
View<ViewIncomeHistoryPresenter>,
Callback<IEnumerable<IncomeInformationDTO>>
product/client/presentation/Views/Shell.cs
@@ -1,16 +1,16 @@
-using System.ComponentModel;
-using System.Windows.Forms;
-using momoney.presentation.presenters;
-using momoney.presentation.views;
-
-namespace MoMoney.Presentation.Views
-{
- public interface Shell : IWin32Window, ISynchronizeInvoke, IContainerControl, IBindableComponent, IDropTarget,
- IRegionManager
- {
- void attach_to(ApplicationShellPresenter presenter);
- void add(IDockedContentView view);
- void close_the_active_window();
- void close_all_windows();
- }
+using System.ComponentModel;
+using System.Windows.Forms;
+using momoney.presentation.presenters;
+using momoney.presentation.views;
+
+namespace MoMoney.Presentation.Views
+{
+ public interface Shell : IWin32Window, ISynchronizeInvoke, IContainerControl, IBindableComponent, IDropTarget,
+ IRegionManager
+ {
+ void attach_to(ApplicationShellPresenter presenter);
+ void add(ITab view);
+ void close_the_active_window();
+ void close_all_windows();
+ }
}
\ No newline at end of file
product/client/presentation/Winforms/Views/AddCompanyView.cs
@@ -16,8 +16,9 @@ namespace MoMoney.Presentation.Winforms.Views
{
public partial class AddCompanyView : ApplicationDockedWindow, IAddCompanyView
{
- ControlAction<EventArgs> submit_button = x => {};
+ ControlAction<EventArgs> submit_button;// = x => {};
readonly RegisterNewCompany dto;
+ Guid id = Guid.NewGuid();
public AddCompanyView()
{
@@ -32,14 +33,17 @@ namespace MoMoney.Presentation.Winforms.Views
companiesListView.Columns.Add("Name");
ux_company_name.bind_to(dto, x => x.company_name);
- ux_submit_button.Click += (x, y) => submit_button(y);
+ ux_submit_button.Click += (x, y) =>
+ {
+ this.submit_button(y);
+ };
ux_cancel_button.Click += (x, y) => Close();
}
public void attach_to(AddCompanyPresenter presenter)
{
this.log().debug("attaching add company presenter");
- submit_button = x =>
+ this.submit_button = x =>
{
this.log().debug("clicked on submit button");
presenter.submit(dto);
product/client/presentation/Winforms/Views/ApplicationShell.cs
@@ -47,7 +47,7 @@ namespace MoMoney.Presentation.Winforms.Views
closed_action = x => presenter.shut_down();
}
- public void add(IDockedContentView view)
+ public void add(ITab view)
{
view.add_to(ux_dock_panel);
}
product/client/presentation/Presentation.csproj
@@ -109,6 +109,9 @@
<Reference Include="WindowsBase">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
+ <Reference Include="WindowsFormsIntegration">
+ <RequiredTargetFramework>3.0</RequiredTargetFramework>
+ </Reference>
<Reference Include="XPExplorerBar, Version=3.3.0.0, Culture=neutral, PublicKeyToken=26272737b5f33015">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\build\lib\app\xp.explorer.bar\XPExplorerBar.dll</HintPath>
@@ -306,7 +309,7 @@
</Compile>
<Compile Include="views\ControlAction.cs" />
<Compile Include="views\IDialogLauncher.cs" />
- <Compile Include="views\IDockedContentView.cs" />
+ <Compile Include="views\ITab.cs" />
<Compile Include="views\View.cs" />
<Compile Include="views\ISaveChangesView.cs" />
<Compile Include="winforms\views\SaveChangesView.cs">
product/client/service/Application/RegisterNewCompanyCommand.cs
@@ -1,43 +1,43 @@
-using System.Linq;
-using gorilla.commons.utility;
-using MoMoney.Domain.Accounting;
-using MoMoney.Domain.repositories;
-using MoMoney.DTO;
-using MoMoney.Service.Contracts.Application;
-
-namespace MoMoney.Service.Application
-{
- public class RegisterNewCompanyCommand : IRegisterNewCompanyCommand
- {
- readonly ICompanyFactory factory;
- readonly Notification notification;
- readonly ICompanyRepository companies;
-
- public RegisterNewCompanyCommand(ICompanyFactory factory, Notification notification, ICompanyRepository companies)
- {
- this.factory = factory;
- this.notification = notification;
- this.companies = companies;
- }
-
- public void run(RegisterNewCompany item)
- {
- if (is_there_a_company_registered_with(item.company_name))
- notification.notify(create_error_message_from(item));
- else
- {
- factory.create().change_name_to(item.company_name);
- }
- }
-
- bool is_there_a_company_registered_with(string company_name)
- {
- return companies.all().Any(x => x.name.is_equal_to_ignoring_case(company_name));
- }
-
- string create_error_message_from(RegisterNewCompany dto)
- {
- return "A Company named {0}, has already been submitted!".formatted_using(dto.company_name);
- }
- }
+using System.Linq;
+using gorilla.commons.utility;
+using MoMoney.Domain.Accounting;
+using MoMoney.Domain.repositories;
+using MoMoney.DTO;
+using MoMoney.Service.Contracts.Application;
+
+namespace MoMoney.Service.Application
+{
+ public class RegisterNewCompanyCommand : IRegisterNewCompanyCommand
+ {
+ readonly ICompanyFactory factory;
+ readonly Notification notification;
+ readonly ICompanyRepository companies;
+
+ public RegisterNewCompanyCommand(ICompanyFactory factory, Notification notification, ICompanyRepository companies)
+ {
+ this.factory = factory;
+ this.notification = notification;
+ this.companies = companies;
+ }
+
+ public void run(RegisterNewCompany item)
+ {
+ if (is_there_a_company_registered_with(item.company_name))
+ notification.notify(create_error_message_from(item));
+ else
+ {
+ factory.create().change_name_to(item.company_name);
+ }
+ }
+
+ bool is_there_a_company_registered_with(string company_name)
+ {
+ return companies.all().Any(x => x.name.is_equal_to_ignoring_case(company_name));
+ }
+
+ string create_error_message_from(RegisterNewCompany dto)
+ {
+ return "A Company named {0}, has already been submitted!".formatted_using(dto.company_name);
+ }
+ }
}
\ No newline at end of file