search logic

This commit is contained in:
2009-02-04 19:51:36 +00:00
parent 408ba2ff26
commit ddc6a34966
11 changed files with 1964 additions and 1919 deletions

View File

@@ -28,256 +28,303 @@ namespace Volian.Controls.Library
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AnnotationDetails));
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
this.rtxbComment = new System.Windows.Forms.RichTextBox();
this.btnSaveAnnotation = new DevComponents.DotNetBar.ButtonX();
this.btnCancelAnnoation = new DevComponents.DotNetBar.ButtonX();
this.cbGridAnnoType = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.btnRemoveAnnotation = new DevComponents.DotNetBar.ButtonX();
this.btnAddAnnotation = new DevComponents.DotNetBar.ButtonX();
this.pannelAnnoEdit = new DevComponents.DotNetBar.PanelEx();
this.labelX1 = new DevComponents.DotNetBar.LabelX();
this.panelAnnoEditBtns = new DevComponents.DotNetBar.PanelEx();
this.expandableSplitter4 = new DevComponents.DotNetBar.ExpandableSplitter();
this.pannelAnnoGrid = new DevComponents.DotNetBar.PanelEx();
this.c1AnnotationGrid = new C1.Win.C1FlexGrid.C1FlexGrid();
this.itemAnnotationsBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.pannelAnnoEdit.SuspendLayout();
this.panelAnnoEditBtns.SuspendLayout();
this.pannelAnnoGrid.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.c1AnnotationGrid)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.itemAnnotationsBindingSource)).BeginInit();
this.SuspendLayout();
//
// superTooltip1
//
this.superTooltip1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
//
// rtxbComment
//
this.rtxbComment.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.rtxbComment.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.rtxbComment.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rtxbComment.Location = new System.Drawing.Point(87, 33);
this.rtxbComment.Name = "rtxbComment";
this.rtxbComment.Size = new System.Drawing.Size(489, 292);
this.superTooltip1.SetSuperTooltip(this.rtxbComment, new DevComponents.DotNetBar.SuperTooltipInfo("Annotation", "", "Enter the annotation information here.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.rtxbComment.TabIndex = 1;
this.rtxbComment.Text = "";
this.rtxbComment.TextChanged += new System.EventHandler(this.rtxbComment_TextChanged);
//
// btnSaveAnnotation
//
this.btnSaveAnnotation.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnSaveAnnotation.Enabled = false;
this.btnSaveAnnotation.Location = new System.Drawing.Point(419, 8);
this.btnSaveAnnotation.Name = "btnSaveAnnotation";
this.btnSaveAnnotation.Size = new System.Drawing.Size(71, 20);
this.superTooltip1.SetSuperTooltip(this.btnSaveAnnotation, new DevComponents.DotNetBar.SuperTooltipInfo("Save Changes", "", "This will save the new annotation or changes made to an existing annotation.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.btnSaveAnnotation.TabIndex = 9;
this.btnSaveAnnotation.Text = "Save";
this.btnSaveAnnotation.Click += new System.EventHandler(this.btnSaveAnnotation_Click);
//
// btnCancelAnnoation
//
this.btnCancelAnnoation.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnCancelAnnoation.Enabled = false;
this.btnCancelAnnoation.Location = new System.Drawing.Point(329, 8);
this.btnCancelAnnoation.Name = "btnCancelAnnoation";
this.btnCancelAnnoation.Size = new System.Drawing.Size(70, 20);
this.superTooltip1.SetSuperTooltip(this.btnCancelAnnoation, new DevComponents.DotNetBar.SuperTooltipInfo("Cancel", "", "This will cancel the changes made to the annotation text and type selection", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(145, 100)));
this.btnCancelAnnoation.TabIndex = 8;
this.btnCancelAnnoation.Text = "Cancel";
this.btnCancelAnnoation.Click += new System.EventHandler(this.btnCancelAnnoation_Click);
//
// cbGridAnnoType
//
this.cbGridAnnoType.DisplayMember = "Text";
this.cbGridAnnoType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cbGridAnnoType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbGridAnnoType.FlatStyle = System.Windows.Forms.FlatStyle.Standard;
this.cbGridAnnoType.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cbGridAnnoType.ForeColor = System.Drawing.SystemColors.WindowText;
this.cbGridAnnoType.Location = new System.Drawing.Point(134, 4);
this.cbGridAnnoType.Name = "cbGridAnnoType";
this.cbGridAnnoType.PreventEnterBeep = true;
this.cbGridAnnoType.Size = new System.Drawing.Size(165, 23);
this.superTooltip1.SetSuperTooltip(this.cbGridAnnoType, new DevComponents.DotNetBar.SuperTooltipInfo("Select Annotation Type", "", "This drop down list contains the posible annotation types.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.cbGridAnnoType.TabIndex = 7;
this.cbGridAnnoType.WatermarkBehavior = DevComponents.DotNetBar.eWatermarkBehavior.HideNonEmpty;
this.cbGridAnnoType.WatermarkText = "Select Annotation Type";
this.cbGridAnnoType.SelectedValueChanged += new System.EventHandler(this.cbGridAnnoType_SelectedValueChanged);
//
// btnRemoveAnnotation
//
this.btnRemoveAnnotation.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnRemoveAnnotation.Location = new System.Drawing.Point(6, 34);
this.btnRemoveAnnotation.Name = "btnRemoveAnnotation";
this.btnRemoveAnnotation.Size = new System.Drawing.Size(71, 20);
this.superTooltip1.SetSuperTooltip(this.btnRemoveAnnotation, new DevComponents.DotNetBar.SuperTooltipInfo("Remove Annotation", "", "This will remove the currently selected annotation.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.btnRemoveAnnotation.TabIndex = 4;
this.btnRemoveAnnotation.Text = "Remove";
this.btnRemoveAnnotation.Click += new System.EventHandler(this.btnRemoveAnnotation_Click);
//
// btnAddAnnotation
//
this.btnAddAnnotation.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnAddAnnotation.Location = new System.Drawing.Point(6, 4);
this.btnAddAnnotation.Name = "btnAddAnnotation";
this.btnAddAnnotation.Size = new System.Drawing.Size(71, 20);
this.superTooltip1.SetSuperTooltip(this.btnAddAnnotation, new DevComponents.DotNetBar.SuperTooltipInfo("Add New Annotation", "", "This button will create a new annotation.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.btnAddAnnotation.TabIndex = 3;
this.btnAddAnnotation.Text = "Add";
this.btnAddAnnotation.Click += new System.EventHandler(this.btnAddAnnotation_Click);
//
// pannelAnnoEdit
//
this.pannelAnnoEdit.CanvasColor = System.Drawing.SystemColors.Control;
this.pannelAnnoEdit.Controls.Add(this.rtxbComment);
this.pannelAnnoEdit.Controls.Add(this.btnSaveAnnotation);
this.pannelAnnoEdit.Controls.Add(this.btnCancelAnnoation);
this.pannelAnnoEdit.Controls.Add(this.labelX1);
this.pannelAnnoEdit.Controls.Add(this.cbGridAnnoType);
this.pannelAnnoEdit.Controls.Add(this.panelAnnoEditBtns);
this.pannelAnnoEdit.Dock = System.Windows.Forms.DockStyle.Fill;
this.pannelAnnoEdit.Location = new System.Drawing.Point(548, 0);
this.pannelAnnoEdit.Name = "pannelAnnoEdit";
this.pannelAnnoEdit.Size = new System.Drawing.Size(576, 325);
this.pannelAnnoEdit.Style.Alignment = System.Drawing.StringAlignment.Center;
this.pannelAnnoEdit.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.pannelAnnoEdit.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.pannelAnnoEdit.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.pannelAnnoEdit.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.pannelAnnoEdit.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.pannelAnnoEdit.Style.GradientAngle = 90;
this.pannelAnnoEdit.TabIndex = 16;
this.pannelAnnoEdit.Text = "panelEx2";
this.pannelAnnoEdit.ThemeAware = true;
//
// labelX1
//
this.labelX1.AutoSize = true;
this.labelX1.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelX1.Location = new System.Drawing.Point(93, 8);
this.labelX1.Name = "labelX1";
this.labelX1.Size = new System.Drawing.Size(35, 17);
this.labelX1.TabIndex = 10;
this.labelX1.Text = "Type:";
//
// panelAnnoEditBtns
//
this.panelAnnoEditBtns.CanvasColor = System.Drawing.SystemColors.Control;
this.panelAnnoEditBtns.Controls.Add(this.btnRemoveAnnotation);
this.panelAnnoEditBtns.Controls.Add(this.btnAddAnnotation);
this.panelAnnoEditBtns.Dock = System.Windows.Forms.DockStyle.Left;
this.panelAnnoEditBtns.Location = new System.Drawing.Point(0, 0);
this.panelAnnoEditBtns.Name = "panelAnnoEditBtns";
this.panelAnnoEditBtns.Size = new System.Drawing.Size(87, 325);
this.panelAnnoEditBtns.Style.Alignment = System.Drawing.StringAlignment.Center;
this.panelAnnoEditBtns.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.panelAnnoEditBtns.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.panelAnnoEditBtns.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.panelAnnoEditBtns.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.panelAnnoEditBtns.Style.GradientAngle = 90;
this.panelAnnoEditBtns.TabIndex = 11;
this.panelAnnoEditBtns.ThemeAware = true;
//
// expandableSplitter4
//
this.expandableSplitter4.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(167)))), ((int)(((byte)(173)))), ((int)(((byte)(182)))));
this.expandableSplitter4.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.expandableSplitter4.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.expandableSplitter4.ExpandFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(167)))), ((int)(((byte)(173)))), ((int)(((byte)(182)))));
this.expandableSplitter4.ExpandFillColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.expandableSplitter4.ExpandLineColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.expandableSplitter4.ExpandLineColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemText;
this.expandableSplitter4.GripDarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.expandableSplitter4.GripDarkColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemText;
this.expandableSplitter4.GripLightColor = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(208)))), ((int)(((byte)(213)))));
this.expandableSplitter4.GripLightColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
this.expandableSplitter4.HotBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(151)))), ((int)(((byte)(61)))));
this.expandableSplitter4.HotBackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(184)))), ((int)(((byte)(94)))));
this.expandableSplitter4.HotBackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemPressedBackground2;
this.expandableSplitter4.HotBackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemPressedBackground;
this.expandableSplitter4.HotExpandFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(167)))), ((int)(((byte)(173)))), ((int)(((byte)(182)))));
this.expandableSplitter4.HotExpandFillColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.expandableSplitter4.HotExpandLineColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.expandableSplitter4.HotExpandLineColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemText;
this.expandableSplitter4.HotGripDarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(167)))), ((int)(((byte)(173)))), ((int)(((byte)(182)))));
this.expandableSplitter4.HotGripDarkColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.expandableSplitter4.HotGripLightColor = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(208)))), ((int)(((byte)(213)))));
this.expandableSplitter4.HotGripLightColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
this.expandableSplitter4.Location = new System.Drawing.Point(545, 0);
this.expandableSplitter4.Name = "expandableSplitter4";
this.expandableSplitter4.Size = new System.Drawing.Size(3, 325);
this.expandableSplitter4.Style = DevComponents.DotNetBar.eSplitterStyle.Office2007;
this.expandableSplitter4.TabIndex = 15;
this.expandableSplitter4.TabStop = false;
//
// pannelAnnoGrid
//
this.pannelAnnoGrid.CanvasColor = System.Drawing.SystemColors.Control;
this.pannelAnnoGrid.Controls.Add(this.c1AnnotationGrid);
this.pannelAnnoGrid.Dock = System.Windows.Forms.DockStyle.Left;
this.pannelAnnoGrid.Location = new System.Drawing.Point(0, 0);
this.pannelAnnoGrid.Name = "pannelAnnoGrid";
this.pannelAnnoGrid.Size = new System.Drawing.Size(545, 325);
this.pannelAnnoGrid.Style.Alignment = System.Drawing.StringAlignment.Center;
this.pannelAnnoGrid.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.pannelAnnoGrid.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.pannelAnnoGrid.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.pannelAnnoGrid.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.pannelAnnoGrid.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.pannelAnnoGrid.Style.GradientAngle = 90;
this.pannelAnnoGrid.TabIndex = 14;
this.pannelAnnoGrid.Text = "panelEx2";
this.pannelAnnoGrid.ThemeAware = true;
//
// c1AnnotationGrid
//
this.c1AnnotationGrid.AllowDragging = C1.Win.C1FlexGrid.AllowDraggingEnum.None;
this.c1AnnotationGrid.AllowEditing = false;
this.c1AnnotationGrid.AutoGenerateColumns = false;
this.c1AnnotationGrid.BackColor = System.Drawing.Color.Transparent;
this.c1AnnotationGrid.ColumnInfo = resources.GetString("c1AnnotationGrid.ColumnInfo");
this.c1AnnotationGrid.DataSource = this.itemAnnotationsBindingSource;
this.c1AnnotationGrid.Dock = System.Windows.Forms.DockStyle.Fill;
this.c1AnnotationGrid.ExtendLastCol = true;
this.c1AnnotationGrid.FocusRect = C1.Win.C1FlexGrid.FocusRectEnum.Raised;
this.c1AnnotationGrid.Location = new System.Drawing.Point(0, 0);
this.c1AnnotationGrid.Name = "c1AnnotationGrid";
this.c1AnnotationGrid.Rows.Count = 1;
this.c1AnnotationGrid.Rows.DefaultSize = 19;
this.c1AnnotationGrid.SelectionMode = C1.Win.C1FlexGrid.SelectionModeEnum.Row;
this.c1AnnotationGrid.Size = new System.Drawing.Size(545, 325);
this.c1AnnotationGrid.StyleInfo = resources.GetString("c1AnnotationGrid.StyleInfo");
this.c1AnnotationGrid.TabIndex = 0;
this.c1AnnotationGrid.EnterCell += new System.EventHandler(this.c1AnnotationGrid_EnterCell);
//
// itemAnnotationsBindingSource
//
this.itemAnnotationsBindingSource.DataSource = typeof(VEPROMS.CSLA.Library.ItemAnnotation);
//
// AnnotationDetails
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.pannelAnnoEdit);
this.Controls.Add(this.expandableSplitter4);
this.Controls.Add(this.pannelAnnoGrid);
this.Name = "AnnotationDetails";
this.Size = new System.Drawing.Size(1124, 325);
this.pannelAnnoEdit.ResumeLayout(false);
this.pannelAnnoEdit.PerformLayout();
this.panelAnnoEditBtns.ResumeLayout(false);
this.pannelAnnoGrid.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.c1AnnotationGrid)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.itemAnnotationsBindingSource)).EndInit();
this.ResumeLayout(false);
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
this.rtxbComment = new System.Windows.Forms.RichTextBox();
this.btnSaveAnnotation = new DevComponents.DotNetBar.ButtonX();
this.btnCancelAnnoation = new DevComponents.DotNetBar.ButtonX();
this.cbGridAnnoType = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.btnRemoveAnnotation = new DevComponents.DotNetBar.ButtonX();
this.btnAddAnnotation = new DevComponents.DotNetBar.ButtonX();
this.pannelAnnoEdit = new DevComponents.DotNetBar.PanelEx();
this.labelX1 = new DevComponents.DotNetBar.LabelX();
this.panelAnnoEditBtns = new DevComponents.DotNetBar.PanelEx();
this.expandableSplitter4 = new DevComponents.DotNetBar.ExpandableSplitter();
this.pannelAnnoGrid = new DevComponents.DotNetBar.PanelEx();
this.dgAnnotations = new DevComponents.DotNetBar.Controls.DataGridViewX();
this.myAnnotationTypeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dTSDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.userIDDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.searchTextDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.itemAnnotationsBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.pannelAnnoEdit.SuspendLayout();
this.panelAnnoEditBtns.SuspendLayout();
this.pannelAnnoGrid.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgAnnotations)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.itemAnnotationsBindingSource)).BeginInit();
this.SuspendLayout();
//
// superTooltip1
//
this.superTooltip1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
//
// rtxbComment
//
this.rtxbComment.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.rtxbComment.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.rtxbComment.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rtxbComment.Location = new System.Drawing.Point(87, 33);
this.rtxbComment.Name = "rtxbComment";
this.rtxbComment.Size = new System.Drawing.Size(489, 292);
this.superTooltip1.SetSuperTooltip(this.rtxbComment, new DevComponents.DotNetBar.SuperTooltipInfo("Annotation", "", "Enter the annotation information here.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.rtxbComment.TabIndex = 1;
this.rtxbComment.Text = "";
this.rtxbComment.TextChanged += new System.EventHandler(this.rtxbComment_TextChanged);
//
// btnSaveAnnotation
//
this.btnSaveAnnotation.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnSaveAnnotation.Enabled = false;
this.btnSaveAnnotation.Location = new System.Drawing.Point(419, 4);
this.btnSaveAnnotation.Name = "btnSaveAnnotation";
this.btnSaveAnnotation.Size = new System.Drawing.Size(71, 24);
this.superTooltip1.SetSuperTooltip(this.btnSaveAnnotation, new DevComponents.DotNetBar.SuperTooltipInfo("Save Changes", "", "This will save the new annotation or changes made to an existing annotation.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.btnSaveAnnotation.TabIndex = 9;
this.btnSaveAnnotation.Text = "Save";
this.btnSaveAnnotation.Click += new System.EventHandler(this.btnSaveAnnotation_Click);
//
// btnCancelAnnoation
//
this.btnCancelAnnoation.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnCancelAnnoation.Enabled = false;
this.btnCancelAnnoation.Location = new System.Drawing.Point(329, 4);
this.btnCancelAnnoation.Name = "btnCancelAnnoation";
this.btnCancelAnnoation.Size = new System.Drawing.Size(70, 24);
this.superTooltip1.SetSuperTooltip(this.btnCancelAnnoation, new DevComponents.DotNetBar.SuperTooltipInfo("Cancel", "", "This will cancel the changes made to the annotation text and type selection", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(145, 100)));
this.btnCancelAnnoation.TabIndex = 8;
this.btnCancelAnnoation.Text = "Cancel";
this.btnCancelAnnoation.Click += new System.EventHandler(this.btnCancelAnnoation_Click);
//
// cbGridAnnoType
//
this.cbGridAnnoType.DisplayMember = "Text";
this.cbGridAnnoType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cbGridAnnoType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbGridAnnoType.FlatStyle = System.Windows.Forms.FlatStyle.Standard;
this.cbGridAnnoType.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cbGridAnnoType.ForeColor = System.Drawing.SystemColors.WindowText;
this.cbGridAnnoType.Location = new System.Drawing.Point(134, 4);
this.cbGridAnnoType.Name = "cbGridAnnoType";
this.cbGridAnnoType.PreventEnterBeep = true;
this.cbGridAnnoType.Size = new System.Drawing.Size(165, 23);
this.superTooltip1.SetSuperTooltip(this.cbGridAnnoType, new DevComponents.DotNetBar.SuperTooltipInfo("Select Annotation Type", "", "This drop down list contains the posible annotation types.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.cbGridAnnoType.TabIndex = 7;
this.cbGridAnnoType.WatermarkBehavior = DevComponents.DotNetBar.eWatermarkBehavior.HideNonEmpty;
this.cbGridAnnoType.WatermarkText = "Select Annotation Type";
this.cbGridAnnoType.SelectedValueChanged += new System.EventHandler(this.cbGridAnnoType_SelectedValueChanged);
//
// btnRemoveAnnotation
//
this.btnRemoveAnnotation.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnRemoveAnnotation.Location = new System.Drawing.Point(6, 34);
this.btnRemoveAnnotation.Name = "btnRemoveAnnotation";
this.btnRemoveAnnotation.Size = new System.Drawing.Size(71, 24);
this.superTooltip1.SetSuperTooltip(this.btnRemoveAnnotation, new DevComponents.DotNetBar.SuperTooltipInfo("Remove Annotation", "", "This will remove the currently selected annotation.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.btnRemoveAnnotation.TabIndex = 4;
this.btnRemoveAnnotation.Text = "Remove";
this.btnRemoveAnnotation.Click += new System.EventHandler(this.btnRemoveAnnotation_Click);
//
// btnAddAnnotation
//
this.btnAddAnnotation.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnAddAnnotation.Location = new System.Drawing.Point(6, 4);
this.btnAddAnnotation.Name = "btnAddAnnotation";
this.btnAddAnnotation.Size = new System.Drawing.Size(71, 24);
this.superTooltip1.SetSuperTooltip(this.btnAddAnnotation, new DevComponents.DotNetBar.SuperTooltipInfo("Add New Annotation", "", "This button will create a new annotation.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.btnAddAnnotation.TabIndex = 3;
this.btnAddAnnotation.Text = "Add";
this.btnAddAnnotation.Click += new System.EventHandler(this.btnAddAnnotation_Click);
//
// pannelAnnoEdit
//
this.pannelAnnoEdit.CanvasColor = System.Drawing.SystemColors.Control;
this.pannelAnnoEdit.Controls.Add(this.rtxbComment);
this.pannelAnnoEdit.Controls.Add(this.btnSaveAnnotation);
this.pannelAnnoEdit.Controls.Add(this.btnCancelAnnoation);
this.pannelAnnoEdit.Controls.Add(this.labelX1);
this.pannelAnnoEdit.Controls.Add(this.cbGridAnnoType);
this.pannelAnnoEdit.Controls.Add(this.panelAnnoEditBtns);
this.pannelAnnoEdit.Dock = System.Windows.Forms.DockStyle.Fill;
this.pannelAnnoEdit.Location = new System.Drawing.Point(548, 0);
this.pannelAnnoEdit.Name = "pannelAnnoEdit";
this.pannelAnnoEdit.Size = new System.Drawing.Size(576, 325);
this.pannelAnnoEdit.Style.Alignment = System.Drawing.StringAlignment.Center;
this.pannelAnnoEdit.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.pannelAnnoEdit.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.pannelAnnoEdit.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.pannelAnnoEdit.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.pannelAnnoEdit.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.pannelAnnoEdit.Style.GradientAngle = 90;
this.pannelAnnoEdit.TabIndex = 16;
this.pannelAnnoEdit.Text = "panelEx2";
this.pannelAnnoEdit.ThemeAware = true;
//
// labelX1
//
this.labelX1.AutoSize = true;
this.labelX1.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelX1.Location = new System.Drawing.Point(93, 8);
this.labelX1.Name = "labelX1";
this.labelX1.Size = new System.Drawing.Size(35, 17);
this.labelX1.TabIndex = 10;
this.labelX1.Text = "Type:";
//
// panelAnnoEditBtns
//
this.panelAnnoEditBtns.CanvasColor = System.Drawing.SystemColors.Control;
this.panelAnnoEditBtns.Controls.Add(this.btnRemoveAnnotation);
this.panelAnnoEditBtns.Controls.Add(this.btnAddAnnotation);
this.panelAnnoEditBtns.Dock = System.Windows.Forms.DockStyle.Left;
this.panelAnnoEditBtns.Location = new System.Drawing.Point(0, 0);
this.panelAnnoEditBtns.Name = "panelAnnoEditBtns";
this.panelAnnoEditBtns.Size = new System.Drawing.Size(87, 325);
this.panelAnnoEditBtns.Style.Alignment = System.Drawing.StringAlignment.Center;
this.panelAnnoEditBtns.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.panelAnnoEditBtns.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.panelAnnoEditBtns.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.panelAnnoEditBtns.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.panelAnnoEditBtns.Style.GradientAngle = 90;
this.panelAnnoEditBtns.TabIndex = 11;
this.panelAnnoEditBtns.ThemeAware = true;
//
// expandableSplitter4
//
this.expandableSplitter4.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(207)))));
this.expandableSplitter4.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.expandableSplitter4.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.expandableSplitter4.ExpandFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(207)))));
this.expandableSplitter4.ExpandFillColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.expandableSplitter4.ExpandLineColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.expandableSplitter4.ExpandLineColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemText;
this.expandableSplitter4.GripDarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.expandableSplitter4.GripDarkColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemText;
this.expandableSplitter4.GripLightColor = System.Drawing.Color.FromArgb(((int)(((byte)(227)))), ((int)(((byte)(239)))), ((int)(((byte)(255)))));
this.expandableSplitter4.GripLightColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
this.expandableSplitter4.HotBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(151)))), ((int)(((byte)(61)))));
this.expandableSplitter4.HotBackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(184)))), ((int)(((byte)(94)))));
this.expandableSplitter4.HotBackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemPressedBackground2;
this.expandableSplitter4.HotBackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemPressedBackground;
this.expandableSplitter4.HotExpandFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(207)))));
this.expandableSplitter4.HotExpandFillColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.expandableSplitter4.HotExpandLineColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.expandableSplitter4.HotExpandLineColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemText;
this.expandableSplitter4.HotGripDarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(147)))), ((int)(((byte)(207)))));
this.expandableSplitter4.HotGripDarkColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.expandableSplitter4.HotGripLightColor = System.Drawing.Color.FromArgb(((int)(((byte)(227)))), ((int)(((byte)(239)))), ((int)(((byte)(255)))));
this.expandableSplitter4.HotGripLightColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
this.expandableSplitter4.Location = new System.Drawing.Point(545, 0);
this.expandableSplitter4.Name = "expandableSplitter4";
this.expandableSplitter4.Size = new System.Drawing.Size(3, 325);
this.expandableSplitter4.Style = DevComponents.DotNetBar.eSplitterStyle.Office2007;
this.expandableSplitter4.TabIndex = 15;
this.expandableSplitter4.TabStop = false;
//
// pannelAnnoGrid
//
this.pannelAnnoGrid.CanvasColor = System.Drawing.SystemColors.Control;
this.pannelAnnoGrid.Controls.Add(this.dgAnnotations);
this.pannelAnnoGrid.Dock = System.Windows.Forms.DockStyle.Left;
this.pannelAnnoGrid.Location = new System.Drawing.Point(0, 0);
this.pannelAnnoGrid.Name = "pannelAnnoGrid";
this.pannelAnnoGrid.Size = new System.Drawing.Size(545, 325);
this.pannelAnnoGrid.Style.Alignment = System.Drawing.StringAlignment.Center;
this.pannelAnnoGrid.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.pannelAnnoGrid.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.pannelAnnoGrid.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.pannelAnnoGrid.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.pannelAnnoGrid.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.pannelAnnoGrid.Style.GradientAngle = 90;
this.pannelAnnoGrid.TabIndex = 14;
this.pannelAnnoGrid.Text = "panelEx2";
this.pannelAnnoGrid.ThemeAware = true;
//
// dgAnnotations
//
this.dgAnnotations.AutoGenerateColumns = false;
this.dgAnnotations.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
this.dgAnnotations.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
this.dgAnnotations.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgAnnotations.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.myAnnotationTypeDataGridViewTextBoxColumn,
this.dTSDataGridViewTextBoxColumn,
this.userIDDataGridViewTextBoxColumn,
this.searchTextDataGridViewTextBoxColumn});
this.dgAnnotations.DataSource = this.itemAnnotationsBindingSource;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgAnnotations.DefaultCellStyle = dataGridViewCellStyle3;
this.dgAnnotations.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgAnnotations.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229)))));
this.dgAnnotations.HighlightSelectedColumnHeaders = false;
this.dgAnnotations.Location = new System.Drawing.Point(0, 0);
this.dgAnnotations.MultiSelect = false;
this.dgAnnotations.Name = "dgAnnotations";
this.dgAnnotations.RowHeadersVisible = false;
this.dgAnnotations.RowTemplate.Height = 24;
this.dgAnnotations.RowTemplate.ReadOnly = true;
this.dgAnnotations.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.dgAnnotations.SelectAllSignVisible = false;
this.dgAnnotations.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgAnnotations.Size = new System.Drawing.Size(545, 325);
this.dgAnnotations.TabIndex = 1;
this.dgAnnotations.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgAnnotations_CellClick);
//
// myAnnotationTypeDataGridViewTextBoxColumn
//
this.myAnnotationTypeDataGridViewTextBoxColumn.DataPropertyName = "MyAnnotationType";
this.myAnnotationTypeDataGridViewTextBoxColumn.HeaderText = "Type";
this.myAnnotationTypeDataGridViewTextBoxColumn.Name = "myAnnotationTypeDataGridViewTextBoxColumn";
this.myAnnotationTypeDataGridViewTextBoxColumn.Width = 65;
//
// dTSDataGridViewTextBoxColumn
//
this.dTSDataGridViewTextBoxColumn.DataPropertyName = "DTS";
this.dTSDataGridViewTextBoxColumn.HeaderText = "Date";
this.dTSDataGridViewTextBoxColumn.Name = "dTSDataGridViewTextBoxColumn";
this.dTSDataGridViewTextBoxColumn.Width = 63;
//
// userIDDataGridViewTextBoxColumn
//
this.userIDDataGridViewTextBoxColumn.DataPropertyName = "UserID";
this.userIDDataGridViewTextBoxColumn.HeaderText = "User";
this.userIDDataGridViewTextBoxColumn.Name = "userIDDataGridViewTextBoxColumn";
this.userIDDataGridViewTextBoxColumn.Width = 63;
//
// searchTextDataGridViewTextBoxColumn
//
this.searchTextDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.searchTextDataGridViewTextBoxColumn.DataPropertyName = "SearchText";
this.searchTextDataGridViewTextBoxColumn.HeaderText = "Description";
this.searchTextDataGridViewTextBoxColumn.Name = "searchTextDataGridViewTextBoxColumn";
//
// itemAnnotationsBindingSource
//
this.itemAnnotationsBindingSource.DataSource = typeof(VEPROMS.CSLA.Library.ItemAnnotation);
//
// AnnotationDetails
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.pannelAnnoEdit);
this.Controls.Add(this.expandableSplitter4);
this.Controls.Add(this.pannelAnnoGrid);
this.Name = "AnnotationDetails";
this.Size = new System.Drawing.Size(1124, 325);
this.pannelAnnoEdit.ResumeLayout(false);
this.pannelAnnoEdit.PerformLayout();
this.panelAnnoEditBtns.ResumeLayout(false);
this.pannelAnnoGrid.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgAnnotations)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.itemAnnotationsBindingSource)).EndInit();
this.ResumeLayout(false);
}
@@ -294,8 +341,12 @@ namespace Volian.Controls.Library
private DevComponents.DotNetBar.ButtonX btnRemoveAnnotation;
private DevComponents.DotNetBar.ButtonX btnAddAnnotation;
private DevComponents.DotNetBar.ExpandableSplitter expandableSplitter4;
private DevComponents.DotNetBar.PanelEx pannelAnnoGrid;
private C1.Win.C1FlexGrid.C1FlexGrid c1AnnotationGrid;
private DevComponents.DotNetBar.PanelEx pannelAnnoGrid;
private System.Windows.Forms.BindingSource itemAnnotationsBindingSource;
private DevComponents.DotNetBar.Controls.DataGridViewX dgAnnotations;
private System.Windows.Forms.DataGridViewTextBoxColumn myAnnotationTypeDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn dTSDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn userIDDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn searchTextDataGridViewTextBoxColumn;
}
}

