Exemple #1
0
        private void UpdateInterface()
        {
            if (PagesTab.SelectedIndex == -1)
            {
                RepeatButton.Enabled = false;
                BackButton.Enabled   = false;
                RowsNumbers.Text     = "";
                return;
            }

            RepeatButton.Enabled = Pages[PagesTab.SelectedIndex].CanRepeat;
            BackButton.Enabled   = Pages[PagesTab.SelectedIndex].CanCancel;

            string numbers = "";
            int    start   = CodeField.GetLineFromCharIndex(CodeField.GetCharIndexFromPosition(new Point(0, 0)));
            int    end     = CodeField.GetLineFromCharIndex(CodeField.GetCharIndexFromPosition(new Point(CodeField.Size.Width, CodeField.Size.Height)));

            for (int i = start; i <= end; i++)
            {
                numbers += (i + 1) + ":\n";
            }

            RowsNumbers.Text = numbers;

            codeHandler.HandleText();
        }
Exemple #2
0
        private void UpdateInterface()
        {
            if (PagesTab.SelectedIndex == -1)
            {
                RepeatButton.Enabled = false;
                CancelButton.Enabled = false;
                RowsNumbers.Text     = "";
                return;
            }

            RepeatButton.Enabled = Pages[PagesTab.SelectedIndex].CanRepeat;
            CancelButton.Enabled = Pages[PagesTab.SelectedIndex].CanCancel;

            UpdateRowsNumbers();
            codeHandler.HandleText();
        }