Example #1
1
        public override void Run(ServiceController[] services, Form mainForm, DataGrid serviceGrid)
        {
            var addedMachine = QuickDialog2.DoQuickDialog("Add A Machine's Services", "Machine Name:",".","Pattern  ^(Enable|EPX):","");

            if (addedMachine != null)
            {

                MachineName = addedMachine[0];
                this.SearchPattern = addedMachine[1];
                try
                {
                    DataGrid dgrid = serviceGrid;

                    this.addView = (DataView)dgrid.DataSource;

                    CurrencyManager bm = (CurrencyManager)dgrid.BindingContext[this.addView];
                    ArrayList arrSelectedRows = new ArrayList();

                    this.addView = (DataView)bm.List;

                    mainForm.Invoke(new InvokeDelegate(this.AddMachineInGUIThread));

                    serviceGrid.Refresh();

                }
                finally
                {
                    addedMachine = null;
                    addView = null;
                }

            }
        }
 internal DataGridAutoFormatDialog(DataGrid dgrid)
 {
     this.dgrid = dgrid;
     base.ShowInTaskbar = false;
     this.dataSet.Locale = CultureInfo.InvariantCulture;
     this.dataSet.ReadXmlSchema(new XmlTextReader(new StringReader("<xsd:schema id=\"pulica\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\"><xsd:element name=\"Scheme\"><xsd:complexType><xsd:all><xsd:element name=\"SchemeName\" minOccurs=\"0\" type=\"xsd:string\"/><xsd:element name=\"SchemePicture\" minOccurs=\"0\" type=\"xsd:string\"/><xsd:element name=\"BorderStyle\" minOccurs=\"0\" type=\"xsd:string\"/><xsd:element name=\"FlatMode\" minOccurs=\"0\" type=\"xsd:string\"/><xsd:element name=\"Font\" minOccurs=\"0\" type=\"xsd:string\"/><xsd:element name=\"CaptionFont\" minOccurs=\"0\" type=\"xsd:string\"/><xsd:element name=\"HeaderFont\" minOccurs=\"0\" type=\"xsd:string\"/><xsd:element name=\"AlternatingBackColor\" minOccurs=\"0\" type=\"xsd:string\"/><xsd:element name=\"BackColor\" minOccurs=\"0\" type=\"xsd:string\"/><xsd:element name=\"BackgroundColor\" minOccurs=\"0\" type=\"xsd:string\"/><xsd:element name=\"CaptionForeColor\" minOccurs=\"0\" type=\"xsd:string\"/><xsd:element name=\"CaptionBackColor\" minOccurs=\"0\" type=\"xsd:string\"/><xsd:element name=\"ForeColor\" minOccurs=\"0\" type=\"xsd:string\"/><xsd:element name=\"GridLineColor\" minOccurs=\"0\" type=\"xsd:string\"/><xsd:element name=\"GridLineStyle\" minOccurs=\"0\" type=\"xsd:string\"/><xsd:element name=\"HeaderBackColor\" minOccurs=\"0\" type=\"xsd:string\"/><xsd:element name=\"HeaderForeColor\" minOccurs=\"0\" type=\"xsd:string\"/><xsd:element name=\"LinkColor\" minOccurs=\"0\" type=\"xsd:string\"/><xsd:element name=\"LinkHoverColor\" minOccurs=\"0\" type=\"xsd:string\"/><xsd:element name=\"ParentRowsBackColor\" minOccurs=\"0\" type=\"xsd:string\"/><xsd:element name=\"ParentRowsForeColor\" minOccurs=\"0\" type=\"xsd:string\"/><xsd:element name=\"SelectionForeColor\" minOccurs=\"0\" type=\"xsd:string\"/><xsd:element name=\"SelectionBackColor\" minOccurs=\"0\" type=\"xsd:string\"/></xsd:all></xsd:complexType></xsd:element></xsd:schema>")));
     this.dataSet.ReadXml(new StringReader("<pulica><Scheme><SchemeName>Default</SchemeName><SchemePicture>default.bmp</SchemePicture><BorderStyle></BorderStyle><FlatMode></FlatMode><CaptionFont></CaptionFont><Font></Font><HeaderFont></HeaderFont><AlternatingBackColor></AlternatingBackColor><BackColor></BackColor><CaptionForeColor></CaptionForeColor><CaptionBackColor></CaptionBackColor><ForeColor></ForeColor><GridLineColor></GridLineColor><GridLineStyle></GridLineStyle><HeaderBackColor></HeaderBackColor><HeaderForeColor></HeaderForeColor><LinkColor></LinkColor><LinkHoverColor></LinkHoverColor><ParentRowsBackColor></ParentRowsBackColor><ParentRowsForeColor></ParentRowsForeColor><SelectionForeColor></SelectionForeColor><SelectionBackColor></SelectionBackColor></Scheme><Scheme><SchemeName>Professional 1</SchemeName><SchemePicture>professional1.bmp</SchemePicture><CaptionFont>Verdana, 10pt</CaptionFont><AlternatingBackColor>LightGray</AlternatingBackColor><CaptionForeColor>Navy</CaptionForeColor><CaptionBackColor>White</CaptionBackColor><ForeColor>Black</ForeColor><BackColor>DarkGray</BackColor><GridLineColor>Black</GridLineColor><GridLineStyle>None</GridLineStyle><HeaderBackColor>Silver</HeaderBackColor><HeaderForeColor>Black</HeaderForeColor><LinkColor>Navy</LinkColor><LinkHoverColor>Blue</LinkHoverColor><ParentRowsBackColor>White</ParentRowsBackColor><ParentRowsForeColor>Black</ParentRowsForeColor><SelectionForeColor>White</SelectionForeColor><SelectionBackColor>Navy</SelectionBackColor></Scheme><Scheme><SchemeName>Professional 2</SchemeName><SchemePicture>professional2.bmp</SchemePicture><BorderStyle>FixedSingle</BorderStyle><FlatMode>True</FlatMode><CaptionFont>Tahoma, 8pt</CaptionFont><AlternatingBackColor>Gainsboro</AlternatingBackColor><BackColor>Silver</BackColor><CaptionForeColor>White</CaptionForeColor><CaptionBackColor>DarkSlateBlue</CaptionBackColor><ForeColor>Black</ForeColor><GridLineColor>White</GridLineColor><HeaderBackColor>DarkGray</HeaderBackColor><HeaderForeColor>Black</HeaderForeColor><LinkColor>DarkSlateBlue</LinkColor><LinkHoverColor>RoyalBlue</LinkHoverColor><ParentRowsBackColor>Black</ParentRowsBackColor><ParentRowsForeColor>White</ParentRowsForeColor><SelectionForeColor>White</SelectionForeColor><SelectionBackColor>DarkSlateBlue</SelectionBackColor></Scheme><Scheme><SchemeName>Professional 3</SchemeName><SchemePicture>professional3.bmp</SchemePicture><BorderStyle>None</BorderStyle><FlatMode>True</FlatMode><CaptionFont>Tahoma, 8pt, style=1</CaptionFont><HeaderFont>Tahoma, 8pt, style=1</HeaderFont><Font>Tahoma, 8pt</Font><AlternatingBackColor>LightGray</AlternatingBackColor><BackColor>Gainsboro</BackColor><BackgroundColor>Silver</BackgroundColor><CaptionForeColor>MidnightBlue</CaptionForeColor><CaptionBackColor>LightSteelBlue</CaptionBackColor><ForeColor>Black</ForeColor><GridLineColor>DimGray</GridLineColor><GridLineStyle>None</GridLineStyle><HeaderBackColor>MidnightBlue</HeaderBackColor><HeaderForeColor>White</HeaderForeColor><LinkColor>MidnightBlue</LinkColor><LinkHoverColor>RoyalBlue</LinkHoverColor><ParentRowsBackColor>DarkGray</ParentRowsBackColor><ParentRowsForeColor>Black</ParentRowsForeColor><SelectionForeColor>White</SelectionForeColor><SelectionBackColor>CadetBlue</SelectionBackColor></Scheme><Scheme><SchemeName>Professional 4</SchemeName><SchemePicture>professional4.bmp</SchemePicture><BorderStyle>None</BorderStyle><FlatMode>True</FlatMode><CaptionFont>Tahoma, 8pt, style=1</CaptionFont><HeaderFont>Tahoma, 8pt, style=1</HeaderFont><Font>Tahoma, 8pt</Font><AlternatingBackColor>Lavender</AlternatingBackColor><BackColor>WhiteSmoke</BackColor><BackgroundColor>LightGray</BackgroundColor><CaptionForeColor>MidnightBlue</CaptionForeColor><CaptionBackColor>LightSteelBlue</CaptionBackColor><ForeColor>MidnightBlue</ForeColor><GridLineColor>Gainsboro</GridLineColor><GridLineStyle>None</GridLineStyle><HeaderBackColor>MidnightBlue</HeaderBackColor><HeaderForeColor>WhiteSmoke</HeaderForeColor><LinkColor>Teal</LinkColor><LinkHoverColor>DarkMagenta</LinkHoverColor><ParentRowsBackColor>Gainsboro</ParentRowsBackColor><ParentRowsForeColor>MidnightBlue</ParentRowsForeColor><SelectionForeColor>WhiteSmoke</SelectionForeColor><SelectionBackColor>CadetBlue</SelectionBackColor></Scheme><Scheme><SchemeName>Classic</SchemeName><SchemePicture>classic.bmp</SchemePicture><BorderStyle>FixedSingle</BorderStyle><FlatMode>True</FlatMode><Font>Times New Roman, 9pt</Font><HeaderFont>Tahoma, 8pt, style=1</HeaderFont><CaptionFont>Tahoma, 8pt, style=1</CaptionFont><AlternatingBackColor>WhiteSmoke</AlternatingBackColor><BackColor>Gainsboro</BackColor><BackgroundColor>DarkGray</BackgroundColor><CaptionForeColor>Black</CaptionForeColor><CaptionBackColor>DarkKhaki</CaptionBackColor><ForeColor>Black</ForeColor><GridLineColor>Silver</GridLineColor><HeaderBackColor>Black</HeaderBackColor><HeaderForeColor>White</HeaderForeColor><LinkColor>DarkSlateBlue</LinkColor><LinkHoverColor>Firebrick</LinkHoverColor><ParentRowsForeColor>Black</ParentRowsForeColor><ParentRowsBackColor>LightGray</ParentRowsBackColor><SelectionForeColor>White</SelectionForeColor><SelectionBackColor>Firebrick</SelectionBackColor></Scheme><Scheme><SchemeName>Simple</SchemeName><SchemePicture>Simple.bmp</SchemePicture><BorderStyle>FixedSingle</BorderStyle><FlatMode>True</FlatMode><Font>Courier New, 9pt</Font><HeaderFont>Courier New, 10pt, style=1</HeaderFont><CaptionFont>Courier New, 10pt, style=1</CaptionFont><AlternatingBackColor>White</AlternatingBackColor><BackColor>White</BackColor><BackgroundColor>Gainsboro</BackgroundColor><CaptionForeColor>Black</CaptionForeColor><CaptionBackColor>Silver</CaptionBackColor><ForeColor>DarkSlateGray</ForeColor><GridLineColor>DarkGray</GridLineColor><HeaderBackColor>DarkGreen</HeaderBackColor><HeaderForeColor>White</HeaderForeColor><LinkColor>DarkGreen</LinkColor><LinkHoverColor>Blue</LinkHoverColor><ParentRowsForeColor>Black</ParentRowsForeColor><ParentRowsBackColor>Gainsboro</ParentRowsBackColor><SelectionForeColor>Black</SelectionForeColor><SelectionBackColor>DarkSeaGreen</SelectionBackColor></Scheme><Scheme><SchemeName>Colorful 1</SchemeName><SchemePicture>colorful1.bmp</SchemePicture><BorderStyle>FixedSingle</BorderStyle><FlatMode>True</FlatMode><Font>Tahoma, 8pt</Font><CaptionFont>Tahoma, 9pt, style=1</CaptionFont><HeaderFont>Tahoma, 9pt, style=1</HeaderFont><AlternatingBackColor>LightGoldenrodYellow</AlternatingBackColor><BackColor>White</BackColor><BackgroundColor>LightGoldenrodYellow</BackgroundColor><CaptionForeColor>DarkSlateBlue</CaptionForeColor><CaptionBackColor>LightGoldenrodYellow</CaptionBackColor><ForeColor>DarkSlateBlue</ForeColor><GridLineColor>Peru</GridLineColor><GridLineStyle>None</GridLineStyle><HeaderBackColor>Maroon</HeaderBackColor><HeaderForeColor>LightGoldenrodYellow</HeaderForeColor><LinkColor>Maroon</LinkColor><LinkHoverColor>SlateBlue</LinkHoverColor><ParentRowsBackColor>BurlyWood</ParentRowsBackColor><ParentRowsForeColor>DarkSlateBlue</ParentRowsForeColor><SelectionForeColor>GhostWhite</SelectionForeColor><SelectionBackColor>DarkSlateBlue</SelectionBackColor></Scheme><Scheme><SchemeName>Colorful 2</SchemeName><SchemePicture>colorful2.bmp</SchemePicture><BorderStyle>None</BorderStyle><FlatMode>True</FlatMode><Font>Tahoma, 8pt</Font><CaptionFont>Tahoma, 8pt, style=1</CaptionFont><HeaderFont>Tahoma, 8pt, style=1</HeaderFont><AlternatingBackColor>GhostWhite</AlternatingBackColor><BackColor>GhostWhite</BackColor><BackgroundColor>Lavender</BackgroundColor><CaptionForeColor>White</CaptionForeColor><CaptionBackColor>RoyalBlue</CaptionBackColor><ForeColor>MidnightBlue</ForeColor><GridLineColor>RoyalBlue</GridLineColor><HeaderBackColor>MidnightBlue</HeaderBackColor><HeaderForeColor>Lavender</HeaderForeColor><LinkColor>Teal</LinkColor><LinkHoverColor>DodgerBlue</LinkHoverColor><ParentRowsBackColor>Lavender</ParentRowsBackColor><ParentRowsForeColor>MidnightBlue</ParentRowsForeColor><SelectionForeColor>PaleGreen</SelectionForeColor><SelectionBackColor>Teal</SelectionBackColor></Scheme><Scheme><SchemeName>Colorful 3</SchemeName><SchemePicture>colorful3.bmp</SchemePicture><BorderStyle>None</BorderStyle><FlatMode>True</FlatMode><Font>Tahoma, 8pt</Font><CaptionFont>Tahoma, 8pt, style=1</CaptionFont><HeaderFont>Tahoma, 8pt, style=1</HeaderFont><AlternatingBackColor>OldLace</AlternatingBackColor><BackColor>OldLace</BackColor><BackgroundColor>Tan</BackgroundColor><CaptionForeColor>OldLace</CaptionForeColor><CaptionBackColor>SaddleBrown</CaptionBackColor><ForeColor>DarkSlateGray</ForeColor><GridLineColor>Tan</GridLineColor><GridLineStyle>Solid</GridLineStyle><HeaderBackColor>Wheat</HeaderBackColor><HeaderForeColor>SaddleBrown</HeaderForeColor><LinkColor>DarkSlateBlue</LinkColor><LinkHoverColor>Teal</LinkHoverColor><ParentRowsBackColor>OldLace</ParentRowsBackColor><ParentRowsForeColor>DarkSlateGray</ParentRowsForeColor><SelectionForeColor>White</SelectionForeColor><SelectionBackColor>SlateGray</SelectionBackColor></Scheme><Scheme><SchemeName>Colorful 4</SchemeName><SchemePicture>colorful4.bmp</SchemePicture><BorderStyle>FixedSingle</BorderStyle><FlatMode>True</FlatMode><Font>Tahoma, 8pt</Font><CaptionFont>Tahoma, 8pt, style=1</CaptionFont><HeaderFont>Tahoma, 8pt, style=1</HeaderFont><AlternatingBackColor>White</AlternatingBackColor><BackColor>White</BackColor><BackgroundColor>Ivory</BackgroundColor><CaptionForeColor>Lavender</CaptionForeColor><CaptionBackColor>DarkSlateBlue</CaptionBackColor><ForeColor>Black</ForeColor><GridLineColor>Wheat</GridLineColor><HeaderBackColor>CadetBlue</HeaderBackColor><HeaderForeColor>Black</HeaderForeColor><LinkColor>DarkSlateBlue</LinkColor><LinkHoverColor>LightSeaGreen</LinkHoverColor><ParentRowsBackColor>Ivory</ParentRowsBackColor><ParentRowsForeColor>Black</ParentRowsForeColor><SelectionForeColor>DarkSlateBlue</SelectionForeColor><SelectionBackColor>Wheat</SelectionBackColor></Scheme><Scheme><SchemeName>256 Color 1</SchemeName><SchemePicture>256_1.bmp</SchemePicture><Font>Tahoma, 8pt</Font><CaptionFont>Tahoma, 8 pt</CaptionFont><HeaderFont>Tahoma, 8pt</HeaderFont><AlternatingBackColor>Silver</AlternatingBackColor><BackColor>White</BackColor><CaptionForeColor>White</CaptionForeColor><CaptionBackColor>Maroon</CaptionBackColor><ForeColor>Black</ForeColor><GridLineColor>Silver</GridLineColor><HeaderBackColor>Silver</HeaderBackColor><HeaderForeColor>Black</HeaderForeColor><LinkColor>Maroon</LinkColor><LinkHoverColor>Red</LinkHoverColor><ParentRowsBackColor>Silver</ParentRowsBackColor><ParentRowsForeColor>Black</ParentRowsForeColor><SelectionForeColor>White</SelectionForeColor><SelectionBackColor>Maroon</SelectionBackColor></Scheme><Scheme><SchemeName>256 Color 2</SchemeName><SchemePicture>256_2.bmp</SchemePicture><BorderStyle>FixedSingle</BorderStyle><FlatMode>True</FlatMode><CaptionFont>Microsoft Sans Serif, 10 pt, style=1</CaptionFont><Font>Tahoma, 8pt</Font><HeaderFont>Tahoma, 8pt</HeaderFont><AlternatingBackColor>White</AlternatingBackColor><BackColor>White</BackColor><CaptionForeColor>White</CaptionForeColor><CaptionBackColor>Teal</CaptionBackColor><ForeColor>Black</ForeColor><GridLineColor>Silver</GridLineColor><HeaderBackColor>Black</HeaderBackColor><HeaderForeColor>White</HeaderForeColor><LinkColor>Purple</LinkColor><LinkHoverColor>Fuchsia</LinkHoverColor><ParentRowsBackColor>Gray</ParentRowsBackColor><ParentRowsForeColor>White</ParentRowsForeColor><SelectionForeColor>White</SelectionForeColor><SelectionBackColor>Maroon</SelectionBackColor></Scheme></pulica>"), XmlReadMode.IgnoreSchema);
     this.schemeTable = this.dataSet.Tables["Scheme"];
     this.IMBusy = true;
     this.InitializeComponent();
     this.schemeName.DataSource = this.schemeTable;
     this.AddDataToDataGrid();
     this.AddStyleSheetInformationToDataGrid();
     if (dgrid.Site != null)
     {
         IUIService service = (IUIService) dgrid.Site.GetService(typeof(IUIService));
         if (service != null)
         {
             Font font = (Font) service.Styles["DialogFont"];
             if (font != null)
             {
                 this.Font = font;
             }
         }
     }
     this.IMBusy = false;
 }