View File

@@ -12,8 +12,11 @@ namespace Volian.Controls.Library
public partial class AnnotationDetails : UserControl
{
#region Properties
private ItemInfo _CurrentItem = null;
private AnnotationSearch _AnnotationSearch;
private bool _LoadingAnnotation = false;
private bool _LoadingGrid = false;
private ItemInfo _CurrentItem = null;
private DisplaySearch _AnnotationSearch;
private AnnotationInfoList _Annotations;
public AnnotationInfoList Annotations
@@ -43,7 +46,7 @@ namespace Volian.Controls.Library
}
_CurrentAnnotation = value;
InitializeAnnotation();
}
}
}
private bool _AnnotationDirty = false;
@@ -94,9 +97,10 @@ namespace Volian.Controls.Library
private bool _AddingAnnotation = false;
private void btnAddAnnotation_Click(object sender, EventArgs e)
{
c1AnnotationGrid.Row = -1;
dgAnnotations.ClearSelection();
CurrentAnnotation = null;
_AddingAnnotation = true;
rtxbComment.Focus();
}
private void btnRemoveAnnotation_Click(object sender, EventArgs e)
@@ -143,18 +147,16 @@ namespace Volian.Controls.Library
AnnotationDirty = true;
}
private bool _LoadingAnnotation = false;
private bool _LoadingGrid = false;
private void c1AnnotationGrid_EnterCell(object sender, EventArgs e)
{
if (!_LoadingGrid) // Only set the Current Annotation when not loading the grid
{
if ((_Annotations != null) && (c1AnnotationGrid.Row > 0))
CurrentAnnotation = _Annotations[c1AnnotationGrid.Row - 1];
else
CurrentAnnotation = null;
}
}
private void dgAnnotations_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (!_LoadingGrid) // Only set the Current Annotation when not loading the grid
{
if ((_Annotations != null) && (dgAnnotations.Rows.Count > 0))
CurrentAnnotation = _Annotations[dgAnnotations.CurrentRow.Index];
else
CurrentAnnotation = null;
}
}
private void rtxbComment_TextChanged(object sender, EventArgs e)
{
@@ -166,15 +168,17 @@ namespace Volian.Controls.Library
#region LoadControlData
public void SetupAnnotations(AnnotationSearch annotation)
{
_AnnotationSearch = annotation; // reference the Annotation Search to update its lists
public void SetupAnnotations(DisplaySearch annosrch)
{
_LoadingAnnotation = true;
_AnnotationSearch = annosrch; // reference the Annotation Search to update its lists
cbGridAnnoType.DisplayMember = "Name";
cbGridAnnoType.ValueMember = "TypeId";
cbGridAnnoType.DataSource = AnnotationTypeInfoList.Get().Clone();
cbGridAnnoType.SelectedIndex = -1; //don't pre-select an annotation type
}
cbGridAnnoType.DisplayMember = "Name";
cbGridAnnoType.ValueMember = "TypeId";
cbGridAnnoType.DataSource = AnnotationTypeInfoList.Get().Clone();
cbGridAnnoType.SelectedIndex = -1; //don't pre-select an annotation type
_LoadingAnnotation = false;
}
private void InitializeAnnotation()
{
@@ -195,8 +199,8 @@ namespace Volian.Controls.Library
}
_LoadingAnnotation = false;
AnnotationDirty = false;
if (!_LoadingGrid)
rtxbComment.Focus(); // Set the focus to the comment text
if (!_LoadingGrid)
rtxbComment.Focus(); // Set the focus to the comment text
}
#endregion
@@ -219,6 +223,7 @@ namespace Volian.Controls.Library
_LoadingGrid = true;
_Annotations = (_CurrentItem == null) ? null : _CurrentItem.ItemAnnotations;
itemAnnotationsBindingSource.DataSource = _Annotations;
dgAnnotations.Refresh();
if ((CurrentAnnotation == null || (_CurrentItem.ItemID != CurrentAnnotation.ItemID)))
{
if (_Annotations != null && _Annotations.Count > 0)
@@ -237,21 +242,23 @@ namespace Volian.Controls.Library
public void FindCurrentAnnotation()
{
int row = 0;
if (CurrentAnnotation != null)
{
if (_Annotations != null)
{
foreach (AnnotationInfo ai in _Annotations)
{
if (ai.AnnotationID == CurrentAnnotation.AnnotationID)
{
row = _Annotations.IndexOf(ai) + 1;
break;
}
}
}
}
c1AnnotationGrid.Select(row, 0, true); // position to the corresponding grid row
if (CurrentAnnotation != null)
{
if (_Annotations != null)
{
foreach (AnnotationInfo ai in _Annotations)
{
if (ai.AnnotationID == CurrentAnnotation.AnnotationID)
{
row = _Annotations.IndexOf(ai);// +1;
break;
}
}
dgAnnotations.Rows[row].Selected = true;
if (!_LoadingGrid)
dgAnnotations.FirstDisplayedScrollingRowIndex = row;
}
}
}
private void SaveAnnotation()
@@ -290,5 +297,6 @@ namespace Volian.Controls.Library
}
#endregion
}
}

