Files
ayanova7/source/WinFormApp/AddressForm.cs
2018-06-29 19:47:36 +00:00

1224 lines
61 KiB
C#

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using GZTW.AyaNova.BLL;
using Infragistics.Win;
using Infragistics.Win.UltraWinToolbars;
using log4net;
namespace AyaNova
{
/// <summary>
/// Summary description for AddressForm.
/// </summary>
public class AddressForm : System.Windows.Forms.Form
{
// Create a logger for use in this class
//case 1039 private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private System.Windows.Forms.CheckBox ckIsDirty;
private System.Windows.Forms.ErrorProvider ErrorProvider;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager tbmPopups;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panelLeft_Toolbars_Dock_Area_Top;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panelLeft_Toolbars_Dock_Area_Bottom;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panelLeft_Toolbars_Dock_Area_Left;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panelLeft_Toolbars_Dock_Area_Right;
private System.Windows.Forms.Panel panelBottom;
private Infragistics.Win.Misc.UltraLabel lblLongitude;
private Infragistics.Win.Misc.UltraLabel lblLatitude;
private Infragistics.Win.UltraWinEditors.UltraCheckEditor ckUnitHasOwnAddress;
private Infragistics.Win.Misc.UltraLabel lblStateProv;
private Infragistics.Win.Misc.UltraLabel lblPostal;
private Infragistics.Win.Misc.UltraLabel lblCountry;
private Infragistics.Win.Misc.UltraLabel lblCity;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edDeliveryAddress;
private Infragistics.Win.Misc.UltraLabel lblStreet;
private System.Windows.Forms.Panel panelTop;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panelBottom_Toolbars_Dock_Area_Left;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panelBottom_Toolbars_Dock_Area_Right;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panelBottom_Toolbars_Dock_Area_Top;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panelBottom_Toolbars_Dock_Area_Bottom;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _AddressForm_Toolbars_Dock_Area_Left;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _AddressForm_Toolbars_Dock_Area_Right;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _AddressForm_Toolbars_Dock_Area_Top;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _AddressForm_Toolbars_Dock_Area_Bottom;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager tbManager;
private Infragistics.Win.Misc.UltraButton btnCountryCode;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edCountryCode;
private System.ComponentModel.IContainer components;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edLatitude;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edLongitude;
private Infragistics.Win.UltraWinEditors.UltraComboEditor cbLatitudeHemisphere;
private Infragistics.Win.UltraWinEditors.UltraComboEditor cbLongitudeHemisphere;
private ComboBox cbCity;
private ComboBox cbCountry;
private ComboBox cbPostal;
private ComboBox cbState;
private bool _ReadOnly=true;
public AddressForm(bool Physical, bool IsUnit, bool ReadOnly)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
ckUnitHasOwnAddress.Visible=IsUnit;
_ReadOnly=ReadOnly;
if(Physical)
panelBottom.Visible=true;
else
panelBottom.Visible=false;
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(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.components = new System.ComponentModel.Container();
Infragistics.Win.UltraWinToolbars.OptionSet optionSet1 = new Infragistics.Win.UltraWinToolbars.OptionSet("OSLatitude");
Infragistics.Win.UltraWinToolbars.OptionSet optionSet2 = new Infragistics.Win.UltraWinToolbars.OptionSet("OSLongitude");
Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar1 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("TempSetupTB");
Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool1 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("PopupLongitude");
Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool2 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("PopupLatitude");
Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool3 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("PopupLatitude");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool1 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:UI.Label.South", "OSLatitude");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool2 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:UI.Label.North", "OSLatitude");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool3 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:UI.Label.North", "OSLatitude");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool4 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:UI.Label.South", "OSLatitude");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool5 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:UI.Label.East", "OSLongitude");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool6 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:UI.Label.West", "OSLongitude");
Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool4 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("PopupLongitude");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool7 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:UI.Label.West", "OSLongitude");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool8 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:UI.Label.East", "OSLongitude");
Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar2 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("AddressMenuBar");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool1 = new Infragistics.Win.UltraWinToolbars.ButtonTool("COPYADDRESS");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool2 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.RecordHistory");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool3 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.OK");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool4 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Cancel");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool5 = new Infragistics.Win.UltraWinToolbars.ButtonTool("MapQuest");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool6 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.RecordHistory");
Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool7 = new Infragistics.Win.UltraWinToolbars.ButtonTool("MapQuest");
Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance5 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool8 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.OK");
Infragistics.Win.Appearance appearance6 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance7 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool9 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Cancel");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool10 = new Infragistics.Win.UltraWinToolbars.ButtonTool("COPYADDRESS");
Infragistics.Win.Appearance appearance8 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance9 = new Infragistics.Win.Appearance();
this.ErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
this.ckIsDirty = new System.Windows.Forms.CheckBox();
this.tbmPopups = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components);
this.panelBottom = new System.Windows.Forms.Panel();
this.cbLongitudeHemisphere = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
this.cbLatitudeHemisphere = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
this.edLongitude = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.edLatitude = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.lblLongitude = new Infragistics.Win.Misc.UltraLabel();
this.lblLatitude = new Infragistics.Win.Misc.UltraLabel();
this._panelBottom_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._panelBottom_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._panelBottom_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._panelBottom_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._panelLeft_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._panelLeft_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._panelLeft_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._panelLeft_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this.panelTop = new System.Windows.Forms.Panel();
this.cbCountry = new System.Windows.Forms.ComboBox();
this.cbPostal = new System.Windows.Forms.ComboBox();
this.cbState = new System.Windows.Forms.ComboBox();
this.cbCity = new System.Windows.Forms.ComboBox();
this.edCountryCode = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.btnCountryCode = new Infragistics.Win.Misc.UltraButton();
this.ckUnitHasOwnAddress = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
this.lblStateProv = new Infragistics.Win.Misc.UltraLabel();
this.lblPostal = new Infragistics.Win.Misc.UltraLabel();
this.lblCountry = new Infragistics.Win.Misc.UltraLabel();
this.lblCity = new Infragistics.Win.Misc.UltraLabel();
this.edDeliveryAddress = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.lblStreet = new Infragistics.Win.Misc.UltraLabel();
this.tbManager = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components);
this._AddressForm_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._AddressForm_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._AddressForm_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._AddressForm_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
((System.ComponentModel.ISupportInitialize)(this.ErrorProvider)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbmPopups)).BeginInit();
this.panelBottom.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.cbLongitudeHemisphere)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbLatitudeHemisphere)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edLongitude)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edLatitude)).BeginInit();
this.panelTop.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.edCountryCode)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ckUnitHasOwnAddress)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edDeliveryAddress)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbManager)).BeginInit();
this.SuspendLayout();
//
// ErrorProvider
//
this.ErrorProvider.ContainerControl = this;
//
// ckIsDirty
//
this.ckIsDirty.Location = new System.Drawing.Point(-422, 148);
this.ckIsDirty.Name = "ckIsDirty";
this.ckIsDirty.Size = new System.Drawing.Size(56, 27);
this.ckIsDirty.TabIndex = 49;
//
// tbmPopups
//
this.tbmPopups.DesignerFlags = 1;
this.tbmPopups.DockWithinContainer = this.panelBottom;
this.tbmPopups.OptionSets.Add(optionSet1);
this.tbmPopups.OptionSets.Add(optionSet2);
this.tbmPopups.ShowFullMenusDelay = 500;
ultraToolbar1.DockedColumn = 0;
ultraToolbar1.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Floating;
ultraToolbar1.DockedRow = 0;
ultraToolbar1.FloatingLocation = new System.Drawing.Point(877, 189);
ultraToolbar1.FloatingSize = new System.Drawing.Size(122, 42);
ultraToolbar1.NonInheritedTools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
popupMenuTool1,
popupMenuTool2});
ultraToolbar1.Text = "TempSetupTB";
ultraToolbar1.Visible = false;
this.tbmPopups.Toolbars.AddRange(new Infragistics.Win.UltraWinToolbars.UltraToolbar[] {
ultraToolbar1});
popupMenuTool3.SharedPropsInternal.Caption = "PopupLatitude";
stateButtonTool1.MenuDisplayStyle = Infragistics.Win.UltraWinToolbars.StateButtonMenuDisplayStyle.DisplayCheckmark;
stateButtonTool2.Checked = true;
stateButtonTool2.MenuDisplayStyle = Infragistics.Win.UltraWinToolbars.StateButtonMenuDisplayStyle.DisplayCheckmark;
popupMenuTool3.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
stateButtonTool1,
stateButtonTool2});
stateButtonTool3.Checked = true;
stateButtonTool3.MenuDisplayStyle = Infragistics.Win.UltraWinToolbars.StateButtonMenuDisplayStyle.DisplayCheckmark;
stateButtonTool3.OptionSetKey = "OSLatitude";
stateButtonTool3.SharedPropsInternal.Caption = "LT:UI.Lable.North";
stateButtonTool4.MenuDisplayStyle = Infragistics.Win.UltraWinToolbars.StateButtonMenuDisplayStyle.DisplayCheckmark;
stateButtonTool4.OptionSetKey = "OSLatitude";
stateButtonTool4.SharedPropsInternal.Caption = "LT:UI.Label.South";
stateButtonTool5.MenuDisplayStyle = Infragistics.Win.UltraWinToolbars.StateButtonMenuDisplayStyle.DisplayCheckmark;
stateButtonTool5.OptionSetKey = "OSLongitude";
stateButtonTool5.SharedPropsInternal.Caption = "LT:UI.Label.East";
stateButtonTool6.Checked = true;
stateButtonTool6.MenuDisplayStyle = Infragistics.Win.UltraWinToolbars.StateButtonMenuDisplayStyle.DisplayCheckmark;
stateButtonTool6.OptionSetKey = "OSLongitude";
stateButtonTool6.SharedPropsInternal.Caption = "LT:UI.Label.West";
popupMenuTool4.SharedPropsInternal.Caption = "PopupLongitude";
stateButtonTool7.Checked = true;
stateButtonTool7.MenuDisplayStyle = Infragistics.Win.UltraWinToolbars.StateButtonMenuDisplayStyle.DisplayCheckmark;
stateButtonTool8.MenuDisplayStyle = Infragistics.Win.UltraWinToolbars.StateButtonMenuDisplayStyle.DisplayCheckmark;
popupMenuTool4.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
stateButtonTool7,
stateButtonTool8});
this.tbmPopups.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
popupMenuTool3,
stateButtonTool3,
stateButtonTool4,
stateButtonTool5,
stateButtonTool6,
popupMenuTool4});
this.tbmPopups.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.tbmPopups_ToolClick);
//
// panelBottom
//
this.panelBottom.Controls.Add(this.cbLongitudeHemisphere);
this.panelBottom.Controls.Add(this.cbLatitudeHemisphere);
this.panelBottom.Controls.Add(this.edLongitude);
this.panelBottom.Controls.Add(this.edLatitude);
this.panelBottom.Controls.Add(this.lblLongitude);
this.panelBottom.Controls.Add(this.lblLatitude);
this.panelBottom.Controls.Add(this._panelBottom_Toolbars_Dock_Area_Left);
this.panelBottom.Controls.Add(this._panelBottom_Toolbars_Dock_Area_Right);
this.panelBottom.Controls.Add(this._panelBottom_Toolbars_Dock_Area_Bottom);
this.panelBottom.Controls.Add(this._panelBottom_Toolbars_Dock_Area_Top);
this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panelBottom.Location = new System.Drawing.Point(0, 494);
this.panelBottom.Name = "panelBottom";
this.panelBottom.Size = new System.Drawing.Size(504, 130);
this.panelBottom.TabIndex = 143;
//
// cbLongitudeHemisphere
//
this.cbLongitudeHemisphere.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2007ScrollbarButton;
this.cbLongitudeHemisphere.LimitToList = true;
this.cbLongitudeHemisphere.Location = new System.Drawing.Point(317, 92);
this.cbLongitudeHemisphere.Name = "cbLongitudeHemisphere";
this.cbLongitudeHemisphere.Size = new System.Drawing.Size(144, 24);
this.cbLongitudeHemisphere.TabIndex = 64;
//
// cbLatitudeHemisphere
//
this.cbLatitudeHemisphere.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2007ScrollbarButton;
this.cbLatitudeHemisphere.LimitToList = true;
this.cbLatitudeHemisphere.Location = new System.Drawing.Point(317, 37);
this.cbLatitudeHemisphere.Name = "cbLatitudeHemisphere";
this.cbLatitudeHemisphere.Size = new System.Drawing.Size(144, 24);
this.cbLatitudeHemisphere.TabIndex = 63;
//
// edLongitude
//
this.edLongitude.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.edLongitude.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2007;
this.edLongitude.Location = new System.Drawing.Point(10, 92);
this.edLongitude.Name = "edLongitude";
this.edLongitude.Size = new System.Drawing.Size(308, 24);
this.edLongitude.TabIndex = 58;
//
// edLatitude
//
this.edLatitude.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.edLatitude.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2007;
this.edLatitude.Location = new System.Drawing.Point(10, 37);
this.edLatitude.Name = "edLatitude";
this.edLatitude.Size = new System.Drawing.Size(308, 24);
this.edLatitude.TabIndex = 57;
//
// lblLongitude
//
this.lblLongitude.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblLongitude.Location = new System.Drawing.Point(10, 69);
this.lblLongitude.Name = "lblLongitude";
this.lblLongitude.Size = new System.Drawing.Size(472, 19);
this.lblLongitude.TabIndex = 52;
this.lblLongitude.Tag = "";
this.lblLongitude.Text = "LT:Address.Label.Longitude";
//
// lblLatitude
//
this.lblLatitude.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblLatitude.Location = new System.Drawing.Point(10, 14);
this.lblLatitude.Name = "lblLatitude";
this.lblLatitude.Size = new System.Drawing.Size(472, 18);
this.lblLatitude.TabIndex = 51;
this.lblLatitude.Tag = "";
this.lblLatitude.Text = "LT:Address.Label.Latitude";
//
// _panelBottom_Toolbars_Dock_Area_Left
//
this._panelBottom_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._panelBottom_Toolbars_Dock_Area_Left.BackColor = System.Drawing.SystemColors.Control;
this._panelBottom_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left;
this._panelBottom_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText;
this._panelBottom_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 0);
this._panelBottom_Toolbars_Dock_Area_Left.Name = "_panelBottom_Toolbars_Dock_Area_Left";
this._panelBottom_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 130);
this._panelBottom_Toolbars_Dock_Area_Left.ToolbarsManager = this.tbmPopups;
//
// _panelBottom_Toolbars_Dock_Area_Right
//
this._panelBottom_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._panelBottom_Toolbars_Dock_Area_Right.BackColor = System.Drawing.SystemColors.Control;
this._panelBottom_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right;
this._panelBottom_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText;
this._panelBottom_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(504, 0);
this._panelBottom_Toolbars_Dock_Area_Right.Name = "_panelBottom_Toolbars_Dock_Area_Right";
this._panelBottom_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 130);
this._panelBottom_Toolbars_Dock_Area_Right.ToolbarsManager = this.tbmPopups;
//
// _panelBottom_Toolbars_Dock_Area_Top
//
this._panelBottom_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._panelBottom_Toolbars_Dock_Area_Top.BackColor = System.Drawing.SystemColors.Control;
this._panelBottom_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top;
this._panelBottom_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText;
this._panelBottom_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 0);
this._panelBottom_Toolbars_Dock_Area_Top.Name = "_panelBottom_Toolbars_Dock_Area_Top";
this._panelBottom_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(504, 0);
this._panelBottom_Toolbars_Dock_Area_Top.ToolbarsManager = this.tbmPopups;
//
// _panelBottom_Toolbars_Dock_Area_Bottom
//
this._panelBottom_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._panelBottom_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.SystemColors.Control;
this._panelBottom_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom;
this._panelBottom_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText;
this._panelBottom_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 130);
this._panelBottom_Toolbars_Dock_Area_Bottom.Name = "_panelBottom_Toolbars_Dock_Area_Bottom";
this._panelBottom_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(504, 0);
this._panelBottom_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.tbmPopups;
//
// _panelLeft_Toolbars_Dock_Area_Top
//
this._panelLeft_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._panelLeft_Toolbars_Dock_Area_Top.BackColor = System.Drawing.SystemColors.Control;
this._panelLeft_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top;
this._panelLeft_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText;
this._panelLeft_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 44);
this._panelLeft_Toolbars_Dock_Area_Top.Name = "_panelLeft_Toolbars_Dock_Area_Top";
this._panelLeft_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(504, 0);
this._panelLeft_Toolbars_Dock_Area_Top.ToolbarsManager = this.tbmPopups;
//
// _panelLeft_Toolbars_Dock_Area_Bottom
//
this._panelLeft_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._panelLeft_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.SystemColors.Control;
this._panelLeft_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom;
this._panelLeft_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText;
this._panelLeft_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 624);
this._panelLeft_Toolbars_Dock_Area_Bottom.Name = "_panelLeft_Toolbars_Dock_Area_Bottom";
this._panelLeft_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(504, 0);
this._panelLeft_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.tbmPopups;
//
// _panelLeft_Toolbars_Dock_Area_Left
//
this._panelLeft_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._panelLeft_Toolbars_Dock_Area_Left.BackColor = System.Drawing.SystemColors.Control;
this._panelLeft_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left;
this._panelLeft_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText;
this._panelLeft_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 44);
this._panelLeft_Toolbars_Dock_Area_Left.Name = "_panelLeft_Toolbars_Dock_Area_Left";
this._panelLeft_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 580);
this._panelLeft_Toolbars_Dock_Area_Left.ToolbarsManager = this.tbmPopups;
//
// _panelLeft_Toolbars_Dock_Area_Right
//
this._panelLeft_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._panelLeft_Toolbars_Dock_Area_Right.BackColor = System.Drawing.SystemColors.Control;
this._panelLeft_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right;
this._panelLeft_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText;
this._panelLeft_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(504, 44);
this._panelLeft_Toolbars_Dock_Area_Right.Name = "_panelLeft_Toolbars_Dock_Area_Right";
this._panelLeft_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 580);
this._panelLeft_Toolbars_Dock_Area_Right.ToolbarsManager = this.tbmPopups;
//
// panelTop
//
this.panelTop.Controls.Add(this.cbCountry);
this.panelTop.Controls.Add(this.cbPostal);
this.panelTop.Controls.Add(this.cbState);
this.panelTop.Controls.Add(this.cbCity);
this.panelTop.Controls.Add(this.edCountryCode);
this.panelTop.Controls.Add(this.btnCountryCode);
this.panelTop.Controls.Add(this.ckUnitHasOwnAddress);
this.panelTop.Controls.Add(this.lblStateProv);
this.panelTop.Controls.Add(this.lblPostal);
this.panelTop.Controls.Add(this.lblCountry);
this.panelTop.Controls.Add(this.lblCity);
this.panelTop.Controls.Add(this.edDeliveryAddress);
this.panelTop.Controls.Add(this.lblStreet);
this.panelTop.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelTop.Location = new System.Drawing.Point(0, 44);
this.panelTop.Name = "panelTop";
this.panelTop.Size = new System.Drawing.Size(504, 450);
this.panelTop.TabIndex = 144;
//
// cbCountry
//
this.cbCountry.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.cbCountry.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.cbCountry.FormattingEnabled = true;
this.cbCountry.Location = new System.Drawing.Point(8, 348);
this.cbCountry.Name = "cbCountry";
this.cbCountry.Size = new System.Drawing.Size(479, 24);
this.cbCountry.TabIndex = 153;
//
// cbPostal
//
this.cbPostal.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.cbPostal.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.cbPostal.FormattingEnabled = true;
this.cbPostal.Location = new System.Drawing.Point(10, 292);
this.cbPostal.Name = "cbPostal";
this.cbPostal.Size = new System.Drawing.Size(478, 24);
this.cbPostal.TabIndex = 152;
//
// cbState
//
this.cbState.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.cbState.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.cbState.FormattingEnabled = true;
this.cbState.Location = new System.Drawing.Point(10, 227);
this.cbState.Name = "cbState";
this.cbState.Size = new System.Drawing.Size(478, 24);
this.cbState.TabIndex = 151;
//
// cbCity
//
this.cbCity.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.cbCity.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.cbCity.FormattingEnabled = true;
this.cbCity.Location = new System.Drawing.Point(10, 165);
this.cbCity.Name = "cbCity";
this.cbCity.Size = new System.Drawing.Size(478, 24);
this.cbCity.TabIndex = 150;
//
// edCountryCode
//
this.edCountryCode.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2007;
this.edCountryCode.Location = new System.Drawing.Point(10, 415);
this.edCountryCode.MaxLength = 2;
this.edCountryCode.Name = "edCountryCode";
this.edCountryCode.Size = new System.Drawing.Size(38, 24);
this.edCountryCode.TabIndex = 5;
//
// btnCountryCode
//
this.btnCountryCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
appearance1.TextHAlignAsString = "Left";
this.btnCountryCode.Appearance = appearance1;
this.btnCountryCode.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2007RibbonButton;
this.btnCountryCode.Location = new System.Drawing.Point(10, 388);
this.btnCountryCode.Name = "btnCountryCode";
this.btnCountryCode.Size = new System.Drawing.Size(482, 24);
this.btnCountryCode.TabIndex = 149;
this.btnCountryCode.Tag = "";
this.btnCountryCode.Text = "LT:Address.Label.CountryCode";
this.btnCountryCode.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
this.btnCountryCode.WrapText = false;
this.btnCountryCode.Click += new System.EventHandler(this.btnCountryCode_Click);
//
// ckUnitHasOwnAddress
//
this.ckUnitHasOwnAddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ckUnitHasOwnAddress.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2007ScrollbarButton;
this.ckUnitHasOwnAddress.Checked = true;
this.ckUnitHasOwnAddress.CheckState = System.Windows.Forms.CheckState.Checked;
this.ckUnitHasOwnAddress.Location = new System.Drawing.Point(19, 18);
this.ckUnitHasOwnAddress.Name = "ckUnitHasOwnAddress";
this.ckUnitHasOwnAddress.Size = new System.Drawing.Size(463, 28);
this.ckUnitHasOwnAddress.TabIndex = 148;
this.ckUnitHasOwnAddress.Tag = "";
this.ckUnitHasOwnAddress.Text = "LT:Unit.Label.UnitHasOwnAddress";
this.ckUnitHasOwnAddress.Visible = false;
//
// lblStateProv
//
this.lblStateProv.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblStateProv.Location = new System.Drawing.Point(10, 212);
this.lblStateProv.Name = "lblStateProv";
this.lblStateProv.Size = new System.Drawing.Size(482, 19);
this.lblStateProv.TabIndex = 147;
this.lblStateProv.Tag = "";
this.lblStateProv.Text = "LT:Address.Label.StateProv";
//
// lblPostal
//
this.lblPostal.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblPostal.Location = new System.Drawing.Point(10, 277);
this.lblPostal.Name = "lblPostal";
this.lblPostal.Size = new System.Drawing.Size(482, 18);
this.lblPostal.TabIndex = 146;
this.lblPostal.Tag = "";
this.lblPostal.Text = "LT:Address.Label.Postal";
//
// lblCountry
//
this.lblCountry.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblCountry.Location = new System.Drawing.Point(10, 332);
this.lblCountry.Name = "lblCountry";
this.lblCountry.Size = new System.Drawing.Size(482, 19);
this.lblCountry.TabIndex = 145;
this.lblCountry.Tag = "";
this.lblCountry.Text = "LT:Address.Label.Country";
//
// lblCity
//
this.lblCity.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblCity.Location = new System.Drawing.Point(10, 148);
this.lblCity.Name = "lblCity";
this.lblCity.Size = new System.Drawing.Size(482, 18);
this.lblCity.TabIndex = 144;
this.lblCity.Tag = "";
this.lblCity.Text = "LT:Address.Label.City";
//
// edDeliveryAddress
//
this.edDeliveryAddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.edDeliveryAddress.DisplayStyle = Infragistics.Win.EmbeddableElementDisplayStyle.Office2007;
this.edDeliveryAddress.Location = new System.Drawing.Point(10, 74);
this.edDeliveryAddress.Multiline = true;
this.edDeliveryAddress.Name = "edDeliveryAddress";
this.edDeliveryAddress.Size = new System.Drawing.Size(481, 64);
this.edDeliveryAddress.TabIndex = 0;
//
// lblStreet
//
this.lblStreet.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblStreet.Location = new System.Drawing.Point(10, 55);
this.lblStreet.Name = "lblStreet";
this.lblStreet.Size = new System.Drawing.Size(472, 19);
this.lblStreet.TabIndex = 143;
this.lblStreet.Tag = "";
this.lblStreet.Text = "LT:Address.Label.DeliveryAddress";
//
// tbManager
//
this.tbManager.DesignerFlags = 1;
this.tbManager.DockWithinContainer = this;
this.tbManager.DockWithinContainerBaseType = typeof(System.Windows.Forms.Form);
this.tbManager.ShowFullMenusDelay = 500;
this.tbManager.Style = Infragistics.Win.UltraWinToolbars.ToolbarStyle.Office2007;
ultraToolbar2.DockedColumn = 0;
ultraToolbar2.DockedRow = 0;
ultraToolbar2.NonInheritedTools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
buttonTool1,
buttonTool2,
buttonTool3,
buttonTool4,
buttonTool5});
ultraToolbar2.Text = "AddressMenuBar";
this.tbManager.Toolbars.AddRange(new Infragistics.Win.UltraWinToolbars.UltraToolbar[] {
ultraToolbar2});
this.tbManager.ToolbarSettings.AllowCustomize = Infragistics.Win.DefaultableBoolean.False;
this.tbManager.ToolbarSettings.AllowFloating = Infragistics.Win.DefaultableBoolean.False;
this.tbManager.ToolbarSettings.AllowHiding = Infragistics.Win.DefaultableBoolean.False;
appearance2.Image = global::AyaNova.Resource1.RecordHistory32;
buttonTool6.SharedPropsInternal.AppearancesLarge.Appearance = appearance2;
appearance3.Image = global::AyaNova.Resource1.RecordHistory16;
buttonTool6.SharedPropsInternal.AppearancesSmall.Appearance = appearance3;
buttonTool6.SharedPropsInternal.Caption = "LT:UI.Command.RecordHistory";
appearance4.Image = global::AyaNova.Resource1.Mapping32;
buttonTool7.SharedPropsInternal.AppearancesLarge.Appearance = appearance4;
appearance5.Image = global::AyaNova.Resource1.Mapping16;
buttonTool7.SharedPropsInternal.AppearancesSmall.Appearance = appearance5;
buttonTool7.SharedPropsInternal.Caption = "MapQuest";
appearance6.Image = global::AyaNova.Resource1.OK32;
buttonTool8.SharedPropsInternal.AppearancesLarge.Appearance = appearance6;
appearance7.Image = global::AyaNova.Resource1.OK16;
buttonTool8.SharedPropsInternal.AppearancesSmall.Appearance = appearance7;
buttonTool8.SharedPropsInternal.Caption = "LT:UI.Command.OK";
buttonTool9.SharedPropsInternal.Caption = "LT:UI.Command.Cancel";
buttonTool9.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.TextOnlyAlways;
appearance8.Image = global::AyaNova.Resource1.CopyAddress32;
buttonTool10.SharedPropsInternal.AppearancesLarge.Appearance = appearance8;
appearance9.Image = global::AyaNova.Resource1.CopyAddress16;
buttonTool10.SharedPropsInternal.AppearancesSmall.Appearance = appearance9;
this.tbManager.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
buttonTool6,
buttonTool7,
buttonTool8,
buttonTool9,
buttonTool10});
this.tbManager.UseLargeImagesOnToolbar = true;
this.tbManager.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.tbManager_ToolClick);
//
// _AddressForm_Toolbars_Dock_Area_Left
//
this._AddressForm_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._AddressForm_Toolbars_Dock_Area_Left.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(255)))));
this._AddressForm_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left;
this._AddressForm_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText;
this._AddressForm_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 44);
this._AddressForm_Toolbars_Dock_Area_Left.Name = "_AddressForm_Toolbars_Dock_Area_Left";
this._AddressForm_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 580);
this._AddressForm_Toolbars_Dock_Area_Left.ToolbarsManager = this.tbManager;
//
// _AddressForm_Toolbars_Dock_Area_Right
//
this._AddressForm_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._AddressForm_Toolbars_Dock_Area_Right.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(255)))));
this._AddressForm_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right;
this._AddressForm_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText;
this._AddressForm_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(504, 44);
this._AddressForm_Toolbars_Dock_Area_Right.Name = "_AddressForm_Toolbars_Dock_Area_Right";
this._AddressForm_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 580);
this._AddressForm_Toolbars_Dock_Area_Right.ToolbarsManager = this.tbManager;
//
// _AddressForm_Toolbars_Dock_Area_Top
//
this._AddressForm_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._AddressForm_Toolbars_Dock_Area_Top.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(255)))));
this._AddressForm_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top;
this._AddressForm_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText;
this._AddressForm_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 0);
this._AddressForm_Toolbars_Dock_Area_Top.Name = "_AddressForm_Toolbars_Dock_Area_Top";
this._AddressForm_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(504, 44);
this._AddressForm_Toolbars_Dock_Area_Top.ToolbarsManager = this.tbManager;
//
// _AddressForm_Toolbars_Dock_Area_Bottom
//
this._AddressForm_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._AddressForm_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(255)))));
this._AddressForm_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom;
this._AddressForm_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText;
this._AddressForm_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 624);
this._AddressForm_Toolbars_Dock_Area_Bottom.Name = "_AddressForm_Toolbars_Dock_Area_Bottom";
this._AddressForm_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(504, 0);
this._AddressForm_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.tbManager;
//
// AddressForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
this.ClientSize = new System.Drawing.Size(504, 624);
this.Controls.Add(this.panelTop);
this.Controls.Add(this.ckIsDirty);
this.Controls.Add(this.panelBottom);
this.Controls.Add(this._panelLeft_Toolbars_Dock_Area_Left);
this.Controls.Add(this._panelLeft_Toolbars_Dock_Area_Right);
this.Controls.Add(this._AddressForm_Toolbars_Dock_Area_Left);
this.Controls.Add(this._AddressForm_Toolbars_Dock_Area_Right);
this.Controls.Add(this._panelLeft_Toolbars_Dock_Area_Bottom);
this.Controls.Add(this._AddressForm_Toolbars_Dock_Area_Bottom);
this.Controls.Add(this._panelLeft_Toolbars_Dock_Area_Top);
this.Controls.Add(this._AddressForm_Toolbars_Dock_Area_Top);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximumSize = new System.Drawing.Size(510, 655);
this.MinimumSize = new System.Drawing.Size(510, 655);
this.Name = "AddressForm";
this.ShowInTaskbar = false;
this.Tag = "";
this.Closing += new System.ComponentModel.CancelEventHandler(this.frmAddress_Closing);
this.Load += new System.EventHandler(this.frmAddress_Load);
((System.ComponentModel.ISupportInitialize)(this.ErrorProvider)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tbmPopups)).EndInit();
this.panelBottom.ResumeLayout(false);
this.panelBottom.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.cbLongitudeHemisphere)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbLatitudeHemisphere)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edLongitude)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edLatitude)).EndInit();
this.panelTop.ResumeLayout(false);
this.panelTop.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.edCountryCode)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ckUnitHasOwnAddress)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edDeliveryAddress)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tbManager)).EndInit();
this.ResumeLayout(false);
}
#endregion
// __ _ _ ___ ____ __ __ __ __ __ ___ ___
// / _)( )( )/ __)(_ _)/ \( \/ ) / _)/ \( \( _)
// ( (_ )()( \__ \ )( ( () )) ( ( (_( () )) ) )) _)
// \__) \__/ (___/ (__) \__/(_/\/\_) \__)\__/(___/(___)
//
#region Form Load / Close
//variable to hold user form settings
//UIUserFormSetting mFormSetting;
private void frmAddress_Load(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("frmAddress_Load");
Cursor.Current = Cursors.WaitCursor;
this.Visible=false;
Util.LoadFormCustomization("Address", this, tbManager, false);
SetupComboBoxes();
Util.LocalizeHelperInsertMenu(tbManager, this); //case 1810
Util.Localize(this);
DataBind();
RestrictUI();
if(this.mCopyToAddress!=null)
{
if(mCopyToAddress.AddressType==AddressTypes.Physical)
tbManager.Tools["COPYADDRESS"].SharedProps.Caption=Util.LocaleText.GetLocalizedText("Address.Label.CopyToPhysical");
else
tbManager.Tools["COPYADDRESS"].SharedProps.Caption=Util.LocaleText.GetLocalizedText("Address.Label.CopyToPostal");
}
this.Visible=true;
Cursor.Current = Cursors.Default;
//Case 152
(new TabOrderManager(this)).SetTabOrder(TabOrderManager.TabScheme.AcrossFirst);
}
/// <summary>
/// Used to track whether the close was done by the program
/// or done by the user clicking on the upper left corner X control
/// </summary>
bool bClosingHandled=false;
/// <summary>
private void frmAddress_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
//case 1039 //log.Debug("frmAddress_Closing");
if(!bClosingHandled)
{
//Save record if necessary
//User may opt to not cancel exit
if(!SaveHandler(RecordActionType.PromptToSave) )
{
e.Cancel=true;
return;
}
}
Util.SaveFormCustomization("Address", this, tbManager, false);
}
#endregion
#region Form UI Commands
private void tbManager_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
{
//case 1039 //if(log.IsDebugEnabled)
//case 1039 //log.Debug("ToolClick:"+e.Tool.Key);
switch (e.Tool.Key)
{
case "LT:UI.Command.RecordHistory": // ButtonTool
RecordHistoryForm RH=new RecordHistoryForm(mAddress.Creator,mAddress.Modifier,mAddress.Created,mAddress.Modified);
RH.ShowDialog(); RH.Dispose();RH.Dispose();
break;
case "MapQuest": // ButtonTool
Util.OpenWebURL(mAddress.MapQuestURL);
break;
case "LT:UI.Command.OK": // ButtonTool
SaveHandler(RecordActionType.SaveAndExit);
break;
case "LT:UI.Command.Cancel": // ButtonTool
mAddress.CancelEdit();
bClosingHandled=true;
this.Close();
break;
case "COPYADDRESS": // ButtonTool
if(this.mAddress.IsValid && this.mCopyToAddress!=null)
{
Address.Copy(this.mAddress,this.mCopyToAddress);
}
break;
}
}
private void btnCountryCode_Click(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("btnCountryCode_Click");
Util.OpenWebURL("http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html");
}
#endregion Form UI Commands
#region Form DataBinding and BrokenRules handling
/// <summary>
/// Bind controls to business objects
/// </summary>
private void DataBind()
{
//case 1039 //log.Debug("DataBind");
//Subscribe to broken rules changed event OnBrokenRulesChanged
mAddress.GetBrokenRulesCollection().ListChanged += new System.ComponentModel.ListChangedEventHandler(OnBrokenRulesChanged);
//=-=-=-=-=-=- Form Field bindings =-=-=-=-=-=-=-=-=-=-=-=
this.Text=Util.LocaleText.GetLocalizedText("O.Address");
//Text editors
Util.BindField(edDeliveryAddress,"Text",mAddress,"DeliveryAddress");
//Util.BindField(edCity,"Text",mAddress,"City");
Util.BindField(cbCity, "Text", mAddress, "City");
Util.BindField(cbState,"Text",mAddress,"StateProv");
Util.BindField(cbPostal,"Text",mAddress,"Postal");
Util.BindField(cbCountry,"Text",mAddress,"Country");
Util.BindField(edCountryCode,"Text",mAddress,"CountryCode");
Util.BindField(edLatitude,"Text",mAddress,"LatitudeText");
Util.BindField(edLongitude,"Text",mAddress,"LongitudeText");
Util.BindField(cbLatitudeHemisphere,"Value",mAddress,"LatHemisphere");
Util.BindField(cbLongitudeHemisphere,"Value",mAddress,"LongHemisphere");
//Bind IsDirty property to hidden checkbox to
//ensure isdirtychanged event is available
//to data binding infrastructure
Util.BindField(ckIsDirty,"Checked",mAddress,"IsDirty");
//Setup initial link to broken rules
OnBrokenRulesChanged(null,null);
}
/// <summary>
/// Handle a change in broken rules
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnBrokenRulesChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
{
Util.BrokenRuleFeedback(this,mAddress,ErrorProvider);
}
#endregion
#region Form restrictions
private void RestrictUI()
{
//case 1039 //if(log.IsDebugEnabled) //case 1039 //log.Debug("RestrictUI, ReadOnly=" + this._ReadOnly.ToString());
//Text editors
edDeliveryAddress.Enabled=!_ReadOnly;
cbCity.Enabled=!_ReadOnly;
cbState.Enabled=!_ReadOnly;
cbPostal.Enabled=!_ReadOnly;
cbCountry.Enabled=!_ReadOnly;
edLatitude.Enabled=!_ReadOnly;
edLongitude.Enabled=!_ReadOnly;
this.edCountryCode.Enabled=!_ReadOnly;
//TODO once John has Address object edited
//edCountryCode.ReadOnly=!_ReadOnly;
//Check boxes
ckUnitHasOwnAddress.Enabled=!_ReadOnly;
//Buttons
cbLatitudeHemisphere.Enabled=!_ReadOnly;
cbLongitudeHemisphere.Enabled=!_ReadOnly;
tbManager.Tools["COPYADDRESS"].SharedProps.Visible=(mCopyToAddress!=null && !_ReadOnly);
}
#endregion Form restrictions
#region Business object editing / adding / deletion related code
private Address mAddress;
/// <summary>
/// record to edit
/// set by caller
/// </summary>
public Address AddressToEdit
{
get
{
return mAddress;
}
set
{
mAddress=value;
mAddress.BeginEdit();
}
}
private Address mCopyToAddress=null;
/// <summary>
/// Address record that is a candidate
/// for copying primary address being edited to
/// (set by caller)
/// </summary>
public Address CopyToAddressToEdit
{
get
{
return mCopyToAddress;
}
set
{
mCopyToAddress=value;
}
}
// /// <summary>
// /// Save record and process
// ///
// /// </summary>
// /// <returns>True if handled, false if not handled</returns>
private bool SaveHandler(RecordActionType SaveType)
{
//case 1039 //if(log.IsDebugEnabled)
//case 1039 //log.Debug("SaveHandler(Action="+SaveType.ToString()+")");
//switch the focus to a non-editable control
//so that any changes in the current editable control
//will get updated before attempting to save
lblCity.Focus();
switch(SaveType)
{
case RecordActionType.SaveAndExit:
//Save if necessary and exit
if(mAddress.IsSavable)
{
mAddress.ApplyEdit();
bClosingHandled=true;
// mAddress.Save();
this.Close();
return true;
}
if(mAddress.IsDirty)//dirty and unsaveable due to broken rules
{
if(Util.PromptForBrokenRulesCancelSave()==DialogResult.Yes)
{
mAddress.CancelEdit();
this.Close();
return true;
}
else
return false;
}
//not dirty so just exit
this.Close();
break;
case RecordActionType.PromptToSave:
//Prompt to save and save if
//required
if(mAddress.IsDirty)
{
DialogResult dr=Util.PromptForSave();
if(dr==DialogResult.Cancel)
{
//Cancel
return false;
}
if(dr==DialogResult.Yes)
{
//Save before exit
if(mAddress.IsSavable)
{
mAddress.ApplyEdit();
// mAddress.Save();
// mbChangesMade=true;
return true;
}
if(mAddress.IsDirty)//dirty and unsaveable due to broken rules
{
if(Util.PromptForBrokenRulesCancelSave()==DialogResult.Yes)
{
return true;
}
else
return false;
}
}
else
{
mAddress.CancelEdit();
}
}
return true;
}
return false;
}
#endregion
#region Latitude / Longitude related
//Keep track of lat/long direction
//bool bNorth=false;
//bool bWest=false;
//Handle lat and long outside of binding
//because they need to be converted
private void edLatitude_Leave(object sender, System.EventArgs e)
{
//SetLatitude();
}
private void SetLatitude()
{
// //case 1039 //log.Debug("SetLatitude");
// if(edLatitude.Value==System.DBNull.Value)
// {
// mAddress.Latitude=0;
// return;
// }
//
// string s=edLatitude.Text;
// if(bNorth==false)
// s="-"+s;
// mAddress.LatitudeFromString(s);
}
private void edLongitude_Leave(object sender, System.EventArgs e)
{
//SetLongitude();
}
private void SetLongitude()
{
// //case 1039 //log.Debug("SetLongitude");
// if(edLongitude.Value==System.DBNull.Value)
// {
// mAddress.Longitude=0;
// return;
// }
//
// string s=edLongitude.Text;
// if(bWest==true)
// s="-"+s;
// mAddress.LongitudeFromString(s);
}
private void tbmPopups_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
{
// //case 1039 //if(log.IsDebugEnabled)
// //case 1039 //log.Debug("ToolClick: " + e.Tool.Key);
// switch (e.Tool.Key)
// {
// case "LT:UI.Label.North": // StateButtonTool
// btnNorthSouth.Text=Util.LocaleText.GetLocalizedText("UI.Label.North");
// bNorth=true;
// SetLatitude();
// break;
//
// case "LT:UI.Label.South": // StateButtonTool
// btnNorthSouth.Text=Util.LocaleText.GetLocalizedText("UI.Label.South");
// bNorth=false;
// SetLatitude();
// break;
//
// case "LT:UI.Label.East": // StateButtonTool
// btnEastWest.Text=Util.LocaleText.GetLocalizedText("UI.Label.East");
// bWest=false;
// SetLongitude();
// break;
//
// case "LT:UI.Label.West": // StateButtonTool
// btnEastWest.Text=Util.LocaleText.GetLocalizedText("UI.Label.West");
// bWest=true;
// SetLongitude();
// break;
//
// }
}
#endregion
#region ComboBoxes
private void SetupComboBoxes()
{
cbLatitudeHemisphere.Items.Add(LatitudeHemisphere.North,Util.LocaleText.GetLocalizedText("UI.Label.North"));
cbLatitudeHemisphere.Items.Add(LatitudeHemisphere.South,Util.LocaleText.GetLocalizedText("UI.Label.South"));
cbLongitudeHemisphere.Items.Add(LongitudeHemisphere.West,Util.LocaleText.GetLocalizedText("UI.Label.West"));
cbLongitudeHemisphere.Items.Add(LongitudeHemisphere.East,Util.LocaleText.GetLocalizedText("UI.Label.East"));
cbCity.DataSource = AddressFieldPickList.GetList(AddressFieldPickList.AddressField.City);
cbCity.DisplayMember = "Name";
cbCountry.DataSource = AddressFieldPickList.GetList(AddressFieldPickList.AddressField.Country);
cbCountry.DisplayMember = "Name";
cbPostal.DataSource = AddressFieldPickList.GetList(AddressFieldPickList.AddressField.Postal);
cbPostal.DisplayMember = "Name";
cbState.DataSource = AddressFieldPickList.GetList(AddressFieldPickList.AddressField.State);
cbState.DisplayMember = "Name";
}
#endregion
#region Unit related
private bool mUnitHasAddress=true;
private void ckUnitHasOwnAddress_CheckedChanged(object sender, System.EventArgs e)
{
mUnitHasAddress=ckUnitHasOwnAddress.Checked;
}
/// <summary>
/// returns checked state of unit has own address check box
/// </summary>
public bool UnitHasAddress
{
get
{
return mUnitHasAddress;
}
}
#endregion
}
}