Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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;
        }
Esempio n. 3
0
        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;
            }
        }