Пример #1
0
        private void HeaderListBox_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            editor.FocusOnLineItem(sidebar.CurrentLineItem());
            editor.Focus();

            // save settings
            Settings.Default.LastFileChapter = sidebar.CurrentLine();
            Settings.Default.LastFileLineNum = editor.CurrentLine();
            Settings.Default.Save();
        }
Пример #2
0
        private void AutoScrollCheckBox_State_Changed(object sender, RoutedEventArgs e)
        {
            if (editor.LineCount() < 1)
            {
                AutoScrollCheckBox.IsChecked = false;
                return;
            }

            if (AutoScrollCheckBox.IsChecked == true)
            {
                autoScrollTimer.Interval = editor.CurrentLineItem().EstimateReadingTime(autoScrollSpeed);
                autoScrollTimer.Enabled  = true;
                autoScrollTimer.Start();
            }
            else
            {
                autoScrollTimer.Stop();
                autoScrollTimer.Enabled = false;
            }

            editor.Focus();
        }