Example #3
0
        protected void CreateResultControls()
        {
            int resultTabIndex = 0;

            Panel panel = AddResultPanel("result 1");
            _gridResult1 = XtraGridControl.Create(dockStyle: DockStyle.Fill);
            panel.Controls.Add(_gridResult1);
            _grid1ResultTabIndex = resultTabIndex++;

            panel = AddResultPanel("result 2");
            _gridResult2 = DataGridViewControl.Create(dockStyle: DockStyle.Fill, showRowNumber: true);
            panel.Controls.Add(_gridResult2);
            _grid2ResultTabIndex = resultTabIndex++;

            panel = AddResultPanel("result 3");
            _gridResult3 = zForm.CreateDataGrid(dockStyle: DockStyle.Fill);
            panel.Controls.Add(_gridResult3);
            _grid3ResultTabIndex = resultTabIndex++;

            _gridResultTabIndex = _grid2ResultTabIndex;

            panel = AddResultPanel("result 4");
            _treeResult = new TreeView();
            _treeResult.Dock = DockStyle.Fill;
            panel.Controls.Add(_treeResult);
            _treeResultTabIndex = resultTabIndex++;

            panel = AddResultPanel("message");
            _logTextBox = LogTextBox.Create(dockStyle: DockStyle.Fill);
            panel.Controls.Add(_logTextBox);
            _messageResultTabIndex = resultTabIndex++;
        }
		/// <summary>
		/// Creates a new MyView object
		/// </summary>
		public SharpQueryDataView(ISchemaClass entity, int lines, SharpQuerySchemaClassCollection parameters)
		{
			if (entity == null)
			{
				throw new ArgumentNullException("entity");
			}

			TitleName = SharpQuery.SchemaClass.AbstractSharpQuerySchemaClass.RemoveBracket(entity.NormalizedName);

			this.pDataGrid = new DataGrid();
			this.pDataGrid.CaptionVisible = true;
			this.pDataGrid.DataMember = "";
			this.pDataGrid.Dock = System.Windows.Forms.DockStyle.Fill;
			this.pDataGrid.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.pDataGrid.Location = new System.Drawing.Point(0, 0);
			this.pDataGrid.Name = "dataGrid";
			this.pDataGrid.Size = new System.Drawing.Size(292, 266);
			this.pDataGrid.TabIndex = 0;
			this.Schema = entity;
			this.Datatable = this.Schema.Execute(lines, parameters);
			//			if ( this.Datatable == null )
			//			{
			//				WorkbenchSingleton.Workbench.ViewContentCollection.Remove( this );
			//			}
		}
