private void colorHighlightToolStripMenuItem_Click(object sender, EventArgs e) { var mi = sender as ToolStripMenuItem; string colorName = mi.Text.Replace("&", ""); Color c = Color.FromName(colorName); Action a = Action.CreateHighlightAction(Txt.SelectedText, c); AddAction(a); }
private void PreInitializeComponent() { // This call is required by the Windows.Forms Form Designer. InitializeComponent(); // TODO: Add any initialization after the InitializeComponent call _action = Action.CreateHighlightAction("", Color.White); txtExample.Font = (Font)_viewer.Font.Clone(); ShowHeaders = _showHeaders; }
private void SetPaused(bool paused) { if (_log.Enabled) { _log.Debug(GetHashCode(), "SetPaused"); } if (paused) { var a = new List <Action>(); a.Add(Action.CreateHighlightAction("", Color.Silver)); AddEvent(new LogEvent("----- PAUSED -----", a, false, "n/a")); } _paused = paused; if (!paused) { Txt.BeginUpdate(); int pos = 0; _progress.Visible = true; int max = PauseCache.Count; while (PauseCache.Count > 0) { pos++; SetProgress(pos, max); InvokedAddEvent(PauseCache.Dequeue(), false); } var a = new List <Action>(); a.Add(Action.CreateHighlightAction("", Color.Silver)); AddEvent(new LogEvent("----- UNPAUSED -----", a, false, "n/a")); Txt.EndUpdate(); Refresh(); Application.DoEvents(); _progress.Visible = false; } }