Ejemplo n.º 1
0
 /// <summary>
 /// Creates a new instance of the <see cref="LogMessageCustom"/> object.
 /// </summary>
 /// <param name="rawData">The data <see cref="Array"/> the new <see cref="LogMessageCustom"/> represents.</param>
 /// <param name="index">The index of the <see cref="LogMessage"/>.</param>
 /// <param name="columns">The <see cref="Columnizer"/> to use for parsing.</param>
 public LogMessageCustom(string rawData, int index, Columnizer columns)
     : base(rawData, index)
 {
     if (!ParseData(rawData))
       {
     throw new ApplicationException("Unable to parse the logger data.");
       }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FrmColumnizer"/> dialog with the specified parameters.
        /// </summary>
        /// <param name="columnizer">The <see cref="Columnizer"/> instance to edit.</param>
        public FrmColumnizer(Columnizer columnizer)
        {
            InitializeComponent();

              mColumnizer = columnizer ?? new Columnizer();

              // Apply a proper renderer for the embedded toolstrip.
              tsColumns.Renderer = new CustomToolStripSystemRenderer();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FrmColumnizerTest"/> dialog.
        /// </summary>
        /// <param name="columnizer">The <see cref="Columnizer"/> instance to test.</param>
        public FrmColumnizerTest(Columnizer columnizer)
        {
            mColumnizer = columnizer;

              InitializeComponent();
        }
Ejemplo n.º 4
0
        /// <summary>
        ///  Handles the Click event of the testr columnizer <see cref="ToolStripButton"/>.
        /// </summary>
        private void TsbTestColumnizerClick(object sender, System.EventArgs e)
        {
            // Create a new temporary columnizer object for testing.
              Columnizer tmpColumnizer = new Columnizer(txtName.Text);

              foreach (DataGridViewRow dgvRow in dgvColumns.Rows)
              {
            tmpColumnizer.Columns.Add(new LogColumn(
            (string)dgvRow.Cells[0].Value
              , (string)dgvRow.Cells[1].Value));
              }

              using (FrmColumnizerTest testColumnizerDlg = new FrmColumnizerTest(tmpColumnizer))
              {
            testColumnizerDlg.ShowDialog(this);
              }
        }