Example #5
0
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.dataGrid1 = new System.Windows.Forms.DataGrid();
			((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
			this.SuspendLayout();
			// 
			// dataGrid1
			// 
			this.dataGrid1.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
				| System.Windows.Forms.AnchorStyles.Left) 
				| System.Windows.Forms.AnchorStyles.Right);
			this.dataGrid1.DataMember = "";
			this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGrid1.Location = new System.Drawing.Point(32, 24);
			this.dataGrid1.Name = "dataGrid1";
			this.dataGrid1.Size = new System.Drawing.Size(568, 192);
			this.dataGrid1.TabIndex = 0;
			// 
			// Form1
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(640, 245);
			this.Controls.AddRange(new System.Windows.Forms.Control[] {
																		  this.dataGrid1});
			this.Name = "Form1";
			this.Text = "Form1";
			this.Load += new System.EventHandler(this.Form1_Load);
			((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
			this.ResumeLayout(false);

		}
        /// <summary>
        /// This can be used to auto-size the specified column in the specified
        /// <see cref="System.Windows.Forms.DataGrid"/> control.
        /// </summary>
        /// <param name="dg">The data grid in which to size the column</param>
        /// <param name="col">The column to resize</param>
        internal static void AutoSizeColumn(DataGrid dg, int col)
        {
            MethodInfo mi = DataGridHelper.DataGridType(dg).GetMethod("ColAutoResize", BindingFlags.NonPublic |
                BindingFlags.Instance);

            mi.Invoke(dg, new object[] { col });
        }
Example #7
0
 internal DataGridCaption(DataGrid dataGrid) {
     this.dataGrid = dataGrid;
     this.downButtonVisible = dataGrid.ParentRowsVisible;
     colorMap[0].OldColor = Color.White;
     colorMap[0].NewColor = this.ForeColor;
     OnGridFontChanged();
 }
		public static void SetGridDataSource(DataGrid grid, object dataSource) {
			grid.DataSource = dataSource;
			DataGridTableStyle ts = new DataGridTableStyle((CurrencyManager) grid.BindingContext[dataSource]);
			grid.TableStyles.Clear();
			grid.TableStyles.Add(ts);
			ts.GridColumnStyles.Clear();
		}
		void InitializeComponent ()
		{
			dataGrid = new DataGrid ();
			SuspendLayout ();

			//
			// dataGrid
			//
			dataGrid.DataMember = "";
			dataGrid.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			dataGrid.Location = new System.Drawing.Point (10, 50);
			dataGrid.Name = "dataGrid";
			dataGrid.Size = new System.Drawing.Size (600, 500);


			//
			// MainForm
			//
			AutoScaleBaseSize = new System.Drawing.Size (5, 13);
			ClientSize = new System.Drawing.Size (700, 600);
			Controls.Add (dataGrid);
			Text = "SWF-Datagrid RealSample";
			Name = "MainForm";
			Load += new System.EventHandler (MainFormLoad);
			ResumeLayout (false);
		}
Example #10
0
        public static void SetStyle(DataGrid grid, Type rowObjectType)
        {
            if (grid == null || grid.DataSource == null)
                return;

            SetStyle(grid, grid.DataSource, DataGridDictionary.Instance.GetDataGridPropertys(rowObjectType.FullName), rowObjectType);
        }
Example #11
0
 private void InitializeComponent()
 {
     this._previewGrid = new DataGrid();
     this._previewButton = new MxButton();
     this._previewGrid.BeginInit();
     base.SuspendLayout();
     this._previewGrid.AllowNavigation = false;
     this._previewGrid.AllowSorting = false;
     this._previewGrid.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
     this._previewGrid.CaptionVisible = false;
     this._previewGrid.DataMember = "";
     this._previewGrid.HeaderForeColor = SystemColors.ControlText;
     this._previewGrid.Location = new Point(8, 0x10);
     this._previewGrid.Name = "_previewGrid";
     this._previewGrid.ReadOnly = true;
     this._previewGrid.Size = new Size(0x1dc, 0x120);
     this._previewGrid.TabIndex = 0;
     this._previewButton.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
     this._previewButton.FlatStyle = FlatStyle.System;
     this._previewButton.Location = new Point(0x198, 0x134);
     this._previewButton.Name = "_previewButton";
     this._previewButton.TabIndex = 1;
     this._previewButton.Text = "Test Query";
     this._previewButton.Click += new EventHandler(this.OnPreviewButtonClick);
     base.Controls.AddRange(new Control[] { this._previewButton, this._previewGrid });
     base.Caption = "Query Preview";
     base.Description = "Test your query by entering some test data.";
     base.Name = "QueryPreviewPanel";
     base.Size = new Size(0x1ec, 340);
     this._previewGrid.EndInit();
     base.ResumeLayout(false);
 }
		public GridTableStylesCollectionTests ()
		{
			DataGrid grid = new DataGrid ();
			GridTableStylesCollection sc = grid.TableStyles;
			sc.CollectionChanged += new CollectionChangeEventHandler (OnCollectionChanged);

			Console.WriteLine ("GridColumnStylesCollection default --- ");
			DumpGridTableStylesCollection (sc);

			Console.WriteLine ("Add single item");
			DataGridTableStyle ts = new DataGridTableStyle ();
			ts.MappingName = "Table1";
			sc.Add (ts);

			Console.WriteLine ("Add multipleitems");
			sc.AddRange (new DataGridTableStyle [] {new DataGridTableStyle (), new DataGridTableStyle ()});
			Console.WriteLine ("Remove At");
			sc.RemoveAt (2);

			Console.WriteLine ("Add single item");
			ts = new DataGridTableStyle ();
			ts.MappingName = "Table2";
			sc.Add (ts);

			for (int i = 0; i < sc.Count; i ++)
				Console.WriteLine ("Element {0}:{1}", i, sc[i].MappingName);

			sc.Remove (ts);
			Console.WriteLine ("Contains Table1 {0}", sc.Contains ("Table1"));
			Console.WriteLine ("Contains Table4 {0}", sc.Contains ("Table4"));
		}
Example #13
0
 /// <summary>
 /// The only creator ;)
 /// </summary>
 /// <param name="colName">The name of the column</param>
 /// <param name="dataSource">The datasource that contains the lookup table</param>
 /// <param name="displayMember">The member of the lookuptable to display</param>
 /// <param name="valueMember">The member of the lookuptable with the value</param>
 /// <param name="dataGrid">The datagrid parent of this column</param>
 public DataGridComboBoxColumn(string colName, DataTable dataSource, string displayMember, string valueMember, DataGrid dataGrid)
 {
     _comboBox = new ComboBox();
     _comboBox.Visible = false;
     _comboBox.DataSource = dataSource;
     _dataTable = dataSource;
     _comboBox.DisplayMember = displayMember;
     _displayMember = displayMember;
     _valueMember = valueMember;
     _comboBox.ValueMember = valueMember;
     _comboBox.DropDownStyle = ComboBoxStyle.DropDownList;
     Graphics _graphicsContext = dataGrid.CreateGraphics();
     float _widest = 0;
     SizeF _stringSize = new SizeF(0, 0);
     foreach (DataRow dr in dataSource.Rows)
     {
         _stringSize = _graphicsContext.MeasureString(dr[displayMember].ToString(), dataGrid.Font);
         if (_stringSize.Width > _widest)
         {
             _widest = _stringSize.Width;
         }
     }
     _comboBox.DropDownWidth = (int)Math.Ceiling(_widest);
     this.Width = _comboBox.DropDownWidth + 25; // Add the space for the dropdown arrow
     this.MappingName = colName;
     this.HeaderText = colName;
     dataGrid.Controls.Add(_comboBox);
 }
Example #14
0
        public override void Run(ServiceController[] services, Form mainForm, DataGrid serviceGrid)
        {
            foreach ( ServiceController service in services )
            {
                if (!needsRunAs)
                {
                    try
                    {
                        service.Start();
                    }
                    catch (Exception e)
                    {
                        needsRunAs = true;
                    }
                }

                if (needsRunAs)
                {
                    this.ScriptHelper.RunProgram("net", "start " + service.ServiceName, null, true);
                }

            }

            System.Threading.Thread.Sleep(500);

            this.RefreshGridFromService( mainForm, serviceGrid );
        }
Example #15
0
		public void TestDefaultValues ()
		{
			DataGrid dg = new DataGrid ();

			Assert.AreEqual (true, dg.AllowNavigation, "AllowNavigation property");
			Assert.AreEqual (true, dg.AllowSorting, "AllowSorting property");
			Assert.AreEqual (BorderStyle.Fixed3D, dg.BorderStyle, "BorderStyle property");
			Assert.AreEqual (string.Empty, dg.CaptionText, "CaptionText property");
			Assert.AreEqual (true, dg.CaptionVisible, "CaptionVisible property");
			Assert.AreEqual (true, dg.ColumnHeadersVisible, "ColumnHeadersVisible property");
			Assert.AreEqual (new DataGridCell (), dg.CurrentCell, "CurrentCell property");
			Assert.AreEqual (-1, dg.CurrentRowIndex, "CurrentRowIndex property");
			Assert.AreEqual (string.Empty, dg.DataMember, "DataMember property");
			Assert.AreEqual (null, dg.DataSource, "DataSource property");
			Assert.AreEqual (0, dg.FirstVisibleColumn, "FirstVisibleColumn property");
			Assert.AreEqual (false, dg.FlatMode, "FlatMode property");
			Assert.AreEqual (DataGridLineStyle.Solid, dg.GridLineStyle, "GridLineStyle property");
			Assert.AreEqual (DataGridParentRowsLabelStyle.Both, dg.ParentRowsLabelStyle, "ParentRowsLabelStyle property");
			Assert.AreEqual (true, dg.ParentRowsVisible, "ParentRowsVisible property");
			Assert.AreEqual (75, dg.PreferredColumnWidth, "PreferredColumnWidth property");
			//Assert.AreEqual (16, dg.PreferredRowHeight, "PreferredRowHeight property");
			Assert.AreEqual (false, dg.ReadOnly, "ReadOnly property");
			Assert.AreEqual (true, dg.RowHeadersVisible, "RowHeadersVisible property");
			Assert.AreEqual (35, dg.RowHeaderWidth, "RowHeaderWidth property");
			Assert.AreEqual (null, dg.Site, "Site property");
			Assert.AreEqual (string.Empty, dg.Text, "Text property");
			Assert.AreEqual (0, dg.VisibleColumnCount, "VisibleColumnCount property");

			// Font
			Assert.IsFalse (dg.Font.Bold, "Font Bold");
			Assert.IsTrue (dg.Font.IsSystemFont, "Font IsSystemFont");
			Assert.IsFalse (dg.Font.Italic, "Font Italic");
			Assert.IsFalse (dg.Font.Strikeout, "Font Strikeout");
			Assert.IsFalse (dg.Font.Underline, "Font Underline");
		}
Example #16
0
        public void Process( DataGrid grid )
        {
            UiConfiguration.DisableControls();

            try {
                mProcessor.ProcessMessageList( Messages );
            } catch (MessageListProcessorException e) {
                MessageBox.Show(
                    "The application failed to process the message list using the " + mProcessor.GetType().Name + " processor.\n\n" + e.ToString(),
                    "Fail to process messages",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Error
                );
            } catch (UnauthorizedException) {
                MessageBox.Show(
                    "DeskScop couldn't process your message list as the server refused your username or password.\n\nPlease ensure that they are correct!",
                    "Failed to read messages",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Exclamation
                );
            }

            MessageListRenderer.RenderMessageList( Messages, grid );

            if( Messages.Count > 0 )
                UiConfiguration.EnableControls();
        }
Example #17
0
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.dataGrid1 = new System.Windows.Forms.DataGrid();
			((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
			this.SuspendLayout();
			// 
			// dataGrid1
			// 
			this.dataGrid1.DataMember = "";
			this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGrid1.Location = new System.Drawing.Point(16, 16);
			this.dataGrid1.Name = "dataGrid1";
			this.dataGrid1.Size = new System.Drawing.Size(496, 232);
			this.dataGrid1.TabIndex = 0;
			// 
			// Form1
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(528, 262);
			this.Controls.AddRange(new System.Windows.Forms.Control[] {
																		  this.dataGrid1});
			this.Name = "Form1";
			this.Text = "Read Data Set";
			((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
			this.ResumeLayout(false);

		}
Example #18
0
 /// <summary>
 /// Creates a grid on the supplied tab page.
 /// </summary>
 private void CreateGrid(TabPage tab, DataTable datasource, string captiontext)
 {
     DataGrid grid = new DataGrid();
     grid.CaptionText = captiontext;
     grid.DataSource = datasource;
     tab.Controls.Add(grid);
 }
 /// <summary>
 /// �����֧������ķ��� - ��Ҫʹ�ô���༭���޸�
 /// �˷��������ݡ�
 /// </summary>
 private void InitializeComponent()
 {
     this.dataGrid1 = new System.Windows.Forms.DataGrid();
     ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
     this.SuspendLayout();
     //
     // dataGrid1
     //
     this.dataGrid1.CaptionVisible = false;
     this.dataGrid1.DataMember = "";
     this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
     this.dataGrid1.Location = new System.Drawing.Point(0, 0);
     this.dataGrid1.Name = "dataGrid1";
     this.dataGrid1.ReadOnly = true;
     this.dataGrid1.Size = new System.Drawing.Size(552, 272);
     this.dataGrid1.TabIndex = 0;
     this.dataGrid1.DoubleClick += new System.EventHandler(this.dataGrid1_DoubleClick);
     //
     // SelectTable
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
     this.ClientSize = new System.Drawing.Size(552, 269);
     this.Controls.Add(this.dataGrid1);
     this.Name = "SelectTable";
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text = "SelectTable";
     this.TopMost = true;
     this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.SelectTable_FormClosing);
     this.Load += new System.EventHandler(this.SelectTable_Load);
     ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
     this.ResumeLayout(false);
 }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ParameterHelperWindow));
     this.dataGrid1 = new System.Windows.Forms.DataGrid();
     ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
     this.SuspendLayout();
     //
     // dataGrid1
     //
     this.dataGrid1.DataMember = "";
     this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
     this.dataGrid1.Location = new System.Drawing.Point(16, 8);
     this.dataGrid1.Name = "dataGrid1";
     this.dataGrid1.Size = new System.Drawing.Size(360, 384);
     this.dataGrid1.TabIndex = 0;
     //
     // ParameterHelperWindow
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize = new System.Drawing.Size(394, 403);
     this.Controls.Add(this.dataGrid1);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
     this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.MaximizeBox = false;
     this.Name = "ParameterHelperWindow";
     this.Text = "ParameterHelperWindow";
     ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
     this.ResumeLayout(false);
 }
