summaryrefslogtreecommitdiff
path: root/src/app/Cmpp298.Assignment3.Desktop.UI
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/Cmpp298.Assignment3.Desktop.UI')
-rw-r--r--src/app/Cmpp298.Assignment3.Desktop.UI/App.config8
-rw-r--r--src/app/Cmpp298.Assignment3.Desktop.UI/Cmpp298.Assignment3.Desktop.UI.csproj124
-rw-r--r--src/app/Cmpp298.Assignment3.Desktop.UI/DeleteInvoiceView.Designer.cs297
-rw-r--r--src/app/Cmpp298.Assignment3.Desktop.UI/DeleteInvoiceView.cs59
-rw-r--r--src/app/Cmpp298.Assignment3.Desktop.UI/DeleteInvoiceView.resx120
-rw-r--r--src/app/Cmpp298.Assignment3.Desktop.UI/EditInvoiceView.Designer.cs287
-rw-r--r--src/app/Cmpp298.Assignment3.Desktop.UI/EditInvoiceView.cs77
-rw-r--r--src/app/Cmpp298.Assignment3.Desktop.UI/EditInvoiceView.resx120
-rw-r--r--src/app/Cmpp298.Assignment3.Desktop.UI/InvoicesMainView.Designer.cs162
-rw-r--r--src/app/Cmpp298.Assignment3.Desktop.UI/InvoicesMainView.cs64
-rw-r--r--src/app/Cmpp298.Assignment3.Desktop.UI/InvoicesMainView.resx120
-rw-r--r--src/app/Cmpp298.Assignment3.Desktop.UI/NewInvoiceView.Designer.cs294
-rw-r--r--src/app/Cmpp298.Assignment3.Desktop.UI/NewInvoiceView.cs66
-rw-r--r--src/app/Cmpp298.Assignment3.Desktop.UI/NewInvoiceView.resx120
-rw-r--r--src/app/Cmpp298.Assignment3.Desktop.UI/Program.cs20
-rw-r--r--src/app/Cmpp298.Assignment3.Desktop.UI/Properties/AssemblyInfo.cs33
-rw-r--r--src/app/Cmpp298.Assignment3.Desktop.UI/Properties/Resources.Designer.cs63
-rw-r--r--src/app/Cmpp298.Assignment3.Desktop.UI/Properties/Resources.resx117
-rw-r--r--src/app/Cmpp298.Assignment3.Desktop.UI/Properties/Settings.Designer.cs26
-rw-r--r--src/app/Cmpp298.Assignment3.Desktop.UI/Properties/Settings.settings7
20 files changed, 2184 insertions, 0 deletions
diff --git a/src/app/Cmpp298.Assignment3.Desktop.UI/App.config b/src/app/Cmpp298.Assignment3.Desktop.UI/App.config
new file mode 100644
index 0000000..9f94d59
--- /dev/null
+++ b/src/app/Cmpp298.Assignment3.Desktop.UI/App.config
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <connectionStrings>
+ <add name="PayablesConnection"
+ connectionString="data source=(local);Integrated Security=SSPI;Initial Catalog=Payables;"
+ providerName="System.Data.SqlClient" />
+ </connectionStrings>
+</configuration> \ No newline at end of file
diff --git a/src/app/Cmpp298.Assignment3.Desktop.UI/Cmpp298.Assignment3.Desktop.UI.csproj b/src/app/Cmpp298.Assignment3.Desktop.UI/Cmpp298.Assignment3.Desktop.UI.csproj
new file mode 100644
index 0000000..b744172
--- /dev/null
+++ b/src/app/Cmpp298.Assignment3.Desktop.UI/Cmpp298.Assignment3.Desktop.UI.csproj
@@ -0,0 +1,124 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{21D2672E-ED28-4AFF-BD5F-8D80469EA681}</ProjectGuid>
+ <OutputType>WinExe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Cmpp298.Assignment3.Desktop.UI</RootNamespace>
+ <AssemblyName>Cmpp298.Assignment3.Desktop.UI</AssemblyName>
+ </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.Data" />
+ <Reference Include="System.Deployment" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="DeleteInvoiceView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="DeleteInvoiceView.Designer.cs">
+ <DependentUpon>DeleteInvoiceView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="EditInvoiceView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="EditInvoiceView.Designer.cs">
+ <DependentUpon>EditInvoiceView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="NewInvoiceView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="NewInvoiceView.Designer.cs">
+ <DependentUpon>NewInvoiceView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="InvoicesMainView.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="InvoicesMainView.Designer.cs">
+ <DependentUpon>InvoicesMainView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <EmbeddedResource Include="DeleteInvoiceView.resx">
+ <SubType>Designer</SubType>
+ <DependentUpon>DeleteInvoiceView.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="EditInvoiceView.resx">
+ <SubType>Designer</SubType>
+ <DependentUpon>EditInvoiceView.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="NewInvoiceView.resx">
+ <SubType>Designer</SubType>
+ <DependentUpon>NewInvoiceView.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="InvoicesMainView.resx">
+ <SubType>Designer</SubType>
+ <DependentUpon>InvoicesMainView.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Resources.resx</DependentUpon>
+ <DesignTime>True</DesignTime>
+ </Compile>
+ <None Include="App.config" />
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Settings.settings</DependentUpon>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Cmpp298.Assignment3.Desktop.Adapters\Cmpp298.Assignment3.Desktop.Adapters.csproj">
+ <Project>{097FDBD3-0339-4D79-AE80-1AD1407B15F0}</Project>
+ <Name>Cmpp298.Assignment3.Desktop.Adapters</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Cmpp298.Assignment3.Desktop.Presentation\Cmpp298.Assignment3.Desktop.Presentation.csproj">
+ <Project>{62EA2002-B0ED-4E9C-945E-B77552A0669C}</Project>
+ <Name>Cmpp298.Assignment3.Desktop.Presentation</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Cmpp298.Assignment3.Dto\Cmpp298.Assignment3.Dto.csproj">
+ <Project>{29260A8E-3F7B-4D9B-BBE3-81210F4B9E5B}</Project>
+ <Name>Cmpp298.Assignment3.Dto</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\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
diff --git a/src/app/Cmpp298.Assignment3.Desktop.UI/DeleteInvoiceView.Designer.cs b/src/app/Cmpp298.Assignment3.Desktop.UI/DeleteInvoiceView.Designer.cs
new file mode 100644
index 0000000..dda1628
--- /dev/null
+++ b/src/app/Cmpp298.Assignment3.Desktop.UI/DeleteInvoiceView.Designer.cs
@@ -0,0 +1,297 @@
+namespace Cmpp298.Assignment3.Desktop.UI
+{
+ partial class DeleteInvoiceView
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if ( disposing && ( components != null ) )
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.label9 = new System.Windows.Forms.Label();
+ this.label8 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
+ this.label6 = new System.Windows.Forms.Label();
+ this.label5 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.label1 = new System.Windows.Forms.Label();
+ this.uxDeleteButton = new System.Windows.Forms.Button();
+ this.uxCancelButton = new System.Windows.Forms.Button();
+ this.uxCreditTotalTextBox = new System.Windows.Forms.TextBox();
+ this.uxPaymentTotalTextBox = new System.Windows.Forms.TextBox();
+ this.uxInvoiceTotalTextBox = new System.Windows.Forms.TextBox();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.uxVendorNameTextBox = new System.Windows.Forms.TextBox();
+ this.uxInvoiceNumberTextBox = new System.Windows.Forms.TextBox();
+ this.uxInvoiceDateTextBox = new System.Windows.Forms.TextBox();
+ this.uxTermsTextBox = new System.Windows.Forms.TextBox();
+ this.uxPaymentDateTextBox = new System.Windows.Forms.TextBox();
+ this.uxDueDateTextBox = new System.Windows.Forms.TextBox();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // label9
+ //
+ this.label9.AutoSize = true;
+ this.label9.Location = new System.Drawing.Point(6, 200);
+ this.label9.Name = "label9";
+ this.label9.Size = new System.Drawing.Size(39, 13);
+ this.label9.TabIndex = 8;
+ this.label9.Text = "Terms:";
+ //
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(6, 177);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(77, 13);
+ this.label8.TabIndex = 7;
+ this.label8.Text = "Payment Date:";
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(6, 154);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(56, 13);
+ this.label7.TabIndex = 6;
+ this.label7.Text = "Due Date:";
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(6, 131);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(64, 13);
+ this.label6.TabIndex = 5;
+ this.label6.Text = "Credit Total:";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.Location = new System.Drawing.Point(6, 108);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(78, 13);
+ this.label5.TabIndex = 4;
+ this.label5.Text = "Payment Total:";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(6, 85);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(72, 13);
+ this.label4.TabIndex = 3;
+ this.label4.Text = "Invoice Total:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(6, 62);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(71, 13);
+ this.label3.TabIndex = 2;
+ this.label3.Text = "Invoice Date:";
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(6, 39);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(55, 13);
+ this.label2.TabIndex = 1;
+ this.label2.Text = "Invoice #:";
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(6, 16);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(75, 13);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "Vendor Name:";
+ //
+ // uxDeleteButton
+ //
+ this.uxDeleteButton.Location = new System.Drawing.Point(155, 243);
+ this.uxDeleteButton.Name = "uxDeleteButton";
+ this.uxDeleteButton.Size = new System.Drawing.Size(75, 23);
+ this.uxDeleteButton.TabIndex = 19;
+ this.uxDeleteButton.Text = "&Delete";
+ this.uxDeleteButton.UseVisualStyleBackColor = true;
+ //
+ // uxCancelButton
+ //
+ this.uxCancelButton.Location = new System.Drawing.Point(236, 243);
+ this.uxCancelButton.Name = "uxCancelButton";
+ this.uxCancelButton.Size = new System.Drawing.Size(75, 23);
+ this.uxCancelButton.TabIndex = 18;
+ this.uxCancelButton.Text = "&Cancel";
+ this.uxCancelButton.UseVisualStyleBackColor = true;
+ //
+ // uxCreditTotalTextBox
+ //
+ this.uxCreditTotalTextBox.Location = new System.Drawing.Point(111, 124);
+ this.uxCreditTotalTextBox.Name = "uxCreditTotalTextBox";
+ this.uxCreditTotalTextBox.ReadOnly = true;
+ this.uxCreditTotalTextBox.Size = new System.Drawing.Size(200, 20);
+ this.uxCreditTotalTextBox.TabIndex = 17;
+ //
+ // uxPaymentTotalTextBox
+ //
+ this.uxPaymentTotalTextBox.Location = new System.Drawing.Point(111, 101);
+ this.uxPaymentTotalTextBox.Name = "uxPaymentTotalTextBox";
+ this.uxPaymentTotalTextBox.ReadOnly = true;
+ this.uxPaymentTotalTextBox.Size = new System.Drawing.Size(200, 20);
+ this.uxPaymentTotalTextBox.TabIndex = 16;
+ //
+ // uxInvoiceTotalTextBox
+ //
+ this.uxInvoiceTotalTextBox.Location = new System.Drawing.Point(111, 78);
+ this.uxInvoiceTotalTextBox.Name = "uxInvoiceTotalTextBox";
+ this.uxInvoiceTotalTextBox.ReadOnly = true;
+ this.uxInvoiceTotalTextBox.Size = new System.Drawing.Size(200, 20);
+ this.uxInvoiceTotalTextBox.TabIndex = 15;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.uxVendorNameTextBox);
+ this.groupBox1.Controls.Add(this.uxInvoiceNumberTextBox);
+ this.groupBox1.Controls.Add(this.uxInvoiceDateTextBox);
+ this.groupBox1.Controls.Add(this.uxTermsTextBox);
+ this.groupBox1.Controls.Add(this.uxPaymentDateTextBox);
+ this.groupBox1.Controls.Add(this.uxDueDateTextBox);
+ this.groupBox1.Controls.Add(this.uxDeleteButton);
+ this.groupBox1.Controls.Add(this.uxCancelButton);
+ this.groupBox1.Controls.Add(this.uxCreditTotalTextBox);
+ this.groupBox1.Controls.Add(this.uxPaymentTotalTextBox);
+ this.groupBox1.Controls.Add(this.uxInvoiceTotalTextBox);
+ this.groupBox1.Controls.Add(this.label9);
+ this.groupBox1.Controls.Add(this.label8);
+ this.groupBox1.Controls.Add(this.label7);
+ this.groupBox1.Controls.Add(this.label6);
+ this.groupBox1.Controls.Add(this.label5);
+ this.groupBox1.Controls.Add(this.label4);
+ this.groupBox1.Controls.Add(this.label3);
+ this.groupBox1.Controls.Add(this.label2);
+ this.groupBox1.Controls.Add(this.label1);
+ this.groupBox1.Location = new System.Drawing.Point(12, 12);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(325, 281);
+ this.groupBox1.TabIndex = 1;
+ this.groupBox1.TabStop = false;
+ //
+ // uxVendorNameTextBox
+ //
+ this.uxVendorNameTextBox.Location = new System.Drawing.Point(111, 13);
+ this.uxVendorNameTextBox.Name = "uxVendorNameTextBox";
+ this.uxVendorNameTextBox.ReadOnly = true;
+ this.uxVendorNameTextBox.Size = new System.Drawing.Size(200, 20);
+ this.uxVendorNameTextBox.TabIndex = 25;
+ //
+ // uxInvoiceNumberTextBox
+ //
+ this.uxInvoiceNumberTextBox.Location = new System.Drawing.Point(111, 32);
+ this.uxInvoiceNumberTextBox.Name = "uxInvoiceNumberTextBox";
+ this.uxInvoiceNumberTextBox.ReadOnly = true;
+ this.uxInvoiceNumberTextBox.Size = new System.Drawing.Size(200, 20);
+ this.uxInvoiceNumberTextBox.TabIndex = 24;
+ //
+ // uxInvoiceDateTextBox
+ //
+ this.uxInvoiceDateTextBox.Location = new System.Drawing.Point(111, 55);
+ this.uxInvoiceDateTextBox.Name = "uxInvoiceDateTextBox";
+ this.uxInvoiceDateTextBox.ReadOnly = true;
+ this.uxInvoiceDateTextBox.Size = new System.Drawing.Size(200, 20);
+ this.uxInvoiceDateTextBox.TabIndex = 23;
+ //
+ // uxTermsTextBox
+ //
+ this.uxTermsTextBox.Location = new System.Drawing.Point(111, 197);
+ this.uxTermsTextBox.Name = "uxTermsTextBox";
+ this.uxTermsTextBox.ReadOnly = true;
+ this.uxTermsTextBox.Size = new System.Drawing.Size(200, 20);
+ this.uxTermsTextBox.TabIndex = 22;
+ //
+ // uxPaymentDateTextBox
+ //
+ this.uxPaymentDateTextBox.Location = new System.Drawing.Point(111, 174);
+ this.uxPaymentDateTextBox.Name = "uxPaymentDateTextBox";
+ this.uxPaymentDateTextBox.ReadOnly = true;
+ this.uxPaymentDateTextBox.Size = new System.Drawing.Size(200, 20);
+ this.uxPaymentDateTextBox.TabIndex = 21;
+ //
+ // uxDueDateTextBox
+ //
+ this.uxDueDateTextBox.Location = new System.Drawing.Point(111, 151);
+ this.uxDueDateTextBox.Name = "uxDueDateTextBox";
+ this.uxDueDateTextBox.ReadOnly = true;
+ this.uxDueDateTextBox.Size = new System.Drawing.Size(200, 20);
+ this.uxDueDateTextBox.TabIndex = 20;
+ //
+ // DeleteInvoiceView
+ //
+ this.AcceptButton = this.uxDeleteButton;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.uxCancelButton;
+ this.ClientSize = new System.Drawing.Size(352, 310);
+ this.Controls.Add(this.groupBox1);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "DeleteInvoiceView";
+ this.Text = "DeleteInvoiceView";
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label label9;
+ private System.Windows.Forms.Label label8;
+ private System.Windows.Forms.Label label7;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Button uxDeleteButton;
+ private System.Windows.Forms.Button uxCancelButton;
+ private System.Windows.Forms.TextBox uxCreditTotalTextBox;
+ private System.Windows.Forms.TextBox uxPaymentTotalTextBox;
+ private System.Windows.Forms.TextBox uxInvoiceTotalTextBox;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.TextBox uxDueDateTextBox;
+ private System.Windows.Forms.TextBox uxPaymentDateTextBox;
+ private System.Windows.Forms.TextBox uxTermsTextBox;
+ private System.Windows.Forms.TextBox uxInvoiceDateTextBox;
+ private System.Windows.Forms.TextBox uxInvoiceNumberTextBox;
+ private System.Windows.Forms.TextBox uxVendorNameTextBox;
+ }
+} \ No newline at end of file
diff --git a/src/app/Cmpp298.Assignment3.Desktop.UI/DeleteInvoiceView.cs b/src/app/Cmpp298.Assignment3.Desktop.UI/DeleteInvoiceView.cs
new file mode 100644
index 0000000..c707956
--- /dev/null
+++ b/src/app/Cmpp298.Assignment3.Desktop.UI/DeleteInvoiceView.cs
@@ -0,0 +1,59 @@
+using System.Windows.Forms;
+using Cmpp298.Assignment3.Presentation;
+
+namespace Cmpp298.Assignment3.Desktop.UI {
+ public partial class DeleteInvoiceView : Form, IDeleteInvoiceView {
+ private DeleteInvoicePresenter _presenter;
+
+ public DeleteInvoiceView( string invoiceId ) {
+ InitializeComponent( );
+ _presenter = new DeleteInvoicePresenter( invoiceId, this );
+
+ uxCancelButton.Click += delegate { Close( ); };
+ uxDeleteButton.Click += delegate { DeleteAndCloseWindow( ); };
+
+ _presenter.Initialize( );
+ }
+
+ public string VendorName {
+ set { uxVendorNameTextBox.Text = value; }
+ }
+
+ public string InvoiceNumber {
+ set { uxInvoiceNumberTextBox.Text = value; }
+ }
+
+ public string InvoiceDate {
+ set { uxInvoiceDateTextBox.Text = value; }
+ }
+
+ public string InvoiceTotal {
+ set { uxInvoiceTotalTextBox.Text = value; }
+ }
+
+ public string PaymentTotal {
+ set { uxPaymentTotalTextBox.Text = value; }
+ }
+
+ public string CreditTotal {
+ set { uxCreditTotalTextBox.Text = value; }
+ }
+
+ public string DueDate {
+ set { uxDueDateTextBox.Text = value; }
+ }
+
+ public string PaymentDate {
+ set { uxPaymentDateTextBox.Text = value; }
+ }
+
+ public string Terms {
+ set { uxTermsTextBox.Text = value; }
+ }
+
+ private void DeleteAndCloseWindow( ) {
+ _presenter.DeleteInvoice( );
+ Close( );
+ }
+ }
+} \ No newline at end of file
diff --git a/src/app/Cmpp298.Assignment3.Desktop.UI/DeleteInvoiceView.resx b/src/app/Cmpp298.Assignment3.Desktop.UI/DeleteInvoiceView.resx
new file mode 100644
index 0000000..ff31a6d
--- /dev/null
+++ b/src/app/Cmpp298.Assignment3.Desktop.UI/DeleteInvoiceView.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root> \ No newline at end of file
diff --git a/src/app/Cmpp298.Assignment3.Desktop.UI/EditInvoiceView.Designer.cs b/src/app/Cmpp298.Assignment3.Desktop.UI/EditInvoiceView.Designer.cs
new file mode 100644
index 0000000..e25e1b2
--- /dev/null
+++ b/src/app/Cmpp298.Assignment3.Desktop.UI/EditInvoiceView.Designer.cs
@@ -0,0 +1,287 @@
+namespace Cmpp298.Assignment3.Desktop.UI
+{
+ partial class EditInvoiceView
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if ( disposing && ( components != null ) )
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.uxTermsDropDownList = new System.Windows.Forms.ComboBox();
+ this.label9 = new System.Windows.Forms.Label();
+ this.label8 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
+ this.label6 = new System.Windows.Forms.Label();
+ this.label5 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.label1 = new System.Windows.Forms.Label();
+ this.uxInvoiceDatePicker = new System.Windows.Forms.DateTimePicker();
+ this.uxVendorNameTextBox = new System.Windows.Forms.TextBox();
+ this.uxInvoiceNumberTextBox = new System.Windows.Forms.TextBox();
+ this.uxUpdateButton = new System.Windows.Forms.Button();
+ this.uxCancelButton = new System.Windows.Forms.Button();
+ this.uxCreditTotalTextBox = new System.Windows.Forms.TextBox();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.uxPaymentTotalTextBox = new System.Windows.Forms.TextBox();
+ this.uxInvoiceTotalTextBox = new System.Windows.Forms.TextBox();
+ this.uxPaymentDatePicker = new System.Windows.Forms.DateTimePicker();
+ this.uxDueDatePicker = new System.Windows.Forms.DateTimePicker();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // uxTermsDropDownList
+ //
+ this.uxTermsDropDownList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.uxTermsDropDownList.FormattingEnabled = true;
+ this.uxTermsDropDownList.Location = new System.Drawing.Point(111, 192);
+ this.uxTermsDropDownList.Name = "uxTermsDropDownList";
+ this.uxTermsDropDownList.Size = new System.Drawing.Size(200, 21);
+ this.uxTermsDropDownList.TabIndex = 9;
+ //
+ // label9
+ //
+ this.label9.AutoSize = true;
+ this.label9.Location = new System.Drawing.Point(6, 200);
+ this.label9.Name = "label9";
+ this.label9.Size = new System.Drawing.Size(39, 13);
+ this.label9.TabIndex = 8;
+ this.label9.Text = "Terms:";
+ //
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(6, 177);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(77, 13);
+ this.label8.TabIndex = 7;
+ this.label8.Text = "Payment Date:";
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(6, 154);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(56, 13);
+ this.label7.TabIndex = 6;
+ this.label7.Text = "Due Date:";
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(6, 131);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(64, 13);
+ this.label6.TabIndex = 5;
+ this.label6.Text = "Credit Total:";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.Location = new System.Drawing.Point(6, 108);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(78, 13);
+ this.label5.TabIndex = 4;
+ this.label5.Text = "Payment Total:";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(6, 85);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(72, 13);
+ this.label4.TabIndex = 3;
+ this.label4.Text = "Invoice Total:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(6, 62);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(71, 13);
+ this.label3.TabIndex = 2;
+ this.label3.Text = "Invoice Date:";
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(6, 39);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(55, 13);
+ this.label2.TabIndex = 1;
+ this.label2.Text = "Invoice #:";
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(6, 16);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(75, 13);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "Vendor Name:";
+ //
+ // uxInvoiceDatePicker
+ //
+ this.uxInvoiceDatePicker.Location = new System.Drawing.Point(111, 55);
+ this.uxInvoiceDatePicker.Name = "uxInvoiceDatePicker";
+ this.uxInvoiceDatePicker.Size = new System.Drawing.Size(200, 20);
+ this.uxInvoiceDatePicker.TabIndex = 12;
+ //
+ // uxVendorNameTextBox
+ //
+ this.uxVendorNameTextBox.Location = new System.Drawing.Point(111, 13);
+ this.uxVendorNameTextBox.Name = "uxVendorNameTextBox";
+ this.uxVendorNameTextBox.ReadOnly = true;
+ this.uxVendorNameTextBox.Size = new System.Drawing.Size(200, 20);
+ this.uxVendorNameTextBox.TabIndex = 21;
+ //
+ // uxInvoiceNumberTextBox
+ //
+ this.uxInvoiceNumberTextBox.Location = new System.Drawing.Point(111, 32);
+ this.uxInvoiceNumberTextBox.Name = "uxInvoiceNumberTextBox";
+ this.uxInvoiceNumberTextBox.Size = new System.Drawing.Size(200, 20);
+ this.uxInvoiceNumberTextBox.TabIndex = 20;
+ //
+ // uxUpdateButton
+ //
+ this.uxUpdateButton.Location = new System.Drawing.Point(155, 243);
+ this.uxUpdateButton.Name = "uxUpdateButton";
+ this.uxUpdateButton.Size = new System.Drawing.Size(75, 23);
+ this.uxUpdateButton.TabIndex = 19;
+ this.uxUpdateButton.Text = "&Update";
+ this.uxUpdateButton.UseVisualStyleBackColor = true;
+ //
+ // uxCancelButton
+ //
+ this.uxCancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.uxCancelButton.Location = new System.Drawing.Point(236, 243);
+ this.uxCancelButton.Name = "uxCancelButton";
+ this.uxCancelButton.Size = new System.Drawing.Size(75, 23);
+ this.uxCancelButton.TabIndex = 18;
+ this.uxCancelButton.Text = "&Cancel";
+ this.uxCancelButton.UseVisualStyleBackColor = true;
+ //
+ // uxCreditTotalTextBox
+ //
+ this.uxCreditTotalTextBox.Location = new System.Drawing.Point(111, 124);
+ this.uxCreditTotalTextBox.Name = "uxCreditTotalTextBox";
+ this.uxCreditTotalTextBox.Size = new System.Drawing.Size(200, 20);
+ this.uxCreditTotalTextBox.TabIndex = 17;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.uxVendorNameTextBox);
+ this.groupBox1.Controls.Add(this.uxInvoiceNumberTextBox);
+ this.groupBox1.Controls.Add(this.uxUpdateButton);
+ this.groupBox1.Controls.Add(this.uxCancelButton);
+ this.groupBox1.Controls.Add(this.uxCreditTotalTextBox);
+ this.groupBox1.Controls.Add(this.uxPaymentTotalTextBox);
+ this.groupBox1.Controls.Add(this.uxInvoiceTotalTextBox);
+ this.groupBox1.Controls.Add(this.uxPaymentDatePicker);
+ this.groupBox1.Controls.Add(this.uxDueDatePicker);
+ this.groupBox1.Controls.Add(this.uxInvoiceDatePicker);
+ this.groupBox1.Controls.Add(this.uxTermsDropDownList);
+ this.groupBox1.Controls.Add(this.label9);
+ this.groupBox1.Controls.Add(this.label8);
+ this.groupBox1.Controls.Add(this.label7);
+ this.groupBox1.Controls.Add(this.label6);
+ this.groupBox1.Controls.Add(this.label5);
+ this.groupBox1.Controls.Add(this.label4);
+ this.groupBox1.Controls.Add(this.label3);
+ this.groupBox1.Controls.Add(this.label2);
+ this.groupBox1.Controls.Add(this.label1);
+ this.groupBox1.Location = new System.Drawing.Point(12, 12);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(324, 283);
+ this.groupBox1.TabIndex = 1;
+ this.groupBox1.TabStop = false;
+ //
+ // uxPaymentTotalTextBox
+ //
+ this.uxPaymentTotalTextBox.Location = new System.Drawing.Point(111, 101);
+ this.uxPaymentTotalTextBox.Name = "uxPaymentTotalTextBox";
+ this.uxPaymentTotalTextBox.Size = new System.Drawing.Size(200, 20);
+ this.uxPaymentTotalTextBox.TabIndex = 16;
+ //
+ // uxInvoiceTotalTextBox
+ //
+ this.uxInvoiceTotalTextBox.Location = new System.Drawing.Point(111, 78);
+ this.uxInvoiceTotalTextBox.Name = "uxInvoiceTotalTextBox";
+ this.uxInvoiceTotalTextBox.Size = new System.Drawing.Size(200, 20);
+ this.uxInvoiceTotalTextBox.TabIndex = 15;
+ //
+ // uxPaymentDatePicker
+ //
+ this.uxPaymentDatePicker.Location = new System.Drawing.Point(111, 170);
+ this.uxPaymentDatePicker.Name = "uxPaymentDatePicker";
+ this.uxPaymentDatePicker.Size = new System.Drawing.Size(200, 20);
+ this.uxPaymentDatePicker.TabIndex = 14;
+ //
+ // uxDueDatePicker
+ //
+ this.uxDueDatePicker.Location = new System.Drawing.Point(111, 147);
+ this.uxDueDatePicker.Name = "uxDueDatePicker";
+ this.uxDueDatePicker.Size = new System.Drawing.Size(200, 20);
+ this.uxDueDatePicker.TabIndex = 13;
+ //
+ // EditInvoiceView
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(348, 307);
+ this.Controls.Add(this.groupBox1);
+ this.Name = "EditInvoiceView";
+ this.Text = "Edit Invoice";
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.ComboBox uxTermsDropDownList;
+ private System.Windows.Forms.Label label9;
+ private System.Windows.Forms.Label label8;
+ private System.Windows.Forms.Label label7;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.DateTimePicker uxInvoiceDatePicker;
+ private System.Windows.Forms.TextBox uxVendorNameTextBox;
+ private System.Windows.Forms.TextBox uxInvoiceNumberTextBox;
+ private System.Windows.Forms.Button uxUpdateButton;
+ private System.Windows.Forms.Button uxCancelButton;
+ private System.Windows.Forms.TextBox uxCreditTotalTextBox;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.TextBox uxPaymentTotalTextBox;
+ private System.Windows.Forms.TextBox uxInvoiceTotalTextBox;
+ private System.Windows.Forms.DateTimePicker uxPaymentDatePicker;
+ private System.Windows.Forms.DateTimePicker uxDueDatePicker;
+ }
+} \ No newline at end of file
diff --git a/src/app/Cmpp298.Assignment3.Desktop.UI/EditInvoiceView.cs b/src/app/Cmpp298.Assignment3.Desktop.UI/EditInvoiceView.cs
new file mode 100644
index 0000000..fac853c
--- /dev/null
+++ b/src/app/Cmpp298.Assignment3.Desktop.UI/EditInvoiceView.cs
@@ -0,0 +1,77 @@
+using System;
+using System.Windows.Forms;
+using Cmpp298.Assignment3.Desktop.Adapters;
+using Cmpp298.Assignment3.Dto;
+using Cmpp298.Assignment3.Presentation;
+
+namespace Cmpp298.Assignment3.Desktop.UI {
+ public partial class EditInvoiceView : Form, IEditInvoiceView {
+ private DesktopDropDownList _termsDropDown;
+ private EditInvoicePresenter _presenter;
+
+ public EditInvoiceView( string invoiceId ) {
+ InitializeComponent( );
+
+ _termsDropDown = new DesktopDropDownList( uxTermsDropDownList );
+ _presenter = new EditInvoicePresenter( invoiceId, this );
+
+ uxUpdateButton.Click += delegate { UpdateAndCloseWindow( ); };
+ uxCancelButton.Click += delegate { Close( ); };
+
+ _presenter.Initialize( );
+ }
+
+ public IDropDownListAdapter TermsDropDown {
+ get { return _termsDropDown; }
+ }
+
+ public string VendorName {
+ get { return uxVendorNameTextBox.Text; }
+ set { uxVendorNameTextBox.Text = value; }
+ }
+
+ public string InvoiceNumber {
+ get { return uxInvoiceNumberTextBox.Text; }
+ set { uxInvoiceNumberTextBox.Text = value; }
+ }
+
+ public string InvoiceDate {
+ get { return uxInvoiceDatePicker.Value.ToString( ); }
+ set { uxInvoiceDatePicker.Value = Convert.ToDateTime( value ); }
+ }
+
+ public string InvoiceTotal {
+ get { return uxInvoiceTotalTextBox.Text; }
+ set { uxInvoiceTotalTextBox.Text = value; }
+ }
+
+ public string PaymentTotal {
+ get { return uxPaymentTotalTextBox.Text; }
+ set { uxPaymentTotalTextBox.Text = value; }
+ }
+
+ public string CreditTotal {
+ get { return uxCreditTotalTextBox.Text; }
+ set { uxCreditTotalTextBox.Text = value; }
+ }
+
+ public string DueDate {
+ get { return uxDueDatePicker.Value.ToString( ); }
+ set { uxDueDatePicker.Value = Convert.ToDateTime( value ); }
+ }
+
+ public string PaymentDate {
+ get { return uxPaymentDatePicker.Value.ToString( ); }
+ set { uxPaymentDatePicker.Value = Convert.ToDateTime( value ); }
+ }
+
+ public void ShowError( string message ) {
+ MessageBox.Show( message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error );
+ }
+
+ private void UpdateAndCloseWindow( ) {
+ _presenter.UpdateInvoice( );
+ Close( );
+ }
+ }
+} \ No newline at end of file
diff --git a/src/app/Cmpp298.Assignment3.Desktop.UI/EditInvoiceView.resx b/src/app/Cmpp298.Assignment3.Desktop.UI/EditInvoiceView.resx
new file mode 100644
index 0000000..ff31a6d
--- /dev/null
+++ b/src/app/Cmpp298.Assignment3.Desktop.UI/EditInvoiceView.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root> \ No newline at end of file
diff --git a/src/app/Cmpp298.Assignment3.Desktop.UI/InvoicesMainView.Designer.cs b/src/app/Cmpp298.Assignment3.Desktop.UI/InvoicesMainView.Designer.cs
new file mode 100644
index 0000000..db43e55
--- /dev/null
+++ b/src/app/Cmpp298.Assignment3.Desktop.UI/InvoicesMainView.Designer.cs
@@ -0,0 +1,162 @@
+namespace Cmpp298.Assignment3.Desktop.UI
+{
+ public partial class InvoicesMainView
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if ( disposing && ( components != null ) )
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.label1 = new System.Windows.Forms.Label();
+ this.uxVendorsDropDown = new System.Windows.Forms.ComboBox();
+ this.uxInvoicesGridView = new System.Windows.Forms.DataGridView();
+ this.uxNewButton = new System.Windows.Forms.Button();
+ this.uxEditButton = new System.Windows.Forms.Button();
+ this.uxDeleteButton = new System.Windows.Forms.Button();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.uxRefreshButton = new System.Windows.Forms.Button();
+ ( (System.ComponentModel.ISupportInitialize)( this.uxInvoicesGridView ) ).BeginInit();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(13, 14);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(44, 13);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "Vendor:";
+ //
+ // uxVendorsDropDown
+ //
+ this.uxVendorsDropDown.Anchor = ( (System.Windows.Forms.AnchorStyles)( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left )
+ | System.Windows.Forms.AnchorStyles.Right ) ) );
+ this.uxVendorsDropDown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.uxVendorsDropDown.FormattingEnabled = true;
+ this.uxVendorsDropDown.Location = new System.Drawing.Point(75, 23);
+ this.uxVendorsDropDown.Name = "uxVendorsDropDown";
+ this.uxVendorsDropDown.Size = new System.Drawing.Size(413, 21);
+ this.uxVendorsDropDown.TabIndex = 1;
+ //
+ // uxInvoicesGridView
+ //
+ this.uxInvoicesGridView.AllowUserToAddRows = false;
+ this.uxInvoicesGridView.AllowUserToDeleteRows = false;
+ this.uxInvoicesGridView.Anchor = ( (System.Windows.Forms.AnchorStyles)( ( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom )
+ | System.Windows.Forms.AnchorStyles.Left )
+ | System.Windows.Forms.AnchorStyles.Right ) ) );
+ this.uxInvoicesGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.uxInvoicesGridView.Location = new System.Drawing.Point(18, 50);
+ this.uxInvoicesGridView.Name = "uxInvoicesGridView";
+ this.uxInvoicesGridView.ReadOnly = true;
+ this.uxInvoicesGridView.Size = new System.Drawing.Size(551, 354);
+ this.uxInvoicesGridView.TabIndex = 2;
+ //
+ // uxNewButton
+ //
+ this.uxNewButton.Anchor = ( (System.Windows.Forms.AnchorStyles)( ( System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right ) ) );
+ this.uxNewButton.Location = new System.Drawing.Point(320, 398);
+ this.uxNewButton.Name = "uxNewButton";
+ this.uxNewButton.Size = new System.Drawing.Size(75, 23);
+ this.uxNewButton.TabIndex = 3;
+ this.uxNewButton.Text = "&New...";
+ this.uxNewButton.UseVisualStyleBackColor = true;
+ //
+ // uxEditButton
+ //
+ this.uxEditButton.Anchor = ( (System.Windows.Forms.AnchorStyles)( ( System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right ) ) );
+ this.uxEditButton.Location = new System.Drawing.Point(401, 398);
+ this.uxEditButton.Name = "uxEditButton";
+ this.uxEditButton.Size = new System.Drawing.Size(75, 23);
+ this.uxEditButton.TabIndex = 4;
+ this.uxEditButton.Text = "&Edit...";
+ this.uxEditButton.UseVisualStyleBackColor = true;
+ //
+ // uxDeleteButton
+ //
+ this.uxDeleteButton.Anchor = ( (System.Windows.Forms.AnchorStyles)( ( System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right ) ) );
+ this.uxDeleteButton.Location = new System.Drawing.Point(482, 398);
+ this.uxDeleteButton.Name = "uxDeleteButton";
+ this.uxDeleteButton.Size = new System.Drawing.Size(75, 23);
+ this.uxDeleteButton.TabIndex = 5;
+ this.uxDeleteButton.Text = "&Delete...";
+ this.uxDeleteButton.UseVisualStyleBackColor = true;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Anchor = ( (System.Windows.Forms.AnchorStyles)( ( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom )
+ | System.Windows.Forms.AnchorStyles.Left )
+ | System.Windows.Forms.AnchorStyles.Right ) ) );
+ this.groupBox1.Controls.Add(this.uxRefreshButton);
+ this.groupBox1.Controls.Add(this.uxNewButton);
+ this.groupBox1.Controls.Add(this.uxEditButton);
+ this.groupBox1.Controls.Add(this.uxDeleteButton);
+ this.groupBox1.Controls.Add(this.label1);
+ this.groupBox1.Location = new System.Drawing.Point(12, 12);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(563, 427);
+ this.groupBox1.TabIndex = 6;
+ this.groupBox1.TabStop = false;
+ //
+ // uxRefreshButton
+ //
+ this.uxRefreshButton.Anchor = ( (System.Windows.Forms.AnchorStyles)( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right ) ) );
+ this.uxRefreshButton.Location = new System.Drawing.Point(482, 11);
+ this.uxRefreshButton.Name = "uxRefreshButton";
+ this.uxRefreshButton.Size = new System.Drawing.Size(75, 23);
+ this.uxRefreshButton.TabIndex = 6;
+ this.uxRefreshButton.Text = "&Refresh";
+ this.uxRefreshButton.UseVisualStyleBackColor = true;
+ //
+ // InvoicesMainView
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(587, 451);
+ this.Controls.Add(this.uxInvoicesGridView);
+ this.Controls.Add(this.uxVendorsDropDown);
+ this.Controls.Add(this.groupBox1);
+ this.Name = "InvoicesMainView";
+ this.Text = "InvoicesMainView";
+ ( (System.ComponentModel.ISupportInitialize)( this.uxInvoicesGridView ) ).EndInit();
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.ComboBox uxVendorsDropDown;
+ private System.Windows.Forms.DataGridView uxInvoicesGridView;
+ private System.Windows.Forms.Button uxNewButton;
+ private System.Windows.Forms.Button uxEditButton;
+ private System.Windows.Forms.Button uxDeleteButton;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Button uxRefreshButton;
+ }
+}
+
diff --git a/src/app/Cmpp298.Assignment3.Desktop.UI/InvoicesMainView.cs b/src/app/Cmpp298.Assignment3.Desktop.UI/InvoicesMainView.cs
new file mode 100644
index 0000000..809d6d7
--- /dev/null
+++ b/src/app/Cmpp298.Assignment3.Desktop.UI/InvoicesMainView.cs
@@ -0,0 +1,64 @@
+using System.Collections.Generic;
+using System.Windows.Forms;
+using Cmpp298.Assignment3.Desktop.Adapters;
+using Cmpp298.Assignment3.Dto;
+using Cmpp298.Assignment3.Presentation;
+
+namespace Cmpp298.Assignment3.Desktop.UI {
+ public partial class InvoicesMainView : Form, IInvoicesMainView {
+ private DesktopDropDownList _vendorsDropDown;
+ private InvoicesMainPresenter _presenter;
+
+ public InvoicesMainView( ) {
+ InitializeComponent( );
+ _vendorsDropDown = new DesktopDropDownList( uxVendorsDropDown );
+ _presenter = new InvoicesMainPresenter( this );
+ _presenter.Initialize( );
+
+ HookupEventHandlers( );
+ _presenter.LoadInvoices( );
+ }
+
+ public IDropDownListAdapter VendorNames {
+ get { return _vendorsDropDown; }
+ }
+
+ public void BindTo( IEnumerable< DisplayInvoiceDto > invoices ) {
+ uxInvoicesGridView.DataSource = invoices;
+ }
+
+ private delegate void Callback( string invoiceId );
+
+ private void OpenDeleteScreen( ) {
+ OpenScreen( delegate( string invoiceId ) { new DeleteInvoiceView( invoiceId ).ShowDialog( ); } );
+ }
+
+ private void OpenEditScreen( ) {
+ OpenScreen( delegate( string invoiceId ) { new EditInvoiceView( invoiceId ).ShowDialog( ); } );
+ }
+
+ private void OpenScreen( Callback callback ) {
+ if ( uxInvoicesGridView.SelectedRows.Count == 1 ) {
+ string invoiceId = uxInvoicesGridView.SelectedRows[ 0 ].Cells[ "InvoiceId" ].Value.ToString( );
+ callback( invoiceId );
+ _presenter.LoadInvoices( );
+ }
+ else {
+ MessageBox.Show( "Please select a single row", "Select a Row", MessageBoxButtons.OK, MessageBoxIcon.Error );
+ }
+ }
+
+ private void HookupEventHandlers( ) {
+ uxNewButton.Click += delegate { OpenNewWindow( ); };
+ uxEditButton.Click += delegate { OpenEditScreen( ); };
+ uxDeleteButton.Click += delegate { OpenDeleteScreen( ); };
+ uxRefreshButton.Click += delegate { _presenter.LoadInvoices( ); };
+ uxVendorsDropDown.SelectedIndexChanged += delegate { _presenter.LoadInvoices( ); };
+ }
+
+ private void OpenNewWindow( ) {
+ new NewInvoiceView( _vendorsDropDown.SelectedItem.Value ).ShowDialog( );
+ _presenter.LoadInvoices( );
+ }
+ }
+} \ No newline at end of file
diff --git a/src/app/Cmpp298.Assignment3.Desktop.UI/InvoicesMainView.resx b/src/app/Cmpp298.Assignment3.Desktop.UI/InvoicesMainView.resx
new file mode 100644
index 0000000..ff31a6d
--- /dev/null
+++ b/src/app/Cmpp298.Assignment3.Desktop.UI/InvoicesMainView.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root> \ No newline at end of file
diff --git a/src/app/Cmpp298.Assignment3.Desktop.UI/NewInvoiceView.Designer.cs b/src/app/Cmpp298.Assignment3.Desktop.UI/NewInvoiceView.Designer.cs
new file mode 100644
index 0000000..ba7346d
--- /dev/null
+++ b/src/app/Cmpp298.Assignment3.Desktop.UI/NewInvoiceView.Designer.cs
@@ -0,0 +1,294 @@
+
+namespace Cmpp298.Assignment3.Desktop.UI
+{
+ partial class NewInvoiceView
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if ( disposing && ( components != null ) )
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.uxSaveButton = new System.Windows.Forms.Button();
+ this.uxCancelButton = new System.Windows.Forms.Button();
+ this.uxCreditTotalTextBox = new System.Windows.Forms.TextBox();
+ this.uxPaymentTotalTextBox = new System.Windows.Forms.TextBox();
+ this.uxInvoiceTotalTextBox = new System.Windows.Forms.TextBox();
+ this.uxPaymentDatePicker = new System.Windows.Forms.DateTimePicker();
+ this.uxDueDatePicker = new System.Windows.Forms.DateTimePicker();
+ this.uxInvoiceDatePicker = new System.Windows.Forms.DateTimePicker();
+ this.uxTermsDropDownList = new System.Windows.Forms.ComboBox();
+ this.label9 = new System.Windows.Forms.Label();
+ this.label8 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
+ this.label6 = new System.Windows.Forms.Label();
+ this.label5 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.label1 = new System.Windows.Forms.Label();
+ this.uxInvoiceNumberTextBox = new System.Windows.Forms.TextBox();
+ this.uxVendorNameTextBox = new System.Windows.Forms.TextBox();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.uxVendorNameTextBox);
+ this.groupBox1.Controls.Add(this.uxInvoiceNumberTextBox);
+ this.groupBox1.Controls.Add(this.uxSaveButton);
+ this.groupBox1.Controls.Add(this.uxCancelButton);
+ this.groupBox1.Controls.Add(this.uxCreditTotalTextBox);
+ this.groupBox1.Controls.Add(this.uxPaymentTotalTextBox);
+ this.groupBox1.Controls.Add(this.uxInvoiceTotalTextBox);
+ this.groupBox1.Controls.Add(this.uxPaymentDatePicker);
+ this.groupBox1.Controls.Add(this.uxDueDatePicker);
+ this.groupBox1.Controls.Add(this.uxInvoiceDatePicker);
+ this.groupBox1.Controls.Add(this.uxTermsDropDownList);
+ this.groupBox1.Controls.Add(this.label9);
+ this.groupBox1.Controls.Add(this.label8);
+ this.groupBox1.Controls.Add(this.label7);
+ this.groupBox1.Controls.Add(this.label6);
+ this.groupBox1.Controls.Add(this.label5);
+ this.groupBox1.Controls.Add(this.label4);
+ this.groupBox1.Controls.Add(this.label3);
+ this.groupBox1.Controls.Add(this.label2);
+ this.groupBox1.Controls.Add(this.label1);
+ this.groupBox1.Location = new System.Drawing.Point(12, 12);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(325, 281);
+ this.groupBox1.TabIndex = 0;
+ this.groupBox1.TabStop = false;
+ //
+ // uxSaveButton
+ //
+ this.uxSaveButton.Location = new System.Drawing.Point(155, 243);
+ this.uxSaveButton.Name = "uxSaveButton";
+ this.uxSaveButton.Size = new System.Drawing.Size(75, 23);
+ this.uxSaveButton.TabIndex = 19;
+ this.uxSaveButton.Text = "&Save";
+ this.uxSaveButton.UseVisualStyleBackColor = true;
+ //
+ // uxCancelButton
+ //
+ this.uxCancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.uxCancelButton.Location = new System.Drawing.Point(236, 243);
+ this.uxCancelButton.Name = "uxCancelButton";
+ this.uxCancelButton.Size = new System.Drawing.Size(75, 23);
+ this.uxCancelButton.TabIndex = 18;
+ this.uxCancelButton.Text = "&Cancel";
+ this.uxCancelButton.UseVisualStyleBackColor = true;
+ //
+ // uxCreditTotalTextBox
+ //
+ this.uxCreditTotalTextBox.Location = new System.Drawing.Point(111, 124);
+ this.uxCreditTotalTextBox.Name = "uxCreditTotalTextBox";
+ this.uxCreditTotalTextBox.Size = new System.Drawing.Size(200, 20);
+ this.uxCreditTotalTextBox.TabIndex = 17;
+ //
+ // uxPaymentTotalTextBox
+ //
+ this.uxPaymentTotalTextBox.Location = new System.Drawing.Point(111, 101);
+ this.uxPaymentTotalTextBox.Name = "uxPaymentTotalTextBox";
+ this.uxPaymentTotalTextBox.Size = new System.Drawing.Size(200, 20);
+ this.uxPaymentTotalTextBox.TabIndex = 16;
+ //
+ // uxInvoiceTotalTextBox
+ //
+ this.uxInvoiceTotalTextBox.Location = new System.Drawing.Point(111, 78);
+ this.uxInvoiceTotalTextBox.Name = "uxInvoiceTotalTextBox";
+ this.uxInvoiceTotalTextBox.Size = new System.Drawing.Size(200, 20);
+ this.uxInvoiceTotalTextBox.TabIndex = 15;
+ //
+ // uxPaymentDatePicker
+ //
+ this.uxPaymentDatePicker.Location = new System.Drawing.Point(111, 170);
+ this.uxPaymentDatePicker.Name = "uxPaymentDatePicker";
+ this.uxPaymentDatePicker.Size = new System.Drawing.Size(200, 20);
+ this.uxPaymentDatePicker.TabIndex = 14;
+ //
+ // uxDueDatePicker
+ //
+ this.uxDueDatePicker.Location = new System.Drawing.Point(111, 147);
+ this.uxDueDatePicker.Name = "uxDueDatePicker";
+ this.uxDueDatePicker.Size = new System.Drawing.Size(200, 20);
+ this.uxDueDatePicker.TabIndex = 13;
+ //
+ // uxInvoiceDatePicker
+ //
+ this.uxInvoiceDatePicker.Location = new System.Drawing.Point(111, 55);
+ this.uxInvoiceDatePicker.Name = "uxInvoiceDatePicker";
+ this.uxInvoiceDatePicker.Size = new System.Drawing.Size(200, 20);
+ this.uxInvoiceDatePicker.TabIndex = 12;
+ //
+ // uxTermsDropDownList
+ //
+ this.uxTermsDropDownList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.uxTermsDropDownList.FormattingEnabled = true;
+ this.uxTermsDropDownList.Location = new System.Drawing.Point(111, 192);
+ this.uxTermsDropDownList.Name = "uxTermsDropDownList";
+ this.uxTermsDropDownList.Size = new System.Drawing.Size(200, 21);
+ this.uxTermsDropDownList.TabIndex = 9;
+ //
+ // label9
+ //
+ this.label9.AutoSize = true;
+ this.label9.Location = new System.Drawing.Point(6, 200);
+ this.label9.Name = "label9";
+ this.label9.Size = new System.Drawing.Size(39, 13);
+ this.label9.TabIndex = 8;
+ this.label9.Text = "Terms:";
+ //
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(6, 177);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(77, 13);
+ this.label8.TabIndex = 7;
+ this.label8.Text = "Payment Date:";
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(6, 154);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(56, 13);
+ this.label7.TabIndex = 6;
+ this.label7.Text = "Due Date:";
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(6, 131);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(64, 13);
+ this.label6.TabIndex = 5;
+ this.label6.Text = "Credit Total:";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.Location = new System.Drawing.Point(6, 108);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(78, 13);
+ this.label5.TabIndex = 4;
+ this.label5.Text = "Payment Total:";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(6, 85);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(72, 13);
+ this.label4.TabIndex = 3;
+ this.label4.Text = "Invoice Total:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(6, 62);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(71, 13);
+ this.label3.TabIndex = 2;
+ this.label3.Text = "Invoice Date:";
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(6, 39);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(55, 13);
+ this.label2.TabIndex = 1;
+ this.label2.Text = "Invoice #:";
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(6, 16);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(75, 13);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "Vendor Name:";
+ //
+ // uxInvoiceNumberTextBox
+ //
+ this.uxInvoiceNumberTextBox.Location = new System.Drawing.Point(111, 32);
+ this.uxInvoiceNumberTextBox.Name = "uxInvoiceNumberTextBox";
+ this.uxInvoiceNumberTextBox.ReadOnly = true;
+ this.uxInvoiceNumberTextBox.Size = new System.Drawing.Size(200, 20);
+ this.uxInvoiceNumberTextBox.TabIndex = 20;
+ //
+ // uxVendorNameTextBox
+ //
+ this.uxVendorNameTextBox.Location = new System.Drawing.Point(111, 13);
+ this.uxVendorNameTextBox.Name = "uxVendorNameTextBox";
+ this.uxVendorNameTextBox.ReadOnly = true;
+ this.uxVendorNameTextBox.Size = new System.Drawing.Size(200, 20);
+ this.uxVendorNameTextBox.TabIndex = 21;
+ //
+ // NewInvoiceView
+ //
+ this.AcceptButton = this.uxSaveButton;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.uxCancelButton;
+ this.ClientSize = new System.Drawing.Size(349, 305);
+ this.Controls.Add(this.groupBox1);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "NewInvoiceView";
+ this.Text = "Create a New Invoice";
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Label label9;
+ private System.Windows.Forms.Label label8;
+ private System.Windows.Forms.Label label7;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.ComboBox uxTermsDropDownList;
+ private System.Windows.Forms.DateTimePicker uxInvoiceDatePicker;
+ private System.Windows.Forms.DateTimePicker uxDueDatePicker;
+ private System.Windows.Forms.DateTimePicker uxPaymentDatePicker;
+ private System.Windows.Forms.TextBox uxInvoiceTotalTextBox;
+ private System.Windows.Forms.TextBox uxPaymentTotalTextBox;
+ private System.Windows.Forms.TextBox uxCreditTotalTextBox;
+ private System.Windows.Forms.Button uxCancelButton;
+ private System.Windows.Forms.Button uxSaveButton;
+ private System.Windows.Forms.TextBox uxInvoiceNumberTextBox;
+ private System.Windows.Forms.TextBox uxVendorNameTextBox;
+ }
+} \ No newline at end of file
diff --git a/src/app/Cmpp298.Assignment3.Desktop.UI/NewInvoiceView.cs b/src/app/Cmpp298.Assignment3.Desktop.UI/NewInvoiceView.cs
new file mode 100644
index 0000000..ae2135f
--- /dev/null
+++ b/src/app/Cmpp298.Assignment3.Desktop.UI/NewInvoiceView.cs
@@ -0,0 +1,66 @@
+using System.Windows.Forms;
+using Cmpp298.Assignment3.Desktop.Adapters;
+using Cmpp298.Assignment3.Dto;
+using Cmpp298.Assignment3.Presentation;
+
+namespace Cmpp298.Assignment3.Desktop.UI {
+ public partial class NewInvoiceView : Form, INewInvoiceView {
+ private NewInvoicePresenter _presenter;
+ private DesktopDropDownList _termsDropDown;
+
+ public NewInvoiceView( string vendorId ) {
+ InitializeComponent( );
+ _termsDropDown = new DesktopDropDownList( uxTermsDropDownList );
+ _presenter = new NewInvoicePresenter( vendorId, this );
+ _presenter.Load( );
+ uxCancelButton.Click += delegate { Close( ); };
+ uxSaveButton.Click += delegate { SaveAndCloseScreen( ); };
+ }
+
+ public IDropDownListAdapter Terms {
+ get { return _termsDropDown; }
+ }
+
+ public string InvoiceNumber {
+ get { return uxInvoiceNumberTextBox.Text; }
+ set { uxInvoiceNumberTextBox.Text = value; }
+ }
+
+ public string InvoiceDate {
+ get { return uxInvoiceDatePicker.Value.ToString( ); }
+ }
+
+ public string InvoiceTotal {
+ get { return uxInvoiceTotalTextBox.Text; }
+ }
+
+ public string PaymentTotal {
+ get { return uxPaymentTotalTextBox.Text; }
+ }
+
+ public string CreditTotal {
+ get { return uxCreditTotalTextBox.Text; }
+ }
+
+ public string DueDate {
+ get { return uxDueDatePicker.Value.ToString( ); }
+ }
+
+ public string PaymentDate {
+ get { return uxPaymentDatePicker.Value.ToString( ); }
+ }
+
+ public void ShowError( string message ) {
+ MessageBox.Show( message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error );
+ }
+
+ public void BindTo( DisplayVendorNameDto displayVendorNameDto ) {
+ uxVendorNameTextBox.Text = displayVendorNameDto.VendorName;
+ }
+
+ private void SaveAndCloseScreen( ) {
+ _presenter.SaveInvoice( );
+ Close( );
+ }
+ }
+} \ No newline at end of file
diff --git a/src/app/Cmpp298.Assignment3.Desktop.UI/NewInvoiceView.resx b/src/app/Cmpp298.Assignment3.Desktop.UI/NewInvoiceView.resx
new file mode 100644
index 0000000..ff31a6d
--- /dev/null
+++ b/src/app/Cmpp298.Assignment3.Desktop.UI/NewInvoiceView.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root> \ No newline at end of file
diff --git a/src/app/Cmpp298.Assignment3.Desktop.UI/Program.cs b/src/app/Cmpp298.Assignment3.Desktop.UI/Program.cs
new file mode 100644
index 0000000..1b6f16b
--- /dev/null
+++ b/src/app/Cmpp298.Assignment3.Desktop.UI/Program.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Windows.Forms;
+
+namespace Cmpp298.Assignment3.Desktop.UI {
+ internal static class Program {
+ /// <summary>The main entry point for the application.</summary>
+ [STAThread]
+ private static void Main( ) {
+ try {
+ Application.EnableVisualStyles( );
+ Application.SetCompatibleTextRenderingDefault( false );
+ Application.Run( new InvoicesMainView( ) );
+ }
+ catch {
+ MessageBox.Show( "I'm sorry but an unexpected error has occurred.", "Ooops!", MessageBoxButtons.OK,
+ MessageBoxIcon.Error );
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/src/app/Cmpp298.Assignment3.Desktop.UI/Properties/AssemblyInfo.cs b/src/app/Cmpp298.Assignment3.Desktop.UI/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..619912c
--- /dev/null
+++ b/src/app/Cmpp298.Assignment3.Desktop.UI/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Cmpp298.Assignment3.Desktop.UI")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Cmpp298.Assignment3.Desktop.UI")]
+[assembly: AssemblyCopyright("Copyright © 2007")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("a0b2b859-9d29-40fd-9ba5-c08949290739")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/src/app/Cmpp298.Assignment3.Desktop.UI/Properties/Resources.Designer.cs b/src/app/Cmpp298.Assignment3.Desktop.UI/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..ff74f57
--- /dev/null
+++ b/src/app/Cmpp298.Assignment3.Desktop.UI/Properties/Resources.Designer.cs
@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.832
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Cmpp298.Assignment3.Desktop.UI.Properties {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Cmpp298.Assignment3.Desktop.UI.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/src/app/Cmpp298.Assignment3.Desktop.UI/Properties/Resources.resx b/src/app/Cmpp298.Assignment3.Desktop.UI/Properties/Resources.resx
new file mode 100644
index 0000000..c40a448
--- /dev/null
+++ b/src/app/Cmpp298.Assignment3.Desktop.UI/Properties/Resources.resx
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root> \ No newline at end of file
diff --git a/src/app/Cmpp298.Assignment3.Desktop.UI/Properties/Settings.Designer.cs b/src/app/Cmpp298.Assignment3.Desktop.UI/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..7f9ee92
--- /dev/null
+++ b/src/app/Cmpp298.Assignment3.Desktop.UI/Properties/Settings.Designer.cs
@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.832
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Cmpp298.Assignment3.Desktop.UI.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default {
+ get {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/src/app/Cmpp298.Assignment3.Desktop.UI/Properties/Settings.settings b/src/app/Cmpp298.Assignment3.Desktop.UI/Properties/Settings.settings
new file mode 100644
index 0000000..abf36c5
--- /dev/null
+++ b/src/app/Cmpp298.Assignment3.Desktop.UI/Properties/Settings.settings
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
+ <Profiles>
+ <Profile Name="(Default)" />
+ </Profiles>
+ <Settings />
+</SettingsFile>