public TailedRichTextBox(string filename, LoggerCategory loggerCategory, TabPage parentTabPage) { this.filename = filename; ShortcutsEnabled = true; Category = loggerCategory; parentTab = parentTabPage; previousSeekPosition = 0; previousFileSize = 0; ctxMenu = new ContextMenuStrip(); ContextMenuStrip = ctxMenu; if (Category != LoggerCategory.Custom) { ToolStripItem relocateItem = ctxMenu.Items.Add("Correct logfile location"); relocateItem.Click += new EventHandler(relocateItem_Click); } ctxMenu.Items.Add("-"); ToolStripItem searchItem = ctxMenu.Items.Add("Find"); searchItem.Click += new EventHandler(searchItem_Click); ctxMenu.Items.Add("-"); ToolStripItem cfgItem = ctxMenu.Items.Add("Configure search parameters"); cfgItem.Click += new EventHandler(Config_Click); ctxMenu.Items.Add("-"); ToolStripItem clearWindowItem = ctxMenu.Items.Add("Clear window"); clearWindowItem.Click += new EventHandler(clearWindowItem_Click); ToolStripItem clearFileItem = ctxMenu.Items.Add("Delete file"); clearFileItem.Click += new EventHandler(clearFileItem_Click); searchParams = new SearchParameters(); LoadSettings(); }
public frmSearchParams(string caption, SearchParameters searchParams) { InitializeComponent(); Text = caption; edSearch.Text = searchParams.searchStr; edColor.BackColor = searchParams.highlightColor; cbCase.Checked = searchParams.caseSensitive; }
public void GetConfig(SearchParameters searchParams) { searchParams.searchStr = edSearch.Text; searchParams.highlightColor = edColor.BackColor; searchParams.caseSensitive = cbCase.Checked; }