Exemplo n.º 1
0
        /// <summary>
        /// Handles the Click event of the edit filter <see cref="ToolStripItem"/>.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TsbEditFilterClick(object sender, EventArgs e)
        {
            if (dgvFilter.SelectedRows.Count > 0)
            {
                LogFilterColumn filterToEdit = dgvFilter.SelectedRows[0].Tag as LogFilterColumn;

                if (filterToEdit != null)
                {
                    using (FrmAddEditFilter addEditFilterDlg = new FrmAddEditFilter(mLogProvider, filterToEdit))
                    {
                        if (addEditFilterDlg.ShowDialog(this) == DialogResult.OK)
                        {
                            filterToEdit.Update(
                                addEditFilterDlg.IsFilterActive
                                , addEditFilterDlg.ColumnIndex
                                , addEditFilterDlg.OperatorIndex
                                , addEditFilterDlg.ExpressionRegex);

                            // Update the data grid.
                            UpdateLogFilters();

                            // Inform the filter handler about the changed filters.
                            mLogFilterHandler.FilterChanged();
                        }
                    }
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Handles the Click event of the add filter <see cref="ToolStripItem"/>.
        /// </summary>
        private void TsbAddFilterClick(object sender, EventArgs e)
        {
            using (FrmAddEditFilter addEditFilterDlg = new FrmAddEditFilter(mLogProvider, null))
            {
                if (addEditFilterDlg.ShowDialog(this) == DialogResult.OK)
                {
                    LogFilterColumn newLogFilter = new LogFilterColumn(
                        addEditFilterDlg.IsFilterActive
                        , addEditFilterDlg.ColumnIndex
                        , addEditFilterDlg.OperatorIndex
                        , addEditFilterDlg.ExpressionRegex);

                    mLogFilter.Add(newLogFilter);

                    // Update the data grid.
                    UpdateLogFilters();

                    // Inform the filter handler about the changed filters.
                    mLogFilterHandler.FilterChanged();
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Handles the Click event of the edit filter <see cref="ToolStripItem"/>.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TsbEditFilterClick(object sender, EventArgs e)
        {
            if (dgvFilter.SelectedRows.Count > 0)
              {
            LogFilterColumn filterToEdit = dgvFilter.SelectedRows[0].Tag as LogFilterColumn;

            if (filterToEdit != null)
            {
              using (FrmAddEditFilter addEditFilterDlg = new FrmAddEditFilter(mLogProvider, filterToEdit))
              {
            if (addEditFilterDlg.ShowDialog(this) == DialogResult.OK)
            {
              filterToEdit.Update(
                  addEditFilterDlg.IsFilterActive
                , addEditFilterDlg.ColumnIndex
                , addEditFilterDlg.OperatorIndex
                , addEditFilterDlg.ExpressionRegex);

              // Update the data grid.
              UpdateLogFilters();

              // Inform the filter handler about the changed filters.
              mLogFilterHandler.FilterChanged();
            }
              }
            }
              }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Handles the Click event of the add filter <see cref="ToolStripItem"/>.
        /// </summary>
        private void TsbAddFilterClick(object sender, EventArgs e)
        {
            using (FrmAddEditFilter addEditFilterDlg = new FrmAddEditFilter(mLogProvider, null))
              {
            if (addEditFilterDlg.ShowDialog(this) == DialogResult.OK)
            {
              LogFilterColumn newLogFilter = new LogFilterColumn(
              addEditFilterDlg.IsFilterActive
            , addEditFilterDlg.ColumnIndex
            , addEditFilterDlg.OperatorIndex
            , addEditFilterDlg.ExpressionRegex);

              mLogFilter.Add(newLogFilter);

              // Update the data grid.
              UpdateLogFilters();

              // Inform the filter handler about the changed filters.
              mLogFilterHandler.FilterChanged();
            }
              }
        }