Files
ayanova7/source/Plugins/AyaNova.Plugin.PTI/LinkAyaObjectToQBConfirm.cs
2018-06-29 19:47:36 +00:00

235 lines
12 KiB
C#

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using Infragistics.Win;
namespace AyaNova.PlugIn.PTI
{
/// <summary>
/// Summary description for LinkAyaObjectToQBConfirm.
/// </summary>
public class LinkAyaObjectToQBConfirm : System.Windows.Forms.Form
{
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
private Infragistics.Win.UltraWinGrid.UltraGrid grid;
private Infragistics.Win.Misc.UltraLabel lblTO;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public LinkAyaObjectToQBConfirm()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
this.btnCancel.Image = Util.AyaImage("Cancel24");
this.btnOK.Image = Util.AyaImage("OK24");
}
/// <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()
{
Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance5 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance6 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance7 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance8 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance9 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance10 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance11 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance12 = new Infragistics.Win.Appearance();
this.grid = new Infragistics.Win.UltraWinGrid.UltraGrid();
this.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.lblTO = new Infragistics.Win.Misc.UltraLabel();
((System.ComponentModel.ISupportInitialize)(this.grid)).BeginInit();
this.SuspendLayout();
//
// grid
//
appearance1.BackColor = System.Drawing.SystemColors.Window;
appearance1.BorderColor = System.Drawing.SystemColors.InactiveCaption;
this.grid.DisplayLayout.Appearance = appearance1;
this.grid.DisplayLayout.AutoFitStyle = Infragistics.Win.UltraWinGrid.AutoFitStyle.ResizeAllColumns;
this.grid.DisplayLayout.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
this.grid.DisplayLayout.CaptionVisible = Infragistics.Win.DefaultableBoolean.False;
appearance2.BackColor = System.Drawing.SystemColors.ActiveBorder;
appearance2.BackColor2 = System.Drawing.SystemColors.ControlDark;
appearance2.BackGradientStyle = Infragistics.Win.GradientStyle.Vertical;
appearance2.BorderColor = System.Drawing.SystemColors.Window;
this.grid.DisplayLayout.GroupByBox.Appearance = appearance2;
appearance3.ForeColor = System.Drawing.SystemColors.GrayText;
this.grid.DisplayLayout.GroupByBox.BandLabelAppearance = appearance3;
this.grid.DisplayLayout.GroupByBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
appearance4.BackColor = System.Drawing.SystemColors.ControlLightLight;
appearance4.BackColor2 = System.Drawing.SystemColors.Control;
appearance4.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
appearance4.ForeColor = System.Drawing.SystemColors.GrayText;
this.grid.DisplayLayout.GroupByBox.PromptAppearance = appearance4;
this.grid.DisplayLayout.MaxColScrollRegions = 1;
this.grid.DisplayLayout.MaxRowScrollRegions = 1;
appearance5.BackColor = System.Drawing.SystemColors.Window;
appearance5.ForeColor = System.Drawing.SystemColors.ControlText;
this.grid.DisplayLayout.Override.ActiveCellAppearance = appearance5;
appearance6.BackColor = System.Drawing.SystemColors.Highlight;
appearance6.ForeColor = System.Drawing.SystemColors.HighlightText;
this.grid.DisplayLayout.Override.ActiveRowAppearance = appearance6;
this.grid.DisplayLayout.Override.AllowAddNew = Infragistics.Win.UltraWinGrid.AllowAddNew.No;
this.grid.DisplayLayout.Override.AllowColMoving = Infragistics.Win.UltraWinGrid.AllowColMoving.NotAllowed;
this.grid.DisplayLayout.Override.AllowColSizing = Infragistics.Win.UltraWinGrid.AllowColSizing.None;
this.grid.DisplayLayout.Override.AllowColSwapping = Infragistics.Win.UltraWinGrid.AllowColSwapping.NotAllowed;
this.grid.DisplayLayout.Override.AllowDelete = Infragistics.Win.DefaultableBoolean.False;
this.grid.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False;
this.grid.DisplayLayout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.False;
this.grid.DisplayLayout.Override.BorderStyleCell = Infragistics.Win.UIElementBorderStyle.Dotted;
this.grid.DisplayLayout.Override.BorderStyleRow = Infragistics.Win.UIElementBorderStyle.Dotted;
appearance7.BackColor = System.Drawing.SystemColors.Window;
this.grid.DisplayLayout.Override.CardAreaAppearance = appearance7;
appearance8.BorderColor = System.Drawing.Color.Silver;
appearance8.FontData.BoldAsString = "True";
appearance8.TextTrimming = Infragistics.Win.TextTrimming.EllipsisCharacter;
this.grid.DisplayLayout.Override.CellAppearance = appearance8;
this.grid.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.EditAndSelectText;
this.grid.DisplayLayout.Override.CellPadding = 0;
appearance9.BackColor = System.Drawing.SystemColors.Control;
appearance9.BackColor2 = System.Drawing.SystemColors.ControlDark;
appearance9.BackGradientAlignment = Infragistics.Win.GradientAlignment.Element;
appearance9.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
appearance9.BorderColor = System.Drawing.SystemColors.Window;
this.grid.DisplayLayout.Override.GroupByRowAppearance = appearance9;
appearance10.TextHAlignAsString = "Left";
this.grid.DisplayLayout.Override.HeaderAppearance = appearance10;
this.grid.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.WindowsXPCommand;
appearance11.BackColor = System.Drawing.SystemColors.Window;
appearance11.BorderColor = System.Drawing.Color.Silver;
this.grid.DisplayLayout.Override.RowAppearance = appearance11;
this.grid.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.False;
this.grid.DisplayLayout.Override.RowSizing = Infragistics.Win.UltraWinGrid.RowSizing.Fixed;
this.grid.DisplayLayout.Override.SelectTypeCell = Infragistics.Win.UltraWinGrid.SelectType.None;
this.grid.DisplayLayout.Override.SelectTypeCol = Infragistics.Win.UltraWinGrid.SelectType.None;
this.grid.DisplayLayout.Override.SelectTypeRow = Infragistics.Win.UltraWinGrid.SelectType.None;
appearance12.BackColor = System.Drawing.SystemColors.ControlLight;
this.grid.DisplayLayout.Override.TemplateAddRowAppearance = appearance12;
this.grid.DisplayLayout.ScrollBounds = Infragistics.Win.UltraWinGrid.ScrollBounds.ScrollToFill;
this.grid.DisplayLayout.ScrollStyle = Infragistics.Win.UltraWinGrid.ScrollStyle.Immediate;
this.grid.Dock = System.Windows.Forms.DockStyle.Top;
this.grid.Location = new System.Drawing.Point(0, 0);
this.grid.Name = "grid";
this.grid.Size = new System.Drawing.Size(481, 222);
this.grid.TabIndex = 0;
this.grid.Text = "Link the following AyaNova objects:";
//
// btnOK
//
this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOK.BackColor = System.Drawing.SystemColors.Control;
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Location = new System.Drawing.Point(368, 303);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(102, 40);
this.btnOK.TabIndex = 30;
this.btnOK.UseVisualStyleBackColor = false;
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCancel.BackColor = System.Drawing.SystemColors.Control;
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(11, 303);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(102, 40);
this.btnCancel.TabIndex = 29;
this.btnCancel.UseVisualStyleBackColor = false;
//
// lblTO
//
this.lblTO.BackColorInternal = System.Drawing.SystemColors.Window;
this.lblTO.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblTO.Location = new System.Drawing.Point(0, 241);
this.lblTO.Name = "lblTO";
this.lblTO.Size = new System.Drawing.Size(577, 41);
this.lblTO.TabIndex = 31;
this.lblTO.Text = "ultraLabel1";
//
// LinkAyaObjectToQBConfirm
//
this.AcceptButton = this.btnOK;
this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(481, 349);
this.ControlBox = false;
this.Controls.Add(this.lblTO);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.grid);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "LinkAyaObjectToQBConfirm";
this.Text = "Link AyaNova object(s)";
this.Load += new System.EventHandler(this.LinkAyaObjectToQBConfirm_Load);
((System.ComponentModel.ISupportInitialize)(this.grid)).EndInit();
this.ResumeLayout(false);
}
#endregion
private DataTable dt=null;
private string _toObject="";
private void LinkAyaObjectToQBConfirm_Load(object sender, System.EventArgs e)
{
grid.DataSource=dt;
this.lblTO.Text=_toObject;
grid.DisplayLayout.CaptionVisible=DefaultableBoolean.True;
grid.DisplayLayout.CaptionAppearance.TextHAlign=HAlign.Left;
}
public DataTable DTRows
{
set
{
dt=value;
}
}
public string ToLabel
{
set
{
_toObject=value;
}
}
//-----------------------
}
}