Commit 4786594

mokhan <mokhan@ce5e1baf-6525-42e4-a1b2-857ea38da20a>
2009-02-27 00:57:11
created base application form
git-svn-id: https://svn.xp-dev.com/svn/mokhan-mo.money@22 ce5e1baf-6525-42e4-a1b2-857ea38da20a
1 parent b7176bc
trunk/src/MyMoney/Presentation/Resources/ApplicationIcons.cs
@@ -1,4 +1,5 @@
 using System.Collections.Generic;
+using System.Drawing;
 using MyMoney.Utility.Extensions;
 
 namespace MyMoney.Presentation.Resources
trunk/src/MyMoney/Presentation/Views/core/ApplicationForm.cs
@@ -0,0 +1,20 @@
+using System.Windows.Forms;
+using MyMoney.Presentation.Resources;
+
+namespace MyMoney.Presentation.Views.core
+{
+    public partial class ApplicationForm : Form
+    {
+        public ApplicationForm(string title)
+        {
+            InitializeComponent();
+            Icon = ApplicationIcons.Application;
+            base.Text = "MoMoney - " + title;
+        }
+
+        protected void create_tool_tip_for(string title, string caption, Control control)
+        {
+            new ToolTip {IsBalloon = true, ToolTipTitle = title}.SetToolTip(control, caption);
+        }
+    }
+}
\ No newline at end of file
trunk/src/MyMoney/Presentation/Views/core/ApplicationForm.Designer.cs
@@ -0,0 +1,46 @@
+namespace MyMoney.Presentation.Views.core
+{
+    partial class ApplicationForm
+    {
+        /// <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.SuspendLayout();
+            // 
+            // ApplicationForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(282, 255);
+            this.Name = "ApplicationForm";
+            this.Text = "MoMoney - ";
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+    }
+}
\ No newline at end of file
trunk/src/MyMoney/Presentation/Views/core/ApplicationForm.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
trunk/src/MyMoney/Presentation/Views/dialogs/save_changes_view.cs
@@ -2,14 +2,15 @@
 using System.Windows.Forms;
 using MyMoney.Presentation.Model.Menu.File.Commands;
 using MyMoney.Presentation.Resources;
+using MyMoney.Presentation.Views.core;
 
 namespace MyMoney.Presentation.Views.dialogs
 {
-    public partial class save_changes_view : Form, ISaveChangesView
+    public partial class save_changes_view : ApplicationForm, ISaveChangesView
     {
         private bool can_be_closed;
 
-        public save_changes_view()
+        public save_changes_view():base("Unsaved Changes")
         {
             InitializeComponent();
             ux_image.Image = ApplicationImages.Splash;
@@ -40,10 +41,5 @@ namespace MyMoney.Presentation.Views.dialogs
             Close();
             action();
         }
-
-        private void create_tool_tip_for(string title, string caption, Control control)
-        {
-            new ToolTip {IsBalloon = true, ToolTipTitle = title}.SetToolTip(control, caption);
-        }
     }
 }
\ No newline at end of file
trunk/src/MyMoney/Presentation/Views/updates/check_for_updates.cs
@@ -1,13 +1,15 @@
-using System.Windows.Forms;
+using System.Reflection;
+using System.Windows.Forms;
 using MyMoney.Presentation.Model.updates;
 using MyMoney.Presentation.Presenters.updates;
 using MyMoney.Presentation.Resources;