Example #21
0
        public void SizeColumnsToContent(DataGrid dataGrid)
        {
            Graphics Graphics = dataGrid.CreateGraphics();

            DataGridTableStyle tableStyle = new DataGridTableStyle();

                DataTable dataTable = (DataTable)dataGrid.DataSource;

                dataGrid.TableStyles.Clear();
                tableStyle.MappingName = dataTable.TableName;
                DataGridTextBoxColumn columnStyle;

                    DataColumn dataColumn = dataTable.Columns[0];
                    columnStyle = new DataGridTextBoxColumn();
                    columnStyle.HeaderText = dataColumn.ColumnName;
                    columnStyle.MappingName = dataColumn.ColumnName;
                    columnStyle.Width = 30;
                    tableStyle.GridColumnStyles.Add(columnStyle);

                    dataColumn = dataTable.Columns[1];
                    columnStyle = new DataGridTextBoxColumn();
                    columnStyle.HeaderText = dataColumn.ColumnName;
                    columnStyle.MappingName = dataColumn.ColumnName;
                    columnStyle.Width = 60;
                    tableStyle.GridColumnStyles.Add(columnStyle);

                    dataColumn = dataTable.Columns[2];
                    columnStyle = new DataGridTextBoxColumn();
                    columnStyle.HeaderText = dataColumn.ColumnName;
                    columnStyle.MappingName = dataColumn.ColumnName;
                    columnStyle.Width = 60;
                    tableStyle.GridColumnStyles.Add(columnStyle);

                    dataColumn = dataTable.Columns[3];
                    columnStyle = new DataGridTextBoxColumn();
                    columnStyle.HeaderText = dataColumn.ColumnName;
                    columnStyle.MappingName = dataColumn.ColumnName;
                    columnStyle.Width = 60;
                    tableStyle.GridColumnStyles.Add(columnStyle);

                    dataColumn = dataTable.Columns[4];
                    columnStyle = new DataGridTextBoxColumn();
                    columnStyle.HeaderText = dataColumn.ColumnName;
                    columnStyle.MappingName = dataColumn.ColumnName;
                    columnStyle.Width = 60;
                    tableStyle.GridColumnStyles.Add(columnStyle);

                    dataColumn = dataTable.Columns[5];
                    columnStyle = new DataGridTextBoxColumn();
                    columnStyle.HeaderText = dataColumn.ColumnName;
                    columnStyle.MappingName = dataColumn.ColumnName;
                    columnStyle.Width = 40;
                    tableStyle.GridColumnStyles.Add(columnStyle);

                dataGrid.TableStyles.Add(tableStyle);

                Graphics.Dispose();
        }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.label1 = new System.Windows.Forms.Label();
     this.dataGrid1 = new System.Windows.Forms.DataGrid();
     this.btnSave = new System.Windows.Forms.Button();
     this.btnCancel = new System.Windows.Forms.Button();
     ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
     this.SuspendLayout();
     //
     // label1
     //
     this.label1.Location = new System.Drawing.Point(8, 8);
     this.label1.Name = "label1";
     this.label1.TabIndex = 0;
     this.label1.Text = "Smtp Servers";
     //
     // dataGrid1
     //
     this.dataGrid1.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.dataGrid1.DataMember = "";
     this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
     this.dataGrid1.Location = new System.Drawing.Point(8, 32);
     this.dataGrid1.Name = "dataGrid1";
     this.dataGrid1.Size = new System.Drawing.Size(472, 368);
     this.dataGrid1.TabIndex = 1;
     //
     // btnSave
     //
     this.btnSave.Location = new System.Drawing.Point(168, 408);
     this.btnSave.Name = "btnSave";
     this.btnSave.TabIndex = 2;
     this.btnSave.Text = "Save";
     this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
     //
     // btnCancel
     //
     this.btnCancel.Location = new System.Drawing.Point(248, 408);
     this.btnCancel.Name = "btnCancel";
     this.btnCancel.TabIndex = 3;
     this.btnCancel.Text = "Cancel";
     this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
     //
     // SmtpServerAddressCollectionEditor
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize = new System.Drawing.Size(480, 438);
     this.Controls.Add(this.btnCancel);
     this.Controls.Add(this.btnSave);
     this.Controls.Add(this.dataGrid1);
     this.Controls.Add(this.label1);
     this.Name = "SmtpServerAddressCollectionEditor";
     this.Text = "SmtpServerAddressCollectionEditor";
     ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
     this.ResumeLayout(false);
 }