View File

@@ -120,13 +120,7 @@
<metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="c1AnnotationGrid.ColumnInfo" xml:space="preserve">
<value>18,1,0,0,0,95,Columns:0{Visible:False;} 1{Width:107;Name:"ErrorMessage";Caption:"ErrorMessage";Visible:False;AllowEditing:False;Style:"DataType:System.String;TextAlign:LeftCenter;";} 2{Width:100;Name:"AnnotationID";Caption:"AnnotationID";Visible:False;AllowEditing:False;Style:"DataType:System.Int32;TextAlign:RightCenter;";} 3{Width:173;Name:"MyAnnotation";Caption:"MyAnnotation";Visible:False;AllowEditing:False;Style:"DataType:VEPROMS.CSLA.Library.Annotation;TextAlign:GeneralCenter;";} 4{Width:66;Name:"TypeID";Caption:"TypeID";Visible:False;AllowEditing:False;Style:"DataType:System.Int32;TextAlign:RightCenter;";} 5{Width:145;Name:"MyAnnotationType";Caption:"Type";AllowDragging:False;AllowEditing:False;Style:"DataType:VEPROMS.CSLA.Library.AnnotationType;TextAlign:GeneralCenter;";} 6{Width:66;Name:"RtfText";Caption:"RtfText";Visible:False;Style:"DataType:System.String;TextAlign:LeftCenter;";} 7{Width:50;Name:"DTS";Caption:"Date";AllowDragging:False;AllowEditing:False;Style:"Format:""d"";DataType:System.DateTime;TextAlign:LeftCenter;";} 8{Width:64;Name:"UserID";Caption:"User";AllowDragging:False;AllowEditing:False;Style:"DataType:System.String;TextAlign:LeftCenter;";} 9{Width:91;Name:"SearchText";Caption:"Description";AllowDragging:False;AllowEditing:False;Style:"DataType:System.String;TextAlign:LeftCenter;";} 10{Width:62;Name:"Config";Caption:"Config";Visible:False;Style:"DataType:System.String;TextAlign:LeftCenter;";} 11{Width:160;Name:"AnnotationType_Name";Caption:"AnnotationType_Name";Visible:False;AllowEditing:False;Style:"DataType:System.String;TextAlign:LeftCenter;";} 12{Width:163;Name:"AnnotationType_Config";Caption:"AnnotationType_Config";Visible:False;AllowEditing:False;Style:"DataType:System.String;TextAlign:LeftCenter;";} 13{Width:151;Name:"AnnotationType_DTS";Caption:"AnnotationType_DTS";Visible:False;AllowEditing:False;Style:"Format:""d"";DataType:System.DateTime;TextAlign:LeftCenter;";} 14{Width:166;Name:"AnnotationType_UserID";Caption:"AnnotationType_UserID";Visible:False;AllowEditing:False;Style:"DataType:System.String;TextAlign:LeftCenter;";} 15{Width:123;Name:"HasBrokenRules";Caption:"HasBrokenRules";Visible:False;AllowEditing:False;Style:"DataType:VEPROMS.CSLA.Library.IVEHasBrokenRules;TextAlign:GeneralCenter;";} 16{Name:"BrokenRules";Caption:"BrokenRules";Visible:False;AllowEditing:False;Style:"DataType:Csla.Validation.BrokenRulesCollection;TextAlign:GeneralCenter;";} 17{Width:123;Name:"CurrentEditLevel";Caption:"CurrentEditLevel";Visible:False;AllowEditing:False;Style:"DataType:System.Int32;TextAlign:RightCenter;";} </value>
</data>
<metadata name="itemAnnotationsBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>156, 17</value>
</metadata>
<data name="c1AnnotationGrid.StyleInfo" xml:space="preserve">
<value>Normal{Font:Microsoft Sans Serif, 7.8pt;BackColor:Transparent;} Alternate{} Fixed{BackColor:Control;ForeColor:ControlText;Border:Raised,1,Black,Both;BackgroundImageLayout:Hide;} Highlight{BackColor:Highlight;ForeColor:HighlightText;} Focus{} Editor{} Search{BackColor:Highlight;ForeColor:HighlightText;} Frozen{BackColor:Beige;} NewRow{} EmptyArea{BackColor:Transparent;Border:Flat,1,ControlDarkDark,Both;} SelectedColumnHeader{} SelectedRowHeader{} GrandTotal{BackColor:Black;ForeColor:White;} Subtotal0{BackColor:ControlDarkDark;ForeColor:White;} Subtotal1{BackColor:ControlDarkDark;ForeColor:White;} Subtotal2{BackColor:ControlDarkDark;ForeColor:White;} Subtotal3{BackColor:ControlDarkDark;ForeColor:White;} Subtotal4{BackColor:ControlDarkDark;ForeColor:White;} Subtotal5{BackColor:ControlDarkDark;ForeColor:White;} </value>
</data>
</root>

