#At file:///C:/src/bzr.mysql/wex/mine/installer/ based on revid:iggy@stripped
221 Iggy Galarza 2010-11-03
Unit Test update work in progress.
added:
WexInstaller/RemovePanels/RemoveConfirmation.Designer.cs
WexInstaller/RemovePanels/RemoveConfirmation.cs
WexInstaller/RemovePanels/RemoveConfirmation.resx
WexInstaller/Resources/Warning.ico
WexInstaller/Resources/warning_sign_large.png
modified:
WexInstaller/Properties/Resources.Designer.cs
WexInstaller/Properties/Resources.resx
WexInstaller/RemovePanels/RemoveProgress.cs
WexInstaller/UnitTests/MultiCoreTest.cs
WexInstaller/WexInstaller.csproj
=== modified file 'WexInstaller/Properties/Resources.Designer.cs'
--- a/WexInstaller/Properties/Resources.Designer.cs 2010-09-09 17:49:17 +0000
+++ b/WexInstaller/Properties/Resources.Designer.cs 2010-11-03 21:33:54 +0000
@@ -600,6 +600,13 @@ namespace WexInstaller.Properties {
}
}
+ internal static System.Drawing.Bitmap warning_sign_large {
+ get {
+ object obj = ResourceManager.GetObject("warning_sign_large", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
internal static System.Drawing.Bitmap WelcomeBackground {
get {
object obj = ResourceManager.GetObject("WelcomeBackground", resourceCulture);
=== modified file 'WexInstaller/Properties/Resources.resx'
--- a/WexInstaller/Properties/Resources.resx 2010-09-09 17:49:17 +0000
+++ b/WexInstaller/Properties/Resources.resx 2010-11-03 21:33:54 +0000
@@ -342,4 +342,8 @@
<data name="MySQLInstallerWelcomeBG" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MySQLInstallerWelcomeBG.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
+ <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <data name="warning_sign_large" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\warning_sign_large.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
</root>
\ No newline at end of file
=== added file 'WexInstaller/RemovePanels/RemoveConfirmation.Designer.cs'
--- a/WexInstaller/RemovePanels/RemoveConfirmation.Designer.cs 1970-01-01 00:00:00 +0000
+++ b/WexInstaller/RemovePanels/RemoveConfirmation.Designer.cs 2010-11-03 21:33:54 +0000
@@ -0,0 +1,112 @@
+namespace WexInstaller
+{
+ partial class RemoveConfirmation
+ {
+ /// <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.confirmLabel = new System.Windows.Forms.Label();
+ this.noButton = new System.Windows.Forms.Button();
+ this.yesButton = new System.Windows.Forms.Button();
+ this.pictureBox1 = new System.Windows.Forms.PictureBox();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+ this.SuspendLayout();
+ //
+ // confirmLabel
+ //
+ this.confirmLabel.AutoSize = true;
+ this.confirmLabel.Location = new System.Drawing.Point(61, 25);
+ this.confirmLabel.Name = "confirmLabel";
+ this.confirmLabel.Size = new System.Drawing.Size(257, 13);
+ this.confirmLabel.TabIndex = 0;
+ this.confirmLabel.Text = "Are you sure you wish to remove all listed products?";
+ //
+ // noButton
+ //
+ this.noButton.AutoSize = true;
+ this.noButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.noButton.Location = new System.Drawing.Point(164, 62);
+ this.noButton.Name = "noButton";
+ this.noButton.Size = new System.Drawing.Size(75, 23);
+ this.noButton.TabIndex = 2;
+ this.noButton.Text = "&No";
+ this.noButton.UseVisualStyleBackColor = true;
+ this.noButton.Click += new System.EventHandler(this.noButton_Click);
+ //
+ // yesButton
+ //
+ this.yesButton.AutoSize = true;
+ this.yesButton.Location = new System.Drawing.Point(83, 62);
+ this.yesButton.Name = "yesButton";
+ this.yesButton.Size = new System.Drawing.Size(75, 23);
+ this.yesButton.TabIndex = 1;
+ this.yesButton.Text = "&Yes";
+ this.yesButton.UseVisualStyleBackColor = true;
+ this.yesButton.Click += new System.EventHandler(this.yesButton_Click);
+ //
+ // pictureBox1
+ //
+ this.pictureBox1.Image = global::WexInstaller.Properties.Resources.warning_sign_large;
+ this.pictureBox1.Location = new System.Drawing.Point(13, 13);
+ this.pictureBox1.Name = "pictureBox1";
+ this.pictureBox1.Size = new System.Drawing.Size(31, 35);
+ this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
+ this.pictureBox1.TabIndex = 3;
+ this.pictureBox1.TabStop = false;
+ //
+ // CustomConformation
+ //
+ this.AcceptButton = this.yesButton;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.noButton;
+ this.ClientSize = new System.Drawing.Size(323, 96);
+ this.Controls.Add(this.pictureBox1);
+ this.Controls.Add(this.yesButton);
+ this.Controls.Add(this.noButton);
+ this.Controls.Add(this.confirmLabel);
+ this.Font = new System.Drawing.Font("Tahoma", 8.25F);
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "CustomConformation";
+ this.ShowIcon = false;
+ this.ShowInTaskbar = false;
+ this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
+ this.Text = "Confirm Removal";
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label confirmLabel;
+ private System.Windows.Forms.Button noButton;
+ private System.Windows.Forms.Button yesButton;
+ private System.Windows.Forms.PictureBox pictureBox1;
+ }
+}
\ No newline at end of file
=== added file 'WexInstaller/RemovePanels/RemoveConfirmation.cs'
--- a/WexInstaller/RemovePanels/RemoveConfirmation.cs 1970-01-01 00:00:00 +0000
+++ b/WexInstaller/RemovePanels/RemoveConfirmation.cs 2010-11-03 21:33:54 +0000
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace WexInstaller
+{
+ public partial class RemoveConfirmation : Form
+ {
+ public RemoveConfirmation()
+ {
+ InitializeComponent();
+ }
+
+ private void yesButton_Click(object sender, EventArgs e)
+ {
+ this.DialogResult = DialogResult.Yes;
+ this.Close();
+ }
+
+ private void noButton_Click(object sender, EventArgs e)
+ {
+ this.DialogResult = DialogResult.No;
+ this.Close();
+ }
+ }
+}
=== added file 'WexInstaller/RemovePanels/RemoveConfirmation.resx'
--- a/WexInstaller/RemovePanels/RemoveConfirmation.resx 1970-01-01 00:00:00 +0000
+++ b/WexInstaller/RemovePanels/RemoveConfirmation.resx 2010-11-03 21:33:54 +0000
@@ -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
=== modified file 'WexInstaller/RemovePanels/RemoveProgress.cs'
--- a/WexInstaller/RemovePanels/RemoveProgress.cs 2010-10-01 13:46:31 +0000
+++ b/WexInstaller/RemovePanels/RemoveProgress.cs 2010-11-03 21:33:54 +0000
@@ -26,6 +26,8 @@ namespace WexInstaller
private bool backOk;
private bool executed;
+ public Form confirmForm;
+
public RemoveProgress()
{
InitializeComponent();
@@ -52,6 +54,8 @@ namespace WexInstaller
nextOk = false;
backOk = true;
executed = false;
+
+ confirmForm = new RemoveConfirmation();
}
private void ProductInstallationProgressChanged(object sender, ChainedInstallerEventArgs c)
@@ -160,7 +164,8 @@ namespace WexInstaller
if (productList.CheckedItems.Count > 0)
{
- DialogResult result = MessageBox.Show("Are you sure you wish to remove all listed products?", "Confirm Removal", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation);
+ confirmForm.StartPosition = FormStartPosition.CenterParent;
+ DialogResult result = confirmForm.ShowDialog();
if (result == DialogResult.Yes)
{
enableDetails.Visible = true;
@@ -215,6 +220,8 @@ namespace WexInstaller
nextOk = true;
SignalChange();
}
+ else
+ executed = false;
}
else
{
@@ -262,5 +269,6 @@ namespace WexInstaller
NextButton.Refresh();
}
}
+
}
}
=== added file 'WexInstaller/Resources/Warning.ico'
Files a/WexInstaller/Resources/Warning.ico 1970-01-01 00:00:00 +0000 and b/WexInstaller/Resources/Warning.ico 2010-11-03 21:33:54 +0000 differ
=== added file 'WexInstaller/Resources/warning_sign_large.png'
Files a/WexInstaller/Resources/warning_sign_large.png 1970-01-01 00:00:00 +0000 and b/WexInstaller/Resources/warning_sign_large.png 2010-11-03 21:33:54 +0000 differ
=== modified file 'WexInstaller/UnitTests/MultiCoreTest.cs'
--- a/WexInstaller/UnitTests/MultiCoreTest.cs 2010-10-01 13:46:31 +0000
+++ b/WexInstaller/UnitTests/MultiCoreTest.cs 2010-11-03 21:33:54 +0000
@@ -77,6 +77,18 @@ namespace WexInstaller.UnitTests
uiSignalEvent.Set();
}
+ public void ConfirmShown(object sender, EventArgs e)
+ {
+ RemoveConfirmation r = sender as RemoveConfirmation;
+ if (r != null)
+ {
+ Button b = (Button)r.Controls.Find("yesButton", false)[0];
+ if (b != null)
+ b.PerformClick();
+ }
+ Thread.Sleep(5);
+ }
+
[Test]
public void BasicInstallAndConfiguration()
{
@@ -193,6 +205,8 @@ namespace WexInstaller.UnitTests
// Start removal.
Assert.AreEqual(htc.SelectedTab.Name, "removeProgressTab");
+ RemoveProgress rp = (RemoveProgress)htc.SelectedTab.Controls.Find("removeProgressPanel", false)[0];
+ rp.confirmForm.Shown += new EventHandler(ConfirmShown);
next.PerformClick();
@@ -216,7 +230,7 @@ namespace WexInstaller.UnitTests
CheckBox cb = (CheckBox)htc.SelectedTab.Controls.Find("removeFinalPanel", false)[0].Controls.Find("removeData", false)[0];
cb.Checked = true;
}
- catch (Exception e)
+ catch
{
// If the control isn't present, no worries.
}
=== modified file 'WexInstaller/WexInstaller.csproj'
--- a/WexInstaller/WexInstaller.csproj 2010-09-24 21:01:12 +0000
+++ b/WexInstaller/WexInstaller.csproj 2010-11-03 21:33:54 +0000
@@ -258,6 +258,12 @@
<Compile Include="Controls\WelcomeControl.Designer.cs">
<DependentUpon>WelcomeControl.cs</DependentUpon>
</Compile>
+ <Compile Include="RemovePanels\RemoveConfirmation.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="RemovePanels\RemoveConfirmation.Designer.cs">
+ <DependentUpon>RemoveConfirmation.cs</DependentUpon>
+ </Compile>
<Compile Include="RemovePanels\RemoveComplete.cs">
<SubType>UserControl</SubType>
</Compile>
@@ -368,6 +374,9 @@
<EmbeddedResource Include="Controls\WelcomeControl.resx">
<DependentUpon>WelcomeControl.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="RemovePanels\RemoveConfirmation.resx">
+ <DependentUpon>RemoveConfirmation.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="RemovePanels\RemoveComplete.resx">
<DependentUpon>RemoveComplete.cs</DependentUpon>
</EmbeddedResource>
@@ -471,6 +480,8 @@
<None Include="Resources\plus_sign.png" />
<Content Include="Resources\SidebarBackground.png" />
<None Include="Resources\warning_sign.png" />
+ <None Include="Resources\Warning.ico" />
+ <None Include="Resources\warning_sign_large.png" />
<Content Include="Resources\WelcomeBackground.png" />
<None Include="Resources\WelcomeStepsMaintenance.png" />
<None Include="Resources\WelcomeStepsInitial.png" />
Attachment: [text/bzr-bundle] bzr/iggy@mysql.com-20101103213354-53jzfhqtl7gsapl0.bundle
| Thread |
|---|
| • bzr commit into wex-installer-1.0 branch (iggy:221) | Iggy Galarza | 3 Nov |