Example #23
0
		public DataGridDataSource (DataGrid owner, CurrencyManager list_manager, object data_source, string data_member, object view_data, DataGridCell current)
		{
			this.owner = owner;
			this.list_manager = list_manager;
			this.view = view_data;
			this.data_source = data_source;
			this.data_member = data_member;
			this.current = current;
		}
Example #24
0
 /// <summary>
 /// �����֧������ķ��� - ��Ҫʹ�ô���༭���޸�
 /// �˷��������ݡ�
 /// </summary>
 private void InitializeComponent()
 {
     this.dataGrid1 = new System.Windows.Forms.DataGrid();
     this.groupBox1 = new System.Windows.Forms.GroupBox();
     this.button1 = new System.Windows.Forms.Button();
     ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
     this.groupBox1.SuspendLayout();
     this.SuspendLayout();
     //
     // dataGrid1
     //
     this.dataGrid1.DataMember = "";
     this.dataGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
     this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
     this.dataGrid1.Location = new System.Drawing.Point(3, 17);
     this.dataGrid1.Name = "dataGrid1";
     this.dataGrid1.ReadOnly = true;
     this.dataGrid1.Size = new System.Drawing.Size(404, 380);
     this.dataGrid1.TabIndex = 0;
     //
     // groupBox1
     //
     this.groupBox1.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.groupBox1.Controls.Add(this.dataGrid1);
     this.groupBox1.Location = new System.Drawing.Point(8, 0);
     this.groupBox1.Name = "groupBox1";
     this.groupBox1.Size = new System.Drawing.Size(410, 400);
     this.groupBox1.TabIndex = 1;
     this.groupBox1.TabStop = false;
     //
     // button1
     //
     this.button1.Location = new System.Drawing.Point(320, 408);
     this.button1.Name = "button1";
     this.button1.Size = new System.Drawing.Size(80, 24);
     this.button1.TabIndex = 2;
     this.button1.Text = "�˳�";
     this.button1.Click += new System.EventHandler(this.button1_Click);
     //
     // frmGLDatas
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
     this.ClientSize = new System.Drawing.Size(426, 448);
     this.Controls.Add(this.button1);
     this.Controls.Add(this.groupBox1);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
     this.MaximizeBox = false;
     this.MinimizeBox = false;
     this.Name = "frmGLDatas";
     this.Text = "���ʱ�";
     this.Load += new System.EventHandler(this.frmGLDatas_Load);
     ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
     this.groupBox1.ResumeLayout(false);
     this.ResumeLayout(false);
 }
		/// <summary>
		/// This method is required for Windows Forms designer support.
		/// Do not change the method contents inside the source code editor. The Forms designer might
		/// not be able to load this method if it was changed manually.
		/// </summary>
		private void InitializeComponent() {
			this.btnRemoveInputParameter = new System.Windows.Forms.Button();
			this.btnAddInputParameter = new System.Windows.Forms.Button();
			this.gridInputParameters = new System.Windows.Forms.DataGrid();
			((System.ComponentModel.ISupportInitialize)(this.gridInputParameters)).BeginInit();
			this.SuspendLayout();
			// 
			// btnRemoveInputParameter
			// 
			this.btnRemoveInputParameter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
			this.btnRemoveInputParameter.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.btnRemoveInputParameter.Location = new System.Drawing.Point(80, 272);
			this.btnRemoveInputParameter.Name = "btnRemoveInputParameter";
			this.btnRemoveInputParameter.Size = new System.Drawing.Size(80, 23);
			this.btnRemoveInputParameter.TabIndex = 14;
			this.btnRemoveInputParameter.Text = "Remove";
			this.btnRemoveInputParameter.Visible = false;
			// 
			// btnAddInputParameter
			// 
			this.btnAddInputParameter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
			this.btnAddInputParameter.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.btnAddInputParameter.Location = new System.Drawing.Point(0, 272);
			this.btnAddInputParameter.Name = "btnAddInputParameter";
			this.btnAddInputParameter.Size = new System.Drawing.Size(80, 23);
			this.btnAddInputParameter.TabIndex = 13;
			this.btnAddInputParameter.Text = "Add";
			this.btnAddInputParameter.Click += new System.EventHandler(this.btnAddInputParameter_Click);
			// 
			// gridInputParameters
			// 
			this.gridInputParameters.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.gridInputParameters.BackgroundColor = System.Drawing.SystemColors.Window;
			this.gridInputParameters.CaptionVisible = false;
			this.gridInputParameters.DataMember = "";
			this.gridInputParameters.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.gridInputParameters.Location = new System.Drawing.Point(0, 0);
			this.gridInputParameters.Name = "gridInputParameters";
			this.gridInputParameters.ParentRowsVisible = false;
			this.gridInputParameters.PreferredColumnWidth = 110;
			this.gridInputParameters.Size = new System.Drawing.Size(272, 272);
			this.gridInputParameters.TabIndex = 12;
			// 
			// InputParameterCollectionEditor
			// 
			this.Controls.Add(this.btnRemoveInputParameter);
			this.Controls.Add(this.btnAddInputParameter);
			this.Controls.Add(this.gridInputParameters);
			this.Name = "InputParameterCollectionEditor";
			this.Size = new System.Drawing.Size(272, 296);
			this.Load += new System.EventHandler(this.InputParameterCollectionEditorLoad);
			((System.ComponentModel.ISupportInitialize)(this.gridInputParameters)).EndInit();
			this.ResumeLayout(false);
		}
