예제 #1
0
 /// <summary>
 /// Moves to the caret and brings the view to the <paramref name="run"/>
 /// </summary>
 /// <param name="run">run to move to</param>
 private void MoveToRun(Run run)
 {
     if (run == null)
     {
         return;
     }
     
     run.BringIntoView();
     this.HelpText.CaretPosition = run.ElementEnd;
     this.HelpText.Focus();
 }
예제 #2
0
        public static void changeLightRun(Run runLight)
        {
            bool isLocked = false;

            if (MainWindow.s_pW.m_isCanEdit == false)
            {
                isLocked = true;
            }
            else
            {
                MainWindow.s_pW.m_isCanEdit = false;
            }
            if (MainWindow.s_pW.m_lastSelRun != null)
            {
                //<text>
                MainWindow.s_pW.m_lastSelRun.Background = null;
            }
            MainWindow.s_pW.m_lastSelRun = runLight;
            //<text>
            runLight.Background = new SolidColorBrush(XmlControl.s_arrTextColor[(int)XmlControl.XmlTextColorType.BCK_CURSEL]);
            if (isLocked == false)
            {
                MainWindow.s_pW.m_isCanEdit = true;
            }
            runLight.BringIntoView();
        }