+using MyMoney.Presentation.Views.core;
 
 namespace MyMoney.Presentation.Views.updates
 {
-    public partial class check_for_updates : Form, ICheckForUpdatesView
+    public partial class check_for_updates : ApplicationForm, ICheckForUpdatesView
     {
-        public check_for_updates()
+        public check_for_updates() : base("Check For Updates")
         {
             InitializeComponent();
             ux_image.Image = ApplicationImages.Splash;
@@ -29,6 +31,13 @@ namespace MyMoney.Presentation.Views.updates
             if (information.updates_available)
             {
                 ux_update_button.Enabled = information.updates_available;
+                ux_current_version.Text = "Current: " + information.current;
+                ux_new_version.Text = "New: " + information.available_version;
+            }
+            else
+            {
+                ux_current_version.Text = "Current: " + Assembly.GetExecutingAssembly().GetName().Version;
+                ux_new_version.Text = "New: " + Assembly.GetExecutingAssembly().GetName().Version;
             }
             ShowDialog();
         }
@@ -37,10 +46,5 @@ namespace MyMoney.Presentation.Views.updates
         {
             MessageBox.Show("update complete", "Complete");
         }
-
-        private void create_tool_tip_for(string title, string caption, Control control)
-        {
-            new ToolTip {IsBalloon = true, ToolTipTitle = title}.SetToolTip(control, caption);
-        }
     }
 }
\ No newline at end of file
trunk/src/MyMoney/Presentation/Views/updates/check_for_updates.Designer.cs
@@ -30,11 +30,13 @@
         {
             this.label3 = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
-            this.label1 = new System.Windows.Forms.Label();
+            this.ux_current_version = new System.Windows.Forms.Label();
             this.ux_image = new System.Windows.Forms.PictureBox();
             this.ux_cancel_button = new System.Windows.Forms.Button();
             this.ux_dont_update_button = new System.Windows.Forms.Button();
             this.ux_update_button = new System.Windows.Forms.Button();
+            this.ux_new_version = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.ux_image)).BeginInit();
             this.SuspendLayout();
             // 
@@ -59,15 +61,15 @@
             this.label2.TabIndex = 14;
             this.label2.Text = "What would you like to do?";
             // 
-            // label1
+            // ux_current_version
             // 
-            this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(178, 50);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(188, 17);
-            this.label1.TabIndex = 13;
-            this.label1.Text = "You have unsaved changes.";
+            this.ux_current_version.AutoSize = true;
+            this.ux_current_version.Location = new System.Drawing.Point(178, 13);
+            this.ux_current_version.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ux_current_version.Name = "ux_current_version";
+            this.ux_current_version.Size = new System.Drawing.Size(59, 17);
+            this.ux_current_version.TabIndex = 13;
+            this.ux_current_version.Text = "Current:";
             // 
             // ux_image
             // 
@@ -112,20 +114,42 @@
             this.ux_update_button.Text = "&Update";
             this.ux_update_button.UseVisualStyleBackColor = true;
             // 
-            // check_for_updatescs
+            // ux_new_version
+            // 
+            this.ux_new_version.AutoSize = true;
+            this.ux_new_version.Location = new System.Drawing.Point(182, 49);
+            this.ux_new_version.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ux_new_version.Name = "ux_new_version";
+            this.ux_new_version.Size = new System.Drawing.Size(39, 17);
+            this.ux_new_version.TabIndex = 16;
+            this.ux_new_version.Text = "New:";
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Location = new System.Drawing.Point(253, 32);
+            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(20, 17);
+            this.label5.TabIndex = 17;
+            this.label5.Text = "to";
+            // 
+            // check_for_updates
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(388, 403);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.ux_new_version);
             this.Controls.Add(this.label3);
             this.Controls.Add(this.label2);
-            this.Controls.Add(this.label1);
+            this.Controls.Add(this.ux_current_version);
             this.Controls.Add(this.ux_image);
             this.Controls.Add(this.ux_cancel_button);
             this.Controls.Add(this.ux_dont_update_button);
             this.Controls.Add(this.ux_update_button);
-            this.Name = "check_for_updatescs";
-            this.Text = "check_for_updatescs";
+            this.Name = "check_for_updates";
+            this.Text = "MoMoney - Check For Updates";
             ((System.ComponentModel.ISupportInitialize)(this.ux_image)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
@@ -136,11 +160,13 @@
 
         private System.Windows.Forms.Label label3;
         private System.Windows.Forms.Label label2;
-        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label ux_current_version;
         private System.Windows.Forms.PictureBox ux_image;
         private System.Windows.Forms.Button ux_cancel_button;
         private System.Windows.Forms.Button ux_dont_update_button;
         private System.Windows.Forms.Button ux_update_button;
+        private System.Windows.Forms.Label ux_new_version;
+        private System.Windows.Forms.Label label5;
 
     }
 }
