public FileLogSettingsDlg( ) { // // Required for Windows Form Designer support // InitializeComponent( ); // initialize the grid ColumnHeader headerBehaviour = new ColumnHeader( false ); FlatHeader headerVisual = new FlatHeader( true ); EditorTextBoxButton textEditor = new EditorTextBoxButton( typeof ( String ) ); EditorNumericUpDown numEditor = new EditorNumericUpDown( ); grid.Redim( 3, 2 ); grid[ 0, 0 ] = new SourceGrid2.Cells.Real.ColumnHeader( "Name", headerVisual, headerBehaviour ); grid[ 0, 1 ] = new SourceGrid2.Cells.Real.ColumnHeader( "Value", headerVisual, headerBehaviour ); grid[ 1, 0 ] = new Cell( "File", textEditor, headerVisual ); grid[ 1, 0 ].ToolTipText = "The path and file name to log to"; grid[ 1, 0 ].Invalidate( ); // TODO: place the old file name here grid[ 1, 1 ] = new Link( @"c:\", new PositionEventHandler( this.OpenFile ) ); grid[ 2, 0 ] = new Cell( "Size (Kb)", textEditor, headerVisual ); grid[ 2, 0 ].ToolTipText = "The maximum size of the log file."; grid[ 2, 0 ].Invalidate( ); grid[ 2, 1 ] = new Cell( 1024 * 100, numEditor ); numEditor.Maximum = new decimal( 1024 * 1024 ); numEditor.Minimum = new decimal( 0 ); grid.AutoStretchColumnsToFitWidth = true; grid.StretchColumnsToFitWidth( ); }
public EvLogSettingsDlg( ) { // // Required for Windows Form Designer support // InitializeComponent( ); ColumnHeader headerBehaviour = new ColumnHeader( false ); FlatHeader headerVisual = new FlatHeader( true ); EditorTextBoxButton textEditor = new EditorTextBoxButton( typeof ( String ) ); EditorNumericUpDown numEditor = new EditorNumericUpDown( ); grid.Redim( 3, 2 ); grid[ 0, 0 ] = new SourceGrid2.Cells.Real.ColumnHeader( "Name", headerVisual, headerBehaviour ); grid[ 0, 1 ] = new SourceGrid2.Cells.Real.ColumnHeader( "Value", headerVisual, headerBehaviour ); grid[ 1, 0 ] = new Cell( "EventSource Name", textEditor, headerVisual ); grid[ 1, 0 ].ToolTipText = "The path and file name to log to"; grid[ 1, 0 ].Invalidate( ); // TODO: place the old event source here grid[ 1, 1 ] = new Cell( "ShareIndex", textEditor ); grid.AutoStretchColumnsToFitWidth = true; grid.StretchColumnsToFitWidth( ); }