using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using log4net;
using GZTW.AyaNova.BLL;
namespace AyaNova
{
///
/// Summary description for ReportDesignerSaveAsDialog.
///
public class ReportDesignerSaveAsDialog : 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 Infragistics.Win.UltraWinEditors.UltraTextEditor edName;
private Infragistics.Win.Misc.UltraLabel lblName;
private System.Windows.Forms.Panel ReportDesignerSaveAsDialog_Fill_Panel;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Left;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Right;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Top;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Bottom;
private Infragistics.Win.Misc.UltraLabel ultraLabel1;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager tbManager;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edKey;
private System.ComponentModel.IContainer components;
public ReportDesignerSaveAsDialog()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
//
//
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar1 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("UltraToolbar1");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool1 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.OK");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool2 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Cancel");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool3 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Cancel");
Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool4 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.OK");
Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
this.edName = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.lblName = new Infragistics.Win.Misc.UltraLabel();
this.tbManager = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components);
this.ReportDesignerSaveAsDialog_Fill_Panel = new System.Windows.Forms.Panel();
this.edKey = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.ultraLabel1 = new Infragistics.Win.Misc.UltraLabel();
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
((System.ComponentModel.ISupportInitialize)(this.edName)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbManager)).BeginInit();
this.ReportDesignerSaveAsDialog_Fill_Panel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.edKey)).BeginInit();
this.SuspendLayout();
//
// edName
//
this.edName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.edName.Location = new System.Drawing.Point(0, 27);
this.edName.Name = "edName";
this.edName.Size = new System.Drawing.Size(427, 24);
this.edName.TabIndex = 93;
this.edName.ValueChanged += new System.EventHandler(this.edName_ValueChanged);
//
// lblName
//
this.lblName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.lblName.BorderStyleOuter = Infragistics.Win.UIElementBorderStyle.None;
this.lblName.Location = new System.Drawing.Point(0, 8);
this.lblName.Name = "lblName";
this.lblName.Size = new System.Drawing.Size(417, 19);
this.lblName.TabIndex = 94;
this.lblName.Tag = "";
this.lblName.Text = "LT:Report.Label.Name";
this.lblName.WrapText = false;
//
// tbManager
//
this.tbManager.DesignerFlags = 1;
this.tbManager.DockWithinContainer = this;
this.tbManager.DockWithinContainerBaseType = typeof(System.Windows.Forms.Form);
this.tbManager.ShowFullMenusDelay = 500;
ultraToolbar1.DockedColumn = 0;
ultraToolbar1.DockedRow = 0;
ultraToolbar1.NonInheritedTools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
buttonTool1,
buttonTool2});
ultraToolbar1.Text = "ClientSelectorToolbar";
this.tbManager.Toolbars.AddRange(new Infragistics.Win.UltraWinToolbars.UltraToolbar[] {
ultraToolbar1});
this.tbManager.ToolbarSettings.AllowCustomize = Infragistics.Win.DefaultableBoolean.False;
this.tbManager.ToolbarSettings.AllowFloating = Infragistics.Win.DefaultableBoolean.False;
this.tbManager.ToolbarSettings.AllowHiding = Infragistics.Win.DefaultableBoolean.False;
appearance1.Image = global::AyaNova.Resource1.Cancel32;
buttonTool3.SharedPropsInternal.AppearancesLarge.Appearance = appearance1;
appearance2.Image = global::AyaNova.Resource1.Cancel16;
buttonTool3.SharedPropsInternal.AppearancesSmall.Appearance = appearance2;
buttonTool3.SharedPropsInternal.Caption = "LT:UI.Command.Cancel";
appearance3.Image = global::AyaNova.Resource1.OK32;
buttonTool4.SharedPropsInternal.AppearancesLarge.Appearance = appearance3;
appearance4.Image = global::AyaNova.Resource1.OK16;
buttonTool4.SharedPropsInternal.AppearancesSmall.Appearance = appearance4;
buttonTool4.SharedPropsInternal.Caption = "LT:UI.Command.OK";
this.tbManager.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
buttonTool3,
buttonTool4});
this.tbManager.UseLargeImagesOnToolbar = true;
this.tbManager.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.tbManager_ToolClick);
//
// ReportDesignerSaveAsDialog_Fill_Panel
//
this.ReportDesignerSaveAsDialog_Fill_Panel.Controls.Add(this.edKey);
this.ReportDesignerSaveAsDialog_Fill_Panel.Controls.Add(this.ultraLabel1);
this.ReportDesignerSaveAsDialog_Fill_Panel.Controls.Add(this.edName);
this.ReportDesignerSaveAsDialog_Fill_Panel.Controls.Add(this.lblName);
this.ReportDesignerSaveAsDialog_Fill_Panel.Cursor = System.Windows.Forms.Cursors.Default;
this.ReportDesignerSaveAsDialog_Fill_Panel.Dock = System.Windows.Forms.DockStyle.Fill;
this.ReportDesignerSaveAsDialog_Fill_Panel.Location = new System.Drawing.Point(0, 43);
this.ReportDesignerSaveAsDialog_Fill_Panel.Name = "ReportDesignerSaveAsDialog_Fill_Panel";
this.ReportDesignerSaveAsDialog_Fill_Panel.Size = new System.Drawing.Size(427, 131);
this.ReportDesignerSaveAsDialog_Fill_Panel.TabIndex = 0;
//
// edKey
//
this.edKey.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.edKey.Location = new System.Drawing.Point(0, 91);
this.edKey.Name = "edKey";
this.edKey.ReadOnly = true;
this.edKey.Size = new System.Drawing.Size(427, 24);
this.edKey.TabIndex = 95;
//
// ultraLabel1
//
this.ultraLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.ultraLabel1.BorderStyleOuter = Infragistics.Win.UIElementBorderStyle.None;
this.ultraLabel1.Location = new System.Drawing.Point(0, 73);
this.ultraLabel1.Name = "ultraLabel1";
this.ultraLabel1.Size = new System.Drawing.Size(408, 18);
this.ultraLabel1.TabIndex = 96;
this.ultraLabel1.Tag = "";
this.ultraLabel1.Text = "LT:Report.Label.ReportKey";
this.ultraLabel1.WrapText = false;
//
// _ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Left
//
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Left.BackColor = System.Drawing.SystemColors.Control;
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left;
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText;
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 43);
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Left.Name = "_ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Left";
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 131);
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Left.ToolbarsManager = this.tbManager;
//
// _ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Right
//
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Right.BackColor = System.Drawing.SystemColors.Control;
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right;
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText;
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(427, 43);
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Right.Name = "_ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Right";
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 131);
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Right.ToolbarsManager = this.tbManager;
//
// _ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Top
//
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Top.BackColor = System.Drawing.SystemColors.Control;
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top;
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText;
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 0);
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Top.Name = "_ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Top";
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(427, 43);
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Top.ToolbarsManager = this.tbManager;
//
// _ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Bottom
//
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.SystemColors.Control;
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom;
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText;
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 174);
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Bottom.Name = "_ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Bottom";
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(427, 0);
this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.tbManager;
//
// ReportDesignerSaveAsDialog
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
this.ClientSize = new System.Drawing.Size(427, 174);
this.Controls.Add(this.ReportDesignerSaveAsDialog_Fill_Panel);
this.Controls.Add(this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Left);
this.Controls.Add(this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Right);
this.Controls.Add(this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Bottom);
this.Controls.Add(this._ReportDesignerSaveAsDialog_Toolbars_Dock_Area_Top);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ReportDesignerSaveAsDialog";
this.ShowInTaskbar = false;
this.Text = "LT:Report.Label.SaveAsDialogTitle";
this.Closing += new System.ComponentModel.CancelEventHandler(this.ReportDesignerSaveAsDialog_Closing);
this.Load += new System.EventHandler(this.ReportDesignerSaveAsDialog_Load);
((System.ComponentModel.ISupportInitialize)(this.edName)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tbManager)).EndInit();
this.ReportDesignerSaveAsDialog_Fill_Panel.ResumeLayout(false);
this.ReportDesignerSaveAsDialog_Fill_Panel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.edKey)).EndInit();
this.ResumeLayout(false);
}
#endregion
// __ _ _ ___ ____ __ __ __ __ __ ___ ___
// / _)( )( )/ __)(_ _)/ \( \/ ) / _)/ \( \( _)
// ( (_ )()( \__ \ )( ( () )) ( ( (_( () )) ) )) _)
// \__) \__/ (___/ (__) \__/(_/\/\_) \__)\__/(___/(___)
//
#region Global vars / Properties
private string mSelectedName="";
public string SelectedName
{
get{ return mSelectedName;}
set{mSelectedName=value;edName.Text=value;}
}
public string ReportKey
{
set{edKey.Text=value;}
}
#endregion
#region Load / close events
//variable to hold user form settings
//UIUserFormSetting mFormSetting;
private void ReportDesignerSaveAsDialog_Load(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("ReportDesignerSaveAsDialog_Load");
Util.LoadFormCustomization("ReportDesignerSaveAsDialog", this, tbManager, true);
this.Icon = Resource1.ReportTemplate16icon;
Util.Localize(this);
Application.Idle+= new EventHandler(Application_Idle);
}
private void ReportDesignerSaveAsDialog_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
//case 1039 //log.Debug("ReportDesignerSaveAsDialog_Closing");
Application.Idle-= new EventHandler(Application_Idle);
if(mSelectedName=="")
this.DialogResult=DialogResult.Cancel;
Util.SaveFormCustomization("ReportDesignerSaveAsDialog", this, tbManager, true);
}
#endregion
#region Idle processing
private void Application_Idle(object sender, EventArgs e)
{
tbManager.Tools["LT:UI.Command.OK"].SharedProps.Enabled=mSelectedName!="";
}
#endregion
#region name changed
private void edName_ValueChanged(object sender, System.EventArgs e)
{
if(edName.Value==null)
mSelectedName="";
else
mSelectedName=edName.Value.ToString();
}
#endregion
#region 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.Cancel": // ButtonTool
mSelectedName="";
this.DialogResult=DialogResult.Cancel;
this.Close();
break;
case "LT:UI.Command.OK": // ButtonTool
this.DialogResult=DialogResult.OK;
this.Close();
break;
}
}
#endregion
}
}