View File

@@ -28,65 +28,66 @@ namespace Volian.Controls.Library
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.cbAnnoType = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.lbResults = new System.Windows.Forms.ListBox();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
this.SuspendLayout();
//
// cbAnnoType
//
this.cbAnnoType.DisplayMember = "Text";
this.cbAnnoType.Dock = System.Windows.Forms.DockStyle.Top;
this.cbAnnoType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cbAnnoType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbAnnoType.FormattingEnabled = true;
this.cbAnnoType.ItemHeight = 17;
this.cbAnnoType.Location = new System.Drawing.Point(0, 0);
this.cbAnnoType.Name = "cbAnnoType";
this.cbAnnoType.Size = new System.Drawing.Size(239, 23);
this.superTooltip1.SetSuperTooltip(this.cbAnnoType, new DevComponents.DotNetBar.SuperTooltipInfo("Select Annotation Search Type", "", "This drop down list contains the posible annotation types. When selected, a list" +
" of the annotions of that type will be displayed below.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.cbAnnoType.TabIndex = 1;
this.cbAnnoType.WatermarkBehavior = DevComponents.DotNetBar.eWatermarkBehavior.HideNonEmpty;
this.cbAnnoType.WatermarkText = "Select Annotation Type";
this.cbAnnoType.SelectedValueChanged += new System.EventHandler(this.cbAnnoType_SelectedValueChanged);
//
// lbResults
//
this.lbResults.Dock = System.Windows.Forms.DockStyle.Fill;
this.lbResults.FormattingEnabled = true;
this.lbResults.HorizontalScrollbar = true;
this.lbResults.ItemHeight = 16;
this.lbResults.Location = new System.Drawing.Point(0, 23);
this.lbResults.Name = "lbResults";
this.lbResults.Size = new System.Drawing.Size(239, 372);
this.lbResults.TabIndex = 2;
this.lbResults.MouseMove += new System.Windows.Forms.MouseEventHandler(this.lbResults_MouseMove);
this.lbResults.SelectedValueChanged += new System.EventHandler(this.lbResults_SelectedValueChanged);
//
// superTooltip1
//
this.superTooltip1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
//
// AnnotationSearch
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.lbResults);
this.Controls.Add(this.cbAnnoType);
this.Name = "AnnotationSearch";
this.Size = new System.Drawing.Size(239, 397);
this.ResumeLayout(false);
this.components = new System.ComponentModel.Container();
this.cbAnnoType = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.lbResults = new System.Windows.Forms.ListBox();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
this.SuspendLayout();
//
// cbAnnoType
//
this.cbAnnoType.DisplayMember = "Text";
this.cbAnnoType.Dock = System.Windows.Forms.DockStyle.Top;
this.cbAnnoType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cbAnnoType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbAnnoType.FormattingEnabled = true;
this.cbAnnoType.ItemHeight = 17;
this.cbAnnoType.Location = new System.Drawing.Point(0, 0);
this.cbAnnoType.Name = "cbAnnoType";
this.cbAnnoType.Size = new System.Drawing.Size(239, 23);
this.superTooltip1.SetSuperTooltip(this.cbAnnoType, new DevComponents.DotNetBar.SuperTooltipInfo("Select Annotation Search Type", "", "This drop down list contains the posible annotation types. When selected, a list" +
" of the annotions of that type will be displayed below.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.cbAnnoType.TabIndex = 1;
this.cbAnnoType.WatermarkBehavior = DevComponents.DotNetBar.eWatermarkBehavior.HideNonEmpty;
this.cbAnnoType.WatermarkText = "Select Annotation Type";
this.cbAnnoType.SelectedValueChanged += new System.EventHandler(this.cbAnnoType_SelectedValueChanged);
//
// lbResults
//
this.lbResults.Dock = System.Windows.Forms.DockStyle.Fill;
this.lbResults.FormattingEnabled = true;
this.lbResults.HorizontalScrollbar = true;
this.lbResults.ItemHeight = 16;
this.lbResults.Location = new System.Drawing.Point(0, 23);
this.lbResults.Name = "lbResults";
this.lbResults.Size = new System.Drawing.Size(239, 372);
this.lbResults.TabIndex = 2;
this.lbResults.Visible = false;
this.lbResults.MouseMove += new System.Windows.Forms.MouseEventHandler(this.lbResults_MouseMove);
this.lbResults.SelectedValueChanged += new System.EventHandler(this.lbResults_SelectedValueChanged);
//
// superTooltip1
//
this.superTooltip1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
//
// AnnotationSearch
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.lbResults);
this.Controls.Add(this.cbAnnoType);
this.Name = "AnnotationSearch";
this.Size = new System.Drawing.Size(239, 397);
this.ResumeLayout(false);
}
#endregion
private DevComponents.DotNetBar.Controls.ComboBoxEx cbAnnoType;
private System.Windows.Forms.ListBox lbResults;
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.ListBox lbResults;
private System.Windows.Forms.ToolTip toolTip1;
private DevComponents.DotNetBar.SuperTooltip superTooltip1;
}
}

