Esempio n. 1
0
        /// <summary>
        /// Show the Searches window to allow the user to enable/disable search terms
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void contextMenuSearchViewTerms_Click(object sender, EventArgs e)
        {
            LogFile lf = logs[tabControl.SelectedTab.Tag.ToString()];

            using (FormSearchTerms f = new FormSearchTerms(lf.Searches))
            {
                DialogResult dr = f.ShowDialog(this);
                if (dr == DialogResult.Cancel)
                {
                    return;
                }

                lf.Searches = f.Searches;
                lf.FilterIds.Clear();
                foreach (SearchCriteria sc in lf.Searches.Items)
                {
                    if (sc.Enabled == false)
                    {
                        continue;
                    }

                    lf.FilterIds.Add(sc.Id);
                }

                lf.List.Refresh();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Show the Searches window to allow the user to enable/disable search terms
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void contextMenuSearchViewTerms_Click(object sender, EventArgs e)
        {
            using (FormSearchTerms f = new FormSearchTerms(this.searches))
            {
                DialogResult dr = f.ShowDialog(this);
                if (dr == DialogResult.Cancel)
                {
                    return;
                }

                this.searches = f.Searches;

                filterIds.Clear();
                foreach (SearchCriteria sc in searches.Items)
                {
                    if (sc.Enabled == false)
                    {
                        continue;
                    }

                    filterIds.Add(sc.Id);
                }

                listLines.Refresh();
            }
        }