Example #26
0
		public DataGridRelationshipRow (DataGrid owner)
		{
			this.owner = owner;
			IsSelected = false;
			IsExpanded = false;
			height = 0;
			VerticalOffset = 0;
			RelationHeight = 0;
			relation_area = Rectangle.Empty;
		}
        // private bool hasRelationships = false;
        // private Font linkFont = null;
        // private new DataGrid dataGrid; // Currently used only to obtain a Graphics object for measuring text

        // private Rectangle relationshipRect   = Rectangle.Empty;
        // private int       relationshipHeight = 0;

        // relationships
        // we should get this directly from the dgTable.
        // private ArrayList     relationships;
        // private int            focusedRelation = -1;
        // private int          focusedTextWidth;

        public DataGridRelationshipRow(DataGrid dataGrid, DataGridTableStyle dgTable, int rowNumber)
        : base(dataGrid, dgTable, rowNumber) {
            // this.dataGrid = dataGrid;
            // linkFont = dataGrid.LinkFont;
            // relationshipHeight = dataGrid.LinkFontHeight + this.dgTable.relationshipSpacing;

            // if (DataGrid.AllowNavigation) {
            //     hasRelationships = dgTable.RelationsList.Count > 0;
            // }
        }
        /// <summary>
        /// This can be used to auto-size all columns in the specified <see cref="System.Windows.Forms.DataGrid"/>
        /// control.
        /// </summary>
        /// <param name="dg">The data grid in which to size the columns</param>
        internal static void AutoSizeColumns(DataGrid dg)
        {
            MethodInfo mi = DataGridHelper.DataGridType(dg).GetMethod("ColAutoResize", BindingFlags.NonPublic |
                BindingFlags.Instance);

            DataGridTableStyle dgs = DataGridHelper.CurrentTableStyle(dg);

            for(int idx = 0; idx < dgs.GridColumnStyles.Count; idx++)
                mi.Invoke(dg, new object[] { idx });
        }
		public DataGridTextBox ()
		{
			isnavigating = true;
			grid = null;
			accepts_tab = true;
			accepts_return = false;

			SetStyle (ControlStyles.UserPaint | ControlStyles.StandardClick | ControlStyles.StandardDoubleClick, false);
			SetStyle (ControlStyles.FixedHeight, true);
		}