View File

@@ -35,32 +35,32 @@ namespace Volian.Controls.Library
#region Events
private void cbAnnoType_SelectedValueChanged(object sender, EventArgs e)
{
UpdateAnnotationSearchResults();
UpdateAnnotationSearchResults();
}
private void lbResults_SelectedValueChanged(object sender, EventArgs e)
{
if (!_LoadingList)
{
_AnnotationDetails.CurrentAnnotation = lbResults.SelectedValue as AnnotationInfo;
if (_AnnotationDetails.CurrentAnnotation != null)
_TabControl.OpenItem(_AnnotationDetails.CurrentAnnotation.MyItem); // open the corresponding procedure text
_AnnotationDetails.FindCurrentAnnotation(); // position to corresponding row in annotation grid
}
}
private void lbResults_SelectedValueChanged(object sender, EventArgs e)
{
if (!_LoadingList)
{
_AnnotationDetails.CurrentAnnotation = lbResults.SelectedValue as AnnotationInfo;
if (_AnnotationDetails.CurrentAnnotation != null)
_TabControl.OpenItem(_AnnotationDetails.CurrentAnnotation.MyItem); // open the corresponding procedure text
_AnnotationDetails.FindCurrentAnnotation(); // position to corresponding row in annotation grid
}
}
private int LastResultsMouseOverIndex = -1;
private void lbResults_MouseMove(object sender, MouseEventArgs e)
{
int ResultsMouseOverIndex = lbResults.IndexFromPoint(e.Location);
if (ResultsMouseOverIndex != -1 && ResultsMouseOverIndex != LastResultsMouseOverIndex)
{
AnnotationInfo ai = lbResults.Items[ResultsMouseOverIndex] as AnnotationInfo;
toolTip1.SetToolTip(lbResults, ai.MyItem.Path); // display location of corresponding procedure text in a tooltip
LastResultsMouseOverIndex = ResultsMouseOverIndex;
}
private int LastResultsMouseOverIndex = -1;
private void lbResults_MouseMove(object sender, MouseEventArgs e)
{
int ResultsMouseOverIndex = lbResults.IndexFromPoint(e.Location);
if (ResultsMouseOverIndex != -1 && ResultsMouseOverIndex != LastResultsMouseOverIndex)
{
AnnotationInfo ai = lbResults.Items[ResultsMouseOverIndex] as AnnotationInfo;
toolTip1.SetToolTip(lbResults, ai.MyItem.Path); // display location of corresponding procedure text in a tooltip
LastResultsMouseOverIndex = ResultsMouseOverIndex;
}
}
}
#endregion
#region LoadControlData
@@ -69,22 +69,22 @@ namespace Volian.Controls.Library
_AnnotationDetails = annotationDetails;
cbAnnoType.DisplayMember = "Name";
cbAnnoType.DataSource = AnnotationTypeInfoList.Get();
lbResults.MouseMove += new MouseEventHandler(lbResults_MouseMove);
lbResults.MouseMove += new MouseEventHandler(lbResults_MouseMove);
_TabControl = tc;
}
#endregion
#region VariousSupportMethods
public void UpdateAnnotationSearchResults()
{
AnnotationTypeInfo ati = cbAnnoType.SelectedValue as AnnotationTypeInfo;
_LoadingList = true;
lbResults.DisplayMember = "SearchText";
lbResults.DataSource = ati.AnnotationTypeAnnotations;
lbResults.SelectedIndex = -1;
LastResultsMouseOverIndex = -1;
_LoadingList = false;
}
public void UpdateAnnotationSearchResults()
{
AnnotationTypeInfo ati = cbAnnoType.SelectedValue as AnnotationTypeInfo;
_LoadingList = true;
lbResults.DisplayMember = "SearchText";
lbResults.DataSource = ati.AnnotationTypeAnnotations;
lbResults.SelectedIndex = -1;
LastResultsMouseOverIndex = -1;
_LoadingList = false;
}
#endregion
}