\ No newline at end of file
trunk/src/MyMoney/Properties/licenses.licx
@@ -1,11 +0,0 @@
-LogicNP.ShellObjects.ShellPopupNotification, LogicNP.ShellObjects, Version=10.0.0.0, Culture=neutral, PublicKeyToken=ff6f27194af4af75
-DataDynamics.ActiveReports.ActiveReport3, ActiveReports3, Version=5.2.1013.2, Culture=neutral, PublicKeyToken=cc4967777c49a3ff
-LogicNP.ShellObjects.SystemIdleTimer, LogicNP.ShellObjects, Version=10.0.0.0, Culture=neutral, PublicKeyToken=ff6f27194af4af75
-ComponentFactory.Krypton.Workspace.KryptonWorkspace, ComponentFactory.Krypton.Workspace, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a87e673e9ecb6e8e
-LogicNP.FolderViewControl.FolderView, LogicNP.FolderView, Version=10.0.0.0, Culture=neutral, PublicKeyToken=ff6f27194af4af75
-LogicNP.FileViewControl.FileView, LogicNP.FileView, Version=10.0.0.0, Culture=neutral, PublicKeyToken=ff6f27194af4af75
-ComponentFactory.Krypton.Ribbon.KryptonRibbon, ComponentFactory.Krypton.Ribbon, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a87e673e9ecb6e8e
-LogicNP.ShComboBoxControl.ShComboBox, LogicNP.ShComboBox, Version=10.0.0.0, Culture=neutral, PublicKeyToken=ff6f27194af4af75
-LogicNP.ShellObjects.ShellNotifyIcon, LogicNP.ShellObjects, Version=10.0.0.0, Culture=neutral, PublicKeyToken=ff6f27194af4af75
-LogicNP.ShellObjects.SystemHotKey, LogicNP.ShellObjects, Version=10.0.0.0, Culture=neutral, PublicKeyToken=ff6f27194af4af75
-LogicNP.ShellObjects.ShellFileOperation, LogicNP.ShellObjects, Version=10.0.0.0, Culture=neutral, PublicKeyToken=ff6f27194af4af75
trunk/src/MyMoney/MyMoney.csproj
@@ -360,6 +360,12 @@
       <DependentUpon>add_bill_payment.cs</DependentUpon>
     </Compile>
     <Compile Include="Presentation\Views\billing\IAddBillPaymentView.cs" />
+    <Compile Include="Presentation\Views\core\ApplicationForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Presentation\Views\core\ApplicationForm.Designer.cs">
+      <DependentUpon>ApplicationForm.cs</DependentUpon>
+    </Compile>
     <Compile Include="Presentation\Views\dialogs\ISaveChangesView.cs" />
     <Compile Include="Presentation\Views\dialogs\save_changes_view.cs">
       <SubType>Form</SubType>
@@ -573,6 +579,9 @@
       <DependentUpon>view_all_bills.cs</DependentUpon>
       <SubType>Designer</SubType>
     </EmbeddedResource>
+    <EmbeddedResource Include="Presentation\Views\core\ApplicationForm.resx">
+      <DependentUpon>ApplicationForm.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Presentation\Views\dialogs\save_changes_view.resx">
       <DependentUpon>save_changes_view.cs</DependentUpon>
     </EmbeddedResource>
@@ -611,7 +620,6 @@
     <EmbeddedResource Include="Presentation\Views\updates\check_for_updates.resx">
       <DependentUpon>check_for_updates.cs</DependentUpon>
     </EmbeddedResource>
-    <EmbeddedResource Include="Properties\licenses.licx" />
     <EmbeddedResource Include="Properties\Resources.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>