示例#1
0
        /// <summary>
        /// EventHandler called when the Column Options tool strip menu item is clicked.
        /// </summary>
        /// <param name="sender">The object that raised this event.</param>
        /// <param name="e">The arguments to this event.</param>
        private void columnOptionsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (OptionsDialog optionsDialog = new OptionsDialog(this.options))
            {
                ColumnSelectorOptions previousSettings = this.options.Clone();

                if (optionsDialog.ShowDialog(this) != System.Windows.Forms.DialogResult.OK)
                {
                    this.options = previousSettings;
                }
                else
                {
                    this.SelectColumn();
                }
            }
        }
示例#2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MainForm"/> class.
        /// </summary>
        public MainForm()
        {
            this.InitializeComponent();

            // Column Selector Options
            this.options =
                new ColumnSelectorOptions()
            {
                ColumnToSelect  = 0,
                ColumnDelimiter = '\t'
            };

            // Set our default font (Consolas)
            var currentFont =
                new Font("Consolas", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, (byte)0);

            this._SetTextBoxFont(currentFont);
        }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OptionsDialog"/> class.
 /// </summary>
 /// <param name="options">The <see cref="ColumnSelectorOptions"/> associated with this dialog.</param>
 public OptionsDialog(ColumnSelectorOptions options)
 {
     this.InitializeComponent();
     this.options = options;
     this.textBoxColumnToSelect.DataBindings.Add("Text", this.options, "ColumnToSelect");
 }