Example #30
0
	public MainForm ()
	{
		SuspendLayout ();
		// 
		// _dataGrid
		// 
		_dataGrid = new System.Windows.Forms.DataGrid ();
		_dataGrid.DataMember = "";
		_dataGrid.Dock = DockStyle.Top;
		_dataGrid.Height = 250;
		_dataGrid.TabIndex = 0;
		Controls.Add (_dataGrid);
		// 
		// _tabControl
		// 
		_tabControl = new TabControl ();
		_tabControl.Dock = DockStyle.Bottom;
		_tabControl.Height = 270;
		Controls.Add (_tabControl);
		// 
		// _bugDescriptionText1
		// 
		_bugDescriptionText1 = new TextBox ();
		_bugDescriptionText1.Multiline = true;
		_bugDescriptionText1.Dock = DockStyle.Fill;
		_bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture,
			"Steps to execute:{0}{0}" +
			"1. Click inside the \"kood\" cell of the first row.{0}{0}" +
			"2. Press Tab key 7 times.{0}{0}" +
			"3. Press Del key.{0}{0}" +
			"Expected result:{0}{0}" +
			"1. While pressing the Tab key, the entered cell scrolls into " +
			"view when necessary.{0}{0}" +
			"2. On step 3:{0}{0}" +
			"   * The content of the cell is cleared.{0}" +
			"   * The view does not shift away from the current cell.{0}" +
			"   * The cursor caret stays in the cell.",
			Environment.NewLine);
		// 
		// _tabPage1
		// 
		_tabPage1 = new TabPage ();
		_tabPage1.Text = "#1";
		_tabPage1.Controls.Add (_bugDescriptionText1);
		_tabControl.Controls.Add (_tabPage1);
		// 
		// MainForm
		// 
		ClientSize = new Size (400, 530);
		StartPosition = FormStartPosition.CenterScreen;
		Text = "bug #80047";
		Load += new EventHandler (MainForm_Load);
		ResumeLayout (false);
	}